Consume Webservice - java.io.IOException: General socket error

Hey,.

I'm trying to consume a webservice ( www.webservicex.net, but also tried other forecasts) with a smart blackberry phone, but I still have a java.io.IOException.

I generated stubs with the Java Wireless Toolkit 2.5.2. Now, I call the heel of the Java application.

My MDS is running and are configured for use with my proxy. I can view each page with the built-in browser.

The call of the stub works like this:

public class BB_WeatherStart extends MainScreen {

   public BB_WeatherStart() throws RemoteException {
    com.weather.WeatherForecasts weather = null;
    WeatherForecastSoap_Stub stub = new WeatherForecastSoap_Stub();
    weather = stub.getWeatherByZipCode("10024");

    LabelField longi = new LabelField();
    longi.setText("Longitüde" + weather.getLongitude());
    add(longi);

    LabelField status = new LabelField();
    status.setText("Status" + weather.getStatus());
    add(status);
   }

}

The instantiation of the stub works, but the call of the method getWeatherByZipCode returns this exception.

This is the code for the method:

public com.weather.WeatherForecasts getWeatherByZipCode(java.lang.String zipCode) throws java.rmi.RemoteException {

   Object[] inputObject = new Object[1];
   inputObject[0] = zipCode;

   Operation op = Operation.newInstance(_qname_GetWeatherByZipCode, _type_GetWeatherByZipCode, _type_GetWeatherByZipCodeResponse);
   _prepOperation(op);
   op.setProperty(Operation.SOAPACTION_URI_PROPERTY, "http://209.162.186.60/GetWeatherByZipCode;deviceSide=true");

   Object resultObj;
   try {
      resultObj = op.invoke(inputObject);
   } catch (JAXRPCException e) {
    throw e;
   }

//Snip.. the Rest of the method is never reached ;)

}

The Exception is thrown in the call to op.invoke (inputObject);

I also tried the hostname instead of IP address, but then I get a j "" ava.io.IOException: bad DNS address "and if I try without the"; " deviceSide = true' I get the message "Local port: 19780 APN:"rim.net.gprs"APN username: password 'null' AFN: there is no connection"null"

Thanks for your help

Tina

After watching a little I don't think that the original problem was with the connection I think it is related to a null value returned by the web service.  I generated a set of stubs from the web service, you were using and tried with the same result as you.  I got a version of 4.5 and made some settings (I don't specifically know who he was) and the error has become ' java.rmi.MarshalException: nillable not element of array in response type is not met. ".  Went up to version 4.7 and here it works very well.  If you run this with a test tool web service call, you see a null of WeatherData to the bottom element which is the likely culprit.  I read somewhere that BB do not have NULL values in some earlier versions.

hope that helps.

T

Tags: BlackBerry Developers

