Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.2
-
None
-
Unknown
Description
Send a random request to a Provider based service. Retrieving the operation property from the MessageContext within the invoke method always returns an operation defined in the attached wsdl even if the the rquest is completely unrelated, e.g. unknown SOAPAction, payload not matching any schema in the WSDL.
Expected behavior is to get back some undefined value, e.g. null, to indicate the requested operation could not be determined.
Attached is the slightly modified jaxws_dispatch_provider sample. The changes were basically made in demo.hwDispatch.server.GreeterSoapMessageProvider:
@WebServiceProvider(portName = "SoapPort1", serviceName = "SOAPService1", targetNamespace = "http://apache.org/hello_world_soap_http", wsdlLocation = "wsdl/hello_world.wsdl") @ServiceMode(value = Service.Mode.MESSAGE) public class GreeterSoapMessageProvider implements Provider<SOAPMessage> { @Resource private WebServiceContext context; public SOAPMessage invoke(SOAPMessage request) { QName opName = (QName) context.getMessageContext().get(MessageContext.WSDL_OPERATION); System.out.println("Incoming Client Request as a SOAPMessage calling operation " + opName); ...
If sending the request attached in the output of the console is:
{{monospaced}}Incoming Client Request as a SOAPMessage calling operation
greetMe{{monospaced}}
Attachments
Attachments
Issue Links
- supercedes
-
CXF-4108 Dispatch provider accepts any request
- Closed