Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL to Java

 
Manikandan Sundaramoorthy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am trying to convert the WSDL file to JAVA using Eclipse IDE. first i uploaded the WSDL file in Web Services,after building the Services i got the Class files like Soap , Skeleton , Impl and Proxy.but i don't how to place the request to web services with this class files, whether i need to write any client side code?

Thanks and Regards
Mani
 
Bogumil Zebek
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

to generate Java classes for client you can use Java tool stored in JDK:

wsimport -verbose -d d:/out -Xnocompile http://localhost:8080/EchoService/EchoServiceBean?wsdl

after that you will have all classes (in out dir) needed to communicate with WS.

WS interface:


Client:


More information's how to start WS on GlassFish you can find at http://blog.redstream.nl/2009/02/11/create-a-ejb3-webservice-with-maven2-running-on-glassfish/
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Another good tutorial is how to create web service clients with JAX-WS: http://netbeans.org/kb/docs/websvc/client.html
There are a number of web service tutorials on NetBeans.org.
A basic JAX-WS tutorial for Eclipse: http://java.dzone.com/articles/jax-ws-hello-world
Best wishes!
 
Manikandan Sundaramoorthy
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Ivan Krizsan and Bogumil thanks for your guidance .those links are very useful for me.
now i done the web service client using net-beans it's working properly, but how can i call that url with dynamic variable using java.


Thanks and Regards
Manikandan
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
What do you mean?
but how can i call that url with dynamic variable using java.

Using generated artifacts, it is still possible to configure the address of the endpoint invoked - see the ENDPOINT_ADDRESS_PROPERTY field in the BindingProvider class that can be found in the Java SE 6 API.
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic