Hi I created my first web service. It work fine but now I need to solve some special situation. First situation is mention here Spring Web Services – Exception Skipping ExceptionResolver but there isnt solution which can help me.
Second situation is the client send me correct SOAP message but make mistake in namespace for example send me:
xmlns:urn="urn:org:samples:spring:ws:schemas:calculatorblabla"
but the correct namespace is xmlns:urn=”urn1:org:samples:spring:ws:schemas:calculator”. So when client send me message with wrong namespace he doesnt receive message where he makes mistake just these:
<html><head><title>SpringSource tc Server/6.0.20.C - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The requested resource () is not available.</u></p><HR size="1" noshade="noshade"><h3>SpringSource tc Server/6.0.20.C</h3></body></html>
I tested these situation with SoapUI
server receive message but didnt send any response because he didn find correct endpoint [2010-08-26 14:38:19] Accepting incoming [org.springframework.ws.transport.http.HttpServletConnection@1700f3d] at [http://localhost:8080/calculator]
[2010-08-26 14:38:19] Received request [SaajSoapMessage {urn:org:samples:spring:ws:schemas:calculatorblabla}calculatorRequest]
[2010-08-26 14:38:19] Looking up endpoint for [{urn:org:samples:spring:ws:schemas:calculatorblabla}calculatorRequest]
[2010-08-26 14:38:19] Endpoint mapping [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@ae2481] has no mapping for request
[2010-08-26 14:38:19] No endpoint mapping found for [SaajSoapMessage {urn:org:samples:spring:ws:schemas:calculatorblabla}calculatorRequest]
[2010-08-26 14:38:19] Successfully completed request
so I need when client send me message with wrong namespace it writes some fault message similar when he send xml which isnt validate with xsd.
Thank for any help and sorry for mistake my english is quite bad
by default Spring-WS 1.5.x uses
org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapterwhich usesorg.springframework.ws.transport.http.HttpServletConnectionto sendWebServiceMessages.HttpServletConnectionis anEndpointAwareWebServiceConnectionwhich defines a way to handle cases when no endpoint is found. The default implementation sets the servlet response code to 404.If you need to do something else, you would need to get your hands into the guts of Spring-WS as the
WebServiceConnectionis not configurable in theWebServiceMessageReceiverHandlerAdapter. I’m not aware of anotherHandlerAdapterthat allows you to configure theWebServiceConnectionso you may have to write one.