• Post Reply Bookmark Topic Watch Topic
  • New Topic

Capabilities of web service client

 
Ravi Danum
Ranch Hand
Posts: 154
1
  • Mark post as helpful
  • send pies
  • 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: 154
1
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!