Hi ,
I Have to made Dynamic external call with cxf webservices.
In other termes I had deploy with cxf framework many webservices on a tomcat 6 server, it work well.
And now I have to add a transformation to my camel OSGI component who will made a dynamic call to a cxf webservices ( url change each message )
I don't now how to made it with the binding component so I have choose to made it directly in java
Here is the code
+ public Object transform(Object body) {+
+ String answer = prefix + " set body: " + new Date();+
+ if (verbose) {+
+ System.out.println(">>>> " + answer);+
+ }+
+ // POC APPEL DYNAMIC CXF +
+ try {+
+ JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory+
+ .newInstance();+
+ Client client = dcf+
+ .createClient("http://localhost:7878/DamFwTransfoPreIntegrationNAFtoVMS/services/DamFwTransformationIntegrationPort?wsdl");+
+ Object[] res = client.invoke("getZone", "exemple de chaine envoi");+
+ System.out.println("Echo response: " + res[0]);+
+ } catch (Exception e) {+
+ System.out.println(">>>> Exception ");+
+ e.printStackTrace();+
+ }+
+ LOG.info(">>>> " + answer);+
+ return answer;+
+ }+
I have had depency to my POM.xml but I have still an error :
ClassNotFound : com.sun.tools.interval.xjc.api.XJC
Any idea ?
Thanks by advance