Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Miguel Murillo

Greenhorn
+ Follow
since Aug 21, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Miguel Murillo

Hello Aleksandar!

I follow your suggest and try display progress in the screen but when the cells crashes can´t print because no return me the control...
I decided use Microlog (thank you for the info, will probe in other Android develop). I follow the steps, using the API (needed add jsr082 (bluetooth API) to compile) and put the code to write a log in a .txt file.

In the emulator works fine (one more time) but in the phone : ask me if I allow him to write, the phone blocks when intent connect with the ws, I force the close and the file never was created. I intented create and write a line in startApp() method (to prevent the block) but the file wasn´t created.

I guess after this... the phone is blocking all actions that involved permission or external libs.

Thank you for your time Aleksandar,
best regards!
12 years ago
Once again thank Aleksandar.

I use your code and could connect to the ws and get the info!!
(with little changes):

String message = "<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " +
"xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
"<soap:Body>"+
"<getEncuestasAResponder xmlns=\"http://mavha.com/\">" +
"<param>unparametro</param>" +
"</getEncuestasAResponder>" +
"</soap:Body>" +
"</soap:Envelope>";

(the rest equal)
...
...


but in the phone... no func!!! intent connect but return nothing... only intent connect (the world icon appear) but later on wait a few seconds disconnects...

I would try changing some parameters and if I could run the application in this phone (sony w300i) ... promise i will post the solution.

In the emulator works perfect!

thank you for your help.

excuse me again for my poor english.
12 years ago
Hello Aleksandar,
it´s true, would be a good option to try manually avoiding ksoap.

Be grateful if you have an example to rewrite the application and retest in phones.

Thank you.

regards.
12 years ago
Hello Aleksandar,
thank you for response me.

We decided suspend the j2me develops because the tests we did on various cell returned very different results depending on each device!!

For example:
Nokia 6131: OK
Sony Ericsson w300i: (Error: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/} Envelope(positions:START_TAG<h1>@1:4 in java.IO.InputStreamReader@23456f).
Motorola Z6: Unable to process command “aceptar”. Blocking call performed in the event thread.
Motorola A1200: touch screen... we need use Canvas to implement in this phone. No test.
Motorola rockr W5: OK
Sony Ericsson w302 when intent install the jar... NO AUTHORIZATION
Nokia 2760: error when intent save a phone number on RMS.

We see that each manufacturer in each model implements in its own way and place restrictions on taste. This prevents us from creating an application that runs on most cell phones properly.

best regards.
12 years ago
Good morning,

I have an error when intent connect from my Sony Ericsson w300i to an .Net 2005 (asp.net 2.0) webservice:

expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/} Envelope(positions:START_TAG<h1>@1:4 in java.IO.InputStreamReader@23456

The ws receive a String and return a String.


My application use Ksoap2 (core) library. I test the same application in the wireless toolkit 2.5.1 emulator, in a Nokia 6131 and in a Motorola rockr W5, working properly in all. The code I use to connect is:

SoapObject request = new SoapObject(NAMESPACE, "getResultados");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;

envelope.setOutputSoapObject(request);
request.addProperty("pregunta","unapreguntacualquiera");
HttpTransport ht = new HttpTransport(URL);

try
{
ht.call(NAMESPACE + "getResultados", envelope);
SoapObject result = (SoapObject) envelope.bodyIn;
String respuesta = result.getProperty(0).toString();
...


Also I tried with some extra lines:

envelope.encodingStyle = SoapSerializationEnvelope.ENC;

or with:

ht.setXmlVersionTag("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

but not change the result.


Also I monitored the network trafic (when use the emulator) obtaining:


Output (from emulator to ws):

<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
<v:Header />
<v:Body>
<getResultados xmlns="http://unaempresa.com/" id="o0" c:root="1">
<pregunta i:type="d:string">unapreguntacualquiera</pregunta>
</getResultados>
</v:Body>
</v:Envelope>


Response (from ws to emulator):

HTTP/1.1 200 OK..Server: Microsoft-IIS/5.1..Date: Wed, 19 Aug 2009 13:42:03 GMT..X-Powered-By: ASP.NET..X-AspNet-Version: 2.0.50727..Cache-Control: private, max-age=0..Content-Type: text/xml; charset=utf-8..Content-Length: 442....<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org 2001/XMLSchema">
<soap:Body>
<getResultadosResponse xmlns="http://unaempresa.com/">
<getResultadosResult>unarespuestacualquiera</getResultadosResult>
</getResultadosResponse>
</soap:Body>
</soap:Envelope>


I see all ok... and in the other devices func. Ok...


Thank you for your time!


regards.


excuse me for my poor english.
12 years ago