axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Jordahl (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-2399) Problem with unbounded elements and sequence in SimpleAxisServer
Date Fri, 17 Feb 2006 15:46:28 GMT
    [ http://issues.apache.org/jira/browse/AXIS-2399?page=comments#action_12366804 ] 

Tom Jordahl commented on AXIS-2399:
-----------------------------------

SimpleAxisServer should be fine for the use that Thomas is using it for.  The error indicates
that there are missing type mappings for the XML that the service is receiving.  The server
is expect something like <mything>foo</mything> and getting something like <mything><child>foo</child></mything>.

Looking at the SOAP request and comparing that to the Schema, then making sure you have TypeMappings
for each of the QName that are complexTypes is a good way to debug this.  Use TCPMon (part
of Axis).

> Problem with unbounded elements and sequence in SimpleAxisServer
> ----------------------------------------------------------------
>
>          Key: AXIS-2399
>          URL: http://issues.apache.org/jira/browse/AXIS-2399
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.3
>  Environment: Java Version 1.4.2_09
> SimpleAxisServer
>     Reporter: Thomas Früh
>     Priority: Blocker
>  Attachments: Example.xsd
>
> With the newest version 1.3., I have a problem with following xml schema type:
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
> 	<xs:complexType name="ucFeedbackRequestType">
> 		<xs:sequence>
> 			<xs:element name="ucLabel" type="xs:string"/>
> 			<xs:element name="possibleAnswers">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="Answer" maxOccurs="unbounded">
> 							<xs:complexType>
> 								<xs:sequence>
> 									<xs:element name="code" type="xs:string"/>
> 									<xs:element name="text" type="xs:string"/>
> 								</xs:sequence>
> 							</xs:complexType>
> 						</xs:element>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> 			<xs:element name="defaultCode" type="xs:string"/>
> 			<xs:element name="timeOut" type="xs:unsignedInt"/>
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:schema>
> In our Java Application I use the SimpleAxisServer to receive some soap messages from
a client.
> If the SimpleAxisServer receive a SOAP Message with the upper structure, then I get the
following error in the client:
> <?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:stackTrace xmlns:ns1="http://xml.apache.org/axis/">org.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which is NOT expected, in something it was
trying to deserialize.
> org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
> org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
> org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
> org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:81)
> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
> org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
> org.apache.axis.transport.http.SimpleAxisWorker.execute(SimpleAxisWorker.java:428)
> org.apache.axis.transport.http.SimpleAxisWorker.run(SimpleAxisWorker.java:155)
> java.lang.Thread.run(Unknown Source)
> </ns1:stackTrace>
> 				<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">CHZRHD0CH0152</ns2:hostname>
> 			</detail>
> 		</soapenv:Fault>
> 	</soapenv:Body>
> </soapenv:Envelope>
>  
> If the SimpleAxisServer receive a soap message with an empty <xs:element name="possibleAnswers">
 tag then there is no error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message