Hi Freeman,
I've tried your suggestion but the problem is still there, BTW the good
news for you is that now
i've the same problem using http, because the TransformComponentSupport
in the trunk has bug.
In my opinion it seems not to be a send() or sendSync() problem, but a
problem on the "role" of the exchange
when the done is sent from cxf-bc back to to smx-bean.
This is the exchange received by smx-bean:
------------------------------------------------------------------------------------------------------
InOut[
id: ID:192.168.20.107-11e2b481260-4:0
status: Active
role: provider
service:
{urn:eng:spagic:processes:firstProcess:v0}firstProcess.Transform_v_0
endpoint: firstProcess.Transform_v_0
operation: {urn:eng:spagic:processes:firstProcess:v0}run
in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/w
sdl-11-wrapper" xmlns:msg="urn:eng:spagic:processes:firstProcess:v0"
xmlns:xsd="http://www.w3.org/20
01/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="msgRequest" type="msg:msgR
equest" version="1.0"><jbi:part><payload
xmlns="urn:eng:spagic">Zoppello</payload></jbi:part></jbi:m
essage>
]
------------------------------------------------------------------------------------------------------
InOut[
id: ID:192.168.20.107-11e2b481260-4:0
status: Done
role: provider
service:
{urn:eng:spagic:processes:firstProcess:v0}firstProcess.Transform_v_0
endpoint: firstProcess.Transform_v_0
operation: {urn:eng:spagic:processes:firstProcess:v0}run
in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/w
sdl-11-wrapper" xmlns:msg="urn:eng:spagic:processes:firstProcess:v0"
xmlns:xsd="http://www.w3.org/20
01/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="msgRequest" type="msg:msgR
equest" version="1.0"><jbi:part><payload
xmlns="urn:eng:spagic">Zoppello</payload></jbi:part></jbi:m
essage>
out: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/
wsdl-11-wrapper" xmlns:msg="urn:eng:spagic:processes:firstProcess:v0"
xmlns:xsd="http://www.w3.org/2
001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="msgRequest" type="msg:msg
Request" version="1.0"><jbi:part><payload
xmlns="urn:eng:spagic">Zoppello</payload></jbi:part></jbi:
message>
]
Freeman Fang ha scritto:
Hi Andrea,
By default http component use send() but cxf component use sendSync(),
I think that's why you see the difference between cxf and http.
You can simply add synchronous="false" for your cxf bc endpoint
configuration to make cxf endpoint use send() as well, to see if in
this case the cxf component still have different behavior.
Freeman
Andrea Zoppello wrote:
Hi,
I've made a very simple SA composed as follow
- CXF-BC(InputOutput) <-> SMX-BEAN ( With a bean class that simpy do
the echo of the original message ).
When i run some test against this, an exception is raised on smx-bean
sayng Out not supported.
I've founf that the problem is that the done message from cxf is not
handled correctly by onMessage method
in TransformBeanSupport, because the exchange role when the done
message is received by smx-bean is "provider"
so the execeution according to the following code is delegated to
"processFirstMessage" method.
Instead it should be delegated to "processOngoingExchange" method,
where the done is managed correctly.
This is the current code of "onMessageExchange" method.
public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
System.out.println(exchange);
if (exchange.getRole() == MessageExchange.Role.CONSUMER
|| exchange.getProperty(correlation) != null) {
processOngoingExchange(exchange);
} else {
processFirstExchange(exchange);
}
}
I've fixed in the following way,
public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
System.out.println(exchange);
if (exchange.getRole() == MessageExchange.Role.CONSUMER
|| exchange.getProperty(correlation) != null) {
processOngoingExchange(exchange);
} else {
if (exchange.getStatus() == ExchangeStatus.ACTIVE){
processFirstExchange(exchange);
}else{
processOngoingExchange(exchange);
}
}
}
but i've not clear if is a cxf-bc or a servicemix-bean problem.
Any idea??? I supsect is probably a cxf-bc problem because if i use
http input output binding component it's working.