Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error after(?) deploying a webservice

 
Christine Spietz
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello together,

I'm trying to deploy a webservice with axis/soap, which is not rpc/encoded (as usual?) but document/literal.

-1) I wrote a java-file "Xy.java" and compiled the clas=> Xy.class

-2) I used the tool java2WSDL:
java2WSDL -o xy.wsdl -l"http://localhost/axis/WEB-INF/classes" -n"urn:xy"
-p"Xy" "urn:xy" xy.Xy
everything is fine. I retrieve a Xy.wsdl-file.
The file contains among other things the following code:



I replaced rpc with document 81 time) and encoded with literal (2 times)

-3) after that I run the tool WSDL2java
WSDL2Java -o "d:/uddi/wsdl2java" -d Session -s -S true -N"urn:xy" "xy" Xy.wsdl
-everything is fine. I've got 6 java-files and the deploy.wsdd and undeploy.wsdd

-4) now I loaded up my classes on the tomcat server at the directory
tomcat/webapps/axis/Web-INF/xy and edited the file
server-config.wsdd by adding my <service>-Tag of my deploy.wsdd-file

-5) After that I reloaded the axis-application on the server

-6) On http://"server"/axis/servlet/AxisServlet I see, that my Webservice is deployed (?) the website shows among other services my service:
* classes (wsdl)
* getXythings
If I click on the wsdl-Link an error message appears:



Normally, when I deployed the rpc/encoded Webservice, I could view some xml by clicking on the wsdl-Link

Can anybody *PLEASE* tell me please what I#ve daone wrong by deploying a document/literal-Webservice?

Thanks a lot!!!

tine

Message edited to disable smile [Balaji]
[ October 31, 2004: Message edited by: Balaji Loganathan ]
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Christine Spietz:
Hello together,

I'm trying to deploy a webservice with axis/soap, which is not rpc/encoded (as usual?) but document/literal.

-1) I wrote a java-file "Xy.java" and compiled the clas=> Xy.class

-2) I used the tool java2WSDL:
java2WSDL -o xy.wsdl -l"http://localhost/axis/WEB-INF/classes" -n"urn:xy"
-p"Xy" "urn:xy" xy.Xy
everything is fine. I retrieve a Xy.wsdl-file.
The file contains among other things the following code:

.
To generate correct document/literal based wsdl, you have to use the option
-y, --style <argument> ...that is
java2WSDL -o xy.wsdl -l"http://localhost/axis/WEB-INF/classes" -n"urn:xy"
-p"Xy" <b>-y "DOCUMENT" </b> "urn:xy" xy.Xy
this should generate the doc/lit wsdl for you(i have not tested).
Replacing rpc with document will not help.
Rest of your procedure is fine...
 
Christine Spietz
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*WOW*

it really works!!
the only thing I had to change was to append the
to the end of the command like this:



THANK YOU A LOT!!! Now I can sleep again + I am really happy :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic