• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SpringWS - Problem in invoking webservice

 
K Chauhan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I've just started to work with Spring Webservices. I've created my own wsdl file which I've configured in spring-ws-servlet.xml.

As I intend to use HTTP for messages, so I've configured org.springframework.ws.transport.http.MessageDispatcherServlet in web.xml.

Following is the spring-ws-servlet.xml:


Configured end point is extending AbstractMarshallingPayloadEndpoint and implements invokeInternal(Object requestObject) method

I've deployed my code to Tomcat 6 which is running on port 8181.

Now, I can get wsdl file by accessing the location: http://localhost:8181/SpringWS/MemberDetailsRequest.wsdl

Following is my wsdl



Now, I was hoping that webservice would be published to the location: http://localhost:9876/memberservice/services/MemberDetailsRequest which doesn't seem to be the case.

I'm not able to invoke this webservice at the above mentioned location. I've hit a dead end and not able to proceed
Any help would be appreciated.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Could you post the contents of your web.xml file?
 
K Chauhan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi James,

Thanks for your reply.

Here goes the web,xml



[VK: Added code tags properly]
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch, K Chauhan!
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adjust your code/spring config accordingly. This is what I understand from the URL

http://localhost:9876/memberservice/services/MemberDetailsRequest

1. port 9876 must be up and listening
2. memberservice - web context path
3. services - configured in web.xml


4. MemberDetailsRequest - this is what you already have
 
K Chauhan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,

Could you please elaborate on point 1) port 9876 must be up and listening
How to ensure that? My Tomcat is running on port 8181.

Thanks for your help.
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At command line, do a telnet to check if 9876 is up.
Probably, you will get an error

>telnet localhost 9876
Connecting To localhost...Could not open connection to the host, on port 9876: Connect failed

 
K Chauhan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,

Yes, I'm receiving the same error.
Connecting To localhost...Could not open connection to the host, on port 9876: Connect failed

I'm not really sure how to proceed on this
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. The port = 8181 (usually 8080) Edited.

2.1 Change the element <soap:address in wsdl

web context path = SpringWS (if this is what your current value is)

New : <soap:address location="http://localhost:8181/SpringWS/MemberDetailsRequest" />
OR

2.2

New: <soap:address location="http://localhost:8181/memberservice/services/MemberDetailsRequest" />

with web.xml changed

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic