Sorry,
See it now setHeader()
Thanks,
Martin
Martin Feeney wrote:
Hi Freeman,
Finally got back to this, I have taken your advice and started using
Camels Content Enricher EIP. Unfortunatly the Camel Message interface
does not allow one to add a property to the message so as the CXF BC
provider class can pick up on it as a JBI Normalised Message property.
Am I missing something.
//Dynamically enrich meassage bound for the CXF BC with
HTTP_DESTINATION_URI property
from(SERVICE_IN_HTTP_DEST_SET)
.process(new Processor() {
public void process(Exchange exchange) {
Message msg = exchange.getIn();
//String payload =
exchange.getIn().getBody(String.class);
//System.out.println("HTTPDESTSET REPORTS "+"
"+payload);
//msg.setProperty(JbiConstants.HTTP_DESTINATION_URI,
"http://localhost:9000/service");
exchange.setProperty(JbiConstants.HTTP_DESTINATION_URI,
"http://localhost:9000/ContextEnablerNotification");
}
})
.to(
"jbi:service:service");
Thanks,
Martin
Freeman Fang wrote:
Hi Martin,
You may need add a content enricher of servicemix-eip between your
cxf proxy and cxf bc provider.
[1] for more details about the content enricher
[1]http://servicemix.apache.org/servicemix-eip.html#servicemix-eip-ContentEnricher
Freeman
Martin Feeney wrote:
Thanks for the speedy reply,
Using the Camel component is not a solution unfortunately as the Web
Service endpoints are not pre defined. The JBI property seems to be
the solution so with this in mind how/where can one set this JBI
property on a Normalised Message from with in a CXF-se using a
CXF-proxy injected via spring or do I have to use a less abstract
component to achieve this?
Thanks,
Martin
Freeman Fang wrote:
Yeah, cxf bc provider also support the dynamic location URI, [1]
track this issue
You can set property JbiConstants.HTTP_DESTINATION_URI as your
endpoint address to the NormalizedMessage programmatically.
[1]https://issues.apache.org/activemq/browse/SMXCOMP-402
Freeman
Gert Vanthienen wrote:
Martin,
The HTTP provider endpoint allows you to set an expression to
determine the location uri to send the request to. That might be a
solution for your problem. I'm not sure if a CXF BC provider
endpoint
has the same feature, but I'm pretty sure someone will jump in if it
does.
Another way to to about this would be by using a Camel Recipient List
together with CXF endpoints. This way, your recipient list can
dynamically generate the camel-cxf endpoint URI to use.
Regards,
Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
2009/2/24 Martin Feeney <[email protected]>:
Hi All,
I am currently using the cxfse:proxy to send web service
notifications to an
external web service via the cxf-bc provider component. I was
wondering
whether it is possible to do this programmatically instead of
hard coding
the cxf-bc provider endpoint address. Is there an appropriate way
to do
this?
Many Thanks,
Martin
--
Research Software Developer
IMSARCS
Telecommunications Software & Systems Group (TSSG),
ArcLabs Research and Innovation Building,
Waterford Institute of Technology,
Carriganore Campus, Carriganore,
Co. Waterford, Ireland
www: www.tssg.org
Work: +353 (0)51 304020
Mobile: +353 (0)85 1463212
Work e-mail: [email protected]
Personal e-mail: [email protected]
Skype: martinfeeney
--
Research Software Developer
IMSARCS
Telecommunications Software & Systems Group (TSSG),
ArcLabs Research and Innovation Building,
Waterford Institute of Technology,
Carriganore Campus, Carriganore,
Co. Waterford, Ireland
www: www.tssg.org
Work: +353 (0)51 834020
Mobile: +353 (0)83 1463212
Work e-mail: [email protected]
Personal e-mail: [email protected]
Skype: martinfeeney