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

Java Development

Reply
Contributor
div15
Posts: 28
Registered: ‎01-27-2012
My Device: 8900
My Carrier: airtel

how to consume a web service with two enpoints for blackberry using J2me

Hi All,

 

We have a web service with two enpoints in it as given below:


   <service behaviorConfiguration="AuthenticationServiceBehavior" name="AuthenticationService">
    <endpoint name="rest" address="rest" contract="IAuthenticationService" binding="webHttpBinding" bindingConfiguration="WebHttpBinding" behaviorConfiguration="httpEndpointBehavour">
     <identity>
      <dns value="localhost"/>
     </identity>
    </endpoint>
        <endpoint address="" binding="basicHttpBinding" contract="IAuthenticationService" name="soap">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>

 

Here we have two enpoint, one for rest and other for soap.

 

I need to know how to set this enpoint in from UI using J2me so as to identify which endpoint to hit on.

 

I am new to J2me. came to know, we have this

ENDPOINT_ADDRESS_PROPERTY property to set enpoint address. but it takes the url of the webservice. IS there any parameter where we set the enpoint name too??

 

 

Please help!

 

Thanks.

Please use plain text.
Developer
simon_hain
Posts: 16,042
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: how to consume a web service with two enpoints for blackberry using J2me

what do you use to consume the webservice? stubs or ksoap?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
div15
Posts: 28
Registered: ‎01-27-2012
My Device: 8900
My Carrier: airtel

Re: how to consume a web service with two enpoints for blackberry using J2me

stubs we are using..
Please use plain text.
Contributor
div15
Posts: 28
Registered: ‎01-27-2012
My Device: 8900
My Carrier: airtel

Re: how to consume a web service with two enpoints for blackberry using J2me

Please guide me a little. stuck with this.

Thankss
Please use plain text.
Developer
simon_hain
Posts: 16,042
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: how to consume a web service with two enpoints for blackberry using J2me

sorry, i don't have any experience with stubs, we are only using ksoap for webservices.

usually you open a connection to an url somewherre, you should be able to just change that to your second endpoint.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Contributor
div15
Posts: 28
Registered: ‎01-27-2012
My Device: 8900
My Carrier: airtel

Re: how to consume a web service with two enpoints for blackberry using J2me

okay. actually i need to do this in a blackberry application. do we need to just append something to the url like we do in case deviceside=true etc.. any idea??
Please use plain text.
Developer
simon_hain
Posts: 16,042
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: how to consume a web service with two enpoints for blackberry using J2me

no, different endpoints would have different urls.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.