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. the best explaination
View Tutorial          By: kingh at 2010-09-17 04:06:46

2. thanks a lot,nicely explained
View Tutorial          By: dhanushka at 2014-08-13 14:40:37

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

4. the example program that given above for recursion
View Tutorial          By: bharathi at 2012-07-17 09:31:14

5. Thanks very much.
View Tutorial          By: Haritha at 2011-05-26 07:56:06

6. Seems to be the best tutorial on this topic. At le
View Tutorial          By: Bob Nickson at 2008-08-26 02:50:29

7. Works great! Thanks!
View Tutorial          By: Ewa at 2013-06-19 10:52:07

8. i am developing a video streaming pc server to j2m
View Tutorial          By: ziathegreat at 2009-05-19 13:19:15

9. Good Example ...For Both FIleWriter and FileReader
View Tutorial          By: karthikeyan.v at 2009-11-17 02:27:42

10. This can also prevent Outlook from using the autod
View Tutorial          By: Morgster79 at 2012-03-21 05:07:42