consume asp.net webservice in android....help required....

9 replies [Last post]
jaydeep.jadav
User offline. Last seen 1 year 23 weeks ago. Offline
Joined: 11/19/2010

Hello Everyone i have issue regarding consume a asp.net(.asmx) webservice in my android application.

i am using ksoap2 and eclipse IDE

my code is................

package hello.webs;

import java.io.IOException;

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

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

public class SignIN extends Activity {
/** Called when the activity is first created. */
private static final String NAMESPACE = "http://tempuri.org/";
private static final String URL = "http://xx.xx.xx.xx/xxxxxx/services/webservice1.asmx";
private static final String SOAP_ACTION = "http://tempuri.org/SignIn";
private static final String METHOD_NAME = "SignIn";

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
envelope.encodingStyle=SoapSerializationEnvelope.XSD;
envelope.dotNet = true;
HttpTransportSE androidHttpTransport = new HttpTransportSE (URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope); //Error comes here
SoapObject resultsRequestSOAP = (SoapObject) envelope.bodyIn;

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
}

The following error comes in XmlPullParserException

org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG @1:6 in java.io.InputStreamReader@43e519b8)

my webservice soap 1.1 request is like following

<?xml version="1.0" encoding="utf-8"?>

string
string

string
string

aedanadrien
User offline. Last seen 5 days 7 hours ago. Offline
Joined: 05/11/2012
A hardware reference guide

A hardware reference guide was created and devices began shipping in 1996, although most of these device bore little resemblance to the goal of a pen-based touchscreen handheld device. Milwaukee Moving Company

simoncowell25
User offline. Last seen 10 weeks 3 days ago. Offline
Joined: 03/04/2012
I would be really thankful if anyone

I would be really thankful if anyone could explain how to create an appropriate method string Login(string username, string password) with appropriate App.config settings and Interface with appropriate [OperationContract] signature in order to read these two parameters from client and reply with session string. pharmacy affiliates

Liaata
User offline. Last seen 18 weeks 2 days ago. Offline
Joined: 01/09/2012
thanks for answering OPs
robert katez
User offline. Last seen 19 weeks 5 days ago. Offline
Joined: 12/30/2011
This article was really

This article was really informative and I have learnt so much after reading this. I wonder some day I would be able to share such valueable information on my own blog. Car service dc

1xuntong
User offline. Last seen 20 weeks 4 hours ago. Offline
Joined: 12/25/2011
prada

Only love in rags miu miu sale bags , nest in my warm piano rhythm in the classroom if have be like without landing to serenade.
Familiar with to can't familiar spectrum, lined with lazy cat as comfortable as delicate girl. Just walked in the door of the noble prince has such as a young temperament, feel is such a scene.
Only the son of the White House in the miu miu online store appeared in the banquet hall.

archana.u
User offline. Last seen 1 year 2 weeks ago. Offline
Joined: 12/17/2010
ANDROID TRAINING IN SINGAPORE!!

Be An Android Professional Today!!

Learn Android - The new technology sensation!
Build your career options!!

SQL Star in partnership with SiTF (Singapore IT Federation) brings you Embedded Android Development Training program right here in Singapore. This program comes with a funding support from *iDA CITREP [MR Ref Code: CITREP0910/MR/10-06/263].

Ideate and create mobile applications, Launch them on app stores, Create a buzz!

Get employed with mobile application development company!!

Train your work force on this latest happening open source mobile platform!!!

LEARN Android from the experts & be the early bird to reap maximum career benefits!
*The Enhanced CITREP supports up to 80% of the course fees, capped at $3,000 per trainee, whichever is lower. For Terms and conditions, please visit http://www.ida.gov.sg/citrep. Organizations and self-sponsored trainees too are eligible for Enhanced CITREP funding support.

Our Services;

1. Embedded Solutions 2. Android Platform Integration
3. Customized Training 4. Mentoring Service
5. R&D Service 6. System Integration Services

To know more write to archana.u@sqlstar.com

pouch
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 12/16/2010
Really appreciate this post.

Really appreciate this post. It’s hard to sort the good from the bad sometimes, but I think you’ve nailed it!

mortgage long island

rgbgood
User offline. Last seen 1 year 12 weeks ago. Offline
Joined: 12/09/2010
vinc

Perfect thanks!My site looked outlet so boring so I needed something and this fits the bill.

Please mail me if you wish to get some cardy tall feedback. I’ll post the link when kensington the site is done :D

pandorauk
User offline. Last seen 1 year 22 weeks ago. Offline
Joined: 12/07/2010
it is sometimes world of hard

it is sometimes world of hard to Pandora in a world of adults Pandora Bracelets