Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

generate web service client

 
arief hidayat
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to web service. I have create web service component using JAX-WS 2.1 (netbeans IDE 5.5).

Now, I want to create web service client to access it from other existing component.

The issue is that..
the existing component should be deployed on JBoss 4.0.0. This existing component use JAX-RPC).

my questions ... given WSDL of the web service server (that I Have create using JAX-WS)..
1. If I generate web service client using JAX-WS (on netbeans). Then I copy the generated codes to the existing component. And used it as per normal.
Would it work successfully on JBoss 4.0.0?
Do I need several steps to make it works? like copying dependencies maybe.

2. If I generate WS client manually using JAX_RPC, would there be a problem? (But I don't know how to use JAX_RPC=S).


Thanks
[ February 03, 2008: Message edited by: arief hidayat ]
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by arief hidayat:
1. If I generate web service client using JAX-WS (on netbeans). Then I copy the generated codes to the existing component. And used it as per normal. Would it work successfully on JBoss 4.0.0?


Highly unlikely for several reasons. First of all your version of JBoss doesn't support JAX-WS in the first place. Second, any code generated by the tool could potentially depend on application server specific support code that isn't within the scope of JAX-WS.

However JAX-WS Web Service Tutorial for JBoss seems to describe a work around for JBoss 4.0.4.

2. If I generate WS client manually using JAX_RPC

Manually creating it in Java with JAX-RPC Dynamic Proxies or the Dynamic Invocation Interface (DII)? Tedious and error prone. Probably not a good idea. An SAAJ client is another option though that still can be tedious.

given WSDL of the web service server (that I Have create using JAX-WS).


Does anything prevent you from using the JBossWS4EE wscompile tool to generate a static client stub from the WSDL?
(as described in Client access of an RPC style service endpoint or Client access of a Document style service endpoint).

The generated stub should allow you to access the web service that is implemented in JAX-WS from JBoss 4.0.0 (the resulting Java interface in the service consumer will probably be (quite) different from the one that you have in the service provider).
 
arief hidayat
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply



Does anything prevent you from using the JBossWS4EE wscompile tool to generate a static client stub from the WSDL?
(as described in Client access of an RPC style service endpoint or Client access of a Document style service endpoint).

The generated stub should allow you to access the web service that is implemented in JAX-WS from JBoss 4.0.0 (the resulting Java interface in the service consumer will probably be (quite) different from the one that you have in the service provider).


I am new to JBoss.. I Just know .. there is such tool(JBossWS4EE). .
I'll try to use it. Hopefully everything goes smooth.

thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic