Hello!
Well, we have the following scenario:
step 1. ok step 2. ok
--------> ---------->
Client (C) Dispatcher (D) Remote Server (RS)
<-------- <----------
step 4. KO step 3. ok
What we are trying to achieve is this: D acts as a front-end for services
requests and redirects the incoming requests to a series of RS. Redirection
target is chosen depending on load balancing algorithms and routing policies
implemented within a specific interceptor in step 1.
D publishes the PersistenceProvider implementor that implements the
Provider<Source> interface with @ServiceMode (Service.Mode.MESSAGE).
Depending on the target RS, D add custom headers or apply security policies.
As I mentioned in my first email, we managed to perform steps 1, 2, 3 and we
get the answer back from our RS. That means we succesfully arrive at the end
of our PersistenceProvider#invoke method (that runs on the Dispatcher side).
As soon as the invoke method returns, CXF should send the answer back to the
client C.
What we return from PersistenceProvider#invoke method is the following
envelope:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><Action
xmlns="http://www.w3.org/2005/08/addressing">http://.../GetPlatUserByUsernameAndPswResponse</Action><MessageID
xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:ac3f89bf-a8cc-44c5-802b-35db62983c5f</MessageID><To
xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To><RelatesTo
xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:43c...</RelatesTo></soap:Header><soap:Body><ns2:GetPlatUserByUsernameAndPswResponse
xmlns:ns2="http://dbproxyservice/"
xmlns:ns3="http://config.dataModel.utils.velocity.plat1.abodata.com/"><return>...
payload
info...</return></ns2:GetPlatUserByUsernameAndPswResponse></soap:Body></soap:Envelope>
Unfortunately this step 4 fails: if we return the SAXSource source
associated with the envelope above, we just get a null answer toward C. If
we remove all but the <soap:Body><ns2:GetPlatUserByUsernameAndPswResponse
xmlns:ns2="http://dbproxyservice/"
xmlns:ns3="http://config.dataModel.utils.velocity.plat1.abodata.com/"><return>...
payload
info...</return></ns2:GetPlatUserByUsernameAndPswResponse></soap:Body> and
we return this as a SAXSource source, we get the exception that I listed in
my first post.
So the main question here is: what is the correct strategy? remove all but
the body from the SAXSource or return the whole envelope?
Thank you very much!
Best,
matteo
-----
matteo
--
View this message in context:
http://cxf.547215.n5.nabble.com/Problem-on-the-way-back-to-the-client-CXF-WS-dispatch-tp5719999p5720140.html
Sent from the cxf-user mailing list archive at Nabble.com.