Hi Alex

I tried the below suggestion but the XML produced does not include the
closing </root> element - perhaps there is something wrong with the XPL.
The XPL code is:

<!-- Call the EJB method using the Delegation Processor  -->
<p:processor name="oxf:delegation">
  <p:input name="interface"> 
      <config> 
          <service id="read-data" type="stateless-ejb"
uri="ejb/MyBeanHome"/>
      </config>
  </p:input>
  <p:input name="call">
    <root>
      <delegation:execute service="read-data" operation="getName"> 
          <theform xsi:type="xs:string">SomeStringValue</theform>
      </delegation:execute>
    </root>
  </p:input>
  
  <p:output name="data" id="ejb-data"/>
</p:processor>

The output is

<?xml version="1.0" encoding="utf-8"?>
<root xmlns:delegation="http://orbeon.org/oxf/xml/delegation";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:oxf="http://www.orbeon.com/oxf/processors";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:p="http://www.orbeon.com/oxf/pipeline";
xmlns:saxon="http://saxon.sf.net/";>
      &lt;document&gt;
&lt;xml-string&gt;
&lt;name&gt;Joe Bloggs Junior&lt;/name&gt;
&lt;/xml-string&gt;
&lt;/document&gt;

Note there is a missing </root> element.

The XML string returned from the EJB is
<document>
<xml-string>
<name>Joe Bloggs Junior</name>
</xml-string>
</document>

Any help appreciated,

Avinder

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alessandro
Vernet
Sent: 07 February 2005 18:53
To: [email protected]
Subject: Re: [orbeon-user] Parsing the return string of an EJB method
into an XML document

--- Avinder Bahra <[EMAIL PROTECTED]> wrote:

> There is an FAQ ( http://www.orbeon.com/community/faq#2.21  ) for
> parsing an XML string to an XML document using the XSLT processor and
> the saxon:parse function. However the input for the processor in the
FAQ
> example uses an XML document. Is there a way I can wrap the above XML
> string inside a document so that I can use the same technique as the
> FAQ?

Yes. This will put the string returned by your EJB in a element named
"root":

    <root>
        <delegation:execute service="..." operation="...">
            ...
        </delegation:execute>
    </root>

Alex



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to