This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Martin Garrido
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. I'll try it.

With Axis2 is possible of some way?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic