Webservice (SOAP) with complex data type and KSOAP Client

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Postby mrfalafel » Wed Feb 24, 2010 1:13 am

Hope this helps

http://www.vimeo.com/9633556

Thanks
-Lino
mrfalafel
Freshman
Freshman
 
Posts: 4
Joined: Sun Feb 21, 2010 11:12 pm
Location: San Jose, CA

Top

it's a silly problem

Postby subspider » Mon Mar 01, 2010 7:16 pm

http://www.anddev.org/ksoap_2_android-t11644.html

sorry i already made my question here
subspider
Freshman
Freshman
 
Posts: 2
Joined: Mon Mar 01, 2010 6:28 pm

Postby DoM » Wed Mar 03, 2010 11:14 am

Hi everyone,
I'm doing an application who must receive position by a web service,ed i must see this position on a map.
Have I to create only the client,or I have to creat also a NuSoap class?
This is my WS http://192.41.218.56:8080/WSGeoEAR-WSGe ... rBean?WSDL

this is my code:

public class Client extends Activity
{


private String SOAP_ACTION = "http://192.41.218.56:8080/WSGeoEAR-WSGeoServer/NavFinderBean?WSDL/getAllPositions";
private String METHOD_NAME = "getAllPositions";
private String NAMESPACE = "http://session/";
private static final String URL ="http://192.41.218.56:8080/WSGeoEAR-WSGeoServer/NavFinderBean?WSDL";


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);


request.addProperty("id_Utente","1");

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);

AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);

androidHttpTransport.debug = true;

try {
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;

Vector XXXX = (Vector) resultsRequestSOAP.getProperty("getAllPositionsResponse");
int testat = XXXX.size();
SoapObject test = (SoapObject) XXXX.get(0);


String tem = (String) test.getProperty("id_Utente");
tem = tem + " " + (String) test.getProperty("1");

((TextView)findViewById(R.id.lblStatus)).setText(tem.toString());
} catch(Exception E) {
((TextView)findViewById(R.id.lblStatus)).setText("ERROR:" + E.getClass().getName() + ": " + E.getMessage());
}
}
}

I attach the emulator response
Attachments
device.png
device.png (7.18 KiB) Viewed 14463 times
DoM
Freshman
Freshman
 
Posts: 9
Joined: Mon Mar 16, 2009 12:43 pm

Getting Error In Ksoap

Postby Sanjay1703 » Fri Mar 12, 2010 4:27 am

Hi I am using Android Ksoap2 to login . I am getting Error at response . I tried to debug it and saw my response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:loginResponse xmlns:ns2="http://xxx.thxd.com/"><return>4eeaaa37-accb-4e7e-ae8a-ce008856391d</return></ns2:loginResponse></soap:Body></soap:Envelope>
--uuid:a0ee2798-3723-4349-b39a-27d9750e5785--

I am getting XmlPullParserException as it cannot recognise -- --uuid:a0ee2798-3723-4349-b39a-27d9750e5785--

Help suggest me a way how to avoid it .

Thanks
Sanjay
Sanjay1703
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Mar 12, 2010 4:17 am
Location: California

Postby lrente » Tue Mar 23, 2010 1:03 am

Hi,
I'm having a problem accessing my web-service.
For now, i'm am running the WS in localhost.

This is my code:

private static final String SOAP_ACTION = "";
private static final String METHOD_NAME = "getPOIS";
private static final String NAMESPACE = "http://ws.projectName/";
private static final String URL = "http://10.0.2.2:8084/projectName/GetPOIS";

//--//

object = new SoapObject(NAMESPACE, METHOD_NAME);
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

object.addProperty("username", "ze");

object.addProperty("latitude", 40.211491);
object.addProperty("longitude", -8.429201);
envelope.setOutputSoapObject(object);

HttpTransportSE aht = new HttpTransportSE(URL);
try{

aht.call(SOAP_ACTION, envelope);

SoapPrimitive primitive = (SoapPrimitive) envelope.getResponse();
tv.setText("From Server: " + primitive);


}catch(Exception e){
e.printStackTrace();
}

//--//

I have the internet permission in the manifest file.
And i am also using a mapactivity, instead of a normal activity
However, I can't get the webservice to respond.

This is my WSDL:

