Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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
 
Space seems cool in the movies, but once you get out there, it is super boring. Now for a fascinating tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic