Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

cCXF component with payload mode

Is there an example that shows how to make a SOAP call in a Route with cCXF component with PAYLOAD mode selected?

Labels (3)
1 Solution

Accepted Solutions
Loko
Creator II
Creator II

this is what I told you :be careful with your namespaces.
Try to remove them from your body stuff

View solution in original post

15 Replies
Loko
Creator II
Creator II

The only requirement is to have some text in your message body that fits the WSDL for your service/operation.

 

What is your issue ?

Anonymous
Not applicable
Author

So I need to provide in the body to the cCXF component the body of the SOAP envelope?

 

Where do I put all the elements that are in my SOAP body element

<S:Body xmlns:ns2=...>

...

</S:Body>

Loko
Creator II
Creator II

Yes, only the body, as your component will auto create the soap enveloppe by itself.
Anonymous
Not applicable
Author

When I select RAW in the component and send entire SOAP to the component I get back 0 from the service.

When I tried with only SOAP body and select PAYLOAD mode I get an error.

 

How do I add all the XML elements from the SOAP?

Loko
Creator II
Creator II

You will have to be more precise if you want some help : what error do you get ?

I confirm sending the soap body in exchange body and letting the cxf component do the rest works fine.

Anonymous
Not applicable
Author

this is what I send to the exchange body:

  <S:Body xmlns:ns2="....">
    <ns2:upload>
      <arg0>
        <credentials>
          <password>...</password>
          <username>...</username>
        </credentials>
        <document>
          <content>j</content>
          <name>1.xml</name>
        </document>
        <documentType>12</documentType>
        <formatType>19</formatType>
      </arg0>
    </ns2:upload>
  </S:Body>

and the error I get

com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "S"
 at [row,col {unknown-source}]: [1,61]
	at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:614)
...

the route for testing

0683p000009LrVq.png

Loko
Creator II
Creator II

remove de s:body tags

and be careful with namespaces, that have to suit exactly your WSDL
Anonymous
Not applicable
Author

After I remove starting and closing Body tag I get

[WARN ]: org.apache.camel.component.cxf.CxfEndpoint - Error finding the start element.
com.ctc.wstx.exc.WstxParsingException: Undeclared namespace prefix "ns2"
at [row,col {unknown-source}]: [1,16]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:614)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:487)
Loko
Creator II
Creator II

this is what I told you :be careful with your namespaces.
Try to remove them from your body stuff