i suppose the problem is that you are mixing up the payload and message modes without doing any adjustment between. the payload mode expects the body-child document, so this is something like your InquiryRequest. in contrast, the message mode expects the entire soap message, so this starts with soap:Envelope.
see the dataformat section of the camel-cxf documentation. http://camel.apache.org/cxf.html#CXF-Thedescriptionsofthedataformats 2015-05-12 12:23 GMT+02:00 jainmcs03 <tojayendran.in...@gmail.com>: > > Team, > > I have successfully done the transformation(unmarshal->do process->marshal) > but getting a error response from real webservice. Below the error and route > definition. > > Error: > <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header > xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action></soapenv:Header><soapenv:Body><soapenv:Fault><faultcode>soapenv:</faultcode><faultstring>First > Element must contain the local name, Envelope , but found > InquiryRequest</faultstring><detail/></soapenv:Fault></soapenv:Body></soapenv:Envelope> > > Enpoints & Route: > <cxf:cxfEndpoint id="canonicalService" > > address="http://localhost:8080/canonicalcxfserviceproxy/webservices/canonical" > endpointName="xsd:CanonicalSoap" > serviceName="xsd:Canonical" > wsdlURL="etc/canonical.wsdl" > > xmlns:xsd="http://localhost:8080/canonicalcxfserviceproxy/canonical"/> > <cxf:cxfEndpoint id="callRealWebService" > > address="https://eporttrain.equifax.co.in/creditreportws/CreditReportWSInquiry/v1.0/" > endpointName="xsd:CreditReportWSInquiryPort" > serviceName="xsd:v1.0" > > xmlns:xsd="http://services.equifax.com/eport/ws/schemas/1.0"/> > > <camelContext trace="true" typeConverterStatisticsEnabled="true" > xmlns="http://camel.apache.org/schema/spring"> > <route streamCache="true"> > <from uri="cxf:bean:canonicalService?dataFormat=PAYLOAD"/> > <wireTap > uri="file:/home/analyzer/Desktop/input/?fileName=request.xml"/> > <unmarshal> > <jaxb prettyPrint="true" > contextPath="localhost._8080.canonicalcxfserviceproxy.canonical"/> > </unmarshal> > <process ref="reqprocessor"/> > <marshal> > <jaxb prettyPrint="true" > contextPath="com.equifax.services.eport.ws.schemas._1"/> > </marshal> > <wireTap > uri="file:/home/analyzer/Desktop/input/?fileName=realrequest.xml"/> > <to uri="cxf:bean:callRealWebService?dataFormat=MESSAGE"/> > <wireTap > uri="file:/home/analyzer/Desktop/output/?fileName=response.xml"/> > </route> > </camelContext> > > > Regards > Jayendran > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Unable-to-make-a-SOAP-HTTP-request-through-webservice-proxy-tp5767008.html > Sent from the Camel - Users mailing list archive at Nabble.com.