Hi,

You may want to look at the working sample for using ksoap webservices
posted in this thread:
http://groups.google.com/group/android-developers/msg/bef2527a3b9c3fd5

Thanks,
Megha

On Tue, Apr 8, 2008 at 7:10 AM, marioneil <[EMAIL PROTECTED]>
wrote:

>
> Hi
>
> I am getting a SOAP error when accessing a web service.
> The web service is setup on my local machine using Tomcat/Axis.
>
> When I use the Android Web Service API I get a SOAP error
> "ns1:Client.NoSOAPAction"
>
> I am using the SOAP monitor GUI -  "TCPMonitor".
>
> Below is part of the SOAP fault message
> <soapenv:Fault>
>   <faultcode xmlns:ns1="http://xml.apache.org/
> axis/ <http://xml.apache.org/axis/>">ns1:Client.NoSOAPAction</faultcode>
>   <faultstring>no SOAPAction header!</faultstring>
>   <detail>
>    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/";>mariof</
> ns2:hostname>
>   </detail>
>  </soapenv:Fault>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> The Android Code is as follows
>
>  WebServiceClient service = new WebServiceClient(this);
>                Vector res = service.ping("222.168.154.1:8080/axis/
> HelloWorldService.jws",                                 "getMessage");
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> The SOAP message sent as a result of this code is as follows
>
> POST /axis/HelloWorldService.jws HTTP/1.1
> Host: 127.0.0.1:8880
> Accept-Encoding: gzip
> Content-Type: text/xml
> Content-Length: 60
>
> <methodCall>
>      <methodName>
>          getMessage
>     </methodName>
> </methodCall>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>
> When i access the web service using a java program trhat uses the Axis
> apis the web service call works and I get a message from the
> webservice . Below is the SOAP message from the program.
>
> The message header below  contains the following text -->>
> SOAPAction: ""
> . This seems to be the reason for the error  "no SOAPAction
> header!"  .
> Does anyone know how to fix this error??
>
> POST /axis/HelloWorldService.jws HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related,
> text/*
> User-Agent: Axis/1.4
> Host: 127.0.0.1:8880
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: ""
> Content-Length: 380
>
> <?xml version="1.0" encoding="UTF-8"?>
>        <soapenv:Envelope
>             xmlns:soapenv="http://schemas.xmlsoap.org/soap/
> envelope/ <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:getMessage
>                           oapenv:encodingStyle="http://
> schemas.xmlsoap.org/soap/encoding/"
>                           xmlns:ns1="http://DefaultNamespace"/>
>                     </soapenv:Body>
>        </soapenv:Envelope>
>
>
>
> many thanks in advance
>
> Regards
>
> mario
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to