You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Filippo Diotalevi <fi...@yahoo.it> on 2005/09/23 15:37:11 UTC

(newbie) SAXException: SimpleDeserializer encountered a child element

Hi, I'm developing a ws with Axis. I've got a wsdl
(attached at the end of this mail), which works fine
when I use it to generate (wsdl2java) a rpc/encoded
ws. 
On the contrary, I need to make a document/literal ws
and I have a lot of problems. 

Can anyone help me? Thank you in advance!

Here are some details:

Using axis-generated test client, and I have the
following exeception:
---
AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which
is NOT expected, in something it was trying to
deserialize.
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}hostname:sirius

org.xml.sax.SAXException: SimpleDeserializer
encountered a child element, which is NOT expected, in
something it was trying to deserialize.
	at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
	at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
	at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
---


Looking at the log, I see that the client creates the
soap message:
---
?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><request
xmlns="urn:MyNameSpace"><credenzialiRichiesta
xmlns=""><ns1:password
xmlns:ns1="http://ws.model.rc.nec">d</ns1:password><ns2:username
xmlns:ns2="http://ws.model.rc.nec">k</ns2:username></credenzialiRichiesta><idRisorsa
xmlns="">112</idRisorsa></request></soapenv:Body></soapenv:Envelope>
---

and the server sends back the response:
---
<?xml version="1.0"
encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which
is NOT expected, in something it was trying to
deserialize.</faultstring><detail><ns1:hostname
xmlns:ns1="http://xml.apache.org/axis/">sirius</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


My WSDL is the following:


<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:MyNameSpace"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:MyNameSpace"
xmlns:intf="urn:MyNameSpace"
xmlns:tns1="http://stato.ws.model.rc.nec"
xmlns:tns2="http://ws.model.rc.nec"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<wsdl:types>
		<schema elementFormDefault="qualified"
targetNamespace="http://ws.model.rc.nec"
xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://stato.ws.model.rc.nec"/>
			
			<complexType name="CredenzialiRichiesta">
				<sequence>
					<element name="password" nillable="true"
type="xsd:string"/>
					<element name="username" nillable="true"
type="xsd:string"/>
				</sequence>
			</complexType>
			<complexType name="EsitoRichiesta">
				<sequence>
					<element name="id" nillable="true"
type="xsd:int"/>
					<element name="messaggio" nillable="true"
type="xsd:string"/>
				</sequence>
			</complexType>

		</schema>
		
		
		<schema
targetNamespace="http://stato.ws.model.rc.nec"
xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://ws.model.rc.nec"/>
			<complexType name="StatoRisorsaWSReq">
				<sequence>
					<element name="credenzialiRichiesta"
nillable="true" type="tns2:CredenzialiRichiesta"/>
					<element name="idRisorsa" nillable="true"
type="xsd:int"/>
				</sequence>
			</complexType>
			<complexType name="StatoRisorsaWSResp">
				<sequence>
					<element name="esitoRichiesta" nillable="true"
type="tns2:EsitoRichiesta"/>
					<element name="statoRisorsa" nillable="true"
type="tns1:StatoRisorsaWS"/>
				</sequence>
			</complexType>
			<complexType name="ClasseRisorsa">
				<sequence>
					<element name="codClassificazioneRegionale"
nillable="true" type="xsd:string"/>
					<element name="descrizione" nillable="true"
type="xsd:string"/>
					<element name="idClasseRisorsa" nillable="true"
type="xsd:long"/>
				</sequence>
			</complexType>
			<complexType name="Operatore">
				<sequence>
					<element name="opCognome" nillable="true"
type="xsd:string"/>
					<element name="opIdOperazione" nillable="true"
type="xsd:long"/>
					<element name="opNome" nillable="true"
type="xsd:string"/>
				</sequence>
			</complexType>
			<complexType name="OperazioneDettaglioT1">
				<sequence>
					<element name="indOperativita" nillable="true"
