Response from Web service using Apache CXF shows “No binding operation info..”

后端 未结 5 1843
故里飘歌
故里飘歌 2021-02-07 10:46

The problem description might be long. Please be patient and provide any kind of help since I am new to the web services.

What I have done: I have creat

5条回答
  •  情书的邮戳
    2021-02-07 11:18

    In general, this exception usually occurs if the incoming soap method doesn't correctly match the WSDL. In such a case, the soap message could not be mapped to an appropriate method on the service. CXF just doesn't know what to do. Double check the incoming soap message.

    Source of the above explanation.

    Possible solution:

    @WebService(targetNamespace = "http://ws.service.com/",
            portName = "DeepThoughtPort",
            serviceName = "DeepThoughtService",
            endpointInterface = "your.pck.DeepThoughtService",
            wsdlLocation = "WEB-INF/wsdl/DeepThoughtService.wsdl")
    public class DeepThought {
    
        @WebMethod(action = "whatIsTheAnswer")
        public String whatIsTheAnswer(@WebParam(name = "arg0") String interviewer) {
            return ("The answer " + interviewer);
        }
    }
    

    What I would do is to add the WSDL location and endpointInterface in your @WebService. Also you are using Java-First approach so your method should be annotated with @WebMethod(action = "whatIsTheAnswer"). So if the method is not annotated CXF "understands" that your web service does not contain any methods at all and says: No binding operation info while invoking unknown method with params unknown.

    See also:

    • Developing a Service using JAX-WS

提交回复
热议问题