Definizione Array in WSDL. Aiutoooooo!!!!

domenica 18 novembre 2007 - 09.07

sordello83 Profilo | Newbie

Ciao a tutti, volevo chiedervi gentilmente se qualcuno può aiutarmi nel risolvere un problemino che ormai da qualche giorno mi rende inquieto.

Sto lavorando per la mia tesi con AXIS2. Nell'ambito della scrittura del file WSDL ho la necessità di definire un complexType Array che viene ritornato al client in seguito all'invocazione del servizio.

La definizione del complexType è la seguente:

<complexType name="ArrayOfString">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="string[]"/>
</restriction>
</complexContent>
</complexType>


Altro frammento del WSDL in cui ArrayOfString viene richiamato è:

<xs:element name="getDataResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true"
type="xs:ArrayOfString"/>
</xs:sequence>
</xs:complexType>
</xs:element>

Altre parti dello schema WSDL coinvolte sono:

<wsdl:definitions
xmlns:axis2="http://EmsService.test/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:ns="http://EmsService.test/xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://EmsService.test/">

ed ancora:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://EmsService.test/xsd"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding">

Il mio problema sta nel fatto che compilando mi viene fuori questo errore:

java.lang.RuntimeException: Cannot unwrap element {http://EmsService.test/xsd}getDataResponse: no abstract mapping definition found for type {http://www.w3.org/2001/XMLSchema}ArrayOfString (used by element {http://EmsService.test/xsd}return)

Il mio sospetto è che non essendo l'array un tipo di dato standard, potrebbe non esser definito in xs="http://www.w3.org/2001/XMLSchema". Per cui suppongo che si dovrebbe definire magari: xxx:"http://......." in cui viene definito l'array. Come fare questo usando axis in localhost?

Qualcuno può aiutarmi?

Vi ringrazio!!!Ciao
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5