So I coded up a simple WCF and it exhibits the same behavior.
After a little poking about in the soap:invoke, for some reason, the response for the WCF is returned as a org.apache.xerces.dom.DeferredDocumentImpl.
So to get the xml, instantiated a org.dom4j.io.DOMReader and read in the org.apache.xerces.dom.DeferredDocumentImpl (org.w3c.dom.Document) into a org.dom4j.Document.
With the then org.dom4j.Document I called the called asXML method to get a string of the response to validate I was getting something back from the WCF.
My test gel:
<gel:script xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql"
xmlns:x="jelly:org.apache.commons.jelly.tags.xml.XMLTagLibrary"
xmlns:xog="http://www.niku.com/xog"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gel:log category="Workday" level="INFO">Starting process</gel:log>
<!-- Make call to Workday TIBCO Service -->
<soap:invoke endpoint="http://localhost/TestWcf/Service1.svc?singleWsdl" var="xmlSource" soapAction="http://tempuri.org/IService1/GetData">
<soap:message>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<GetData>
<value>1</value>
</GetData>
</soapenv:Body>
</soapenv:Envelope>
</soap:message>
</soap:invoke>
<core:new className="org.dom4j.io.DOMReader" var="domReader"/>
<core:invoke on="${domReader}" method="read" var="dom4jDoc">
<core:arg type="org.w3c.dom.Document" value="${xmlSource}" />
</core:invoke>
<core:set var="xmlString" value="${dom4jDoc.asXML()}" />
<core:set var="entries" value="${context.getVariables().entrySet().toArray()}" />
<core:forEach var="entry" items="${entries}">
<core:if test="${!entry.getKey().equalsIgnoreCase('systemScope')}" >
<gel:log> ${entry.getKey()} | ${entry.getValue()}</gel:log>
</core:if>
</core:forEach>
<gel:log>${xmlString}</gel:log>
<!-- Check to see if connection was successful -->
</gel:script>
Output:
The last line is my xml response from my WCF from this class:
Best I can tell is the org.apache.xerces.dom.DeferredDocumentImpl is an in-memory xml document and the gel:set tag needs it to be a real org.w3c.dom.Document. I pushed it into a org.dom4j.Document for the asXML method. On a side note the jelly:org.apache.commons.jelly.tags.xml.XMLTagLibrary uses dom4J.
If you want to get it back into a org.w3c.dom.Document take a look at the org.dom4j.io.DOMWriter.
V/r,
Gene