Yeah, the SoapDataFormat is based on the JAXB which is need to use the
generated classes to do marshal and unmarshal work.
If you already has the generate soap message you can consider to use
camel-http component to do the proxy job.
On 10/20/10 9:16 PM, fitzgerald wrote:
Hallo
The intention of our developing issue was to call, a soap webservice from
camel via the producertemplate.
As base of our researching we used this site.
http://camel.apache.org/soap.html http://camel.apache.org/soap.html
Proxy code generation with wsdl to code generators, should not be used,
instead a kind of codeless proxy which we thougt is provided by camel and
was done in the following way by setting
the endpoint wsdlurd,portname and servicename
Like in the sample contained in the link we used SoapJaxbDataFormat
SoapJaxbDataFormat soapDF = new SoapJaxbDataFormat("com.siemens.zcsisuint");
soapDF.setElementNameStrategy(new ServiceInterfaceStrategy(xx.class)
The producertemplate sends data in following way
prodtemp.sendBody("direct:start",ExchangePattern.InOut, xxmessagepojo);
So far it works fine.
But then in the next iteration we tried to become to live without the
proxyclasses and changed the soapdataformatbinding to (to be able to get
away from the proxyclasses)
QName elementName = new QName("http://www.example.com/ZCSISUINT/",
"NewOperation");
QNameStrategy strategy = new
QNameStrategy(elementName);
SoapJaxbDataFormat soapDF = new
SoapJaxbDataFormat();
soapDF.setElementNameStrategy(strategy);
The result is marshalling doesn't work anymore.A bulk of exceptions is
thrown.
The important one seems to be
Caused by: javax.xml.bind.JAXBException:
org.xmlsoap.schemas.soap.envelope.Envelope is not known to this context.
I think it isn't possible to marshal data from a producer to a external
soapwebservice without generated proxy classes (only using a wsdl file,
without proxy code)!
Is that right ?
Cheers
Fitzgerald
--
Willem
----------------------------------
Open Source Integration: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: http://twitter.com/willemjiang