<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. --><definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.projectName/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.projectName/" name="GetPOISService">
<types>
<xsd:schema>
<xsd:import namespace="http://ws.projectName/" schemaLocation="http://localhost:8084/projectName/GetPOIS?xsd=1"></xsd:import>
</xsd:schema>
</types>
<message name="getPOIS">
<part name="parameters" element="tns:getPOIS"></part>
</message>
<message name="getPOISResponse">
<part name="parameters" element="tns:getPOISResponse"></part>
</message>
<portType name="GetPOIS">
<operation name="getPOIS">
<input message="tns:getPOIS"></input>
<output message="tns:getPOISResponse"></output>
</operation>
</portType>
<binding name="GetPOISPortBinding" type="tns:GetPOIS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<operation name="getPOIS">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="GetPOISService">
<port name="GetPOISPort" binding="tns:GetPOISPortBinding">
<soap:address location="http://localhost:8084/projectName/GetPOIS"></soap:address>
</port>
</service>
</definitions>

Can anyone help me?
lrente
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Mar 23, 2010 12:56 am

Postby nckinh » Fri Apr 23, 2010 12:14 pm

Hi,

Please take the tool at http://ksoap2genstub.sourceforge.net/.

Hope this help you

Thanks
nckinh
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Apr 23, 2010 12:11 pm

Top

Postby anuani20 » Tue Apr 27, 2010 11:48 am

Hello ,

Can I get a full tutorial for this web services..I am new to android.Plz do reply......
anuani20
Freshman
Freshman
 
Posts: 4
Joined: Tue Apr 27, 2010 11:24 am

Re: I have a problem with AndroidHttpTransport.

Postby tetsuo » Fri Jul 30, 2010 11:43 am

cattivik wrote:Hello!
I have a problem with AndroidHttpTransport.
If the URL is not reachable, because the server is down, AndroidHttpTransport don't thrown any Exception.
It is possible to insert a time out?
Please give me some example,
Thanks


Has someone found a way to set up a timeout?

Thanks for help
tetsuo
Freshman
Freshman
 
Posts: 2
Joined: Fri Jul 30, 2010 11:38 am

Re: Webservice (SOAP) with complex data type and KSOAP Clien

Postby dwarka.damodaran » Wed Aug 18, 2010 5:47 pm

Greetings to All !!!

I am new to Android and mobile plateform. My need was to call a webservice deployed in Jboss which accepts a complex input and responds back with a complex output. I searched tro the internet was not able to find a complete guide for the same. I would like to contribute this small tutorial,

Calling a Webservice using Android

Introduction
This tutorial talks about how to consume a webservice (in this case a service deployed into Jboss) from Android 2.2. For this purpose the following tools and SDK’s are used,
1. Android SDK 2.2
2. JDK 1.6
3. Eclipse 3.5 with Android Plug-in
4. Jboss 5.0
5. KSOAP2 2.4
Here kSOAP is a SOAP web service client library for constrained Java environments such as Applets or J2ME applications (CLDC / CDC / MIDP)

Organization of the Tutorial

Part1: About the Webservice (Only the WSDL part)
Part2: Calling the webservice with complex request object
Part3: Receiving a complex response object and parsing the same

Part1: About the Webservice (Only the WSDL part)
This Sample webservice has one operation with a complex input parameter and a complex output parameter. The following is the WSDL,

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.example.org/AndroidSampleWebservice/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="AndroidSampleWebservice"
targetNamespace="http://www.example.org/AndroidSampleWebservice/">
  <wsdl:types>
    <xsd:schema targetNamespace="http://www.example.org/AndroidSampleWebservice/">


      <xsd:element name="complexInData" type="tns:inData"></xsd:element>
      <xsd:element name="ComplexOutData" type="tns:outData"></xsd:element>

      <xsd:complexType name="inData">
         <xsd:sequence>
            <xsd:element name="firstName" type="xsd:string"></xsd:element>
            <xsd:element name="lastName" type="xsd:string"></xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   
      <xsd:complexType name="outData">
         <xsd:sequence>
            <xsd:element name="generalData" type="tns:gData"></xsd:element>
            <xsd:element name="addressData" type="tns:aData"></xsd:element>
            <xsd:element name="accountData" type="tns:acData"></xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   
      <xsd:complexType name="gData">
         <xsd:sequence>
            <xsd:element name="firstName" type="xsd:string"></xsd:element>
            <xsd:element name="lastName" type="xsd:string"></xsd:element>
            <xsd:element name="age" type="xsd:string"></xsd:element>
            <xsd:element name="sex" type="xsd:string"></xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   
      <xsd:complexType name="aData">
         <xsd:sequence>
            <xsd:element name="street1" type="xsd:string"></xsd:element>
            <xsd:element name="street2" type="xsd:string"></xsd:element>
            <xsd:element name="postBox" type="xsd:string"></xsd:element>
            <xsd:element name="state" type="xsd:string"></xsd:element>
            <xsd:element name="country" type="xsd:string"></xsd:element>
         </xsd:sequence>
      </xsd:complexType>
   
      <xsd:complexType name="acData">
         <xsd:sequence>
            <xsd:element name="accountno" type="xsd:string"></xsd:element>
            <xsd:element name="bank" type="xsd:string"></xsd:element>
            <xsd:element name="accounttype" type="xsd:string"></xsd:element>
            <xsd:element name="balance" type="xsd:string"></xsd:element>
         </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="getComplexDataRequest">
    <wsdl:part element="tns:complexInData" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="getComplexDataResponse">
    <wsdl:part element="tns:ComplexOutData" name="parameters"/>
  </wsdl:message>
  <wsdl:portType name="AndroidSampleWebservice">
    <wsdl:operation name="getComplexData">
      <wsdl:input message="tns:getComplexDataRequest"/>
      <wsdl:output message="tns:getComplexDataResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="AndroidSampleWebserviceSOAP" type="tns:AndroidSampleWebservice">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getComplexData">
      <soap:operation soapAction="http://www.example.org/AndroidSampleWebservice/getComplexData"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="AndroidSampleWebservice">
    <wsdl:port binding="tns:AndroidSampleWebserviceSOAP" name="AndroidSampleWebserviceSOAP">
      <soap:address location="http://<your ip and port>/"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


From the webservice the following are clear,
Service Name: AndroidSampleWebservice
Operation: getComplexData
Input: getComplexDataRequest (A complex request)
Output: getComplexDataResponse (A complex response)

Part2: Calling the webservice with complex request object

The structure of the input is:
Code: Select all
<xsd:element name="complexInData" type="tns:inData"></xsd:element>
<xsd:complexType name="inData">
         <xsd:sequence>
            <xsd:element name="firstName" type="xsd:string"></xsd:element>
            <xsd:element name="lastName" type="xsd:string"></xsd:element>
         </xsd:sequence>
      </xsd:complexType>


Step1:
The first step would be constructing the SoapObject. The following code demonstrates the construction,

Code: Select all
private static final String NAMESPACE = "http://www.example.org/AndroidSampleWebservice/";
private static final String METHOD_NAME = "complexInData";
SoapObject loSoapObject = new SoapObject(NAMESPACE, METHOD_NAME);
//At this point our loSoapObject here refers to the inData complex type.
//After this we have to set the elements firstName and the lastName into the loSoapObject
loSoapObject.addProperty("firstName","Dwarka");
loSoapObject.addProperty("lastName","Damodaran");


Step2:
Now we have got the SoapObject after this point we would be creating a Soap envelop, putting the envelop into a HTTP transport and calling the required method in the service. In most of the cases the step 2 would remain the same.
The following is the code for it,

Code: Select all
private static final String SOAP_ACTION = "http://www.example.org/AndroidSampleWebservice/getComplexData";
private static final String URL = "http://172.25.108.49:8080/AndroidWebservice/AndroidSampleWebservice?wsdl";
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(loSoapObject);
AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL);
httpTransport.debug = true;
httpTransport.call(SOAP_ACTION, envelope);


With this we have called the webservice.

Part3: Receiving a complex response object and parsing the same
After Part2 the webservice implementation would do the required work and respond back with the data. Now this data is available in the envelop from the previous part. To extract the body out of the envelop the following has to be done,

SoapObject loresponse = (SoapObject) envelope.bodyIn;

Here since out response type is a complex type we are type casting it into a Soapobject. Now this object would represent the xml tag “outData” in the WSDL. From this loResponseObject we can then extract the aData or acData or the gData tags and in the similar way the inner tags. For doing the following see the following code,

Code: Select all
SoapObject logObject = (SoapObject)loresponse.getProperty("generalData");
SoapObject loaObject = (SoapObject)loresponse.getProperty("addressData");
SoapObject loacObject = (SoapObject)loresponse.getProperty("accountData");
Log.d("WS", "logObject: "+logObject);
Log.d("WS", "loaObject: "+loaObject);
Log.d("WS", "loacObject: "+loacObject);            
Log.d("WS", "firstName: "+logObject.getProperty("firstName"));
Log.d("WS", "lastName: "+logObject.getProperty("lastName"));
Log.d("WS", "age: "+logObject.getProperty("age"));
Log.d("WS", "sex: "+logObject.getProperty("sex"));


The following is the complete code for the example:

Code: Select all
package com.android.example;

import java.io.IOException;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import org.xmlpull.v1.XmlPullParserException;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class WebserviceConsumer extends Activity {
   /** Called when the activity is first created. */

   private static final String NAMESPACE = "http://www.example.org/AndroidSampleWebservice/";
   private static final String METHOD_NAME = "complexInData";
   private static final String SOAP_ACTION = "http://www.example.org/AndroidSampleWebservice/getComplexData";
   private static final String URL = "http://172.25.108.49:8080/AndroidWebservice/AndroidSampleWebservice?wsdl";

   @Override
   public void onCreate(Bundle savedInstanceState) {
      Log.d("WS", "Inside onCreate");

      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);

      Log
            .d("WS",
                  "--------------------- Webservice Part Begins ---------------------");
      Log.d("WS", "1. SoapObject Construction");

      SoapObject loSoapObject = new SoapObject(NAMESPACE, METHOD_NAME);

      // If this is not a direct type i.e. a primitive or string then you
      // have to construct another SoapObject and put in the place of the
      // obejct
      loSoapObject.addProperty("firstName", "Dwarka");
      loSoapObject.addProperty("lastName", "Damodaran");
      Log.d("WS", "Construction of SOAP Object End !!!");

      SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
            SoapEnvelope.VER11); // put all required data into a soap
                              // envelope
      Log.d("WS", "2. Envelop Created");
      envelope.setOutputSoapObject(loSoapObject); // prepare request
      Log.d("WS", "3. Request Into Envelop");
      AndroidHttpTransport httpTransport = new AndroidHttpTransport(URL);
      Log.d("WS", "4. Transport Created");
      httpTransport.debug = true; // this is optional, use it if you don't
                           // want to use a packet sniffer to check
                           // what the sent message was
                           // (httpTransport.requestDump)
      Log.d("WS", "5. Transport Level to True");
      try {
         httpTransport.call(SOAP_ACTION, envelope);
         if (envelope != null)
         {
            SoapObject loresponse = (SoapObject) envelope.bodyIn;
            SoapObject logObject = (SoapObject)loresponse.getProperty("generalData");
            SoapObject loaObject = (SoapObject)loresponse.getProperty("addressData");
            SoapObject loacObject = (SoapObject)loresponse.getProperty("accountData");
            Log.d("WS", "logObject: "+logObject);
            Log.d("WS", "loaObject: "+loaObject);
            Log.d("WS", "loacObject: "+loacObject);
            
            Log.d("WS", "firstName: "+logObject.getProperty("firstName"));
            Log.d("WS", "lastName: "+logObject.getProperty("lastName"));
            Log.d("WS", "age: "+logObject.getProperty("age"));
            Log.d("WS", "sex: "+logObject.getProperty("sex"));
            
         }
         else
         {
            Log.d("WS", "Response Envelop Error");
         }

      } catch (IOException e) {
         e.printStackTrace();
      } catch (XmlPullParserException e) {
         e.printStackTrace();
      }
   }
}


If you need to work with the same, the following has to be done,

1. Generate a webservice using the WSDL that i have provided.
2. Deploy the webservice
3. Create a Android project
4. Use the activity code above.

The following are the references for this material,

http://www.javaworld.com/javaworld/jw-08-2002/jw-0823-wireless.html?page=1
http://www.javaworld.com/javaworld/jw-08-2002/jw-0823-wireless.html?page=1
http://developer.android.com/reference/android/app/ListActivity.html
http://supportforums.blackberry.com/t5/Java-Development/Example-of-KSoap2-Wrapper-classes/m-p/473088
http://www.codeproject.com/KB/webservices/CallWebServiceFromkSOAP.aspx
http://stackoverflow.com/questions/1052300/how-to-call-a-net-webservice-from-android-using-ksoap2
http://android.amberfog.com/?p=45
http://www.google.co.in/search?q=ksoap2+example&hl=en&ei=10xlTJKuIY3CcbessboK&start=10&sa=N
http://www.blackberryforums.com/developer-forum/155972-blackberry-ksoap2-tutorial.html
http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/102/The-Minimum-Steps-to-utilize-KSOAP2.aspx
dwarka.damodaran
Freshman
Freshman
 
Posts: 3
Joined: Wed Aug 18, 2010 3:23 pm

Re:

Postby dwarka.damodaran » Wed Aug 18, 2010 6:01 pm

lrente wrote:Hi,
I'm having a problem accessing my web-service.
For now, i'm am running the WS in localhost.

This is my code:

private static final String SOAP_ACTION = "";
private static final String METHOD_NAME = "getPOIS";
private static final String NAMESPACE = "http://ws.projectName/";
private static final String URL = "http://10.0.2.2:8084/projectName/GetPOIS";

//--//

object = new SoapObject(NAMESPACE, METHOD_NAME);
envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

object.addProperty("username", "ze");

