axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pétur Runólfsson (JIRA) <j...@apache.org>
Subject [jira] Commented: (AXIS2-4401) xsi:type attribute should be generated for elements declared as xs:anyType when the actual value is a simple type
Date Mon, 22 Jun 2009 10:06:07 GMT

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

Pétur Runólfsson commented on AXIS2-4401:
-----------------------------------------

The request used to get the xs:string response is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://ws.apache.org/axis2">
   <soapenv:Header/>
   <soapenv:Body>
      <axis:getAny>
         <axis:args0>true</axis:args0>
      </axis:getAny>
   </soapenv:Body>
</soapenv:Envelope>

The request used for the complex type response is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis="http://ws.apache.org/axis2">
   <soapenv:Header/>
   <soapenv:Body>
      <axis:getAny>
         <axis:args0>false</axis:args0>
      </axis:getAny>
   </soapenv:Body>
</soapenv:Envelope>


> xsi:type attribute should be generated for elements declared as xs:anyType when the actual
value is a simple type
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4401
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4401
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5
>            Reporter: Pétur Runólfsson
>            Priority: Minor
>         Attachments: Server.java, services.xml, Value.java
>
>
> Currently, the xsi:type attribute is only declared for complex types. This means that
if a method that returns xs:anyType returns an object of simple type (for example xs:string
or xs:date), the client gets no type information with the object. xsi:type attributes should
always be declared for return values for methods that have xs:anyType return types. The same
applies when a method returns a complex type that contains a xs:anyType property.
> Example response when xs:string is returned:
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <ns:getAnyResponse xmlns:ns="http://ws.apache.org/axis2">
>          <ns:return>Hello</ns:return>
>       </ns:getAnyResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
> Response from same method when a complex type is returned:
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <ns:getAnyResponse xmlns:ns="http://ws.apache.org/axis2">
>          <ns:return xsi:type="ax21:Value" xmlns:ax21="http://ws.apache.org/axis2/xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>             <ax21:any xsi:nil="true"/>
>          </ns:return>
>       </ns:getAnyResponse>
>    </soapenv:Body>
> </soapenv:Envelope>

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


Mime
View raw message