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. please give very easy program....this program is d
View Tutorial          By: rajesh at 2010-01-24 08:08:38

2. Well first-oof, I don't see the obvious app.
View Tutorial          By: Marvin Ambrose at 2010-10-07 01:30:30

3. how i can used inheritence ?
View Tutorial          By: samee at 2008-02-16 12:54:27

4. THANX :)
View Tutorial          By: Saurabh at 2012-01-02 16:13:06

5. how about soting you word? like your output will b
View Tutorial          By: [email protected] at 2011-01-27 16:40:51

6. it absolutely very usefull for me
Thanks

View Tutorial          By: sudhir Kr Singh at 2012-07-24 05:17:52

7. very good introduction.thanx to the authr of this
View Tutorial          By: anjali at 2011-06-17 02:14:48

8. place both comm.jar and javax.comm.properties in l
View Tutorial          By: Rania at 2010-09-14 19:52:49

9. Your explanation is good but, it will be better i
View Tutorial          By: Jabaraj at 2010-03-22 06:02:33

10. Thanks summarized and useful
View Tutorial          By: Pegasus_Silvershade at 2010-09-10 18:02:49