aspose file tools
The moose likes Web Services and the fly likes web service Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "web service "int myMethod(int i, String s)"" Watch "web service "int myMethod(int i, String s)"" New topic
Author

web service "int myMethod(int i, String s)"

Martin Garrido
Ranch Hand

Joined: Dec 04, 2010
Posts: 31
I will try to say in short: How to make a Web Service (WSDL) with the Java method "void myMethod(int i, String s)" create it manually? error
prone. Eclipse? Axis2?

I'd prefer not to use JavatoWSDL, since this make a dependent-platform WSDL.
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
Using Java SE 6, you can use the wsgen command to create artifacts (such as WSDL and XML schema) from a class annotated with JAX-WS annotations.
This is probably the simplest way. Once you have generated a WSDL, you can edit it to suite your needs.
In fact, I think one annotation is enough for the absolute minimum:


Then to create the artifacts from the above class, use wsgen:
wsgen -verbose -classpath [path-to-compiled-classes] -wsdl -d [path-to-write-generated-files-to] -r [path-to-output-wsdl-xml-files] -s [path-to-write-generate-src-to] -keep com.ivan.Calculator
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Martin Garrido
Ranch Hand

Joined: Dec 04, 2010
Posts: 31
thanks. I'll try it.

With Axis2 is possible of some way?
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2193
Hi!
Martin Garrido wrote:thanks. I'll try it.
With Axis2 is possible of some way?

The above is meant for use with JAX-WS and the tools (wsgen) that comes with the JavaSE 6 JRE or JDK. GlassFish is also distributed with wsgen and other webservice-related tools.
As far as I know, the Axis2 tools are somewhat different. My experience with Axis2 is somewhat limited, so I prefer not to elaborate on that subject.
Best wishes!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: web service "int myMethod(int i, String s)"
 
Similar Threads
Strange recursive method call! ???
web service questions to ask based on the client wsdl file and XML sample files
C++ style default values for method parameters
Axis1 error: Could not generate WSDL!
how do i make a field mandatory in my WSDL using axis2