walterDurin / android-ws-client

Automatically exported from code.google.com/p/android-ws-client
0 stars 0 forks source link

Unexpected wrapper element #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a problem when my app consumes a web service. 
The client was generated with "androidWSClientGenDist-1.2.0" package 

It throws "Unexpected wrapper element"

The method signature is: 

    @WebResult(name = "Wrapped", targetNamespace = "http://services/xsd/lex/LocalExtension/v2/wrapper")
    @RequestWrapper(localName = "getBooking", targetNamespace = "http://services/xsd/lex/LocalExtension/v2/wrapper", className = "services.xsd.lex.localextension.v2.wrapper.GetBookingRequest")
    @WebMethod(action = "http://services/xsd/lex/LocalExtension/v2/getBooking")
    @ResponseWrapper(localName = "getBookingResponse", targetNamespace = "http://services/xsd/lex/LocalExtension/v2/wrapper", className = "services.xsd.lex.localextension.v2.wrapper.GetBookingResponse")
    public services.xsd.lex.localextension.v2.types.LxeBooking getBooking(
        @WebParam(name = "WorkingDepartment", targetNamespace = "http://services/xsd/lex/LocalExtension/v2/wrapper")
        services.xsd.lex.localextension.v2.types.LxpDepartment workingDepartment,
        @WebParam(name = "TrackingNumber", targetNamespace = "http://services/xsd/lex/LocalExtension/v2/wrapper")
        long trackingNumber
    );

This is the raw request message:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ws="http://services/xsd/lex/LocalExtension/v2" >
<soap:Header/>
<soap:Body>
<ws:getBooking>
<ws:WorkingDepartment>
</ws:WorkingDepartment>
<ws:TrackingNumber>1150007354</ws:TrackingNumber>
</ws:getBooking>
</soap:Body>

This is the raw response message:

</soap:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Unexpected wrapper element 
{http://services/xsd/lex/LocalExtension/v2}getBooking found.   Expected 
{http://services/xsd/lex/LocalExtension/v2/wrapper}getBooking.</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>

------------------------------------------------------
I think that the namespace (in request) is 
http://services/xsd/lex/LocalExtension/v2 and it must be 
http://services/xsd/lex/LocalExtension/v2/wrapper
is this a bug? or am I doing somtething wrong?

Original issue reported on code.google.com by agab...@gmail.com on 26 Dec 2012 at 6:30