[
https://issues.apache.org/jira/browse/AXIS2-4401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sagara Gunathunga resolved AXIS2-4401.
---------------------------------------
Resolution: Fixed
Fix Version/s: 1.7.0
This is fixed in current trunk.
> 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: Axis2
> Issue Type: Improvement
> Components: adb
> Affects Versions: 1.5
> Reporter: Pétur Runólfsson
> Assignee: Sagara Gunathunga
> Priority: Minor
> Fix For: 1.7.0
>
> Attachments: Server.java, Server.wsdl, Value.java, services.xml
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]