Simon Nash wrote:
(cut)
Now let's come back to the problem that I cam currently seeing. I'm not
sure if you have looked into the details of the failure. My code is
effectively already doing exactly what you suggest (including registering
a servlet mapping for the pseudo-service that supports the callback
reference), and I am seeing a "servlet unavailable" message when trying
to invoke the servlet. I'd like to understand why this is happening
before making all the code change you are suggesting, which could possibly
still result in the same error because they will be doing the same thing.
If anyone else understands how servlet registration and servlet mapping
works and could help me today to look into this problem, I would
appreciate it. Otherwise I will continue to educate myself in this
area and try some other scenarios to attempt to narrow it down. The first
thing I will try is doing exactly what Raymond suggests, but manually
in the SCDL, to see whether the problem still occurs.
I tried this and got exactly the same error with not a callback in sight
anywhere, just plain old references and services making forward calls.
I have created TUSCANY-1474 for this problem and I have attached my
test case simple-callback2-ws.zip to it. It seesms that no more than one
Tomcat Axis2 servlet can be registered, which means that it's not possible
to have more than one SCA service that uses the Web Service binding.
Simon
Raymond Feng wrote:
Hi, Simon.
I think the problem is that we need to create an internal callback
service to listen on the callbacks from the web service protocol.
Please see my proposal [1].
If we do so, a servlet mapping
"MyClientComponent/$callback$.myService" for this special service will
be registered when it is activated.
[1] http://www.mail-archive.com/[email protected]/msg20497.html
Thanks,
Raymond
----- Original Message ----- From: "Simon Nash" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, July 21, 2007 5:54 PM
Subject: Problem with new callback implementation for the Web Service
binding
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
(cut)
... 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]