Re: Object's attribute returned from call instead of the object itself
Stefan Haustein <[email protected]> Thu, 04 Mar 2004 11:23:18 +0100
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
Hi,
the call method returns a single result for convenience, since a single result
seemed the "usual" case. If the method returs more than one return values (may
be the case for in/out parameters), please access the body(In) field of the
envelope directly.
Best,
Stefan
Wysocki Adalbert wrote:
> Hi,
> You are my last chance;) I'm trying to get work the following scenario:
>
> 1) This is the reponse from my axis server:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <ns1:requestInclusionResponse
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns1="http://the.uri/ws/admin">
> <sessionID
> xsi:type="xsd:string">71EC5BB407A8AD649441A4D7D01C9848</sessionID>
> <newInclusion xsi:type="xsd:boolean">false</newInclusion>
> <relativeTime xsi:type="xsd:boolean">true</relativeTime>
> </ns1:requestInclusionResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> 2) I made the following to read this response:
>
> HttpTransport call = getNewCall("requestInclusion");
> ClassMap cmap = new ClassMap();
> cmap.addMapping("http://the.uri/ws/admin", "requestInclusionResponse",
> new RequestInclusionResponse().getClass());
> call.setClassMap(cmap);
> Object resultObj = call.call(so);
>
> 3) And made implement to RequestInclusionResponse class the
> KvmSerializable interface.
>
> When I debug the program, the "requestInclusionResponse" element is
> correctly mapped to the RequestInclusionResponse class and the resulting
> object is set as the body of the responseEnvelope in the HttpTransport
> class but the return from the call is a String (being the first property
> of the body of the responseEnvelope content)
>
> WHY? PLEASE HELP!
>
> Aldo
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
> _______________________________________________
> Ksoap mailing list
> [email protected]
> http://www.enhydra.org/mailman/listinfo.cgi/ksoap