Has some one used it in developing some
applications?
Any references would be helpful
-----Original Message-----
From: Alexander Gdalevich
[mailto:alexander.gdalevich@dvtsensors.com]
Sent: Tuesday,
January 06, 2004 3:52 AM
To: kSOAP@enhydra.org
Subject: Ksoap: xmlns
Greetings!
I am new to kSOAP and trying to get
a very simple program to work.
public static
void main(String[] args) {
try
{
String serviceUrl = "http://194.67.45.100";
String arg = "on";
ClassMap classMap = new ClassMap();
SoapObject request = new SoapObject("imaging",
"setPlayMode" );
request.addProperty("play", "on");
HttpTransportSE tx = new HttpTransportSE(serviceUrl, "setPlayMode");
tx.setClassMap( classMap );
tx.debug = true;
String result = tx.call(request).toString();
System.out.println( tx );
}
catch (Exception e)
{
System.out.println(e);
}
As you can see, I am trying to send
a “setPlayMode” message with a single parameter “play”,
whose value is “on”.
What’s being sent is this:
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<setPlayMode
xmlns="imaging" id="o0" SOAP-ENC:root="1">
<play
xmlns="" xsi:type="xsd:string">on</play>
</setPlayMode>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
What I have problem with is that it
is trying to specify namespace for each element. The “play”
element’s namespace is “” – something the SOAP server
really does not like. Could you tell me what I am doing incorrectly?
Thanks.