• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic