Hello,
I have generated Java classes from a WSDL- file using the wsdl2java and the generation worked fine. But now when I’m implementing the skeleton and calling it from a client provided by a third party I get following exception:
org.xml.sax.SAXException: Invalid element in org.opcfoundation.webservices.XMLDA._1_0.RequestOptions - Options at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:223) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1025) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:159) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1138) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:198) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:323) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:146) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
This only happens in one of the methods that I have implemented, and I know that the WSDL is fine and the client should also be fine. I looked the SOAP- request that the client is generating and it looks following: <soap:Body> <Read xmlns=”http://opcfoundation.org/webservices/XMLDA/1.0/” > <Options ReturnDiagnosticInfo=”true” ReturnItemTime=”true” ReturnItemPath=”true” ReturnItemName=”true” /> <ItemList> <Items ItemPath=”RootPath” ItemName=”Item1” ClientItemHandle=”Item1” /> </ItemList> </Read> </soap:Body>
The WSDL of my service at that part is following: <s:element name="Read"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Options" type="s0:RequestOptions" /> <s:element minOccurs="0" maxOccurs="1" name="ItemList" type="s0:ReadRequestItemList" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="RequestOptions"> <s:attribute default="true" name="ReturnErrorText" type="s:boolean" /> <s:attribute default="false" name="ReturnDiagnosticInfo" type="s:boolean" /> <s:attribute default="false" name="ReturnItemTime" type="s:boolean" /> <s:attribute default="false" name="ReturnItemPath" type="s:boolean" /> <s:attribute default="false" name="ReturnItemName" type="s:boolean" /> <s:attribute name="RequestDeadline" type="s:dateTime" /> <s:attribute name="ClientRequestHandle" type="s:string" /> <s:attribute name="LocaleID" type="s:string" /> </s:complexType>
The weird thing is that I have another method that uses the RequestOptions- element and in that method everything works just fine. Though in that method the RequestOptions is inside another element.
Best Regards, - Sami
|