[
https://issues.apache.org/jira/browse/AXIS2-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Sosnoski closed AXIS2-1362.
----------------------------------
> Errors parsing Fault document with ADB databinding
> --------------------------------------------------
>
> Key: AXIS2-1362
> URL: https://issues.apache.org/jira/browse/AXIS2-1362
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: kernel
> Affects Versions: nightly
> Environment: Linux, JDK 1.5.0_07
> Reporter: Dennis Sosnoski
> Assigned To: Dennis Sosnoski
> Priority: Blocker
> Attachments: library-fault.zip
>
>
> Running the current svn code with the following WSDL (relevant portions only):
> <wsdl:definitions targetNamespace="http://ws.sosnoski.com/library/wsdl"
> xmlns:wns="http://ws.sosnoski.com/library/wsdl"
> xmlns:tns="http://ws.sosnoski.com/library/types"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
>
> <schema elementFormDefault="qualified"
> targetNamespace="http://ws.sosnoski.com/library/types"
> xmlns="http://www.w3.org/2001/XMLSchema"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> ...
> <element name="addDuplicate" type="tns:AddDuplicate"/>
>
> <complexType name="AddDuplicate">
> <sequence>
> <element name="book" type="tns:BookInformation"/>
> </sequence>
> </complexType>
>
> <complexType name="BookInformation">
> <sequence>
> <element name="author" minOccurs="0" maxOccurs="unbounded"
> type="string"/>
> <element name="title" type="string"/>
> </sequence>
> <attribute name="type" use="required" type="string"/>
> <attribute name="isbn" use="required" type="string"/>
> </complexType>
> ...
> </schema>
> </wsdl:types>
> ...
> <wsdl:message name="addDuplicateFault">
> <wsdl:part element="tns:addDuplicate" name="fault"/>
> </wsdl:message>
> <wsdl:portType name="Library">
> ...
> <wsdl:operation name="addBookInstance">
> <wsdl:input message="wns:addBookInstanceRequest"
> name="addBookInstanceRequest"/>
> <wsdl:output message="wns:addBookInstanceResponse"
> name="addBookInstanceResponse"/>
> <wsdl:fault message="wns:addDuplicateFault" name="addDuplicateFault"/>
> </wsdl:operation>
>
> </wsdl:portType>
> The Fault returned by the server is:
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Client</faultcode>
> <faultstring>Attempt to add duplicate book</faultstring>
> <detail>
> <ns1:addDuplicate
> xmlns:ns1="http://ws.sosnoski.com/library/types">
> <ns1:book type="scifi" isbn="0812580311">
> <ns1:author>Sheffield, Charles</ns1:author>
> <ns1:title>Dark as Day</ns1:title>
> </ns1:book>
> </ns1:addDuplicate>
> </detail>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> This looks correct to me, but the client throws an exception in parsing the
> Fault:
> [java] Exception in thread "main" java.lang.RuntimeException:
> java.lang.RuntimeException: Unexpected subelement author
> [java] at
> com.sosnoski.ws.library.adb.LibraryAdbFaultStub.fromOM(LibraryAdbFaultStub.java:1299)
> [java] at
> com.sosnoski.ws.library.adb.LibraryAdbFaultStub.addBookInstance(LibraryAdbFaultStub.java:402)
> [java] at
> com.sosnoski.ws.library.adb.WebServiceClient.main(WebServiceClient.java:82)
> [java] Caused by: java.lang.RuntimeException: Unexpected subelement
> author
> [java] at
> com.sosnoski.ws.library.types.AddDuplicate$Factory.parse(AddDuplicate.java:279)
> [java] at
> com.sosnoski.ws.library.types.AddDuplicate0$Factory.parse(AddDuplicate0.java:241)
> [java] at
> com.sosnoski.ws.library.adb.LibraryAdbFaultStub.fromOM(LibraryAdbFaultStub.java:1251)
> [java] ... 2 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]