java me - ksoap connection with web service, no android (using ksoap) -
Well I'm making a connection ... Web service with SQL Server, web service with j2me, but Now I'm doing a Helloworld ... I could, but now I want to do a "hello world" + nombre ... parameter is not available in the web service, web service here
< code> [WebService (namespace = "http://tempuri.org/")] [Vebsaisbading (Confrfoto = WsiProfiles.BasicProfile1_1)] / para allow it with a web script and B service offers, which Aspianatti Ajeaks, is quite simple de la Laana Siguante // [System.Web.Script.Services.ScriptService] public class Service: System.Web.Services.WebService {public service () {WebMethod} Public string HelloWorld (string nombre) {return "Que onda" + nombre; }}and it has the code to call with ksoap ...
string nombremetodo = "HelloWorld"; String url = "http: // localhost: 49175 / website1 / service command"; String namespace = "http://tempuri.org/"; String SOAP_ACTION = namespace + numerametodo; Public Zero Travel () {SOAP Object Busqueda = New Soap Object (Namespace, Nombreametodo); HTTP Transport Transport = New HTTP Transport (URL); Busqueda.addProperty (new string ("nombre"), new string ("angel")); System.out.println ("Parametra Aggrado"); //busqueda.addProperty (Property Info. OBJECTE, "Angel"); Try SoapSerializationEnvelope envelope = new Sabunsirikrnkrn Anafef (Sopanlfafe. Transportacion.debug truth =; envelope.bodyOut = busqueda; System.out.println ( "OK"); {System.out.println ( "Comenjando Tronssaisn"); Transportacion Kcall (SOAP_ACTION, envelope); System.out.println ( "transport"); Respuesta = envelope.getResponse (). ToString (); System.out.println ( "respuesta ok");} catch (exception e) {texto.setString ( "fallo"); System.out.println ( "corruption l try"); Println (e);}}
"Q Onda me with a place" Returns the result, so I put it in the web service But never give it "QNADA" + nombre ... This is an application for j2me for Android, I'm looking for Android it's Sue ...
PropertyInfo p1 = new Snpttiinfo (); p1.setName ( "nombre"); p11.setValue ( "Angel"); busqueda.addProperty (p1);
but ksoap for j2me There are no methods in it. "SetName, setValue"; I have downloaded this library but I get an ugly bug and the app is not running ... with it I see the feet M so added ..
busqueda.addProperty ( "nombre", "Angel");
but it does not work ... it runs, there is no bug in it, but the web service does not get the parameter ...
Thank you STACKOVERFLOW People of my English are not very apologizing
I solved it, it is mandatory
envelope.dotNet = true;
Comments
Post a Comment