axis-java-dev mailing list archives

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


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="">
    <soapenv:Header />
        <ns:getBooksResponse xmlns:ns="">
                <author xmlns="">John Doe</author>
                <title>Using Axis2</title>

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

<author xmlns="">

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: {}title
Found: title

I hope this helps track down and solve this issue!

>  java.lang.RuntimeException: Unexpected subelement value
> --------------------------------------------------------
>                 Key: AXIS2-2464
>                 URL:
>             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:
> 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:
For additional commands, e-mail:

View raw message