File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes generate web service client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "generate web service client" Watch "generate web service client" New topic
Author

generate web service client

arief hidayat
Ranch Hand

Joined: Apr 13, 2007
Posts: 33
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

Joined: Aug 19, 2005
Posts: 2906
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).


"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
arief hidayat
Ranch Hand

Joined: Apr 13, 2007
Posts: 33
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generate web service client
 
Similar Threads
axis2/webshpere response != axis2/glassfish response........ why?
Spring Framework in NetBeans
Cannot find a function in the generated Web Service stub
Microsoft Sharepoint web services from java client
how to consume a webservice using axis2