title: apigee policy error - java.lang.String cannot be cast to com.apigee.flow.message.Message
body: <p>I am trying to transform a <code>JSON</code> response from a target end point into soap message. I have 2 policies in the post flow.</p>
  
  <ol>
  <li><code>JSONTOXML</code> - If I disable <code>xsltransform</code> I see the xml result so this work.</li>
  <li><code>xsltransform</code> - this just point to my xsltransform file which has the template and dynamic content supposed to come from the xml from step 1.</li>
  </ol>
  
  <p>Both source and output are set to "response" but it looks like it failed to cast in step 2. What should I make step 2 to pick up the xml and apply the <code>xsl</code>? How else can I do this? Thanks</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;JSONToXML async="false" continueOnError="false" enabled="true" name="jsontoxml-2"&gt;
      &lt;DisplayName&gt;JSONtoXML-2&lt;/DisplayName&gt;
      &lt;FaultRules/&gt;
      &lt;Properties/&gt;
      &lt;Options&gt;
          &lt;NullValue&gt;NULL&lt;/NullValue&gt;
          &lt;NamespaceBlockName&gt;#namespaces&lt;/NamespaceBlockName&gt;
          &lt;DefaultNamespaceNodeName&gt;$default&lt;/DefaultNamespaceNodeName&gt;
          &lt;NamespaceSeparator&gt;:&lt;/NamespaceSeparator&gt;
          &lt;TextNodeName&gt;#text&lt;/TextNodeName&gt;
          &lt;AttributeBlockName&gt;#attrs&lt;/AttributeBlockName&gt;
          &lt;AttributePrefix&gt;@&lt;/AttributePrefix&gt;
          &lt;InvalidCharsReplacement&gt;_&lt;/InvalidCharsReplacement&gt;
          &lt;ObjectRootElementName&gt;Root&lt;/ObjectRootElementName&gt;
          &lt;ArrayRootElementName&gt;Array&lt;/ArrayRootElementName&gt;
          &lt;ArrayItemElementName&gt;Item&lt;/ArrayItemElementName&gt;
      &lt;/Options&gt;
      &lt;OutputVariable&gt;response&lt;/OutputVariable&gt;
      &lt;Source&gt;response&lt;/Source&gt;
  &lt;/JSONToXML&gt;
  
  &lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;XSL async="false" continueOnError="false" enabled="true" name="xsltransform-1"&gt;
      &lt;DisplayName&gt;XSLTransform-1&lt;/DisplayName&gt;
      &lt;FaultRules/&gt;
      &lt;Properties/&gt;
      &lt;Source&gt;response&lt;/Source&gt;
      &lt;ResourceURL&gt;xsl://xsltransform-1&lt;/ResourceURL&gt;
      &lt;Parameters ignoreUnresolvedVariables="true"/&gt;
      &lt;OutputVariable&gt;response&lt;/OutputVariable&gt;
  &lt;/XSL&gt;
  </code></pre>