Discussion Board

Results 1 to 5 of 5

Hybrid View

  1. #1
    Regular Contributor Infernal01's Avatar
    Join Date
    Dec 2009
    Posts
    59
    When i call any WS operation from a J2ME client i get this strange exception:
    java.rmi.MarshalException: Unexpected Exception : unexpected end of stream

    The thing is, the WS receives the info i send, but the client doesn't receive the response. And even more wierd is that this only happens the first time, if i run the client again, it's all ok. I tried using J2SE and that works fine.

    I can pass whatever data to whatever WS operation, it's the same story.

    This is my J2ME code:
    Code:
    public void startApp() {
        try {
            pack.WSService_Stub service = new pack.WSService_Stub();
            boolean result = service.anyOperation();
            System.out.println(result);
        } catch (RemoteException e) {
            e.printStackTrace();
        }
    }

  2. #2
    Registered User BatkoVladko's Avatar
    Join Date
    Feb 2010
    Posts
    1
    Hi,

    Did you manage to find a solution for this problem?
    I have the same problem calling a web service. It occurs only invoking one method,
    which returns an array of objects.
    When calling simples methods, it works.


    Cheers,
    Vladdy

  3. #3
    Regular Contributor Infernal01's Avatar
    Join Date
    Dec 2009
    Posts
    59
    No, but i only get this exception when i run the emulator. On the actual device it works fine.

    I always try the operation twice

  4. #4
    Registered User mobilsoft's Avatar
    Join Date
    Dec 2012
    Posts
    1
    Hi, I quest you, are you problem only the Emulator?, and device? Is work fine?
    Because I try connet to Web Service, but Nettbeans show me a Error:

    "java.rmi.MarshalException: Unexpected Exception : unexpected end of stream
    java.rmi.MarshalException: Unexpected Exception : unexpected end of stream
    at com.sun.j2mews.xml.rpc.SOAPDecoder.decode(), bci=241
    at com.sun.j2mews.xml.rpc.OperationImpl.invoke(), bci=103
    at operacionesservice.OperacionesService_Stub.suma(OperacionesService_Stub.java:94)
    at Midlet.commandAction(Midlet.java:95)
    at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46
    at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74
    at com.sun.midp.chameleon.layers.SoftButtonLayer.commandSelected(), bci=11
    at com.sun.midp.chameleon.layers.MenuLayer.keyInput(), bci=290
    at com.sun.midp.chameleon.CWindow.keyInput(), bci=38
    at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17
    at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277
    at com.sun.midp.events.EventQueue.run(), bci=179
    at java.lang.Thread.run(Thread.java:662)"

    Please help me with your answer and Which device do you use?

  5. #5
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    It looks to be some issue with your emulator or internet/server access, try to run it on some other emulator on some other system or try to check the web services accessibility from your computer via some desktop test tools..
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Device Error Exception in player application when call is in progress.
    By prakashvs in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2009-03-09, 06:10
  2. Strange Exception
    By honest_success in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2008-09-17, 09:13
  3. Exception when C++ function call C function
    By zhangpengstu in forum Symbian C++
    Replies: 4
    Last Post: 2008-05-27, 10:03
  4. i got Exception when i call the high level screen from the canvas screen using comman
    By madnan_java in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2004-10-05, 13:50
  5. Time based Call restrictions
    By wsmolich in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2002-09-16, 12:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved