Discussion:
xpath-extractor-transformer issue
Joe Hoppesch
2012-01-31 14:39:26 UTC
Permalink
I'm getting the following error when trying to extract the child xml from the body of a SOAP message.


<s:Envelope>
<s:Header>
...
</s:Header>
<s:Body>
{desired XML Node}
</s:Body>
</s:Envelope>


Here is the relevant part of the flow:

<inbound-endpoint address="https://localhost:9002/EchoServiceProxy" exchange-pattern="request-response" connector-ref="HTTP_HTTPS" doc:name="Generic"/>
<mulexml:xml-to-dom-transformer returnClass="org.w3c.dom.Document" />
<mulexml:xpath-extractor-transformer expression="//s:Envelope/s:Body/*" resultType="NODE" >
<mulexml:namespace prefix="s" uri="http://www.w3.org/2003/05/soap-envelope"/>
</mulexml:xpath-extractor-transformer>

If I set the resultType to STRING instead of NODE, then I get the string value out of the child xml, but if I want to return the full XML as a NODE - I get:

+Unable to convert class org.apache.xerces.dom.ElementNSImpl to XMLStreamReader. (org.mule.api.transformer.TransformerException)+

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Joe Hoppesch
2012-01-31 15:34:15 UTC
Permalink
Resolved:

Upon closer inspection - the exception being thrown was from the next processor in the chain which looking at the source code was expecting a STRING - which is why it worked with STRING. Adding a different processor in the chain to convert did the trick.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...