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. Works thnx :D :D :D :D
View Tutorial          By: nik at 2014-11-09 20:44:29

2. Error loading SolarisSerial: java.lang.Unsatisfied
View Tutorial          By: amit doshi at 2009-04-06 02:00:28

3. It can be Made Popular by adding Links or Suggesti
View Tutorial          By: Ramalingam at 2010-03-20 23:00:41

4. very very nice...
thanks

View Tutorial          By: ramu at 2010-11-23 23:38:18

5. it is gooo...very helpful to know the basics
View Tutorial          By: srikanth at 2010-08-24 00:38:57

6. The code gives the following exception :-
<

View Tutorial          By: anju at 2014-03-15 07:02:18

7. XML Parsing - Simplified.
Thanks.

View Tutorial          By: Piyush at 2011-05-19 22:56:23

8. very nice and good introduction for beginners.
View Tutorial          By: annie at 2011-11-23 06:50:32

9. Hi,
I can run this program.But after

View Tutorial          By: jayaraj at 2009-06-05 01:28:18

10. finally an understandable example
View Tutorial          By: sdf at 2012-11-26 21:44:34