Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
skraj72
Posts: 2
Registered: 04-12-2009

Re: Web Services sample on BlackBerry JDE 4.5

Hi Johan,

 

Will you be able to post the code you got working for calling a web service?

 

Thanks,

Sundar

Please use plain text.
New Developer
mvashist
Posts: 6
Registered: 07-20-2009

Hello World sample error

Hi, I was writing the code to consume my simple dotnet HelloWorld webservice using JSR172, and this was the error I got:

 

"java.rmi.MarshalException: SAXParseException in the return SOAP message from the server."

 

My simple code was the following :

 

         _errorMessage = new BasicEditField("", "");
        JSRSample.SAPServiceSoap_Stub WS1 = new JSRSample.SAPServiceSoap_Stub();
        try
        {
         String str1 = WS1.helloWorld("WELCOME");   
        _errorMessage.setText(str1);
        add(_errorMessage);

        }

 

Any idea what I could be doing wrong ?

 

Cheers!
Please use plain text.
Developer
ferhatbulut
Posts: 21
Registered: 09-25-2009
My Carrier: Turkcell

Re: Hello World sample error

Hello,

 

I think, your webservice function returns error (Exception) which is kind of SAXParseException. And you can catch this exception using try catch block. I didn't see catch block in your code.

 

Try again after adding catch block.

 

Like this,

 

         _errorMessage = new BasicEditField("", "");
        JSRSample.SAPServiceSoap_Stub WS1 = new JSRSample.SAPServiceSoap_Stub();
        try
        {
         String str1 = WS1.helloWorld("WELCOME");   
        _errorMessage.setText(str1);
        add(_errorMessage);

        } catch (SAXParseException e) {

             e.PrintStackTrace(); // -->try to catch error message on this line. I didn't remember what is the correct code.

        }

 

Regards,


Ferhat

www.bestcoder.net

Please use plain text.