Similar Questions

  • General Socket error

    I hope someone can help with this. I use a TCP socket client in my application. It works pretty well, but it seems to be about 30 calls on a TCP socket and then up a "General Socket error." This puts the unit in a State that usually requires a restart of the phone before it will resume communication socket. My code is below. Any ideas or suggestions are greatly appreciated.

    OK, I hope that someone can offer a better solution, but after a few tries, here is what is happening. I am struck these calls taken very quickly. Too fast, in fact, the garbage collector release resources appropriately. If I call system.GC() periodically, resources are released as soon as I need them to be. I realize that I should allow the system to take care of garbage collection for me, but my requirements are such that it is not possible. I also realize that Blackberry is not an ideal platform for my needs, but I have to work within the limits that I gave.

    Based on my code, if anyone can provide a better way to deal with this that force the garbage collection, I really appreciate it.

  • General Socket error on torch Simulator

    Argh...

    I used the storm Simulator to test my application.  I can read and write very well http and Sockets. Now I download the Simulator for the torch and I get "General Socket error" on all network access.  I looked in the debugging that I can't find something different.

    Ideas?

    Mark,

    Sorry I just thought of it.  He had something to do with my VPN DNS resolution.  I just used the IP address and I'm good.

    Thank you.

  • General socket error please help urgent

    Hello

    I do the http connection call following webservice.

    http://maps.google.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&sensor=false
    

    the code is as follows,

    HttpConnection conn = (HttpConnection), Connector.open (url);

    InputStream in = conn.openInputStream ();

    If (responseCode is HttpConnection.HTTP_OK) int inChar.

    {

    final StringBuffer inBuffer = new StringBuffer() ;

             While ((inChar = in.read ())! = - 1).

    inBuffer.append)

    inChar Char));

    in. Close();

    }

    This code worked fine yesterday, today, I get 200 responsecode but get the general exception taken during playback.

    If I use some other webservice it also works very well.

    pls pls help

    Here seems to be nothing wrong with the link.

    I would recommend that you do not open the InputStream, until you have the response code and I was looking at using IOUtilities.streamToBytes rather than you StringBuffer loop, but here the noise.

    Is your problem on a device or a Simulator?

  • java.io.IOException on Blackberry 9700

    Hey... Uhm... When I try to use a webservice (SlackerRadio on my BlackBerry 9700), it is said it is impossible to activate due to the failure of activation of: java.io.IOException: General Socket error. How can I fix? Please and thank you

    Hello and welcome to the forum of Java developers.

    Before look us at your problem, it seems to me that you are not a developer of BlackBerry, but have installed the Slacker App and have problems with him?  If Yes, then you should use the Slacker support procedure (sorry I'm not aware of it), because they know how they wrote at the request and so they will have a better idea of what changes you can make to the configuration, so that it will work for you.

    Let us know if you develop for BlackBerry, and then we'll try to help you.

  • Error when running a page in J Developer - java.io.IOException: C:\JDeveloper10g\jdevhome\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\server.xml

    Hello

    In J Developer a strange error happens when I try to run any page yesterday.

    I don't know what happened and how do I fix this

    Can someone please help me what to do?

    Screenshot below shows the dialog box when opening the developer J (10.1.3.3)

    Capture.PNG

    Here is the error when running a page,

    java.io.IOException: C:\JDeveloper10g\jdevhome\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\server.xml

    at oracle.jdeveloper.xml.DomIO.loadImpl(DomIO.java:128)

    at oracle.jdeveloper.xml.URLDomIO.load(URLDomIO.java:21)

    at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:43)

    at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:37)

    at oracle.jdeveloper.xml.oc4j.Oc4jConfigAdmin.getServerConf(Oc4jConfigAdmin.java:227)

    at oracle.jdeveloper.xml.oc4j.Oc4jConfigAdmin.getRmiServerURL(Oc4jConfigAdmin.java:978)

    at oracle.jdeveloper.xml.oc4j.Oc4jConfigAdmin.getRmiServer(Oc4jConfigAdmin.java:1002)

    at oracle.jdevimpl.runner.oc4j.Oc4jZombieUtil.okToProceed(Oc4jZombieUtil.java:38)

    at oracle.jdevimpl.runner.oc4j.Oc4jStarter.preStart(Oc4jStarter.java:614)

    at oracle.jdevimpl.runner.oc4j.Oc4jStarter.start(Oc4jStarter.java:269)

    at oracle.ide.runner.RunProcess.startTarget(RunProcess.java:830)

    at oracle.jdeveloper.runner.JRunProcess.startTarget(JRunProcess.java:473)

    at oracle.jdevimpl.runner.run.RunningProcess.startTarget(RunningProcess.java:76)

    to oracle.ide.runner.RunProcess$ $2 1.run(RunProcess.java:768)

    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Caused by: oracle.xml.parser.v2.XMLParseException: start of the element root waited.

    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)

    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)

    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)

    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:292)

    at oracle.jdeveloper.xml.DomIO.loadImpl(DomIO.java:115)

    ... more than 20

    java.io.IOException: C:\JDeveloper10g\jdevhome\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\server.xml

    at oracle.jdeveloper.xml.DomIO.loadImpl(DomIO.java:128)

    at oracle.jdeveloper.xml.URLDomIO.load(URLDomIO.java:21)

    at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:43)

    at oracle.jdeveloper.xml.BindingIO.load(BindingIO.java:37)

    at oracle.jdeveloper.xml.oc4j.Oc4jConfigAdmin.getServerConf(Oc4jConfigAdmin.java:227)

    at oracle.jdeveloper.xml.oc4j.Oc4jConfigAdmin.getHttpWebSiteConf(Oc4jConfigAdmin.java:359)

    at oracle.jdeveloper.xml.oc4j.Oc4jConfigAdmin.getHttpPort(Oc4jConfigAdmin.java:1125)

    at oracle.jdevimpl.runner.oc4j.Oc4jPortConflictUtil.acquirePorts(Oc4jPortConflictUtil.java:58)

    at oracle.jdevimpl.runner.oc4j.Oc4jStarter.preStart(Oc4jStarter.java:622)

    at oracle.jdevimpl.runner.oc4j.Oc4jStarter.start(Oc4jStarter.java:269)

    at oracle.ide.runner.RunProcess.startTarget(RunProcess.java:830)

    at oracle.jdeveloper.runner.JRunProcess.startTarget(JRunProcess.java:473)

    at oracle.jdevimpl.runner.run.RunningProcess.startTarget(RunningProcess.java:76)

    to oracle.ide.runner.RunProcess$ $2 1.run(RunProcess.java:768)

    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Caused by: oracle.xml.parser.v2.XMLParseException: start of the element root waited.

    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)

    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:341)

    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)

    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:292)

    at oracle.jdeveloper.xml.DomIO.loadImpl(DomIO.java:115)

    ... more than 20

    I guess BC4J Server is not running.

    Please help me.

    Had to extract the patch again and run the new developer,

    Old data of projects migrated to this new folder, then it is running

  • Deployment error - java.io.IOException: no space is available on the device

    Hi everyone, I'm the BPM project deployment, I get the error below. Can someone please guide the solution for the error below. Thanks adavance. oracle.fabric.common.FabricDeploymentException: error occurred while processing file sca_TestSOAEmploy_rev1.0.jar rad before transferring in the store of MDS. Please make sure that the sar file is a valid jar file. : no space is available on the device {rootCauses = []} to oracle.integration.platform.blocks.deploy.servlet.BaseDeployProcessor.deploySARs(BaseDeployProcessor.java:160) to oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:203) to oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeployWork(DeployProcessor.java:147) to oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.doDeploy(DeployProcessor.java:134) to oracle.integration.platform.blocks.deploy.servlet.DeployProcessor.process(DeployProcessor.java:100) truncated. check the log file full stacktrace caused by: java.io.IOException: no space is available on the truncated device at java.io.FileOutputStream.writeBytes (Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:260) at oracle.integration.platform.blocks.deploy.CompositeJarExpander.expandOneEntry(CompositeJarExpander.java:238) at oracle.integration.platform.blocks.deploy.CompositeJarExpander.expandJar(CompositeJarExpander.java:118) at oracle.integration.platform.blocks.deploy.CompositeJarExpander.expandJar(CompositeJarExpander.java:96). check the log file full stacktrace

    problem solved. It's a matter of space on the disk.

  • This error: "java.io.IOException: error = 12, cannot allocate memory.

    I tried to run a simple workflow in vCenter Orchestrator (VCO) which accesses the command prompt by using this script:

    var myCommand = new Command ("ls");
    myCommand.execute (true);
    System.log (myCommand.Result);

    We use VAPP VCO and we continue this error:

    "Wrapped java.io.IOException: cannot run program 'ls': java.io.IOException: error = 12, cannot allocate memory (Workflow: Test2 / Scriptabletask (item0) #1)"

    Any suggestions? This script is copied and pasted directly from the VCO manuals, where our confusion.

    Have you tried to increase the memory of the virtual machine?

    I assume that you already have tried to restart the virtual machine without increasing the memory, just?

    Christophe.

  • OdiOSCommand error java.io.IOException: error = 2

    Hi all

    Z Drive is a mapped network drive.
    When I run the command "cmd.exe /C Z:\bin\import.bat Montana Z:\bin\ODIFilesStore\SRSTargets.csv" he executed successfully, but when I use it through OdiOSCommand I get the following error:

    java.io.IOException: CreateProcess: OdiOSCommand "cmd.exe /C Z:\bin\import.bat Montana Z:\bin\ODIFilesStore\SRSTargets.csv" error = 2

    at java.lang.Win32Process.create (Native Method)

    to java.lang.Win32Process. < init >(Unknown Source)

    at java.lang.Runtime.execInternal (Native Method)

    the impossible (unknown Source)

    the impossible (unknown Source)

    the impossible (unknown Source)

    the impossible (unknown Source)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execOsOrders (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execOsOrders (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt (SnpSessTaskSqlS.java)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask (SnpSessTaskSql.java)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep (SnpSessStep.java)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession (SnpSession.java)

    at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand (DwgCommandSession.java)

    at com.sunopsis.dwg.cmd.DwgCommandBase.execute (DwgCommandBase.java)

    at com.sunopsis.dwg.cmd.e.i (e.java)

    at com.sunopsis.dwg.cmd.g.y (g.java)

    at com.sunopsis.dwg.cmd.e.run (e.java)

    at java.lang.Thread.run (unknown Source)

    your help is very appreciated.

    Thanks in advance.

    Hello

    use cmd/c instead of cmd.exe/C (use small letter c)
    hope this can help you

    for example: copy the content of the multiple files into single file

    copy of cmd/c/y d:\xyz\file1*.txt d:\abc\newfile.txt

    Kind regards
    Phanikanth

  • Error when trying to create a collection of Solr (java.io.IOException: the device is not ready)

    Hello, everyone.

    I am trying to create a .cfm document which delete and then re-create a specific collection of Solr, index and optimize it.

    The removal works perfectly.

    Unfortunately, creation it doesn't, at all.  I get the following message:

    Cannot create the collection publicsearch - an error occurred during the creation of the collection: java.io.IOException: the device is not ready.

    This is a server of Windows 7 under Apache and CFServer 9.0.1 (the version before Verity was cut).  I get no more detail than an error message.  Any idea what could be the cause?  I googled this and I see a lot of similar questions, but not quite what I have going on.

    Thank you

    ^_^

    So much worse... someone didn't bother to inform the proponent that the access to the collection AND the path to the directory that contains the collection for are different on this other server.

    Fixed.

  • Message "General Extraction error location ARE 1"

    I have the means to go to the Bowling game and was able to play until a few days ago, I got the error "General Extraction location ARE 1" and I can't get in the game.  I looked online to see what this error is and he can't find where.  I contacted Pogo, where I had the game and Oberon Media, the creators of the game and can help find a solution to my problem.  The only thing I've done to my computer, it's do all the updates of Java, windows and McAfee (my virus program).  I have windows XP.  Any help would be appreciated.

    Hi Jack,
    Thanks a lot for your answer.  I deleted all records of three in the C drive and not seen any sign of the game in my computer so I re-installed.  The re - install put the shortcut on my desktop, so I tried to go in there and got the same 'general Extraction error location ES 1' and the game will not load.  Went through the start menu and tried and received the same message.  I returned to my computer > lecteurC > program files > oberon media > way to go Bowling and open this folder.  The record was filled of records and other icons, so I started to search in folders.  There is an icon that says 'Way to go Bowling Application Electronic Arts' and when I clicked on that, load the game and I was able to play the game.  Because I didn't get into the game this way, whenever I play, I went back to this icon and click right and found the 'send to the office', so I did.  When I click on it on my desk, the game loads and I can play.  I deleted the shortcut that was created during installation and use the one I sent to the desktop and can play now.  Don't know what past or why, I'm so happy I can play this game.

    Thank you

    Vickie1712

  • General extraction error location es1

    I just got a new laptop.  I played on IWin on my old laptop.  When I tried to download games on the new laptop, I get this error message.   General extraction error location es1

    Hi biehlel,

    (a) what operating system do you have?
     
    (b) you try to download the game via Internet Explorer? Or install the game from the CD/DVD/flash drive?
    Uninstall versions of java and reinstall them.
     
    Check this link, it may help, if you are referring to the installation of the game through CD/DVD.
    http://social.answers.Microsoft.com/forums/en-us/vistagaming/thread/33c530ab-07bc-4b94-8bdf-431ddbcf0c72
     
    IWin seems to be an online game.
     
     
    Post back with the State.
    Aziz Nadeem - Microsoft Support
  • No Socket error 11001 and error no Ox800CCC0D

    means socket error 11001 and 0x800CCC0D No error and how do I fix it. Whenever I connect to windows mail I get this message.   Its does not not my incoming emails, but cannot send messages, also problems causig enter the windows messaging

    Thanks t.

    my mistake put .au in post, shows the degree of fatigue, I. I wish it were easy.

    account has been/is ok put in place without the .au

    am able to send at least. now, the difficulty of the reception...

    Check the account name on the general tab of your account properties window;
    1. it must be the same as your e-mail address.
    2. it can BE
        * E-mail address is removed from the privacy *     (without .au)
    or,* address email is removed from the privacy * (with .in but NOT .com)
    but not the combination of the two.

    You have account: 'mail.bigpond.com.au'.  I think this is why the error message says : host 'mail.bigpond.com.au' is not found.

    t-4-2... keep guessing.

  • Windows live ID:0x800CCC0E, 10060 socket error - impossible to send/receive email using Windows Live Mail

    could not send email, now I can't send or receive email.  I contacted my IP to see if it was a problem on their end, and it wasn't. Help, please!

    Looks like you are running in a block of 25 port.
    As a general rule, the owner of port 25 SMTP server you use must be the same as the entity that provides your Internet connection at the moment. To learn more about this issue, see anti-spam
     
    The workarounds available when sending abroad are the following:
     
    1. use webmail to send (via your browser).
    2. ask your ISP if they have one port other than '25' for SMTP.
    3. If you use the same connection away from home frequently,
    Replace with the SMTP belonging in this regard. It's a bit
    difficult, but if you want to go this route, I can provide more details.
    4. If you frequently send to multiple locations, get a free Gmail account,
    Configure it to POP access, set up in Windows Mail and use it to
    your shipment of household chores. Gmail uses port 465 for SMTP, which is not blocked
    as port 25 is.
     
    Gary van, Microsoft MVP (Mail)
    ------------------------------------------------------

    'Law Gal' wrote in the new message: * e-mail address is removed from the privacy... *

    Here is the error I get.  I'm on a laptop, wireless.  My thing of mail server does not use SSL.

    I can't SEND mail via Windows Live, but I can receive.

    The connection to the server has failed.

    Are subject: Roberts - t/c Nancy Stacy (925) 939-4367'
    Server: 'mail.hsimonsonlaw.com '.
    Windows Live Mail error ID: 0x800CCC0E
    Protocol: SMTP
    Port: 25
    Secure (SSL): No.
    Socket error: 10060

    Gary van, MVP (Mail)

  • Java.io.ioException: Tunnel Timed out received

    Hello

    We have developed a Java ME application that has been evaluated for fine fonctinner on Blackberry 9000 using the Wifi Interface. Downloaded the application on our server and the application installed on the device using OTA. The cod was signed through Blackberry. Application installs correctly and when it is launched, he's trying to connect to our server by using the HTTP connection. We use the direct TCP with Vodafone (India) APN setting (I tried www, portalnmms and blackberry.net) but with all 3 APNs, the error is the same:

    java.io.IOException: Tunnel Timed Out

    With the URL '; deviceside = true' is specified for a direct TCP connection. Default browser to HTTP is configured for the Internet browser.

    HTTPDemo installed JDE, device samples and it also gives the same error.

    Tried to contact the service provider for the mistake of tunnel... but no help.

    Can someone help pls on this issue? Are there network tools to diagnose problems of tunnel on blackberry?

    Model: Blackberry 8310

    Version: 4.5.0.55 (Platform 2.7.0.68)

    Thank you

    Bennett

    Try the NetworkDiagnostics tool of the RIM. In addition, look at the log of events to see if the right NPP (those that you set in the Options-> advanced-> TCP) is actually used by the operating system - sometimes WAP 2.0 TCP is used instead.

    Another thing you could try is to take the this BlackBerry SIM card and insert it in a non-BlackBerry phone, say, a Nokia. Then you can check if this unit can connect to the Internet and you might also find what NPC he uses.

Maybe you are looking for