KSOAP2 working on the Simulator, but failed on the device. Help, please!
Hi all. Please, I need support on this issue.
I have a request of KSOAP2 running which:
1) Œuvres ALLWAYS on the Simulator (9700 Simulator)
2) FAILS on the device when you use 3 G Internet Link
3) work on the device when hard reseting it and directly using Wi - Fi link (if you switch to 3 G, it starts failing).
When it do I get the following error:
type of org.xmlpull.v1.XmlPullParserException:Unexpected (position: TEXT SocketException:...@1:33 in java.io.InputStreamReader@hexhere)
Some other times I get an IO error faced:
net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection timed Out
The funny thing is that it works through 3 G as 1 in 40 times... it seems that 3 G connection is too slow to KSOAP2 to work properly, or something like that. The complex type is small (8 strings).
My webservice is a webservice VB.NET located on the production IIS server. It works well because it responds to any request of Simulator.
Additional data:
-Other Internet applications of device (such as the Internet browser) works well through 3G even when my application does not always succeed. Coverage of 3G service is excellent.
-J' use JRE 5.0.0.
-Device is a BlackBerry Bold 9700
-Webservice is written in VB.NET in the production on the Internet Server, and it works perfectly because it responds to each request of Simulator.
-J' use javaloader.exe to deploy the cod to the device files (both, ksoap library cod and cod of my project)
-L'application is not signed.
-Once the application starts breaks down (when you switch to 3G) it maintains in default if you return to the WiFi again.
Here is my code:
String res=""; boolean error=false; Vector seguimientos = null; SoapObject m_Soapobject=new SoapObject("urn:tempuri", "GetSeguimientos"); SoapSerializationEnvelope m_Envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); m_Envelope.encodingStyle = SoapSerializationEnvelope.ENC; m_Soapobject.addProperty("strInstance", "r2sistemas"); m_Soapobject.addProperty("user", "myuser"); m_Soapobject.addProperty("password", "mypassword"); m_Soapobject.addProperty("comercialId", "3"); m_Envelope.addMapping("urn:tempuri/encodedTypes", "Seguimiento", new Seguimiento().getClass()); m_Envelope.bodyOut = m_Soapobject; m_Envelope.setOutputSoapObject(m_Soapobject); HttpTransport ht = new httpTransport("http://www.productionserver.com/service1.asmx"); ht.setXmlVersionTag(""); try { ht.call("urn:tempuri/GetSeguimientos", m_Envelope); SoapObject respuesta=(SoapObject)m_Envelope.bodyIn; seguimientos=(Vector)respuesta.getProperty(0); } catch (IOException e) { error=true; res="IO Problem: " + e.toString(); } catch (XmlPullParserException e) { error=true; res="XMLParser problem: " + e.toString(); } if(error!=true) { Seguimiento seg=(Seguimiento)seguimientos.elementAt(1); res=seg.Comentario; } this.add(new LabelField("aa"+ res));
I read on this forum that ksoap2 cannot treat the http error messages. You must download the KSOAP source and change it to do this. Something like ServiceConnectionMidp. The message is this: link
I use a port KSOAP2 library: ksoap2-j2me-core-prev - 2.1.2.jar, like I said it works fine on the Simulator. I tried to download the source code of KSOAP to debug in the failing methods, but was unnable to do compile ok on Eclipse.
I really am stuck at this point. Please, any help would be great.
Thank you in advance.
Ok. Further reading took me to the problem.
AFAIK, there are 5 ways to connect to web addresses from a BlackBerry device.
Of course, the BB Simulator uses one that works with my WS. When my BB is connected via wifi it works as well. However, when I use the 3g from my device connection, I should mention the destinies of correct connection on the connection URL parameters.
That's what I did:
I read this: 1 Source
And this (Spanish): Source 2
Of course, I noticed that my BB is connected to a BES company, I must indicate the correct ConnectionUID to my address book of device on the connection string. So now the line in my code is:
HttpTransport ht = new HttpTransport("http://www.address.com/service1.asmx;deviceside=false;ConnectionUID=YOURCONNECTIONUID");
To find your UID connection, take your device, go to Options - Advanced Options - service book. Choose a book of service applications that connects successfully on your device (in my case Blackberry Internet Browser service), open it and copy the ConnectionUID. Then, paste it in the connection string.
Now, it works great!
My next challenge is to find connection string parameters correctly so that the application works on any device, not only on my ones company BES.
Someone knows what should be the standard setting?
I hope that my help of inquiry.
P.S. still cannot complete successfully ServiceConnectionMidp...
Tags: BlackBerry Developers
Similar Questions
-
Hi, I bought 6 Iphon from another country and it does not work in the USA help please!
Hi recently I went to South Korea and I bought the iphone 6 in there and used it
And I'm back to try from the USA at the same use iphone 6, but it does not work with my verizon sim card
So I went to the verzion store to find the problem but they could also solved the problem
Can you help me please?
N ° do not use this phone on Verizon. Verizon is a CDMA carrier. It can be possible to operate on the Verizon LTE network, but they don't will not activate it on their CDMA network. Only unlocked iPhones they will activate on their network (excluding those sold specifically for Verizon) are the 6s and 6 s more.
-
Make HttpConnection work on the device
Hello
I have a java program that uses a HttpConnection (in the main thread). It works quite well on the Simulator, but when I run it on my device (8310 Curve), she just do nothing! Even after asking to allow the application to make http connections.
I hear some APN settings to configure on the device. I did it too ("airtelgprs.com" with name of user and password blank for Airtel, India).
Is there something else that does not leave my request to make http connections? Can someone please tell me what all I should do tomake my http connections work on the device?
Thank you
-Arun
This means that you can perform a blocking i/o operation, as an HTTP connection, thread in your event management program. You must create a worker thread to manage the operations of HTTP connection.
-
AirPlay does not work on Apple TV with ios 10. It was working before the update. Please notify.
Try these steps, check to see if things work after each step if necessary, before you try the next.
- Check AirPlay is on the Apple TV (turn market if it already is)
- Check that both devices are on the same network (settings > Wifi on the mobile device and the settings > general > network, on the Apple TV).
- Restart the Apple TV (settings > general > restart).
- Restart the Apple TV by removing ALL cables for 30 seconds.
- Restart your router. (Also try to remove the power cord for at least 30 seconds)
- Restart your computer or mobile device.
If you're still having problems, try to use 802.11n for wifi if you currently use 802. 11B or 802. 11 g.
If your problem is AirPlaying starting a computer, try turning off bluetooth
If you're still having problems, the following article can help you.
Troubleshooting connections and Wi - Fi networks
WiFi Diagnostic Software (for Mac users)
You will also find help on this page, where I have collected some of the more unusual solutions for network problems.
-
Adobe Premiere Elements doesn't recognize my camcorder - Canon GL-2. Can I make it work? The device worked very well with my old computer (just died) and an older version of Premiere Pro. Any suggestions?
Version 13 capture is more than one camera to tape
http://helpx.Adobe.com/premiere-elements/KB/removed-features-formats-elements.html
-
I want to print a document that contains 20 pages. I can print individual pdf pages from the same document usung photo shop elements 4, but it is laborious. Help, please. I've updated the Adobe reader to the latest version. This fault is developed when I was at Midway through a series of 20 pages of printing documents.
In the Advanced Print dialog box disable the entry "print to file".
-
my app store on my 6plus does not work... not load materials... Help, please
Turn off your device and turn it on again. If this does not help, sign out of your account and reconnect.
In addition, you can try to reset your settings.
- Press and hold the sleep/wake button
- Press and hold the Home button
- Press and hold both buttons until the display turns off and on again with the Apple logo on the subject.
Alternatively, you can go to settings - general - reset - Reset all settings
-
I have a problem whit security for Microsoft Works 8 (KB977304), appear always 646 error Code? Help, please!
Hello
1. what operating system do you use?
2 are you able to install all other updates on your computer?Try to download and install the update from the link below and check for the issue.
http://www.Microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=807426a1-8b78-4681-A606-dc39f4d7b64aFor more information visit http://support.microsoft.com/kb/977304I hope this helps.Thanks and greetings
Umesh P - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
[If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.] -
I reinstall xp on my toshiba laptop Dungeon wonders for SDBUS. SYS file that is not on the cd help please, I did once before without this problem
Please try to use different CD or simply remove the CD then insert again the installation request for the files.
-
GPS location works Simulator, but does not work in the device
Hi all,
I have problem with GPS location.
I have the button through which I can get the latitude and longitude in Simulator via LocationProvider class.
His work very well in the Simulator, but giving is not the result in the unit.
I use Storm 9530 devices and curve 8830.
Thank you
Valter
Thanks for your support,
Finally, I found my location.
The steps are:
As a first step BBDeveloper mentioned
Options of-> advanced-> GPS Options
Now,.
Start the application maps
Select Menu-> start the GPS Navigation
or
Find the location-> where I am
It will activate the GPS.
Thank you and best regards,
Valter
-
Rental app run on the Simulator, but not in real device!
Hello
I made a simple application using GPSDemo in JDE, I get altitude, longitude, latitude... I tried in the Simulator (9000) and it worked perfectly.
But when I put it on my BB (bold 9000), I can't get the location information. I've done some tests and I think it's because the location.isValid () return false!
I checked the settings of the BB and the GPS is activated.
Do you know what is the problem? And what can be the solution ?
Thanks for your help and I apologize if my sentences are strange, I'm French and not very versed in English ^^...
Ok! I found the solution! The problem wasn't my code, it came from the camera. I had update (outdoor) GPS data in the advanced options because it was the first time I tried to use it.
And now it works perfectly!
Thank you for all your help
-
tried the Device Manager and add/install the old hardware on the wizard... he finds ADSInstant HTV PC1, but sending the message... Impossible to install correctly the code 10
Restore the system to then it was working properly.
-
Hi group!
I have a brilliant parent project that serves as a springboard for other projects. Users click a component of software they want and are redirected to a page with a list of all the documentation available for this component. Click on the name of a document and access - a lot of PDF files. BUT I also wish they were able to tie the online help for the component. After having read up on the link through / between projects, I knew that I needed to create a parent project (for the page intro and links brilliant) and projects for children (for software components).
THEN
I created a parent sensitive HTML5 project and the projects of two children. I compiled the parent to create mergedprojects files, and then open the projects children and collected to the appropriate mergedprojects folder. I then created a hyperlink to the file list html documentation in the project parent towards the child file software component html (output folder and start page [which is the same as the default theme]) and the link does not work! The child and its table of contents appears in the parent TOC so topics are here, but I can't link to them. If necessary, I can send screenshots.
Where I am dorking this place?
Thanks in advance for your time and help!
Scottie 'needs help' gear
What is your relationship like? And how did you create the link?
A typical reactive merged help is structured as follows:
index.htm (Master home page)
mergedProjects
childName
index.htm (starting page for child)
A child from the index.htm page link would look like this:... /... index.htm
Kind regards
Willam
-
WebWorks app does not work on the device
I am currently working on the webworks app and then I compiled the app on Mac environtment. My application get not problem with the compilation of the process, but it does not start on a real device.
My smart phone BlackBerry say: cannot display the file
Thanks for the help
Solved now
-
Notification do not work in the device
Hello, I have "create a simple application to the notification of the test, but application not working on my device and display the error"error at startup PushNotification; Module 'PushNotification' trying to access a secure API. ».
My code is:
SerializableAttribute public class PushNotification extends UiApplication {}
Public Shared Sub main (String [] args) {}
PushNotification pn = new PushNotification();
pn.enterEventDispatcher ();
}{PushNotification()}
pushScreen (new ScreenStart());
}
}class ScreenStart extends form {}
{ScreenStart()}
setTitle ("notice of application");ButtonField bf = new ButtonField ("receipt Notification");
bf.setChangeListener (new FieldChangeListener() {}' Public Sub fieldChanged (field field, int context) {}
try {}
ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance ();
EncodedImage image = EncodedImage.getEncodedImageResource ("icon.png");
ApplicationIcon icon = new ApplicationIcon (image);
Indicator of ApplicationIndicator = reg.register (true false, icon);
indicator.setValue (7);
}
catch (Exception e) {}}
}
});
Add (BF);ButtonField CFB = new ButtonField ("own Notification");
bfc.setChangeListener (new FieldChangeListener() {}' Public Sub fieldChanged (field field, int context) {}
try {}
ApplicationIndicatorRegistry reg = ApplicationIndicatorRegistry.getInstance ();
Reg.Unregister ();
}
catch (Exception e) {}
}
}
});
Add (CFB);}
}CUMPS
Have you signed the application before putting it on the device?
Maybe you are looking for
-
"Don't forget to download history" setting is ignored
I don't know if it started the update of Firefox 8 immediately, but FF is currently saving downloads in the menu background despite the fact that I've got "Remember download history" checked. I can't find anyone else with this problem and think that
-
Hello people! I have a generic application that run a timed sequence of loop. Inside the loop, I tried to generate a random number and get him curent date when the number was generated. As you can see, For example: I put the period at 50 ms. In the E
-
I'm running an all in one HP PSC 2410 (since 2003) with Windows XP SP 3, current Firefox & IE8. My HP Director stopped opening after I upgraded from IE 6 to IE8 it several months ago. While looking for help on HP, I came across a patch drivers XP 200
-
where can I find a driver for the jlms dvd rom? 166 the code 41 when I ran device mngr
where can I find a driver for the jlms dvd rom? 166 the code 41 when I ran device mngr
-
My HP Pavilion dv6 3130sa sound setting
Hello My laptop's hard drive crashed and I changed the hard drive and as I was not provided with my laptop recovery disks, I loaded windows 7 Ultimate x 64. I tried to download the drivers from the HP site for everything and loaded AMD HD Audio devic