- 1. Introduction
- 2. Usage
- 3. Calling an EJB
- 4. Calling a Web Service
- 4.1. Example: RPC-Style
- 4.2. Example: Document-Style
- 4.3. Usage
|
|||||||
OPS User Guide
|
Delegation Processor
1. IntroductionThe delegation processor can be used to call existing code available as:
2. Usage
3. Calling an EJBYou call an EJB with:
<p:processor name="oxf:delegation"> <p:input name="interface"> <config> <service id="creditcard-validation" type="stateless-ejb" uri="java:comp/env/ejb/creditcard-validation"/> </config> </p:input> <p:input name="call"> <delegation:execute service="creditcard-validation" operation="validate"> <number xsi:type="xs:string">1234123412341234</number> <type xsi:type="xs:string">visa</type> </delegation:execute> </p:input> <p:output name="data" id="data"/> </p:processor>
4. Calling a Web Service4.1. Example: RPC-Style
<p:processor name="oxf:delegation"> <p:input name="interface"> <config> <service id="quotes" type="webservice" style="rpc" endpoint="http://www.scdi.org/~avernet/webservice/"> <operation nsuri="urn:avernet" name="getRandomQuote" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </service> </config> </p:input> <p:input name="call"> <delegation:execute service="quotes" operation="getRandomQuote"/> </p:input> <p:output name="data" ref="data"/> </p:processor>
4.2. Example: Document-Style
<p:processor name="oxf:delegation"> <p:input name="interface"> <config> <service id="stock-quote" type="webservice" style="document" endpoint="http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx"> <operation name="get-quote" soap-action="http://ws.cdyne.com/GetQuote"/> </service> </config> </p:input> <p:input name="call"> <delegation:execute service="stock-quote" operation="get-quote" xsl:version="2.0"> <m:GetQuote> <m:StockSymbol> <xsl:value-of select="/symbol"/> </m:StockSymbol> <m:LicenseKey>0</m:LicenseKey> </m:GetQuote> </delegation:execute> </p:input> <p:output name="data" ref="data"/> </p:processor>
4.3. Usage
|