| Author |
SpringWS - Problem in invoking webservice
|
K Chauhan
Greenhorn
Joined: Nov 21, 2011
Posts: 4
|
|
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
Ranch Hand
Joined: Nov 09, 2011
Posts: 657
|
|
Hi
Could you post the contents of your web.xml file?
|
 |
K Chauhan
Greenhorn
Joined: Nov 21, 2011
Posts: 4
|
|
Hi James,
Thanks for your reply.
Here goes the web,xml
[VK: Added code tags properly]
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
|
And welcome to the Ranch, K Chauhan!
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
H Paul
Ranch Hand
Joined: Jul 26, 2011
Posts: 299
|
|
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
Joined: Nov 21, 2011
Posts: 4
|
|
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
Joined: Jul 26, 2011
Posts: 299
|
|
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
Joined: Nov 21, 2011
Posts: 4
|
|
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
Joined: Jul 26, 2011
Posts: 299
|
|
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
|
 |
 |
|
|
subject: SpringWS - Problem in invoking webservice
|
|
|