0

Hai Friends

I want to invoke .net ?(.asmx) webservice in J2ME Application,
iam using following code , but its giving Runtime Exception

"SoapFault - faultcode: 'soap:Client' faultstring: 'Server did not recognize the value of HTTP Header SOAPAction: urn:Welcome#GetdrawTimes.' faultactor: 'null' detail: [EndTag </detail>]
"

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.io.*;
import javax.microedition.io.*;

import org.ksoap.*;
import org.ksoap.transport.*;
import org.ksoap.SoapObject;

public class testWebService extends MIDlet {

private Display display;

private String url = "http://194.9.0.1/ws2DigitMobile/Service.asmx";

TextBox textBox = null;
private Command cmExit;

public testWebService()
{
display = Display.getDisplay(this);

}

public void startApp() {
try 
{
doWebService(url);
}
catch(Exception e)
{
System.out.println("Exception: " + e);
}

}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
destroyApp(false);
notifyDestroyed();
}


public void doWebService(String url) throws Exception
{
StringBuffer sb = new StringBuffer();
String name = "Phobos";
TextBox textBox = null;
SoapObject client = new SoapObject("http://194.9.0.1/ws2DigitMobile/Service/", "GetdrawTimes");
client.addProperty("pstrIPAddress", "194.0.0.0");
client.addProperty("pstrMobileID", "124343");



HttpTransport ht = new HttpTransport(url, "GetdrawTimes");
sb.append("" + ht.call(client));
System.out.println(client.getNamespace());


textBox = new TextBox("Simple Web Service Test: ", sb.toString(), 1024, 0);
display.setCurrent(textBox);
}

}

please help me for this problem.

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by peter_budo
0

Congratulations! You've just decreased your chances of being helped by the people here.
You can find your double thread here (in case you don't know what I'm talking about).
If you want a quicker (more useful) reply than this one, then I suggest you to put your time into figuring out the problem instead of making double posts.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.