title: How can I create and Apache Axiom element from a E4X object from a script running in Rhino?
body: <p>I am running a script running in Rhino, which creates an E4X object like this:</p>
  
  <pre><code>var s =     &lt;product id="123"&gt;
                      &lt;name&gt;Google Search&lt;/name&gt;
                      &lt;source&gt;https://google.com&lt;/source&gt;
              &lt;/product&gt;
  </code></pre>
  
  <p>I want to include such XML in a SOAP message. I am using <a href="http://ws.apache.org/axis2/1_1/api/org/apache/axis2/client/ServiceClient.htm" rel="nofollow noreferrer">Apache Axis 2 ServiceClient</a> for creating soap message. What I am looking for is a way to convert the E4X xml object into an Apache AXIOM element so that it can be added to SOAP message via a call to:</p>
  
  <p><a href="http://ws.apache.org/axis2/1_1/api/org/apache/axis2/client/ServiceClient.html#addHeader(org.apache.axiom.om.OMElement)" rel="nofollow noreferrer">ServiceClient.addHeader(org.apache.axiom.om.OMElement omElement)</a></p>