How to Pass XML as a SOAP Attachment, between Processes?

345 views
Skip to first unread message

Aditya S

unread,
Feb 22, 2013, 11:47:51 AM2/22/13
to live...@googlegroups.com
Process A unable to pass XML when invoking process B, through a SOAP endpoint. This is done using an out of the box operation (Invoke Web Service), where I am passing an XML variable (application/xml or text/xml) to process B. Process B has an XML variable with the input setting checked.

For some reason, process B doesn't seem to get the XML.

On the flip side, process B gets the XML successfully, as a document variable. Since I am passing an XML, I don't want to use the document variable workaround and assign it to an XML variable later.

Any suggestions on how to make this work.

Aditya

Darren

unread,
Feb 24, 2013, 6:12:58 PM2/24/13
to live...@googlegroups.com
Hi Aditaya,

I would suspect that you just have an error in your SOAP envelope. I just did a test process with two processes - Process A sends an XML variable to Process B which has an XML variable as input. The WSDL inspector in the invoke Web Service process is very basic and doesn't give you all of the details you need to correctly construct a SOAP request. I would recommend using SOAPUI to inspect the WSDL and cut and paste that request template into your Invoke Web Service process.

My process B has an XML input variable called inXML

This is the request I am using (generated by SOAPUI):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://adobe.com/idp/services">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:invoke>
         <!--Optional:-->
         <ser:inXML>
            <!--Optional:-->
            <ser:document>

              <![CDATA[ <?xml version="1.0" encoding="UTF-8"?> <your_xml><goes><here></here></goes></your_xml> ]]>

            </ser:document>
            <!--Optional:-->
            <ser:element>?</ser:element>
         </ser:inXML>
      </ser:invoke>
   </soapenv:Body>
</soapenv:Envelope

I would also question why you want to do this when you can just invoke a sub-process, but I have had to do some strange things in LC too. 

Ping me if you need me to send you an example LCA.

Cheers,
Darren

Darren

unread,
Feb 24, 2013, 6:21:43 PM2/24/13
to live...@googlegroups.com
I should also point out that you will need to serialize any input XML variable that you want to send: e.g.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://adobe.com/idp/services">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:invoke>
         <!--Optional:-->
         <ser:inXML>
            <!--Optional:-->
            <ser:document><![CDATA[{$ serialize(/process_data/outXML) $}  ]]></ser:document>
            <!--Optional:-->
            <ser:element>?</ser:element>
         </ser:inXML>
      </ser:invoke>
   </soapenv:Body>
</soapenv:Envelope>

On Saturday, 23 February 2013 03:47:51 UTC+11, Aditya S wrote:

Aditya Shah

unread,
Mar 6, 2013, 4:45:01 PM3/6/13
to live...@googlegroups.com
Darren,

This is the error I get. Why are you using the document node for an XML variable?

ERROR [com.adobe.workflow.AWS] com.adobe.idp.Document cannot be cast to org.w3c.dom.Node

Aditya

--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to livecycle+...@googlegroups.com.
To post to this group, send email to live...@googlegroups.com.
Visit this group at http://groups.google.com/group/livecycle?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Darren

unread,
Mar 6, 2013, 4:57:06 PM3/6/13
to live...@googlegroups.com
Hi Aditya,

I'm not using a Document variable type, it is an xml variable. However LiveCycle requires that you put the serialised xml within that sub node to allow it to be read at the receiving end. This is why putting the LC endpoint into soapui is always a good idea. It will tell you these quirks.

Darren

Darren

unread,
Mar 6, 2013, 6:42:32 PM3/6/13
to live...@googlegroups.com, adi...@gmail.com
Hi Aditaya,

I have created an example application to demonstrate how you do this using only XML variables passed between processes.


Once you import, execute the SendSOAP process. This process will load an XML file, send it to ReceiveXML which will return the node count back to the SendSOAP process and display it as an output string.

Darren
Reply all
Reply to author
Forward
0 new messages