I have come across a problem with my new implementation of callbacks
across the Web Service binding. This code handles callbacks in the same
way as forward calls by creating an Axis service and a servlet on the
reference end to receive the callbacks, and using a normal Axis2
OperationClient on the service end to invoke them.
The problem is an error
org.apache.axis2.AxisFault: Transport error: 404 Error: Servlet
/MyClientComponent/$callback$.myService is not available
when the service side attempts to make a callback to the client side.
This URI is one I have constructed to represent a reference callback endpoint.
I have created a servlet and registered a mapping for this callback URI using
the same code that does this successfully for a service. I don't know why
my callback servlet isn't available but my servlet for the forward call works
OK.
In the following trace there are some debug println calls showing that the
servlet mapping is being registered with the correct URI, and that the server
callback invocation back to the client is using the same URI that was extracted
from WS-Addressing information sent on the forward call.
To run the new code path and see this problem, you need my latest patch (patch2)
applied, and you also need to make some small modifications to the code in
binding-ws-axis2 and to the SCDL and WSDL files in simple-callback-ws.
1. In Axis2ReferenceBindingProvider.java and Axis2ServiceBindingProvider.java,
change the value of "tactical" from true to false, then rebuild the
binding-ws-axis2 module.
2. In simple-callback-ws, change the WSDL to use a one-way MEP rather than
a two-way MEP for the call to someMethod (see commented instructions).
Also change the SCDL to specify a wsdl.port instead of a wsdl.binding for
the callback (see commented instructions). Rebuild simple-callback-ws and
you should see the following trace.
Any suggestions for what is causing this problem would be very gratefully
received!
Simon
Running simplecallback.SimpleCallbackTestCase
log4j:WARN No appenders could be found for logger
(org.apache.axiom.om.util.StAXUtils).
log4j:WARN Please initialize the log4j system properly.
Axis2ServiceProvider: adding servlet mapping for
http://localhost:8085/MyClientComponent/$callback$.myService
22-Jul-2007 00:31:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
22-Jul-2007 00:31:27 org.apache.catalina.startup.ContextConfig defaultWebConfig
INFO: No default web.xml
22-Jul-2007 00:31:27 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd
22-Jul-2007 00:31:27 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
22-Jul-2007 00:31:27 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
22-Jul-2007 00:31:27 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
22-Jul-2007 00:31:27 org.apache.catalina.startup.DigesterFactory register
WARNING: Could not get url for
/javax/servlet/resources/j2ee_web_services_1_1.xsd
22-Jul-2007 00:31:27 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8085
22-Jul-2007 00:31:27 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8085
Axis2ServiceProvider adding servlet mapping for
http://localhost:8085/MyServiceComponent
Main thread Thread[main,5,main]
aClientMethod on thread Thread[main,5,main]
aClientMethod return from someMethod on thread Thread[main,5,main]
Sleeping ...
22-Jul-2007 00:31:28 org.apache.catalina.core.StandardWrapper unload
INFO: Waiting for 1 instance(s) to be deallocated
setMyServiceCallback on thread Thread[pool-1-thread-1,5,main]
someMethod on thread Thread[pool-1-thread-1,5,main]
Axis2BindingInvoker: dynamic endpoint URI is
http://localhost:8085/MyClientComponent/$callback$.myService
22-Jul-2007 00:31:28 org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet /MyClientComponent/$callback$.myService is currently unavailable
java.lang.reflect.UndeclaredThrowableException
at $Proxy11.receiveResult(Unknown Source)
at simplecallback.MyServiceImpl.someMethod(MyServiceImpl.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invokeTarget(JavaTargetInvoker.java:112)
at
org.apache.tuscany.sca.implementation.java.invocation.JavaTargetInvoker.invoke(JavaTargetInvoker.java:134)
at
org.apache.tuscany.sca.implementation.java.invocation.PassByValueInvoker.invoke(PassByValueInvoker.java:61)
at
org.apache.tuscany.sca.implementation.java.invocation.TargetInvokerInvoker.invoke(TargetInvokerInvoker.java:46)
at
org.apache.tuscany.sca.core.databinding.wire.DataTransformationInteceptor.invoke(DataTransformationInteceptor.java:68)
at
org.apache.tuscany.sca.binding.axis2.Axis2ServiceProvider.invokeTarget(Axis2ServiceProvider.java:421)
at
org.apache.tuscany.sca.binding.axis2.Axis2ServiceInMessageReceiver.invokeBusinessLogic(Axis2ServiceInMessageReceiver.java:67)
at
org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:33)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
org.apache.tuscany.sca.binding.axis2.Axis2ServiceServlet.service(Axis2ServiceServlet.java:234)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:352)
at org.apache.tuscany.sca.core.work.Jsr237Work.run(Jsr237Work.java:61)
at
org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$DecoratingWork.run(ThreadPoolWorkManager.java:206)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.axis2.AxisFault: Transport error: 404 Error: Servlet
/MyClientComponent/$callback$.myService is not available
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:221)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
at
org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invokeTarget(Axis2BindingInvoker.java:94)
at
org.apache.tuscany.sca.binding.axis2.Axis2BindingInvoker.invoke(Axis2BindingInvoker.java:72)
at
org.apache.tuscany.sca.core.databinding.wire.DataTransformationInteceptor.invoke(DataTransformationInteceptor.java:68)
at
org.apache.tuscany.sca.core.invocation.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:142)
at
org.apache.tuscany.sca.core.invocation.JDKCallbackInvocationHandler.invoke(JDKCallbackInvocationHandler.java:91)
... 36 more
Caused by: org.apache.axis2.AxisFault: Transport error: 404 Error: Servlet
/MyClientComponent/$callback$.myService is not available
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:314)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:201)
... 44 more
Caused by: org.apache.axis2.AxisFault: Transport error: 404 Error: Servlet
/MyClientComponent/$callback$.myService is not available
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:179)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)
... 45 more
Caused by: org.apache.axis2.AxisFault: Transport error: 404 Error: Servlet
/MyClientComponent/$callback$.myService is not available
at
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:320)
at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:177)
... 47 more
RuntimeException invoking receiveResult:
java.lang.reflect.UndeclaredThrowableException
22-Jul-2007 00:31:28 org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8085
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.265 sec <<<
FAILURE!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]