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



Related Tutorials

Java program to get location meta data from an image

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

Archived Comments

1. how to implement stack with using vector class
View Tutorial          By: anamika at 2015-08-25 18:58:29

2. the default implementation of validate returns nul
View Tutorial          By: Jerry at 2009-02-01 11:12:06

3. i have been searching for this result for more tha
View Tutorial          By: nithin at 2010-08-08 12:55:18

4. recursive programs that ask the user to enter the
View Tutorial          By: siyabonga at 2011-08-10 08:34:44

5. hello,
how can i add a specific variable va

View Tutorial          By: Abdulla at 2014-12-05 15:30:27

6. Pastoral College is a small college in the Midwest
View Tutorial          By: James Chui at 2015-08-03 00:48:50

7. Hi MR,are you have java code to read sms...... tha
View Tutorial          By: ronized at 2008-12-29 16:59:27

8. Hello Nishi,
The class names in your progra

View Tutorial          By: Kiran at 2011-12-16 06:32:54

9. thanks
for your clear and precise explanati

View Tutorial          By: Tausiq at 2009-09-05 07:27:49

10. Great Thanks
View Tutorial          By: anawaz at 2012-10-05 10:28:20