I knew that was coming, sorry. I was hoping that maybe somebody could speak up from a past run in with this problem. But, I've put together a simple example that produces the problem. Here is the WSDL for my example service: <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns:tns="http://tempuri.org/" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12enc="http://www.w3.org/2002/12/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/"> <types xmlns:tns="http://tempuri.org/" xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12enc="http://www.w3.org/2002/12/soap-encoding" xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/"> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:language_builtins.lang" elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace="java:language_builtins.lang"> <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"> </xsd:import> <xsd:complexType name="ArrayOfString"> <xsd:complexContent> <xsd:restriction xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" base="soapenc:Array"> <xsd:attribute xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"> </xsd:attribute> </xsd:restriction> </xsd:complexContent> </xsd:complexType> </xsd:schema> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:stns="java:test.webservice" elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace="java:test.webservice"> <xsd:import namespace="java:language_builtins.lang"> </xsd:import> <xsd:complexType name="ResponseObject"> <xsd:sequence> <xsd:element type="xsd:boolean" name="isMore" minOccurs="1" nillable="true" maxOccurs="1"> </xsd:element> <xsd:element xmlns:tp="java:language_builtins.lang" type="tp:ArrayOfString" name="messages" minOccurs="1" nillable="true" maxOccurs="1"> </xsd:element> <xsd:element type="xsd:string" name="requestId" minOccurs="1" nillable="true" maxOccurs="1"> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema> </types> <message name="getData"> </message> <message name="getDataResponse"> <part xmlns:partns="java:test.webservice" type="partns:ResponseObject" name="result"> </part> </message> <portType name="ComplexTypeWithArrayServicePort"> <operation name="getData"> <input message="tns:getData"> </input> <output message="tns:getDataResponse"> </output> </operation> </portType> <binding type="tns:ComplexTypeWithArrayServicePort" name="ComplexTypeWithArrayServicePort"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"> </soap:binding> <operation name="getData"> <soap:operation style="rpc" soapAction=""> </soap:operation> <wsr:reliability persistDuration="60000"> </wsr:reliability> <input> <soap:body namespace="http://tempuri.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"> </soap:body> </input> <output> <soap:body namespace="http://tempuri.org/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded"> </soap:body> </output> </operation> </binding> <service name="ComplexTypeWithArrayService"> <port name="ComplexTypeWithArrayServicePort" binding="tns:ComplexTypeWithArrayServicePort"> <soap:address location="http://localhost:7001/ws/complexTypeService"> </soap:address> </port> </service> </definitions> Here is a request message (from Axis generated client code): <?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> <ns1:getData soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://tempuri.org/"/> </soapenv:Body> </soapenv:Envelope> And here is the response that the webservice running under WebLogic 8.1 is returning: <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <env:Header/> <env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <m:getDataResponse xmlns:m="http://tempuri.org/"> <result xmlns:n1="java:test.webservice" xsi:type="n1:ResponseObject"> <isMore xsi:type="xsd:boolean">false</isMore> <messages soapenc:arrayType="xsd:string[20]"> <string xsi:type="xsd:string">Message in string array index 0</string> <string xsi:type="xsd:string">Message in string array index 1</string> <string xsi:type="xsd:string">Message in string array index 2</string> <string xsi:type="xsd:string">Message in string array index 3</string> <string xsi:type="xsd:string">Message in string array index 4</string> <string xsi:type="xsd:string">Message in string array index 5</string> <string xsi:type="xsd:string">Message in string array index 6</string> <string xsi:type="xsd:string">Message in string array index 7</string> <string xsi:type="xsd:string">Message in string array index 8</string> <string xsi:type="xsd:string">Message in string array index 9</string> <string xsi:type="xsd:string">Message in string array index 10</string> <string xsi:type="xsd:string">Message in string array index 11</string> <string xsi:type="xsd:string">Message in string array index 12</string> <string xsi:type="xsd:string">Message in string array index 13</string> <string xsi:type="xsd:string">Message in string array index 14</string> <string xsi:type="xsd:string">Message in string array index 15</string> <string xsi:type="xsd:string">Message in string array index 16</string> <string xsi:type="xsd:string">Message in string array index 17</string> <string xsi:type="xsd:string">Message in string array index 18</string> <string xsi:type="xsd:string">Message in string array index 19</string> </messages> <requestId xsi:type="xsd:string">1059700567590</requestId> </result> </m:getDataResponse> </env:Body> </env:Envelope>
-----Original Message----- From: Mike Perham [mailto:[EMAIL PROTECTED] Sent: Thu 7/31/2003 4:12 PM To: [EMAIL PROTECTED] Cc: Subject: RE: Complex Type Deserialization The associated WSDL description and SOAP message would be helpful. -----Original Message----- From: Jeff Poetker [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 2:23 PM To: [EMAIL PROTECTED] Subject: Complex Type Deserialization I'm having some trouble deserializing a complex type which contains an array of Strings. Currently I have a webservice running on weblogic server, and I'm trying to verify that it works well with webservice toolkits other than that supplied by BEA. So far I know the service works fine with .NET and with BEA's tools. But with Axis and Sun's JWSDP I'm unable to desirialize my responses. With Axis I get the following message: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. And stacktrace: at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeser ializer.java:189) at org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria lizationContextImpl.java:963) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java: 198) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j ava:722) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347) at org.apache.axis.client.Call.invoke(Call.java:2272) at org.apache.axis.client.Call.invoke(Call.java:2171) at org.apache.axis.client.Call.invoke(Call.java:1691) at org.tempuri.ResultsServicePortStub.getResults(ResultsServicePortStub.jav a:276) at AxisTestClient.run(AxisTestClient.java:102) at AxisTestClient.main(AxisTestClient.java:67) Searching the archives of this list, I see some similar posts, but I'm not seeing any answers. Have a left out something so obvious that people haven't posted it to the list? Or is there a larger problem here? Any suggestions? It may be worth noting that when my array of strings is null, I don't get this exception, and the object is deserialized just fine. Thanks, Jeff Poetker
<<winmail.dat>>