axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Chandler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-2464) java.lang.RuntimeException: Unexpected subelement value
Date Thu, 12 Apr 2007 14:25:32 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-2464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488385
] 

Ryan Chandler commented on AXIS2-2464:
--------------------------------------

I believe that I am experiencing the same or similar problem.  I tracked the issue down to
the service.  The issues seems to be with the xml sent back to the client.  It looks like
the service is only setting the name space on the first element and not subsequent elements.
 Here is the response coming back from the service:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header />
        <soapenv:Body>
        <ns:getBooksResponse xmlns:ns="http://service.blah.mydomain.com/xsd">
            <ns:return>
                <author xmlns="http://service.blah.mydomain.com/xsd">John Doe</author>
                <title>Using Axis2</title>
            </ns:return>
        </ns:getBooksResponse>
    </soapenv:Body>
</soapenv:Envelope>



As you can see, the 'title' element is missing the namespace.

<author xmlns="http://service.blah.mydomain.com/xsd">
<title>


So I went back into the generated client code (generated by wsdl2java) and add some logging
and here is what I found just before it threw the 'Unexpected subelement' exception:

Expected: {http://service.blah.mydomain.com/xsd}title
Found: title


I hope this helps track down and solve this issue!

>  java.lang.RuntimeException: Unexpected subelement value
> --------------------------------------------------------
>
>                 Key: AXIS2-2464
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2464
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb, client-api, codegen, databinding, wsdl
>    Affects Versions: 1.1.1
>         Environment: Windows XP
>            Reporter: Ted Jones
>         Attachments: MyService.aar, MyWebservice.jar, MyWebService.wsdl, sampleMessage.txt
>
>
> Using generated WSDL from POJOs and the ADB, the client stub is generating an "java.lang.RuntimeException:
Unexpected subelement value" exception. The issue seems stem from the targetnamespace defined
in the wsdl not being used for an element within my POJO.
> Here is email thread regarding this issue:
> http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-subelement-value-t3489089.html
> My WSDL and a sample response document is attached.

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message