• 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
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

WSDD - Apache axis

 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to write an customized deployment descriptor (wsdd) file ? I'm using apache axis.
At present i'm using
<service name="SomeService" provider="java:RPC">
<parameter name="allowedMethods" value="oneMethod"/>
<parameter name="className" value="com.HelloWorld"/>
</service> to specify a service


The automatically generated WSDL file appear something like this

<wsdl:message name="oneMethodRequest">
<wsdl art name="in0" type="xsd:string" />
</wsdl:message>

Its uses it own parameter naming convention like in0, in1 etc., Instead i would like them to appear as inputName, inputAge etc.,
I would also like to add some comment at the top of wsdl file.

is it possible to specify them in wsdd file itself ? Any guidelines ?
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you compile your source code, turn debugging on. Apache will use your parameter names in the WSDL file.
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rich Raposa:
When you compile your source code, turn debugging on. Apache will use your parameter names in the WSDL file.


Hello Rich,
Could you please explain a bit more. I don't know which source code you mean here ?
balaji
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you're wsdd file looks fine so long as you've got a class residing on the server side "HelloWorld" in package "com" with a method named "oneMethod" -- but, I'm not sure how you're "automatically" generating wsdl from the wsdd file -- I didn't know that was a possibility with axis.
I believe Rich is suggesting that you use some of the axis tools to create wsdl for you from your java source, ie, java2wsdl.
Have a look here: http://12.230.201.166:8080/axis/docs/reference.html. (This could be an out of date ref, but does show the switch).
On a related note -- can anyone comment on how to create WSDL for message based services, ie, whose server side class is working with the actual XML?
 
Rich Raposa
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Balaji,
That was my mistake. I forgot there is no compiling when you place a .java file in the \axis folder and rename it with the .jws extension.
What Cory said is correct: If you want the WSDL to use your paramater names, then you need to compile the source code yourself, making sure debugging is turned on.
javac -g Calculator.java
Then use the java2wsdl tool that comes with Axis. For example, if AXIS_HOME is an environment variable equal to the install directory of Axis, then the following two commands should do it:

set CLASSPATH=.;%AXIS_HOME%\lib\axis.jar;%AXIS_HOME%\lib\wsdl4j.jar;%AXIS_HOME%\lib\commons-logging.jar;%AXIS_HOME%\lib\saaj.jar;%AXIS_HOME%\lib\jaxrpc.jar;%AXIS_HOME%\lib\tt-bytecode.jar;
java org.apache.axis.wsdl.Java2WSDL -o calculator.wsdl -l
"http://localhost:8080/axis/Calculator.jws" Calculator
The -o option is for the name of the output file, and the -l option is URL of the service.
Let me know if that works.
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rich and Cory,
Sorry for my delayed reply.thanks a lot replying.
Yes I compiled with javac -g option and now i can able to see my own input parameters in the auto generated wsdl
Actually I'm not using jws, i create class, place them in web-inf/classes directory and deploy them with org.apache.axis.AdminClient tool where i supply my wsdd file.
I'm also not using Java2WSDL, i using the web based admin interface of Axis, where services deployed were listed with link to WSDL generation.
Thanks for replying.
Regards
Balaji
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Cory Wilkerson:

On a related note -- can anyone comment on how to create WSDL for message based services, ie, whose server side class is working with the actual XML?


I hope you know this now.
Auto generation of WSDL
Two option:
1. read this link http://cvs.apache.org/viewcvs.cgi/~checkout~/xml-axis/java/docs/user-guide.html#Java2WSDL: Building WSDL from Java
2. or After deploying ur service using AdminClient, go to http://localhost/axis/servlet/AxisServlet you will see all ur services listed with a link to auto WSDL generation(auto).. here i assume that u had hosted ur axis under webapps/axis directory.
 
reply
    Bookmark Topic Watch Topic
  • New Topic