You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by pradeepbill <pr...@gmail.com> on 2013/04/24 15:09:48 UTC

MESSAGE vs PAYLOAD data format

Hello Camel Riders, I have soap ui sending soap requests to my cxf endpoint
and from there to an other endpoint via Routes, the request response works
fine if I use MESSAGE format, but fails with the below error message when I
use PAYLOAD format.I have checked the soap response and its a valid one, I
am posting that as well.

 I need to use PAYLOAD format to mess with the headers, I can not use
MESSAGE because MESSAGE format do not support headers.

The response is coming from SOAPUI as well, through a mock server.Please
advice.Thanks, Pradeep

*error message*

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Body>
            <soapenv:Fault>
               <faultcode>Server</faultcode>
               <faultstring>org.apache.xmlbeans.XmlException:
Missing/Invalid SOAP Envelope, expecting
[{http://schemas.xmlsoap.org/soap/envelope/}Envelope]</faultstring>
            </soapenv:Fault>
         </soapenv:Body>
      </soapenv:Envelope>
   </soap:Body>
</soap:Envelope>


*soap response*


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:aca="http://xyz.com/viers/schemas/vrm/0.1/vrm/aca"
xmlns:ns="http://123.com/structures/2.0" xmlns:ns1="http://123.com/2.0">
   <soapenv:Header/>
   <soapenv:Body>
      <aca:acaVerificationResponse>
         <aca:TransactionId>
            
            <ns1:IdentificationID></ns1:IdentificationID>
         </aca:TransactionId>
         <aca:PersonSSNIdentification>
            
            <ns1:IdentificationID></ns1:IdentificationID>
         </aca:PersonSSNIdentification>
         <aca:ResponseCode>APPLICANT NOT FOUND</aca:ResponseCode>
      </aca:acaVerificationResponse>
   </soapenv:Body>
</soapenv:Envelope>






--
View this message in context: http://camel.465427.n5.nabble.com/MESSAGE-vs-PAYLOAD-data-format-tp5731439.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: MESSAGE vs PAYLOAD data format

Posted by Willem jiang <wi...@gmail.com>.
Just Christian point out. If you want to set the message body for the PAYLOAD, it should not has soap envelop. It could be an xml element or java object (camel-cxf will marshal the object for you by default).

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem


Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Wednesday, April 24, 2013 at 9:30 PM, Christian Müller wrote:

> If you use the PAYLOAD data format, you have to return a java / jaxb object
> instead of an XML/string.
>  
> Sent from a mobile device
> Am 24.04.2013 15:25 schrieb "pradeepbill" <pradeep.bill@gmail.com (mailto:pradeep.bill@gmail.com)>:
>  
> > Hello Camel Riders, I have soap ui sending soap requests to my cxf endpoint
> > and from there to an other endpoint via Routes, the request response works
> > fine if I use MESSAGE format, but fails with the below error message when I
> > use PAYLOAD format.I have checked the soap response and its a valid one, I
> > am posting that as well.
> >  
> > I need to use PAYLOAD format to mess with the headers, I can not use
> > MESSAGE because MESSAGE format do not support headers.
> >  
> > The response is coming from SOAPUI as well, through a mock server.Please
> > advice.Thanks, Pradeep
> >  
> > *error message*
> >  
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > <soap:Body>
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> > <soapenv:Body>
> > <soapenv:Fault>
> > <faultcode>Server</faultcode>
> > <faultstring>org.apache.xmlbeans.XmlException:
> > Missing/Invalid SOAP Envelope, expecting
> > [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]</faultstring>
> > </soapenv:Fault>
> > </soapenv:Body>
> > </soapenv:Envelope>
> > </soap:Body>
> > </soap:Envelope>
> >  
> >  
> > *soap response*
> >  
> >  
> > <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> > "
> > xmlns:aca="http://xyz.com/viers/schemas/vrm/0.1/vrm/aca"
> > xmlns:ns="http://123.com/structures/2.0" xmlns:ns1="http://123.com/2.0">
> > <soapenv:Header/>
> > <soapenv:Body>
> > <aca:acaVerificationResponse>
> > <aca:TransactionId>
> >  
> > <ns1:IdentificationID></ns1:IdentificationID>
> > </aca:TransactionId>
> > <aca:PersonSSNIdentification>
> >  
> > <ns1:IdentificationID></ns1:IdentificationID>
> > </aca:PersonSSNIdentification>
> > <aca:ResponseCode>APPLICANT NOT FOUND</aca:ResponseCode>
> > </aca:acaVerificationResponse>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >  
> >  
> >  
> >  
> >  
> >  
> > --
> > View this message in context:
> > http://camel.465427.n5.nabble.com/MESSAGE-vs-PAYLOAD-data-format-tp5731439.html
> > Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
>  




Re: MESSAGE vs PAYLOAD data format

Posted by Christian Müller <ch...@gmail.com>.
If you use the PAYLOAD data format, you have to return a java / jaxb object
instead of an XML/string.

Sent from a mobile device
Am 24.04.2013 15:25 schrieb "pradeepbill" <pr...@gmail.com>:

> Hello Camel Riders, I have soap ui sending soap requests to my cxf endpoint
> and from there to an other endpoint via Routes, the request response works
> fine if I use MESSAGE format, but fails with the below error message when I
> use PAYLOAD format.I have checked the soap response and its a valid one, I
> am posting that as well.
>
>  I need to use PAYLOAD format to mess with the headers, I can not use
> MESSAGE because MESSAGE format do not support headers.
>
> The response is coming from SOAPUI as well, through a mock server.Please
> advice.Thanks, Pradeep
>
> *error message*
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>    <soap:Body>
>       <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>          <soapenv:Body>
>             <soapenv:Fault>
>                <faultcode>Server</faultcode>
>                <faultstring>org.apache.xmlbeans.XmlException:
> Missing/Invalid SOAP Envelope, expecting
> [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]</faultstring>
>             </soapenv:Fault>
>          </soapenv:Body>
>       </soapenv:Envelope>
>    </soap:Body>
> </soap:Envelope>
>
>
> *soap response*
>
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "
> xmlns:aca="http://xyz.com/viers/schemas/vrm/0.1/vrm/aca"
> xmlns:ns="http://123.com/structures/2.0" xmlns:ns1="http://123.com/2.0">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <aca:acaVerificationResponse>
>          <aca:TransactionId>
>
>             <ns1:IdentificationID></ns1:IdentificationID>
>          </aca:TransactionId>
>          <aca:PersonSSNIdentification>
>
>             <ns1:IdentificationID></ns1:IdentificationID>
>          </aca:PersonSSNIdentification>
>          <aca:ResponseCode>APPLICANT NOT FOUND</aca:ResponseCode>
>       </aca:acaVerificationResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/MESSAGE-vs-PAYLOAD-data-format-tp5731439.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>