Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
Web Services, XML
Definizione Array in WSDL. Aiutoooooo!!!!
domenica 18 novembre 2007 - 09.07
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
sordello83
Profilo
| Newbie
1
messaggi | Data Invio:
dom 18 nov 2007 - 09:07
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
Torna su
Stanze Forum
Elenco Threads
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 !