Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
Posts: 32
Registered: ‎05-05-2011
My Device: BB9700
My Carrier: mts
Accepted Solution

Using JSR 172 stubs in WebWorks application

Hi,
     I'm new to webworks. I need to know how to access the webservices from webworks application. I have a .Net server, and I have created stubs for it using JSR172. Now I need to know how to use these stubs in BB Webworks application. Is JavaScript Extension a solution? If so, how do u convert my stubs as Javascript Extension?

 

Thanks in advance..

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Using JSR 172 stubs in WebWorks application

Hi UserBB33,

 

I would recommend using a more web friendly way to call your web service through javascript instead of trying to bridge in the Java world.  There are many different ways to call web services using AJAX, JSON and XML.

 

Here is a quick tutorial that I put together

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-quot-I-quot-would-call-a-web...

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 32
Registered: ‎05-05-2011
My Device: BB9700
My Carrier: mts

Re: Using JSR 172 stubs in WebWorks application

 

Hi Tneil,

 

      Thanks for your immediate reply. We are actually trying to port an existing J2ME application to BB WebWorks application.  We don’t have access to server side code. That is the reason I thought JavaScript extension is the only possible way! Will we be able to convert Stub files to JavaScript extension? If so will it be tedious? Or is there any way other than JS Etn?

 

 

Thanks.... Smiley Happy

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Using JSR 172 stubs in WebWorks application

Creating a JavaScript extension for the stubs will be complicated and will also not be portable to the PlayBook or other platforms.

 

There are a few examples out there how to call a SOAP web service directly via JavaScript and AJAX.  Below are just a couple examples

 

http://www.techrepublic.com/article/easily-consume-soap-web-services-with-javascript/5887775

 

http://javascriptsoapclient.codeplex.com/

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 32
Registered: ‎05-05-2011
My Device: BB9700
My Carrier: mts

Re: Using JSR 172 stubs in WebWorks application

Hi Tneil,

      Thanks for your reply. Since i'm new to serverside coding i was not able to see other options. The links you gave was really helpful. Finally i decided to use WSDL and Javascript...

 

Thanks for your wonderful help.