Hi Abhishek

I am getting the error sometghing like

09-05 11:16:46.841: WARN/System.err(2712):
org.xmlpull.v1.XmlPullParserException: expected: END_TAG {http://
schemas.xmlsoap.org/soap/envelope/}Body (position:END_TAG </{http://
schemas.xmlsoap.org/soap/envelope/}env:Fault>@1:267 in
java.io.InputStreamReader@44fdc7f8)


how to solve this and any tips how to find these 2
parameters:namespace and soap action.....

On Jul 23, 7:31 am, Abhishek Akhani <abhishek.akh...@gmail.com> wrote:
> Hi Rishabh
>
> I am giving youa sample code of my soap  processor class in which i have
> used soap service for login purpose...
> Its very easy to call soap service
>
> for that you have to add this ksoap library ( i have attached here ) to you
> project's lib folder and have to set its build path.
>
> Then after you just have to put your soap url, soap action and method name
> instead of mine... and it will work for you... you can get all the values
> from the response ( soapObject here ) by its getProperty() method...
>
> Here is the class
>
> public class SoapProcessor {
>     private final String NAME_SPACE = "http://tempuri.org/";;
>     private final String METHOD_NAME_USER_LOGIN = "W_UserLogin";
>     private final String URL = "https://your_url/wsdl";;
>     private final String SOAP_ACTION_USER_LOGIN =
> "http://your_soap_action_url";;
>     private String result;
>
>     public boolean userLogin(String userName,String password,Activity
> activity){
>
>         boolean isLogin = false;
>
>         SoapObject soapObject;
>
>         SoapObject Request = new SoapObject(NAME_SPACE
> ,METHOD_NAME_USER_LOGIN);
>         Request.addProperty("email", "a...@ab.com");
>         Request.addProperty("password", "asdfgh");
>
>         SoapSerializationEnvelope soapEnvelope = new
> SoapSerializationEnvelope(SoapEnvelope.VER11);
>         soapEnvelope.dotNet=true;
>         soapEnvelope.setOutputSoapObject(Request);
>
>         AndroidHttpTransport aht = new AndroidHttpTransport(URL);
>         aht.debug=true;
>         try {
>             aht.call(SOAP_ACTION_USER_LOGIN, soapEnvelope);
>             soapObject = (SoapObject) soapEnvelope.getResponse();
>             if(soapObject != null){
>                 result = soapObject.getProperty("result").toString();
>             }
>
>             if(result.equalsIgnoreCase("success")){
>                 isLogin = true;
>             }
>         } catch (IOException e) {
>             e.printStackTrace();
>         } catch (XmlPullParserException e) {
>             e.printStackTrace();
>         }    
>
>         return isLogin;
>     }
>
>
>
>
>
>
>
> }
>
>
>
>  ksoap2-android-assembly-2.3-jar-with-dependencies.jar
> 188KViewDownload

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to