object.addProperty("latitude", 40.211491);
object.addProperty("longitude", -8.429201);
envelope.setOutputSoapObject(object);

HttpTransportSE aht = new HttpTransportSE(URL);
try{

aht.call(SOAP_ACTION, envelope);

SoapPrimitive primitive = (SoapPrimitive) envelope.getResponse();
tv.setText("From Server: " + primitive);


}catch(Exception e){
e.printStackTrace();
}

//--//

I have the internet permission in the manifest file.
And i am also using a mapactivity, instead of a normal activity
However, I can't get the webservice to respond.

This is my WSDL:

<?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. --><definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.projectName/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.projectName/" name="GetPOISService">
<types>
<xsd:schema>
<xsd:import namespace="http://ws.projectName/" schemaLocation="http://localhost:8084/projectName/GetPOIS?xsd=1"></xsd:import>
</xsd:schema>
</types>
<message name="getPOIS">
<part name="parameters" element="tns:getPOIS"></part>
</message>
<message name="getPOISResponse">
<part name="parameters" element="tns:getPOISResponse"></part>
</message>
<portType name="GetPOIS">
<operation name="getPOIS">
<input message="tns:getPOIS"></input>
<output message="tns:getPOISResponse"></output>
</operation>
</portType>
<binding name="GetPOISPortBinding" type="tns:GetPOIS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<operation name="getPOIS">
<soap:operation soapAction=""></soap:operation>
<input>
<soap:body use="literal"></soap:body>
</input>
<output>
<soap:body use="literal"></soap:body>
</output>
</operation>
</binding>
<service name="GetPOISService">
<port name="GetPOISPort" binding="tns:GetPOISPortBinding">
<soap:address location="http://localhost:8084/projectName/GetPOIS"></soap:address>
</port>
</service>
</definitions>

Can anyone help me?


I think the problem is the localhost part in your webservice. When i tried the same it worked by binding my jboss server to my actual IP i.e. 172.25.108.49 and gave the same in the URL like

private static final String URL = "http://172.25.108.49:8080/AndroidWebservice/AndroidSampleWebservice?wsdl";

I suppose this should work. If you have not tried it yet, may be give it a try !!!
dwarka.damodaran
Freshman
Freshman
 
Posts: 3
Joined: Wed Aug 18, 2010 3:23 pm

Re: Webservice (SOAP) with complex data type and KSOAP Clien

Postby abhishek.s » Fri Aug 27, 2010 4:05 am

when I use https instead of http it gives me error of SSL how can I resolve it ???I m using KSOAP library...
abhishek.s
Freshman
Freshman
 
Posts: 4
Joined: Wed May 26, 2010 2:15 pm

Https web service call

Postby tejas_26987 » Mon Aug 30, 2010 3:46 pm

Hello,

This post is for those guys who are getting error during calling of HTTPS web service and getting SSL Certificate error.

It is possible to call HTTPS web service by making custom service connection class. reply who really need this.

Thanks,
tejas_26987
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Aug 30, 2010 8:15 am

Re: Webservice (SOAP) with complex data type and KSOAP Clien

Postby mephju » Mon Sep 20, 2010 12:07 pm

Hi tejas_26987,

I would be very glad to get any information on this as I am trying to do exactly the same thing.
mephju
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Sep 20, 2010 12:05 pm

Re: Webservice (SOAP) with complex data type and KSOAP Clien

Postby andreslr » Thu Sep 23, 2010 9:58 pm

hi guys,

did anyone achieved to call a https webservice??
andreslr
Junior Developer
Junior Developer
 
Posts: 12
Joined: Wed Jul 01, 2009 6:44 pm

Re: Webservice (SOAP) with complex data type and KSOAP Clien

Postby kishore.thorata » Thu Nov 11, 2010 1:28 pm

hi can any one suggest the best way to call web service thatneed to send request in xml format exactly as the below soap, is it possible in ksoap2

For the soap

?xml version="1.0" encoding="utf-8"?>
soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
soap:Body>
employee xmlns="http://abcd.com/">
emp>
Name>string/Name>
Designation>string/Designation>
/emp>
/employee>
/soap:Body>
/soap:Envelope>

responce will be

?xml version="1.0" encoding="utf-8"?>
soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
soap:Body>
employeeResponse xmlns="http://abcd.com/">
employeeResult>string/employeeResult>
/employeeResponse>
/soap:Body>
/soap:Envelope>
Regards,
KISHORE.
User avatar
kishore.thorata
Freshman
Freshman
 
Posts: 8
Joined: Wed Jun 02, 2010 7:21 am

Top
PreviousNext

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 9 guests