SOAP Message ?
"Charith Indika Fernando" <[email protected]> Thu, 12 Feb 2004 11:36:05 +0600
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <28B8E04BCFBEB74B9B19F765DE6598E9DE41DD@enetslmaili.enetsl.virtusa.com> |
This is a multi-part message in MIME format.
------_=_NextPart_001_01C3F12A.1C1440A9
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
When i try to access a web service by using the kSOAP API's i get an =
empty xml name space... why is this... if you could tell me why is this =
i would be greatful... please refer the place highlighted in red...
the code that i've used is as follows...
transport =3D new HttpTransport( serviceUrl, =
soapAction);
transport.debug =3D true;
=20
classMap =3D new ClassMap(true);
transport.setClassMap( classMap );
=20
request =3D new SoapObject( serviceNamespace, methodName =
);
request.addProperty( "name", "Charith Indika Fernando");
transport.call(request);
i get the response message from "transport.responseDump"
<SOAP-ENV:Envelope =
xmlns:xsi=3D"http://www.w3.org/1999/XMLSchema-instance" =
xmlns:xsd=3D"http://www.w3.org/1999/XMLSchema" =
xmlns:SOAP-ENC=3D"http://schemas.xmlsoap.org/soap/encoding/" =
xmlns:SOAP-ENV=3D"http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body =
SOAP-ENV:encodingStyle=3D"http://schemas.xmlsoap.org/soap/encoding/">
<GetByName xmlns=3D"http://tempuri.org/" id=3D"o0" =
SOAP-ENC:root=3D"1">
<name xmlns=3D"" xsi:type=3D"xsd:string">Charith Indika =
Fernando</name>
</GetByName>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Thank you,
Regards,
Charith I Fernando=20
------_=_NextPart_001_01C3F12A.1C1440A9
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6487.1">
<TITLE>SOAP Message ? </TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier">Hi all,</FONT>
</P>
<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier">When i try to =
access a web service by using the kSOAP API's i get an empty xml name =
space... why is this... if you could tell me why is this i would be =
greatful... please refer the place highlighted in red...</FONT></P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier">the code that i've used is as =
follows...</FONT>
</P>
<P><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; transport =3D<B> new</B> =
HttpTransport( serviceUrl, soapAction);</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; transport.debug =3D</FONT><B> <FONT =
SIZE=3D2 FACE=3D"Courier">true</FONT></B><FONT SIZE=3D2 =
FACE=3D"Courier">;</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; </FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; classMap =3D</FONT><B> <FONT SIZE=3D2 =
FACE=3D"Courier">new</FONT></B><FONT SIZE=3D2 FACE=3D"Courier"> =
ClassMap(</FONT><B><FONT SIZE=3D2 FACE=3D"Courier">true</FONT></B><FONT =
SIZE=3D2 FACE=3D"Courier">);</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; transport.setClassMap( classMap =
);</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; </FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; request =3D</FONT><B> <FONT SIZE=3D2 =
FACE=3D"Courier">new</FONT></B><FONT SIZE=3D2 FACE=3D"Courier"> =
SoapObject( serviceNamespace, methodName );</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Courier"> &n=
bsp; request.addProperty( =
"name", "Charith Indika Fernando");</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier"> =
=
</FONT> <FONT =
SIZE=3D2 FACE=3D"Courier">transport.call(request);</FONT>
</P>
<P><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier">i get the response =
message from "</FONT><FONT COLOR=3D"#3F7F5F" SIZE=3D2 =
FACE=3D"Courier">transport.responseDump</FONT><FONT COLOR=3D"#3F7F5F" =
SIZE=3D2 FACE=3D"Courier">"</FONT>
</P>
<P><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Courier"><SOAP-ENV:Envelope xmlns:xsi=3D"<A =
HREF=3D"http://www.w3.org/1999/XMLSchema-instance">http://www.w3.org/1999=
/XMLSchema-instance</A>" xmlns:xsd=3D"<A =
HREF=3D"http://www.w3.org/1999/XMLSchema">http://www.w3.org/1999/XMLSchem=
a</A>" xmlns:SOAP-ENC=3D"<A =
HREF=3D"http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap=
.org/soap/encoding/</A>" xmlns:SOAP-ENV=3D"<A =
HREF=3D"http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap=
.org/soap/envelope/</A>"></FONT></P>
<P><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Courier"> <SOAP-ENV:Body =
SOAP-ENV:encodingStyle=3D"<A =
HREF=3D"http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap=
.org/soap/encoding/</A>"></FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier"> =
<GetByName xmlns=3D"<A =
HREF=3D"http://tempuri.org/">http://tempuri.org/</A>" =
id=3D"o0" SOAP-ENC:root=3D"1"></FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier"> =
<</FONT><FONT COLOR=3D"#FF0000" SIZE=3D2 FACE=3D"Courier">name =
xmlns=3D""</FONT> <FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Courier">xsi:type=3D"xsd:string">Charith Indika =
Fernando</name></FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Courier"> =
</GetByName></FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Courier"> </SOAP-ENV:Body></FONT>
<BR><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Courier"></SOAP-ENV:Envelope></FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Thank you,</FONT>
<BR><B><FONT SIZE=3D2 FACE=3D"Book Antiqua">Regards,</FONT></B>
<BR><B><FONT SIZE=3D2 FACE=3D"Book Antiqua">Charith I =
Fernando</FONT></B><FONT SIZE=3D2 FACE=3D"Book Antiqua"><BR>
</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C3F12A.1C1440A9--