• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Capabilities of web service client

 
Ranch Hand
Posts: 165
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello,

I have created a web service client using wsimport.  I have two questions:

1)  Can I create 2 ports and call web service methods concurrently?  (I don't see anything in the generated code that prohibits this.)

2)  How long can I keep a port open?  For example, how many web service methods can I call on a give port instance?  The port instance is created as follows:  


Many thanks for any help you can give.

-Ravi
 
Ravi Danum
Ranch Hand
Posts: 165
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello All,

I have looked into this and have found that often the web service proxy is cached and reused.

The important point is whether the web service proxy is thread safe or not.  The JAX-WS implementation that is included in the JDK starting with Java 6 has a proxy that is not thread safe.  The web service proxy in CXF is thread safe.

Since I have written my code using the JAX-WS implementation in JDK (java 8), I plan to create a small pool of proxies (2-3 objects).

Any comments to this method are welcome.

-Ravi
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic