[ 
http://issues.apache.org/jira/browse/AXIS2-969?page=comments#action_12436012 ] 
            
Thomas, Berlinghoff commented on AXIS2-969:
-------------------------------------------

Hi all,
just captured the data send/received through my network interface and found out 
that, if using a derived type, the "xsi:type" attribute is used within requests 
from the client, but not in the response of the service. Furthermose the type, 
specified through the "xsi:type" attribute, is prefixed by a namespace, which 
makes it not understandable by the service (if using desirees workaround the 
type is not prefixed and this works):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
<soapenv:Header />
<soapenv:Body>
        <Parent xmlns="http://orchestra-eu.org/tests/inheritance"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
          xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance"; 
ns0:type="inh:Child">
                <myInt_1>2</myInt_1>
                <myInt_2>3</myInt_2>
        </Parent>
</soapenv:Body>
</soapenv:Envelope>

The code I've used has a simple operation called "getSomething" taking the type 
"Parent" as input as well as return type. "Child" is a type derived from 
"Parent" (I've choosed the naming for simplifying the test).

So in my eyes there're two bugs to fix:

1. The "xsi:type" attribute shall also be used in the service reponse, not only 
in the clients request.
2. The type specified by "xsi:type" shall not be prefixed by any namespace 
abbreviations.

Hope this info helps to fix this bug.

Cheers,

Thomas

> Missing xsi:type in SOAP-Message
> --------------------------------
>
>                 Key: AXIS2-969
>                 URL: http://issues.apache.org/jira/browse/AXIS2-969
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Windows XP Professional, Tomcat 5.5, Axis2 1.0 and 
> nightly snapshot from 3rd August 2006
>            Reporter: Desiree Hilbring
>         Attachments: delivery060803-2.xsd, GMLSFClient.java, 
> GMLSFE060803.wsdl, GMLSFESkeleton.java
>
>
> I am trying to create an working inheritance example with Axis2. In the 
> attached example case
> OAMIFASCapabilitiesType is derived from OAMIServiceSpecificCapabilities.
> To recognize the inheritance the client needs the xsi:type in the SOAP 
> message, but
> it is missing.
> The example will work outcommenting the following lines in GMLSFESkeleton:
> XmlCursor cur = 
> resp.getOAGetMetaInformationResponse().getFeatureMetaInformation().getOAMIServiceSpecificCapabilities().newCursor();
> cur.toFirstChild();
> cur.insertAttributeWithValue("type",
>     "http://www.w3.org/2001/XMLSchema-instance";,
>     "OAMIFASCapabilitiesType");               
>     cur.dispose();
>     
> Why is the xsi:type not sent?
> Davanum Srinivas advised my to try the latest nightly snapshot, which is the 
> one from 3rd August 2006. Unforunately I do have another
> issue with that version, trying to create the code with WSDL2Java. I'll get 
> the following exceptions in the created GMLSFEStub.java:
>    [javac] Compiling 225 source files to C:\hilbring\EclipseWTP\GMLSFE\classes
>     [javac] 
> C:\hilbring\EclipseWTP\GMLSFE\output\src\org\example\types\GMLSFEStub.java:142:
>  toEnvelope(org.apache.axiom.soap.SOAPFactory) in 
> org.example.types.GMLSFEStub cannot be applied to 
> (org.apache.axiom.soap.SOAPFactory,orchestra.oas.building.BuildingStringDocument,boolean)
>     [javac] env = 
> toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
>     [javac] ^
>     [javac] 
> C:\hilbring\EclipseWTP\GMLSFE\output\src\org\example\types\GMLSFEStub.java:247:
>  toEnvelope(org.apache.axiom.soap.SOAPFactory) in 
> org.example.types.GMLSFEStub cannot be applied to 
> (org.apache.axiom.soap.SOAPFactory,orchestra.oas.building.BuildingStringDocument,boolean)
>     [javac] env = 
> toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
>     [javac] ^

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.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]

Reply via email to