As the typical way to use cxf se component in Apache Servicemix[1] or FuseSource[2] ESB is like
JBI consumer endpoint<=====> cxf se endpoint.Sometimes customer want to put extra properties during runtime in JBI NormalizedMessage with JBI consumer endpoint and retrieve it from cxf se endpoint later on.
With SMXCOMP-593[3], we provide a webservice friendly and CXF-ish way to retrieve and set properties in cxf se endpoint.
Customer just need add code like
@Resource
private WebServiceContext wsContext;
to inject WebServiceContext to this CxfSeEndpoint
and use
javax.xml.ws.handler.MessageContext ctx = wsContext.getMessageContext();
org.apache.cxf.message.Message message = ((org.apache.cxf.jaxws.context.WrappedMessageContext) ctx).getWrappedMessage();
String propertyValue = (String) message.get("PROPERTY_NAME");//retrieve property
message.put("PROPERTY_NAME", "newPropertyValue");//set property
to get/set properties within cxf se endpoint.
[1]http://servicemix.apache.org/home.html
[2]http://fusesource.com/
[3]https://issues.apache.org/activemq/browse/SMXCOMP-593
Wow what a nice post. I am impressed from it.
ReplyDeleteThanks for more sharing........
zvnproperties
Hi Fang,
ReplyDeleteDo you have any sample Fuse project to demo the integration of hibernate with rest service .
If you have can you please share the link