• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a webservice using JAX-WS Question

 
Rajesh Khan
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently consuming a C++ webservice using JAX. (I generated the files using wsimport).
Now i know my client is correct. Since I have been using it to connect and retrieve data from the C++ webservice. Now I wanted to actually host the webservice in JAVA . How can i create a server webservice using the existing WSDL file.?
This is my current approach:
Server:

Then the main file is


The Client Accesses the webservice using (I am sure there is no problem with the client)


Any suggestions what might be going wrong ??
I get the following Errors


 
Andi Eska
Greenhorn
Posts: 14
BSD Eclipse IDE VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajesh Khan wrote:I am currently consuming a C++ webservice using JAX. (I generated the files using wsimport).
How can i create a server webservice using the existing WSDL file.?


Use wsimport -s sources -d generated http://localhost:6661/oper/?wsdl.
this also generates the WebService (server) Interface.




Rajesh Khan wrote:
Any suggestions what might be going wrong ??
I get the following Errors




Seems like your client is sending a request your java web-service can not handle.

Try to implement the generated WebService interface using the wsimport tool as described above.

You may also compare your original wsdl file and the wsdl file of the java web service for example http://localhost:6661/oper/?wsdl
to see if there are any differences.

 
Avinash Ga
Ranch Hand
Posts: 78
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you post your wsdl?
 
Andi Eska
Greenhorn
Posts: 14
BSD Eclipse IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Avinash Ga wrote:can you post your wsdl?


Whom do you mean? The original poster? From your question it's not clear whom you are asking.
I can post my but it will not help anything. It's the "same" you'll get when you use the webservice classes from the original post and start the server.
 
Avinash Ga
Ranch Hand
Posts: 78
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andi Eska wrote:
Avinash Ga wrote:can you post your wsdl?


Whom do you mean? The original poster? From your question it's not clear whom you are asking.
I can post my but it will not help anything. It's the "same" you'll get when you use the webservice classes from the original post and start the server.


Hi Andi,

i think the original poster wants to build a contract first jax-ws. so asked the wsdl to verify.

thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic