You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by gauravd <ga...@gmail.com> on 2011/09/10 00:15:32 UTC

CXF - Asynchronous Webservices WSA-Addressing Problem

Hi All,

I am trying to expose an asynchronous webservice via ESB but having some
issues with WS-Addressing.

I have made a asynchornous webservice and client which works fine if I test
it in point to point model.  However when I am trying to expose it via ESB -
so that the client calls the ESB endpoint instead of direct service
endpoint, iam running into issues. 

The ESB requires WS-Addressing to be enabled at service end so that it could
handle the async response. I have implemented it and when I run the client
to call ESB endpoint, the  ESB acts as a client and calls my WS-Addressing
enabled service and tries to consume the response but it fails- the error
message is " Message does not contain a valid SOAP Reply Identifier."

I  see that the the cxf services sends 2 responses back to ESB -- The 1st
response contains anonymous at the "TO" field with empty soap:Body ( Please
see below)  and the second response is the actual proper response. 


<To
xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
					<Address>http://www.w3.org/2005/08/addressing/none</Address>
				</ReplyTo>


I think ESB is not able to understand the 1st response that is being sent. 
Can you please help me out on why CXF sends 2 responses? Please not that
Synchronous CXF services via ESB works fine. 

Below are some configuration I have used. -- 

@Addressing(enabled = true, required = false, responses =
Responses.NON_ANONYMOUS)

	<wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"
				allowDuplicates="false" usingAddressingAdvisory="true" />

I have tweaked the above seetings a lot but I cannot make it to send a
single response back to ESB .

Please help  :( 

Thanks.
Gaurav


--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing-Problem-tp4788067p4788067.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF - Asynchronous Webservices WSA-Addressing Problem

Posted by Daniel Kulp <dk...@apache.org>.
On Monday, September 12, 2011 12:29:19 PM gauravd wrote:
> Thanks everyone for the inputs.  I will try out the 2.5 snapshots but is
> there any tentative release date for 2.5?

Mid October would be 6 months since 2.4.  That's likely the "right" time.

Dan


> 
> We are keen on using a stable build and any information on planned 2.5
> release will really help in planning our future activities.
> 
> Thanks,
> 
> Gaurav
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing
> -Problem-tp4788067p4795597.html Sent from the cxf-user mailing list archive
> at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: CXF - Asynchronous Webservices WSA-Addressing Problem

Posted by gauravd <ga...@gmail.com>.
Thanks everyone for the inputs.  I will try out the 2.5 snapshots but is
there any tentative release date for 2.5?  

We are keen on using a stable build and any information on planned 2.5
release will really help in planning our future activities. 

Thanks,

Gaurav

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing-Problem-tp4788067p4795597.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF - Asynchronous Webservices WSA-Addressing Problem

Posted by Aki Yoshida <el...@googlemail.com>.
Hi,

The patch for this behavior correction (CXF-3768) is only available in
2.5.0-SNAPSHOT at the moment. So, if you want to try it out, please
use 2.5.0-SNAPSHOT.

regards, aki

2011/9/12 Daniel Kulp <dk...@apache.org>:
>
> There has been some work on trunk (and the branches) in the last couple weeks
> to clarify some of the WS-Addressing one-way handling and the 202 return codes
> and such.    Thus, this may already be fixed in the latest 2.4.3 and 2.5.0
> snapshots.   Any chance you can give those a try?
>
> Dan
>
>
> On Friday, September 09, 2011 8:20:12 PM gauravd wrote:
>> Iam using Websphere Message Broker 7 as an ESB.  There are multiple message
>> flows - one for sending calling the cxf service and second flow for handling
>> the response from cxf service. Its the second flow where Iam seeing the
>> problem.
>>
>> Can you help me out please.  I am not sure if  2 responses sent by CXF, -
>> one with anonymous declarations and second with actual response payload is a
>> standard practice?
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing
>> -Problem-tp4788067p4788618.html Sent from the cxf-user mailing list archive
>> at Nabble.com.
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> Talend - http://www.talend.com
>

Re: CXF - Asynchronous Webservices WSA-Addressing Problem

Posted by Daniel Kulp <dk...@apache.org>.
There has been some work on trunk (and the branches) in the last couple weeks 
to clarify some of the WS-Addressing one-way handling and the 202 return codes 
and such.    Thus, this may already be fixed in the latest 2.4.3 and 2.5.0 
snapshots.   Any chance you can give those a try?

Dan


On Friday, September 09, 2011 8:20:12 PM gauravd wrote:
> Iam using Websphere Message Broker 7 as an ESB.  There are multiple message
> flows - one for sending calling the cxf service and second flow for handling
> the response from cxf service. Its the second flow where Iam seeing the
> problem.
> 
> Can you help me out please.  I am not sure if  2 responses sent by CXF, -
> one with anonymous declarations and second with actual response payload is a
> standard practice?
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing
> -Problem-tp4788067p4788618.html Sent from the cxf-user mailing list archive
> at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: CXF - Asynchronous Webservices WSA-Addressing Problem

Posted by gauravd <ga...@gmail.com>.
I am still struggling with the multiple outbound responses generated by CXF
when there is an asynchrnous request with addressing attributes -  

here is the exact response payload - The second response is the actual
response that should be generated. But its the 1st response with the bold
segments that causing problems at esb end. Its not able to resolve ReplyTo
headers i guess.  Please help.

*Outbound Message 1*---------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Header>
		<MessageID
xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:92349ec2-a78e-4276-9659-c23bec9d293f
		</MessageID>
		<To
xmlns="http://www.w3.org/2005/08/addressing">*http://www.w3.org/2005/08/addressing/anonymous*</To>
		<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
			<Address>*http://www.w3.org/2005/08/addressing/none*</Address>
		</ReplyTo>
		<RelatesTo
xmlns="http://www.w3.org/2005/08/addressing">*http://www.w3.org/2005/08/addressing/unspecified*	
</RelatesTo>
	</soap:Header>
	<soap:Body />
</soap:Envelope>
--------------------------------------
*Outbound Message 2*---------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Header>
		<Action
xmlns="http://www.w3.org/2005/08/addressing">http://service.esb.com/Mathematics/squareNumberResponse
		</Action>
		<MessageID
xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:423f3493-27a1-46f2-a97b-88bc877610c9
		</MessageID>
		<To
xmlns="http://www.w3.org/2005/08/addressing">http://10.24.81.42:7801/WMB/Async/Response/Node/Math_Async?context=534f4150000000000000000000000000980d000000000000&amp;timestamp=3810
		</To>
		<RelatesTo
xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:4469BE87590E442FAD1315845755210
		</RelatesTo>
		<ns2:context xmlns="http://www.w3.org/2005/08/addressing"
			xmlns:ns2="http://www.ibm.com/wmb/2007/05/rp"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
		
wsa:IsReferenceParameter="1">squareNumber534f4150010000000300000000000000980d0000000000003810
		</ns2:context>
	</soap:Header>
	<soap:Body>
		<ns2:squareNumberResponse xmlns:ns2="http://service.esb.com/">
			<return>4</return>
		</ns2:squareNumberResponse>
	</soap:Body>
</soap:Envelope>

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing-Problem-tp4788067p4795243.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF - Asynchronous Webservices WSA-Addressing Problem

Posted by gauravd <ga...@gmail.com>.
Iam using Websphere Message Broker 7 as an ESB.  There are multiple message
flows - one for sending calling the cxf service and second flow for handling
the response from cxf service. Its the second flow where Iam seeing the
problem. 

Can you help me out please.  I am not sure if  2 responses sent by CXF, -
one with anonymous declarations and second with actual response payload is a
standard practice? 

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing-Problem-tp4788067p4788618.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF - Asynchronous Webservices WSA-Addressing Problem

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

A quick question, what's the kind of ESB you're using?

Freeman
On 2011-9-10, at 上午6:15, gauravd wrote:

> Hi All,
>
> I am trying to expose an asynchronous webservice via ESB but having  
> some
> issues with WS-Addressing.
>
> I have made a asynchornous webservice and client which works fine if  
> I test
> it in point to point model.  However when I am trying to expose it  
> via ESB -
> so that the client calls the ESB endpoint instead of direct service
> endpoint, iam running into issues.
>
> The ESB requires WS-Addressing to be enabled at service end so that  
> it could
> handle the async response. I have implemented it and when I run the  
> client
> to call ESB endpoint, the  ESB acts as a client and calls my WS- 
> Addressing
> enabled service and tries to consume the response but it fails- the  
> error
> message is " Message does not contain a valid SOAP Reply Identifier."
>
> I  see that the the cxf services sends 2 responses back to ESB --  
> The 1st
> response contains anonymous at the "TO" field with empty soap:Body  
> ( Please
> see below)  and the second response is the actual proper response.
>
>
> <To
> xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous 
> </To>
> <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
> 					<Address>http://www.w3.org/2005/08/addressing/none</Address>
> 				</ReplyTo>
>
>
> I think ESB is not able to understand the 1st response that is being  
> sent.
> Can you please help me out on why CXF sends 2 responses? Please not  
> that
> Synchronous CXF services via ESB works fine.
>
> Below are some configuration I have used. --
>
> @Addressing(enabled = true, required = false, responses =
> Responses.NON_ANONYMOUS)
>
> 	<wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"
> 				allowDuplicates="false" usingAddressingAdvisory="true" />
>
> I have tweaked the above seetings a lot but I cannot make it to send a
> single response back to ESB .
>
> Please help  :(
>
> Thanks.
> Gaurav
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-Asynchronous-Webservices-WSA-Addressing-Problem-tp4788067p4788067.html
> Sent from the cxf-user mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com