axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagara Gunathunga (Assigned) (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (AXIS2-4401) xsi:type attribute should be generated for elements declared as xs:anyType when the actual value is a simple type
Date Wed, 05 Oct 2011 13:56:34 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-4401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sagara Gunathunga  reassigned AXIS2-4401:
-----------------------------------------

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


Mime
View raw message