type="xsd:boolean"/>
					<element name="motivoNonOperativita"
nillable="true" type="xsd:string"/>
				</sequence>
			</complexType>
			<complexType name="OperazioneDettaglioT2">
				<sequence>
					<element name="dataOraFineOccupazione"
nillable="true" type="xsd:dateTime"/>
					<element name="desRisorsaAssociata"
nillable="true" type="xsd:string"/>
					<element name="indOccupazione" nillable="true"
type="xsd:boolean"/>
					<element name="indOperativita" nillable="true"
type="xsd:boolean"/>
					<element name="motivoNonOperativita"
nillable="true" type="xsd:string"/>
					<element name="risorsaAssociata" nillable="true"
type="xsd:string"/>
				</sequence>
			</complexType>
			<complexType name="OperazioneDettaglioT3">
				<sequence>
					<element name="numImpegnati" nillable="true"
type="xsd:int"/>
					<element name="numLiberi" nillable="true"
type="xsd:int"/>
					<element name="numOperativi" nillable="true"
type="xsd:int"/>
				</sequence>
			</complexType>
			<complexType name="OperazioneDettaglioT4">
				<sequence>
					<element name="dataOraFineSaturazione"
nillable="true" type="xsd:dateTime"/>
					<element name="indSaturazione" nillable="true"
type="xsd:boolean"/>
				</sequence>
			</complexType>
			<complexType name="CaricoPS">
				<sequence>
					<element name="numGialli24Ore" nillable="true"
type="xsd:long"/>
					<element name="numGialliInCarico" nillable="true"
type="xsd:long"/>
					<element name="numRossi24Ore" nillable="true"
type="xsd:long"/>
					<element name="numRossiInCarico" nillable="true"
type="xsd:long"/>
					<element name="numVerdi24Ore" nillable="true"
type="xsd:long"/>
					<element name="numVerdiInCarico" nillable="true"
type="xsd:long"/>
				</sequence>
			</complexType>
			<complexType name="DifficoltaPS">
				<sequence>
					<element name="dataOraFine" nillable="true"
type="xsd:dateTime"/>
					<element name="indArea01" nillable="true"
type="xsd:boolean"/>
					<element name="indArea02" nillable="true"
type="xsd:boolean"/>
					<element name="indArea03" nillable="true"
type="xsd:boolean"/>
					<element name="indArea04" nillable="true"
type="xsd:boolean"/>
					<element name="indArea05" nillable="true"
type="xsd:boolean"/>
					<element name="indArea06" nillable="true"
type="xsd:boolean"/>
					<element name="indArea07" nillable="true"
type="xsd:boolean"/>
					<element name="indArea08" nillable="true"
type="xsd:boolean"/>
					<element name="indArea09" nillable="true"
type="xsd:boolean"/>
					<element name="indArea10" nillable="true"
type="xsd:boolean"/>
					<element name="indCausa01" nillable="true"
type="xsd:boolean"/>
					<element name="indCausa02" nillable="true"
type="xsd:boolean"/>
					<element name="indCausa03" nillable="true"
type="xsd:boolean"/>
					<element name="indCausa04" nillable="true"
type="xsd:boolean"/>
					<element name="indDifficoltaRicettive"
nillable="true" type="xsd:boolean"/>
				</sequence>
			</complexType>
			<complexType name="OperazioneDettaglioT5">
				<sequence>
					<element name="caricoPS" nillable="true"
type="tns1:CaricoPS"/>
					<element name="difficoltaPS" nillable="true"
type="tns1:DifficoltaPS"/>
				</sequence>
			</complexType>
			<complexType name="Operazione">
				<sequence>
					<element name="dataOra" nillable="true"
type="xsd:dateTime"/>
					<element name="idOperazione" nillable="true"
type="xsd:long"/>
					<element name="note" nillable="true"
