Alex Rivera | Logout

The given SOAPAction does not match an operation

Asked 2012-08-31T18:35:43.880
10

I'm new to web service using jax-ws. I was starting to implement it based on some kind of tutorials over the web. Moreover, I was trying to access that service through my android client so I was calling this.

private static final String SOAP_ACTION =  "http://service.my/sayHello";
    androidHttpTransport.call(SOAP_ACTION, envelope);

But I get this error when i try to printstacktrace.

WARNING: Interceptor for {http://service.my/}HelloServiceImplService#{http://service.my/}sayHello has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: The given SOAPAction http://service.my/sayHello does not match an operation.
    at org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor$SoapActionInAttemptTwoInterceptor.handleMessage(SoapActionInInterceptor.java:188)
    at org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor$SoapActionInAttemptTwoInterceptor.handleMessage(SoapActionInInterceptor.java:162)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:209)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:191)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:114)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
    at org.apache.catalina.core.ApplicationFilterCh
Edit
Report

1 Answer

2

Your SOAP action should look like this: {http://service.my/}sayHello if you specify it like this: http://service.my/sayHello CXF does not understands that this is an action, this looks more like a name space, not an action.

Change this:

private static final String SOAP_ACTION =  "http://service.my/sayHello";

into this:

private static final String SOAP_ACTION =  "{http://service.my/}sayHello";

And it should work.

answered 2012-09-03T08:58:44.820

Your Answer