You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Nick Paul (JIRA)" <ji...@apache.org> on 2009/10/21 11:51:59 UTC

[jira] Issue Comment Edited: (AXIS2-4022) No namespace on xsi:type for generics under JAX-WS

    [ https://issues.apache.org/jira/browse/AXIS2-4022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768149#action_12768149 ] 

Nick Paul edited comment on AXIS2-4022 at 10/21/09 9:51 AM:
------------------------------------------------------------

Hello,

I am experiencing the same issue as well. Has anyone had any success in resolving or working around this? The example in the initial description is again a very concise example of the issue I am having. 

I have looked into the code for Axis2 jax-ws module - however I must admit I am struggling to understand everything in the code. It looks like what is happening is that the jax-ws code generates the <dlwmin:testCResponse> with the prefix "dlwmin". The object structure being returned is then handed over to JAXB, however JAXB is not aware that the namespace for "http://server.hw.demo/" is "dlwmin". I assume that JAXB therefore expects all types to be in the default namespace.

The relevant method that starts to create the <dlwmin:testCResponse> element is DocLitWrappedMinimalMethodMarshaller.marshalResponse()

I think what needs to happen is that when JAXB is requested to marshall it is informed that the namespace prefix "dlwmin" has already been setup. But I have no idea how to do this...

Thanks,

Nick

PS. Sorry just edited this comment as I was mistakenly referring to XMLBeans instead of JAXB. Staying up too late!


      was (Author: nickpaul):
    Hello,

I am experiencing the same issue as well. Has anyone had any success in resolving or working around this? The example in the initial description is again a very concise example of the issue I am having. 

I have looked into the code for Axis2 jax-ws module - however I must admit I am struggling to understand everything in the code. It looks like what is happening is that the jax-ws code generates the <dlwmin:testCResponse> with the prefix "dlwmin". The object structure being returned is then handed over to XMLBeans, however XMLBeans is not aware that the namespace for "http://server.hw.demo/" is "dlwmin". I assume that XMLBeans therefore expects all types to be in the default namespace.

The relevant method that starts to create the <dlwmin:testCResponse> element is DocLitWrappedMinimalMethodMarshaller.marshalResponse()

I think what needs to happen is that when XMLBeans is requested to marshall it is informed that the namespace prefix "dlwmin" has already been setup. But I have no idea how to do this...

Thanks,

Nick

  
> No namespace on xsi:type for generics under JAX-WS
> --------------------------------------------------
>
>                 Key: AXIS2-4022
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4022
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>    Affects Versions: 1.4.1
>         Environment: Tomcat 5.5, jdk 1.5.0_13, Windows XP
>            Reporter: Kevin Ruland
>         Attachments: source.tgz
>
>
> I created a simple class and exposed the web service using JAX-WS annontations.  The wsdl & xsd generated looked ok, but the response messages for methods which returned parametrized lists did not put a namespace on the xsi type for the elements.  The resulting SOAP response document did not validate against the xsd and could not be deserialized with an axis2 generated client (using adb).
> Attached is full example - client and server.
> The response document returned by the server from a call to the testC() method is:
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>       <soapenv:Body>
>          <dlwmin:testCResponse xmlns:dlwmin="http://server.hw.demo/">
>             <return>
>                <list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="typeC">
>                   <aString>outp</aString>
>                   <aInt>0</aInt>
>                   <aBoolean>false</aBoolean>
>                </list>
>             </return>
>          </dlwmin:testCResponse>
>       </soapenv:Body>
>    </soapenv:Envelope>
> Note the xsi:type="typeC" attribute is incorrect and should be xsd:type="dlwmin:typeC"
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.