type="xsd:string"/>
					<element name="operazioneDettaglioT1"
nillable="true" type="tns1:OperazioneDettaglioT1"/>
					<element name="operazioneDettaglioT2"
nillable="true" type="tns1:OperazioneDettaglioT2"/>
					<element name="operazioneDettaglioT3"
nillable="true" type="tns1:OperazioneDettaglioT3"/>
					<element name="operazioneDettaglioT4"
nillable="true" type="tns1:OperazioneDettaglioT4"/>
					<element name="operazioneDettaglioT5"
nillable="true" type="tns1:OperazioneDettaglioT5"/>
					<element name="tipoOperazione" nillable="true"
type="xsd:string"/>
				</sequence>
			</complexType>
			<complexType name="Risorsa">
				<sequence>
					<element name="capacitaAccreditata"
nillable="true" type="xsd:int"/>
					<element name="descrizione" nillable="true"
type="xsd:string"/>
					<element name="idRisorsa" nillable="true"
type="xsd:long"/>
					<element name="indAttivo" nillable="true"
type="xsd:boolean"/>
				</sequence>
			</complexType>
			<complexType name="TipoDisponibilita">
				<sequence>
					<element name="descrizione" nillable="true"
type="xsd:string"/>
					<element name="idTipoDisponibilita"
nillable="true" type="xsd:long"/>
				</sequence>
			</complexType>
			<complexType name="StatoRisorsaWS">
				<sequence>
					<element name="classeRisorsa" nillable="true"
type="tns1:ClasseRisorsa"/>
					<element name="idRisorsa" nillable="true"
type="xsd:long"/>
					<element name="operatore" nillable="true"
type="tns1:Operatore"/>
					<element name="operazione" nillable="true"
type="tns1:Operazione"/>
					<element name="risorsa" nillable="true"
type="tns1:Risorsa"/>
					<element name="tipoDisponibilita" nillable="true"
type="tns1:TipoDisponibilita"/>
				</sequence>
			</complexType>
		</schema>
		
		
		<schema elementFormDefault="qualified"
targetNamespace="urn:MyNameSpace"
xmlns="http://www.w3.org/2001/XMLSchema">
			<import namespace="http://ws.model.rc.nec"/>
			<import namespace="http://stato.ws.model.rc.nec"/>
			<element name="request"
type="tns1:StatoRisorsaWSReq"/>
			<element name="getStatoRisorsaReturn"
type="tns1:StatoRisorsaWSResp"/>
		</schema>
		
	</wsdl:types>
	<wsdl:message name="getStatoRisorsaRequest">
		<wsdl:part element="impl:request" name="request"/>
	</wsdl:message>
	<wsdl:message name="getStatoRisorsaResponse">
		<wsdl:part element="impl:getStatoRisorsaReturn"
name="getStatoRisorsaReturn"/>
	</wsdl:message>
	<wsdl:portType name="GetStatoRisorsaWS">
		<wsdl:operation name="getStatoRisorsa"
parameterOrder="request">
			<wsdl:input message="impl:getStatoRisorsaRequest"
name="getStatoRisorsaRequest"/>
			<wsdl:output message="impl:getStatoRisorsaResponse"
name="getStatoRisorsaResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="GetStatoRisorsaWSSoapBinding"
type="impl:GetStatoRisorsaWS">
		<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="getStatoRisorsa">
			<wsdlsoap:operation soapAction=""/>
			<wsdl:input name="getStatoRisorsaRequest">
				<wsdlsoap:body use="literal"/>
			</wsdl:input>
			<wsdl:output name="getStatoRisorsaResponse">
				<wsdlsoap:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="GetStatoRisorsaWSService">
		<wsdl:port
binding="impl:GetStatoRisorsaWSSoapBinding"
name="GetStatoRisorsaWS">
			<wsdlsoap:address
location="http://localhost:8080/eu_rc/services/GetStatoRisorsaWS"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>



	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it