[ 
https://issues.apache.org/jira/browse/CXF-4108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207829#comment-13207829
 ] 

Zsolt Beothy-Elo commented on CXF-4108:
---------------------------------------

ok, bad title, bad example and bad description.
Basically where I struggle is with the following code snippet

{code}
public class MyProviderImpl implements Provider<Source> {

...
    @javax.annotation.Resource
    private javax.xml.ws.WebServiceContext context;

....
    public Source invoke(Source request) {
        QName opName = (QName) context.getMessageContext().get(
                MessageContext.WSDL_OPERATION);

....
{code} 

which value for {{opName}} can I expect if a totally unrelated request is 
submitted with an unknown SOAPAction property? Currently I get back one of the 
operation names specified in the WSDL -didn't yet understand the algrithm 
behind it. This renders the information about the operation name pretty 
useless. BTW I could not find the place in the JAX-WS spec which states when 
using Provider, by definition any SOAP message is acceptable.
In case you agree that 
{{context.getMessageContext().get(MessageContext.WSDL_OPERATION);}} in this 
situation return a spurious value I wil create a new issue and close this one.
                
> Dispatch provider accepts any request
> -------------------------------------
>
>                 Key: CXF-4108
>                 URL: https://issues.apache.org/jira/browse/CXF-4108
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>            Reporter: Zsolt Beothy-Elo
>         Attachments: request.txt, response.txt
>
>
> Start the server of the jaxws_dispatch_provider sample. Send a totally 
> unrelated request to the endpoint of the sample server. For the request 
> actually sent see attachment request.txt
> Expected behaviour: the service returns a fault with code = client  stating 
> an unknown operation was invoked.
> Actual behaviour: One of the service operations is called and normal response 
> is returned, see attachment response.txt
> Also replacing the empty soapAction values in the sample WSDL with distinct 
> values yields the same result. 
> Note: This behaviour can also be observed with other provider based services. 
> Of course here the business code might return a fault because the structure 
> of the request is not the expected one. Still already CXF should not accept 
> the requests.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to