Comment on Tutorial - Web services basics By Saravanan D. Rao



Comment Added by : Anup

Comment Added at : 2013-01-02 05:11:51

Comment on Tutorial : Web services basics By Saravanan D. Rao
Getting Invalid IPv4 format J2me Midp 2.0, Asp.net version 4.0, Ksoap2-j2me-core2.1.2 . Iâm using CLDC 1.1 MIDP2.0 and IIS7 Asp.net version 4.0 . My code is as followsâ¦

public String loginVerification(String userId, String pwd){
String Method_Name = âmLoginâ;
//String Method_Name = âLoginCheckâ;
try{
SoapObject request = new SoapObject(Constants.NAMESPACE_URL, Method_Name);
request.addProperty(âuseridâ, userId);
request.addProperty(âpasswordâ, pwd);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransport ht = new HttpTransport(Constants.LOGIN_URL);
ht.debug = true;
ht.call(Constants.NAMESPACE_URL+Method_Name, envelope); // getting error here
SoapPrimitive result = (SoapPrimitive) envelope.getResponse();
return result.toString();
}catch(IOException e){
return e.getMessage().toString();
}catch(XmlPullParserException e){
return e.getMessage().toString();
}

}

web service is as followsâ¦

[WebMethod]
public string mLogin(string userid, string password)
{
string message = string.Empty;
CommonDataEntity cd = new CommonDataEntity();
sqlfilter filter = new sqlfilter();
int retVal=cd.Select_CustomerLogin(filter.SqFilter(userid), filter.SqFilter(password), out message);

if (retVal > 0 && message == âUserâ)
{

return âtrue#â+cd.mLogin(userid);

}
else
{
return âfalse#â+userid;
}

}

Iâm not able to figure out where and what is the probâ¦. Need help!!


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Best Example sir
View Tutorial          By: Hiren Dangar at 2015-04-23 06:55:26

2. I need JSP Code to send SMS to mobile.
View Tutorial          By: nana at 2010-03-12 22:43:22

3. hi,
can you tell me how to run the code to

View Tutorial          By: raghu at 2008-12-26 03:15:52

4. nice example and this is very use ful
View Tutorial          By: jyothi at 2011-02-18 22:24:51

5. really very-2 good site....

thanks

View Tutorial          By: Priti at 2012-02-06 03:00:13

6. HI can you send "send sms" program throg
View Tutorial          By: manav at 2010-05-09 12:54:52

7. may i have one more example
View Tutorial          By: bujii at 2015-05-08 03:04:40

8. very simple explanation......
easily unders

View Tutorial          By: saurabh at 2009-04-17 16:02:30

9. Hi all

I am using getAttribute but

View Tutorial          By: Suvarna at 2012-01-12 06:56:55

10. I could not understand, anyone having an easier ex
View Tutorial          By: aatish at 2011-09-14 09:52:28