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



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. hi
Thanks great your tutorial. i want to wr

View Tutorial          By: fatima at 2009-08-29 00:15:27

2. good understandability code
View Tutorial          By: Raja Mahendra Kumar at 2009-03-05 03:11:26

3. hello!!can anyone help me. can you send me the com
View Tutorial          By: denisse at 2008-01-07 05:40:25

4. nice explanation.but one thing in retrieving proce
View Tutorial          By: venkateswarlu at 2013-04-06 09:03:46

5. This the very good introduction to the J2ME for th
View Tutorial          By: chetan jain at 2010-04-01 06:39:32

6. I was able to modify this to work perfectly.

View Tutorial          By: _Jon at 2012-04-01 23:04:49

7. I am trying to figure out what our Professor did w
View Tutorial          By: Abhishek at 2011-04-09 23:31:28

8. Hi Alvin, in order to send sms from phone I suuges
View Tutorial          By: Vasan at 2008-03-21 01:44:02

9. i'm really hoping this example was wrote before 19
View Tutorial          By: Anonymous at 2009-06-07 21:00:18

10. I am very comfortable with this example, its very
View Tutorial          By: Inam at 2010-11-07 03:04:46