You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by bu...@apache.org on 2012/11/12 14:07:46 UTC
svn commit: r838053 [13/13] - /websites/staging/ode/trunk/content/
Added: websites/staging/ode/trunk/content/wsdl-11-extensions-for-rest.html
==============================================================================
--- websites/staging/ode/trunk/content/wsdl-11-extensions-for-rest.html (added)
+++ websites/staging/ode/trunk/content/wsdl-11-extensions-for-rest.html Mon Nov 12 13:07:37 2012
@@ -0,0 +1,297 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>WSDL 1.1 Extensions for REST</title>
+
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+
+
+
+
+
+ </head>
+
+ <body>
+ <div id="page" class="container_16">
+ <div id="header" class="grid_8">
+ <img src="http://www.apache.org/images/feather-small.gif" alt="The Apache Software Foundation">
+ <h1>The Apache Software Foundation</h1>
+ <h2>WSDL 1.1 Extensions for REST</h2>
+ </div>
+ <div id="nav" class="grid_8">
+ <ul>
+ <!-- <li><a href="/" title="Welcome!">Home</a></li> -->
+ <li><a href="http://www.apache.org/foundation/" title="The Foundation">Foundation</a></li>
+ <li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
+ <li><a href="http://people.apache.org" title="The People">People</a></li>
+ <li><a href="http://www.apache.org/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
+ <li><a href="http://www.apache.org/dyn/closer.cgi" title="Download">Download</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
+ </ul>
+ <p><a href="/">Home</a></p>
+ <form name="search" id="search" action="http://www.google.com/search" method="get">
+ <input value="*.apache.org" name="sitesearch" type="hidden"/>
+ <input type="text" name="q" id="query">
+ <input type="submit" id="submit" value="Search">
+ </form>
+ </div>
+ <div class="clear"></div>
+ <div id="content" class="grid_16"><div class="section-content"><p>The <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">Resource-Oriented Architecture</a> defines four concepts:
+1. Resources
+1. Their names (URIs)
+1. Their representations
+1. The link bet ween them</p>
+<p>and four properties:
+1. Addressability
+1. Statelesness
+1. Connectedness
+1. A uniform interface</p>
+<p>HTTP binding as defined in WSDL 1.1 is not well suitable to describe services implementing these concepts and properties, mainly because a port type may access 4 different locations/resources but with only one HTTP method.</p>
+<p>To better describe RESTful services, and turn a port type into a "resource type", ODE brings a set of 4 extensions:
+1. one HTTP method per operation (instead of one per binding)
+1. a unique URI Template for all operations
+1. access to HTTP headers
+1. fault support</p>
+<p>Further details below.</p>
+<p>In this page, we use an imaginary blog service as a use case to illustrate and make things more palpable. We will focus on the resources defined by the following URI template: {noformat}http://blog.org/post/{id}{noformat}
+Let's assume that such a resource accept four operations:
+<em> GET to retrieve a post
+</em> DELETE to delete it
+<em> PUT to update the post
+</em> POST to add a comment to a post</p>
+<div class="alert alert-info"><h4 class="alert-heading">Check out unit tests!</h4>
+
+ h3. One verb per operation
+
+ According to the WSDL 1.1 specification, the verb describing the HTTP method has to be at [the binding level|http://www.w3.org/TR/wsdl#A4.3]. Which implies that the same HTTP method is used by all operations of a given port type. But RESTful web services leverage HTTP methods as a uniform interface to describe operation on resources. So for instance, if you want to use the following HTTP operations -- GET, POST, PUT, DELETE -- for a given resource, four different bindings would be required. And consequently four port types and four ports. Quite verbose and unusable, isn't it?
+
+ So, this extension is to push down the HTTP verb at the operation level. And if an operation does not have its own verb, then the verb defined at the binding level will be used.
+ This extension is declared in the namespace: {{http://www.apache.org/ode/type/extension/http}}
+
+ Please note that ODE supports GET, POST, PUT, DELETE only.
+ {code:xml}
+ <definitions ...
+ xmlns:odex="http://www.apache.org/ode/type/extension/http"/>
+
+ <!-- many wsdl elements are ommited to highlight the interesting part -->
+
+ <binding name="blogBinding" type="blogPortType">
+ <operation name="GET">
+ <odex:binding verb="GET" />
+ </operation>
+ <operation name="DELETE">
+ <odex:binding verb="DELETE"/>
+ </operation>
+ </binding>
+ </definitions>
+ {code}
+
+ h3. URI Template
+
+ A RESTful service exposed a set of resources, each of them being accessible through a uniform interface: HTTP methods for a web service. So we need a way to define four operations (at most) for a single resource.
+
+ Moreover it's very likely that the resource URI actually describes a set of resources. For instance, the set of posts contained in our imaginary blog: {{http://blog.org/post/\{post_id\}}}.
+
+ HTTP binding offers the [http:operation | http://www.w3.org/TR/wsdl#_http:operation] element to set the path of an operation. While the service address is set in the [http:address|http://www.w3.org/TR/wsdl#_http:address] of the [wsdl:port|http://www.w3.org/TR/wsdl#_ports] element.
+ So one could imagine splitting the URL this way:
+
+ {code:xml}
+ <definitions ...
+ xmlns:odex="http://www.apache.org/ode/type/extension/http"/>
+
+ <service name="blogService">
+ <port name="blogPort" binding="blogPortType">
+ <http:address location="http://blog.org"/>
+ </port>
+ </service>
+
+ <binding name="blogBinding" type="blogPortType">
+ <operation name="PUT">
+ <odex:binding verb="PUT" />
+ <http:operation location="post/(post_id)"/>
+ <input>
+ <http:urlReplacement/>
+ </input>
+ <output/>
+ </operation>
+ </binding>
+ </definitions>
+ {code}
+
+ However, here 3 issues show up:
+ # the location is not accessible from the End Point Reference. _=> ODE cannot process it before invoking the external service._
+ # [http:urlReplacement|http://www.w3.org/TR/wsdl#_http:urlReplacement] is only accepted for GET _=> what about the uniform interface?!_
+ # http:urlReplacement requires all parts of the operation input message to be mentioned in the operation location. Meaning that:
+ #* => the resource id (in the present example) must be a part of the message.
+ #* => no parts may be stored in the HTTP body. this conflicts with a PUT operation for instance. With a PUT you would like to set the id in the url and the resource data in the HTTP request body.
+
+ To solve this, ODE allows [http:operation | http://www.w3.org/TR/wsdl#_http:operation] elements to be omitted or empty, and the full resource URI to be set in a single place, the http:address element.
+
+ {note:Curly Brackets}Please note that curly brackets '\{\}' are the preferred argument delimiters in URI templates. So that URLs can be dynamically composed using [compose-url, combine-url and expand-template XPath Functions|RESTful BPEL, Part I#XPath functions].{note}
+
+ In addition, the http:urlReplacement is relaxed: all parts are *not* required in the URI template anymore. One part could go in the URI, another in the request body.
+
+ {code:xml}
+ <definitions ...
+ xmlns:odex="http://www.apache.org/ode/type/extension/http"/>
+
+ <service name="blogService">
+ <port name="blogPort" binding="blogPortType">
+ <!-- here is the full URI template, using curly brackets -->
+ <http:address location="http://blog.org/post/{post_id}"/>
+ </port>
+ </service>
+
+ <binding name="blogBinding" type="blogPortType">
+ <operation name="PUT">
+ <odex:binding verb="PUT" />
+ <!-- location attribute intentionally blank -->
+ <http:operation location=""/>
+ <input>
+ <http:urlReplacement/>
+ <!-- an additional part can be mapped to the request body even if urlReplacement is used-->
+ <mime:content type="text/xml" part="post_content"/>
+ </input>
+ <output/>
+ </operation>
+ </binding>
+ </definitions>
+ {code}
+
+ h3. HTTP Headers manipulation
+
+ HHTP protocal convey a lot of information in Request/Response Headers. Caching information, Content description for instance. All this data is completely left out by WSDL 1.1 HTTP Binding. To fix this, ODE provides a header element. This element can be used to insert a part or a static value into a given HTTP request header (standard or custom). And the way around, a HTTP request header into a part. Also note that all HTTP response headers are inserted into the message headers, and thus are available from the BPEL process.
+
+ {code:xml}
+ <definitions ...
+ xmlns:odex="http://www.apache.org/ode/type/extension/http"/>
+
+ <binding name="blogBinding" type="blogPortType">
+ <operation name="PUT">
+ <odex:binding verb="PUT" />
+ <http:operation location=""/>
+ <input>
+ <http:urlReplacement/>
+ <mime:content type="text/xml" part="post_content"/>
+ <!-- set a standard request header from a part -->
+ <odex:header name="Authorization" part="credentials_part"/>
+ <!-- set a custom request header with a static value -->
+ <odex:header name="MyCustomHeader" value="ode@apache.org" />
+ </input>
+ <output>
+ <mime:content type="text/xml" part="post_content"/>
+ <!-- set 1 response header to a part -->
+ <odex:header name="Age" part="age_part"/>
+ </output>
+ </operation>
+ </binding>
+ </definitions>
+ {code}
+
+ For every HTTP response, in addition to HTTP response headers, the [Status-Line|http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1] is passed as a message header. To save some painful XPath string manipulations, the Status-line is already parsed into the following structure:
+ {code:xml}
+ <Status-Line>
+ <HTTP-Version>HTTP/1.1</HTTP-Version>
+ <Status-Code>200</Status-Code>
+ <Reason-Phrase>OK</Reason-Phrase>
+ <!-- the original unaltered Status-Line -->
+ <original>HTTP/1.1 200 OK</original>
+ </Status-Line>
+ {code}
+
+ So that you can write the following BPEL lines:
+ {code:xml}
+ <assign>
+ <copy>
+ <from variable="postMsg" header="Status-Line"/>
+ <to>$statusLine</to>
+ </copy>
+ </assign>
+ <if>
+ <condition>number($statusLine/Status-Code) > 200 and number($statusLine/Status-Code) < 300</condition>
+ <assign>
+ <copy>
+ <from>'Request successful!!!'</from>
+ <to>$outputVar.TestPart</to>
+ </copy>
+ </assign>
+ </if>
+ {code}
+
+ h3. Fault Support
+
+ Another domain completely neglected by WSDL 1.1 HTTP Binding is Fault management. The word is not even mentioned in the [HTTP Binding section|http://www.w3.org/TR/wsdl#_http].
+ ODE allows you to bind a fault with HTTP Binding. If a [4xx or a 5xx|http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4] is returned, the following logic is applied:
+
+ A failure is thrown if the code is one of these:
+ || Status-Codes triggering a Failure ||
+ | 3xx Redirections |
+ |401_UNAUTHORIZED|
+ |408_REQUEST_TIMEOUT|
+ |503_SERVICE_UNAVAILABLE|
+ |504_GATEWAY_TIMEOUT|
+
+ {info:title=Useful Information}Note that 3xx errors should be pretty rare since by default the first hundred redirections are followed. You can tweak this value by setting the property {{http.protocol.max-redirects}} in the [enpoint-configuration.properties|Endpoint Configuration] of your process.{info}
+
+ Here what ODE does, if the status code is one of those listed in the next table (500, 501, etc):
+ # check that the operation has at least one fault in its abstract part, and one fault binding
+ # check that the Content-type header describes an xml document ('application/xml', 'application/atom+xml' etc)
+ # check that the body is not empty
+
+ If so far everything is fine, the HTTP response body is parsed into an xml document. Then the fault to be thrown is inferred from the qname of the response root element, i.e the fault having a message part matching the root element. This matching process is exactly the same as for a SOAP service.
+ If one of these steps fails, a failure is thrown.
+
+ || Status-Codes that may trigger a Fault ||if the body element matches a fault declaration||
+ |500_INTERNAL_SERVER_ERROR | 407_PROXY_AUTHENTICATION_REQUIRED |
+ |501_NOT_IMPLEMENTED | 409_CONFLICT |
+ |502_BAD_GATEWAY | 410_GONE |
+ |505_HTTP_VERSION_NOT_SUPPORTED | 412_PRECONDITION_FAILED |
+ |400_BAD_REQUEST | 413_REQUEST_TOO_LONG |
+ |402_PAYMENT_REQUIRED | 414_REQUEST_URI_TOO_LONG |
+ |403_FORBIDDEN | 415_UNSUPPORTED_MEDIA_TYPE |
+ |404_NOT_FOUND | 411_LENGTH_REQUIRED |
+ |405_METHOD_NOT_ALLOWED | 416_REQUESTED_RANGE_NOT_SATISFIABLE |
+ |406_NOT_ACCEPTABLE | 417_EXPECTATION_FAILED |
+
+ Note that you can't bind a given fault to a specific status code.
+
+ {code:xml}
+ <definitions ...
+ xmlns:odex="http://www.apache.org/ode/type/extension/http"/>
+
+ <portType name="BlogPortType">
+ <operation name="PUT">
+ <input message="..."/>
+ <output message="..."/>
+ <fault name="UpdateFault" message="tns:UpdateFault"/>
+ </operation>
+ </portType>
+
+ <binding name="blogBinding" type="blogPortType">
+ <operation name="PUT">
+ <odex:binding verb="PUT" />
+ <http:operation location=""/>
+ <input> ... </input>
+ <output> ... </output>
+ <!-- fault binding -->
+ <fault name="UpdateException">
+ <!-- name attribute is optional if there is only one fault for this operation -->
+ <!-- <odex:fault name="UpdateFault"/> -->
+ <odex:fault/>
+ </fault>
+ </operation>
+ </binding>
+ </definitions>
+ {code}</div></div>
+ <div class="clear"></div>
+ </div>
+
+ <div id="copyright" class="container_16">
+ <p>Copyright © 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+ </div>
+ </body>
+</html>
Added: websites/staging/ode/trunk/content/wsdl-11-http-binding-support.html
==============================================================================
--- websites/staging/ode/trunk/content/wsdl-11-http-binding-support.html (added)
+++ websites/staging/ode/trunk/content/wsdl-11-http-binding-support.html Mon Nov 12 13:07:37 2012
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>WSDL 1.1 HTTP Binding Support</title>
+
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+
+
+
+
+
+ </head>
+
+ <body>
+ <div id="page" class="container_16">
+ <div id="header" class="grid_8">
+ <img src="http://www.apache.org/images/feather-small.gif" alt="The Apache Software Foundation">
+ <h1>The Apache Software Foundation</h1>
+ <h2>WSDL 1.1 HTTP Binding Support</h2>
+ </div>
+ <div id="nav" class="grid_8">
+ <ul>
+ <!-- <li><a href="/" title="Welcome!">Home</a></li> -->
+ <li><a href="http://www.apache.org/foundation/" title="The Foundation">Foundation</a></li>
+ <li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
+ <li><a href="http://people.apache.org" title="The People">People</a></li>
+ <li><a href="http://www.apache.org/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
+ <li><a href="http://www.apache.org/dyn/closer.cgi" title="Download">Download</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
+ </ul>
+ <p><a href="/">Home</a></p>
+ <form name="search" id="search" action="http://www.google.com/search" method="get">
+ <input value="*.apache.org" name="sitesearch" type="hidden"/>
+ <input type="text" name="q" id="query">
+ <input type="submit" id="submit" value="Search">
+ </form>
+ </div>
+ <div class="clear"></div>
+ <div id="content" class="grid_16"><div class="section-content"><p>Since version <a href="getting-ode.html">1.2</a>, ODE supports [HTTP Binding|http://www.w3.org/TR/wsdl#_http]. ODE is almost fully compliant with the WSDL 1.1 spec. The few limitations are related to MIME types.
+Actually only the following <a href="http://www.iana.org/assignments/media-types/">MIME types</a> are supported:
+1. Media types that represent <a href="http://www.rfc-editor.org/rfc/rfc3023.txt">XML MIME entities</a>. Basically any types matching <code>"text/xml"</code>, <code>"application/xml"</code> and <code>"\*+xml"</code>.
+1. Non-XML types will be processed as Text, thus Text Media Types comes de facto but they may have a very limited set of usages.</p>
+<p><a href="http://www.w3.org/TR/wsdl#_mime:multipartRelated">mime:multipartRelated</a>, [mime:soap:body|http://www.w3.org/TR/wsdl#_mime:soap:body] and [mime:mimeXml|http://www.w3.org/TR/wsdl#_mime:mimeXml] are not supported.</p>
+<p>Considering how unsuitable WSDL 1.1 HTTP Binding is for a large majority of services -- especially RESTful services -- a set of extensions is available.
+All the details you want to know are <a href="wsdl-1.1-extensions-for-rest.html">here</a>.</p></div></div>
+ <div class="clear"></div>
+ </div>
+
+ <div id="copyright" class="container_16">
+ <p>Copyright © 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+ </div>
+ </body>
+</html>
Added: websites/staging/ode/trunk/content/wsdl-11.html
==============================================================================
--- websites/staging/ode/trunk/content/wsdl-11.html (added)
+++ websites/staging/ode/trunk/content/wsdl-11.html Mon Nov 12 13:07:37 2012
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>WSDL 1.1</title>
+
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+
+
+
+
+
+ </head>
+
+ <body>
+ <div id="page" class="container_16">
+ <div id="header" class="grid_8">
+ <img src="http://www.apache.org/images/feather-small.gif" alt="The Apache Software Foundation">
+ <h1>The Apache Software Foundation</h1>
+ <h2>WSDL 1.1</h2>
+ </div>
+ <div id="nav" class="grid_8">
+ <ul>
+ <!-- <li><a href="/" title="Welcome!">Home</a></li> -->
+ <li><a href="http://www.apache.org/foundation/" title="The Foundation">Foundation</a></li>
+ <li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
+ <li><a href="http://people.apache.org" title="The People">People</a></li>
+ <li><a href="http://www.apache.org/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
+ <li><a href="http://www.apache.org/dyn/closer.cgi" title="Download">Download</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
+ </ul>
+ <p><a href="/">Home</a></p>
+ <form name="search" id="search" action="http://www.google.com/search" method="get">
+ <input value="*.apache.org" name="sitesearch" type="hidden"/>
+ <input type="text" name="q" id="query">
+ <input type="submit" id="submit" value="Search">
+ </form>
+ </div>
+ <div class="clear"></div>
+ <div id="content" class="grid_16"><div class="section-content"><p><em>WSDL 1.1</em> --- {excerpt}version 1.1 of the Web Services Description Language <a href="http://www.w3.org/TR/wsdl">specification</a> from the [W3C|http://www.w3c.org]{excerpt}. Following the [WS-I Basic Profile 1.1], PXE uses the WSDL schema located at [http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd].</p></div></div>
+ <div class="clear"></div>
+ </div>
+
+ <div id="copyright" class="container_16">
+ <p>Copyright © 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+ </div>
+ </body>
+</html>
Added: websites/staging/ode/trunk/content/xpath-10-expression-language.html
==============================================================================
--- websites/staging/ode/trunk/content/xpath-10-expression-language.html (added)
+++ websites/staging/ode/trunk/content/xpath-10-expression-language.html Mon Nov 12 13:07:37 2012
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>XPath 1.0 Expression Language</title>
+
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+
+
+
+
+
+ </head>
+
+ <body>
+ <div id="page" class="container_16">
+ <div id="header" class="grid_8">
+ <img src="http://www.apache.org/images/feather-small.gif" alt="The Apache Software Foundation">
+ <h1>The Apache Software Foundation</h1>
+ <h2>XPath 1.0 Expression Language</h2>
+ </div>
+ <div id="nav" class="grid_8">
+ <ul>
+ <!-- <li><a href="/" title="Welcome!">Home</a></li> -->
+ <li><a href="http://www.apache.org/foundation/" title="The Foundation">Foundation</a></li>
+ <li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
+ <li><a href="http://people.apache.org" title="The People">People</a></li>
+ <li><a href="http://www.apache.org/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
+ <li><a href="http://www.apache.org/dyn/closer.cgi" title="Download">Download</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
+ </ul>
+ <p><a href="/">Home</a></p>
+ <form name="search" id="search" action="http://www.google.com/search" method="get">
+ <input value="*.apache.org" name="sitesearch" type="hidden"/>
+ <input type="text" name="q" id="query">
+ <input type="submit" id="submit" value="Search">
+ </form>
+ </div>
+ <div class="clear"></div>
+ <div id="content" class="grid_16"><div class="section-content"></div></div>
+ <div class="clear"></div>
+ </div>
+
+ <div id="copyright" class="container_16">
+ <p>Copyright © 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+ </div>
+ </body>
+</html>
Added: websites/staging/ode/trunk/content/xpath-20-expression-language.html
==============================================================================
--- websites/staging/ode/trunk/content/xpath-20-expression-language.html (added)
+++ websites/staging/ode/trunk/content/xpath-20-expression-language.html Mon Nov 12 13:07:37 2012
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>XPath 2.0 Expression Language</title>
+
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+
+
+
+
+
+ </head>
+
+ <body>
+ <div id="page" class="container_16">
+ <div id="header" class="grid_8">
+ <img src="http://www.apache.org/images/feather-small.gif" alt="The Apache Software Foundation">
+ <h1>The Apache Software Foundation</h1>
+ <h2>XPath 2.0 Expression Language</h2>
+ </div>
+ <div id="nav" class="grid_8">
+ <ul>
+ <!-- <li><a href="/" title="Welcome!">Home</a></li> -->
+ <li><a href="http://www.apache.org/foundation/" title="The Foundation">Foundation</a></li>
+ <li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
+ <li><a href="http://people.apache.org" title="The People">People</a></li>
+ <li><a href="http://www.apache.org/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
+ <li><a href="http://www.apache.org/dyn/closer.cgi" title="Download">Download</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
+ </ul>
+ <p><a href="/">Home</a></p>
+ <form name="search" id="search" action="http://www.google.com/search" method="get">
+ <input value="*.apache.org" name="sitesearch" type="hidden"/>
+ <input type="text" name="q" id="query">
+ <input type="submit" id="submit" value="Search">
+ </form>
+ </div>
+ <div class="clear"></div>
+ <div id="content" class="grid_16"><div class="section-content"></div></div>
+ <div class="clear"></div>
+ </div>
+
+ <div id="copyright" class="container_16">
+ <p>Copyright © 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+ </div>
+ </body>
+</html>
Added: websites/staging/ode/trunk/content/xpath-extensions.html
==============================================================================
--- websites/staging/ode/trunk/content/xpath-extensions.html (added)
+++ websites/staging/ode/trunk/content/xpath-extensions.html Mon Nov 12 13:07:37 2012
@@ -0,0 +1,305 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>XPath Extensions</title>
+
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+
+
+
+
+
+ </head>
+
+ <body>
+ <div id="page" class="container_16">
+ <div id="header" class="grid_8">
+ <img src="http://www.apache.org/images/feather-small.gif" alt="The Apache Software Foundation">
+ <h1>The Apache Software Foundation</h1>
+ <h2>XPath Extensions</h2>
+ </div>
+ <div id="nav" class="grid_8">
+ <ul>
+ <!-- <li><a href="/" title="Welcome!">Home</a></li> -->
+ <li><a href="http://www.apache.org/foundation/" title="The Foundation">Foundation</a></li>
+ <li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
+ <li><a href="http://people.apache.org" title="The People">People</a></li>
+ <li><a href="http://www.apache.org/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
+ <li><a href="http://www.apache.org/dyn/closer.cgi" title="Download">Download</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
+ </ul>
+ <p><a href="/">Home</a></p>
+ <form name="search" id="search" action="http://www.google.com/search" method="get">
+ <input value="*.apache.org" name="sitesearch" type="hidden"/>
+ <input type="text" name="q" id="query">
+ <input type="submit" id="submit" value="Search">
+ </form>
+ </div>
+ <div class="clear"></div>
+ <div id="content" class="grid_16"><div class="section-content"><p>Apache ODE extends the default XPath coverage provided by the <a href="-ws-bpel-20.html">WS-BPEL</a> specification mostly by adding support for [XPath 2.0|http://www.w3.org/TR/xpath20/] and by offering a few utility extension functions to make some assignments easier.</p>
+<p><a name="XPathExtensions-XPath2.0"></a></p>
+<h3 id="xpath-20">XPath 2.0</h3>
+<p>To use XPath 2.0 in your processes just use the following <em>queryLanguage</em> and <em>expressionLanguage</em> attributes:</p>
+<div class="codehilite"><pre><span class="n">queryLanguage</span><span class="o">=</span><span class="s">"urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"</span>
+<span class="n">expressionLanguage</span><span class="o">=</span><span class="s">"urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"</span>
+</pre></div>
+
+
+<p>If you want support at the process just add these attributes to your root <em>process</em> element. If you want to stick with XPath 1.0 but want XPath 2.0 support for a specific assignment you can also define these attributes on an <em>assign</em> element.</p>
+<p><a name="XPathExtensions-ExtensionFunctions"></a></p>
+<h3 id="extension-functions">Extension Functions</h3>
+<p>All extension functions are defined in the ODE extension namespace: http://www.apache.org/ode/type/extension. This namespace will be associated with the <em>ode</em> prefix in the following examples.</p>
+<p><a name="XPathExtensions-insert-before"></a></p>
+<h4 id="insert-before">insert-before</h4>
+<p>This is a function that allows you to insert one or more siblings (specified by the $siblings argument in the signature below) before the first node of children (specified by the $children argument), all of whose nodes must have the same parent (specified by the $context argument).</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Insert Before</B></DIV><DIV class="codeContent panelContent">
+ ode:insert-before($context as node(), $children as node()<em>, $siblings as node()</em>) as node() </p>
+<p>By design, this function is non-updating in that it preserves the identity and properties of its arguments (i.e., they don't try to change the XML in-place). Instead, a modified copy of the context node is created, essentially giving it a new identity. Further, it returns a single R-value item, as opposed to a sequence. The example below illustrates how it may be used in the context of an assign activity:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>ode:insert-before(<span class="p">$</span><span class="nv">parent</span>, <span class="p">$</span><span class="nv">parent</span>/child::node[position()=last()], <span class="p">$</span><span class="nv">siblings</span>)<span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"parent"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>For those familiar with the <a href="http://www.w3.org/TR/2008/CR-xquery-update-10-20080801/">XQuery Update Facility</a>, the above example is semantically equivalent to the expression shown below:</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>XQuery Equivalent</B></DIV><DIV class="codeContent panelContent">
+ insert nodes $siblings before $parent/child::node[position()=last()] </p>
+<p><a name="XPathExtensions-insert-after"></a></p>
+<h4 id="insert-after">insert-after</h4>
+<p>This is a function that allows you to insert one or more siblings (specified by the $siblings argument in the signature below) after the last node of children (specified by the $children argument), all of whose nodes must have the same parent (specified by the $context argument).</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Insert After</B></DIV><DIV class="codeContent panelContent">
+ ode:insert-after($context as node(), $children as node()<em>, $siblings as node()</em>) as node() </p>
+<p>By design, this function is non-updating in that it preserves the identity and properties of its arguments (i.e., they don't try to change the XML in-place). Instead, a modified copy of the context node is created, essentially giving it a new identity. Further, it returns a single R-value item, as opposed to a sequence. The example below illustrates how it may be used in the context of an assign activity:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>ode:insert-after(<span class="p">$</span><span class="nv">parent</span>, <span class="p">$</span><span class="nv">parent</span>/child::node(), <span class="p">$</span><span class="nv">siblings</span>)<span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"parent"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>For those familiar with the <a href="http://www.w3.org/TR/2008/CR-xquery-update-10-20080801/">XQuery Update Facility</a>, the above example is semantically equivalent to the expression shown below:</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>XQuery Equivalent</B></DIV><DIV class="codeContent panelContent">
+ insert nodes $siblings after $parent/child::node()</p>
+<p><a name="XPathExtensions-insert-as-first-into"></a></p>
+<h4 id="insert-as-first-into">insert-as-first-into</h4>
+<p>This is a function that allows you to insert the node(s) (specified by the $children argument in the signature below) as the first child(ren) of a given context node (specified by the $context argument).</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Insert As First Into</B></DIV><DIV class="codeContent panelContent">
+ ode:insert-as-first-into($context as node(), $children as node()*) as node() </p>
+<p>By design, this function is non-updating in that it preserves the identity and properties of its arguments (i.e., they don't try to change the XML in-place). Instead, a modified copy of the context node is created, essentially giving it a new identity. Further, it returns a single R-value item, as opposed to a sequence. The example below illustrates how it may be used in the context of an assign activity:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>ode:insert-as-first-into(<span class="p">$</span><span class="nv">parent</span>, <span class="p">$</span><span class="nv">children</span>)<span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"parent"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>For those familiar with the <a href="http://www.w3.org/TR/2008/CR-xquery-update-10-20080801/">XQuery Update Facility</a>, the above example is semantically equivalent to the expression shown below:</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>XQuery Equivalent</B></DIV><DIV class="codeContent panelContent">
+ insert nodes $children as first into $parent </p>
+<p><a name="XPathExtensions-insert-as-last-into"></a></p>
+<h4 id="insert-as-last-into">insert-as-last-into</h4>
+<p>This is a function that allows you to insert the node(s) (specified by the $children argument in the signature below) as the last child(ren) of a given context node (specified by the $context argument).</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Insert As Last Into</B></DIV><DIV class="codeContent panelContent">
+ ode:insert-as-last-into($context as node(), $children as node()*) as node() </p>
+<p>By design, this function is non-updating in that it preserves the identity and properties of its arguments (i.e., they don't try to change the XML in-place). Instead, a modified copy of the context node is created, essentially giving it a new identity. Further, it returns a single R-value item, as opposed to a sequence. The example below illustrates how it may be used in the context of an assign activity:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>ode:insert-as-last-into(<span class="p">$</span><span class="nv">parent</span>, <span class="p">$</span><span class="nv">children</span>)<span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"parent"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>For those familiar with the <a href="http://www.w3.org/TR/2008/CR-xquery-update-10-20080801/">XQuery Update Facility</a>, the above example is semantically equivalent to the expression shown below:</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>XQuery Equivalent</B></DIV><DIV class="codeContent panelContent">
+ insert nodes $children as last into $parent </p>
+<p><a name="XPathExtensions-delete"></a></p>
+<h4 id="delete">delete</h4>
+<p>This is a function that allows you to delete one or more node(s) (specified by the $children argument in the signature below) from its parent (specified by the $context argument).</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Delete</B></DIV><DIV class="codeContent panelContent">
+ ode:delete($context as node(), $children as node()*) as node() </p>
+<p>By design, this function is non-updating in that it preserves the identity and properties of its arguments (i.e., they don't try to change the XML in-place). Instead, a modified copy of the context node is created, essentially giving it a new identity. Further, it returns a single R-value item, as opposed to a sequence. The example below illustrates how it may be used in the context of an assign activity:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>ode:delete(<span class="p">$</span><span class="nv">parent</span>, <span class="p">$</span><span class="nv">children</span>)<span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"parent"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>For those familiar with the <a href="http://www.w3.org/TR/2008/CR-xquery-update-10-20080801/">XQuery Update Facility</a>, the above example is semantically equivalent to the expression shown below:</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>XQuery Equivalent</B></DIV><DIV class="codeContent panelContent">
+ delete nodes $children </p>
+<p><a name="XPathExtensions-rename"></a></p>
+<h4 id="rename">rename</h4>
+<p>This is a function that allows you to rename the context node (specified by the $context argument in the signature below) as per the given name (specified by $item, which is either a QName, Element or String).</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Rename</B></DIV><DIV class="codeContent panelContent">
+ ode:rename($context as node(), $name as item()) as node() </p>
+<p>By design, this function is non-updating in that it preserves the identity and properties of its arguments (i.e., they don't try to change the XML in-place). Instead, a modified copy of the context node is created, essentially giving it a new identity. Further, it returns a single R-value item, as opposed to a sequence. The example below illustrates how it may be used in the context of an assign activity:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>ode:rename(<span class="p">$</span><span class="nv">person</span>, fn:QName("http://www.example.com/example", "manager"))<span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"person"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>For those familiar with the <a href="http://www.w3.org/TR/2008/CR-xquery-update-10-20080801/">XQuery Update Facility</a>, the above example is semantically equivalent to the expression shown below:</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>XQuery Equivalent</B></DIV><DIV class="codeContent panelContent">
+ rename $person as fn:QName("http://www.example.com/example", "manager")</p>
+<div class="alert alert-warning"><h4 class="alert-heading">Assign Assumptions</h4>
+ The WS-BPEL requires that "for a copy operation to be valid, the data referred to by the from-spec and the to-spec MUST be of compatible types." Hence, make sure that when you rename an element, the new name refers to a type that is compatible with the target variable. In other words, it should be of a substitutable (essentially stronger) complex type.
+</div>
+
+<p><a name="XPathExtensions-split-to-elements"></a></p>
+<h4 id="split-to-elements">split-to-elements</h4>
+<p>It's impossible to split a given string into a sequence of elements using assignments. The only possible alternative is XSL which is a lot of complexity for a very simple usage pattern. The <em>ode:splitToElements</em> function splits a given string (that can be a variable reference) into several elements by using a specific separators. Here is an example:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><from></span>ode:split-to-elements(<span class="p">$</span><span class="nv">authorizeMessage</span><span class="p">.</span><span class="nv">credential</span>/userList, ',', 'user')<span class="nt"></from></span>
+ <span class="nt"><to></span><span class="p">$</span><span class="nv">authorizedUsers</span><span class="nt"></to></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>If the source element contains a list like "joe, paul, fred" the target variable will be assigned the sequence of elements:</p>
+<div class="codehilite"><pre><span class="nt"><user></span>joe<span class="nt"></user></span>
+<span class="nt"><user></span>paul<span class="nt"></user></span>
+<span class="nt"><user></span>fred<span class="nt"></user></span>
+</pre></div>
+
+
+<p>Alternatively this function can take a fourth parameter that would be the namespace of the elements used to wrap the split strings:</p>
+<div class="codehilite"><pre><span class="err">ode:split-to-elements(stringToSplit,</span> <span class="err">separator,</span> <span class="err">targetElement,</span> <span class="err">targetNamespace)</span>
+</pre></div>
+
+
+<div class="alert alert-info"><h4 class="alert-heading">Deprecated Name</h4>
+ This function was formerly known as splitToElements, which may still be used, but is deprecated.
+</div>
+
+<p><a name="XPathExtensions-combine-url(base,relative)"></a></p>
+<h4 id="combine-urlbase-relative">combine-url(base, relative)</h4>
+<p>Takes the relative URL and combines it with the base URL to return a new absolute URL. If the relative parameter is an absolute URL, returns it instead.
+This function is similar to <a href="http://www.w3.org/TR/2004/WD-xpath-functions-20040723/#func-resolve-uri">func-resolve-uri</a>. However the latter is available in XPath 2.0 only.</p>
+<p><a name="XPathExtensions-compose-url(template,\[name,value\](name,value\.html)*)"></a></p>
+<h4 id="compose-urltemplate-91name-value93">compose-url(template, [name, value]*)</h4>
+<p><a name="XPathExtensions-compose-url(template,pairs)"></a></p>
+<h4 id="compose-urltemplate-pairs">compose-url(template, pairs)</h4>
+<p>Expands the template URL by substituting place holders in the template, for example, ('/order/{id}', 'id', 5) returns '/order/5'. Substitute values are either name/value pairs passed as separate parameters, or a node-set returning elements with name mapping to value. The functions applies proper encoding to the mapped values. Undefined variables are replaced with an empty string. This function returns an URL.
+See also the <a href="http://bitworking.org/projects/URI-Templates/spec/draft-gregorio-uritemplate-03.html">URI Template spec</a>.</p>
+<p><a name="XPathExtensions-expand-template(template,\[name,value\](name,value\.html)*)"></a></p>
+<h4 id="expand-templatetemplate-91name-value93">expand-template(template, [name, value]*)</h4>
+<p><a name="XPathExtensions-expand-template(template,pairs)"></a></p>
+<h4 id="expand-templatetemplate-pairs">expand-template(template, pairs)</h4>
+<p>Similar to <code>composeURL</code> but undefined variables are <em><em>not</em></em> replaced with an empty string. They are ignored. As a result with incomplete mapping may return a new URL template.</p>
+<p><a name="XPathExtensions-dom-to-string"></a></p>
+<h4 id="dom-to-string">dom-to-string</h4>
+<p>This is a function that serializes a DOM node (specified by the $node argument in the signature below) into a string.</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Dom To String</B></DIV><DIV class="codeContent panelContent">
+ ode:dom-to-string($node as node()) as xs:string</p>
+<p><a name="XPathExtensions-process-property"></a></p>
+<h4 id="process-property">process-property</h4>
+<p>This is a function that allows you to retrieve the value of a property, defined in deploy.xml for the current process, with the given name (specified by the $name argument in the signature below, which is either a QName, String, Element or Single-Valued List).</p>
+<p><DIV class="code panel" style="border-style: solid;border-width: 1px;"><DIV class="codeHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;"><B>Process Property</B></DIV><DIV class="codeContent panelContent">
+ ode:process-property($name as item()) as node() </p>
+<p>Basically, this method gives you a way to reference properties, defined in deploy.xml for a given process, directly in the BPEL code for that process. The $name argument refers to any schema item that resolves to a QName. The return value is the child node of the property element with the given name.</p>
+<p>The example below illustrates how it may be used in the context of an assign activity:</p>
+<div class="codehilite"><pre><span class="nt"><assign></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>ode:process-property("auctionEpr")<span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">partnerLink=</span><span class="s">"partnerLink"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+<span class="nt"></assign></span>
+</pre></div>
+
+
+<p>where, the property called "epr" is defined in the corresponding deploy.xml as follows:</p>
+<div class="codehilite"><pre><span class="nt"><deploy</span> <span class="na">xmlns=</span><span class="s">"http://www.apache.org/ode/schemas/dd/2007/03"</span>
+ <span class="na">xmlns:tns=</span><span class="s">"http://ode/bpel/process"</span><span class="nt">></span>
+ <span class="nt"><process</span> <span class="na">name=</span><span class="s">"tns:negotiate"</span><span class="nt">></span>
+ <span class="nt"><property</span> <span class="na">name=</span><span class="s">"auctionEpr"</span><span class="nt">></span>
+ <span class="nt"><sref:service-ref</span>
+ <span class="na">xmlns:sref=</span><span class="s">" http://docs.oasis-open.org/wsbpel/2.0/serviceref"</span>
+ <span class="na">xmlns:addr=</span><span class="s">"http://example.com/addressing"</span>
+ <span class="na">xmlns:as=</span><span class="s">"http://example.com/auction/wsdl/auctionService/"</span><span class="nt">></span>
+ <span class="nt"><addr:EndpointReference></span>
+ <span class="nt"><addr:Address></span>http://example.com/auction/RegistrationService<span class="ni">&lt;</span>/addr:Address>
+ <span class="nt"><addr:ServiceName></span>as:RegistrationService<span class="nt"></addr:ServiceName></span>
+ <span class="nt"></addr:EndpointReference></span>
+ <span class="nt"></sref:service-ref></span>
+ <span class="nt"></property></span>...
+ <span class="nt"></process></span>
+<span class="nt"></deploy></span>
+</pre></div>
+
+
+<div class="alert alert-info"><h4 class="alert-heading">Release Information</h4>
+ This function will be available in the 1.3 or higher version of ODE.
+</div>
+
+<p><a name="XPathExtensions-PredefinedProcessProperties"></a></p>
+<h4 id="predefined-process-properties">Predefined Process Properties</h4>
+<p><a name="XPathExtensions-Localhostinfo(nameandIPaddress)"></a></p>
+<h5 id="localhost-info-name-and-ip-address">Localhost info (name and IP address)</h5>
+<div class="codehilite"><pre><span class="nt"><bpws:assign></span>
+ <span class="nt"><bpws:copy></span>
+ <span class="nt"><bpws:from></span>ode:process-property('ode.localhost.name')<span class="nt"></bpws:from></span>
+ <span class="nt"><bpws:to></span><span class="p">$</span><span class="nv">output</span><span class="p">.</span><span class="nv">payload</span><span class="nt"></bpws:to></span>
+ <span class="nt"></bpws:copy></span>
+<span class="nt"></bpws:assign></span>
+
+<span class="nt"><bpws:assign></span>
+ <span class="nt"><bpws:copy></span>
+ <span class="nt"><bpws:from></span>ode:process-property('ode.localhost.address')<span class="nt"></bpws:from></span>
+ <span class="nt"><bpws:to></span><span class="p">$</span><span class="nv">output</span><span class="p">.</span><span class="nv">payload</span><span class="nt"></bpws:to></span>
+ <span class="nt"></bpws:copy></span>
+<span class="nt"></bpws:assign></span>
+</pre></div>
+
+
+<p><a name="XPathExtensions-ExtensionVariables"></a></p>
+<h3 id="extension-variables">Extension Variables</h3>
+<p><a name="XPathExtensions-InstanceId"></a></p>
+<h4 id="instance-id">Instance Id</h4>
+<div class="codehilite"><pre><span class="nv">$ode:pid</span>
+</pre></div>
+
+
+<p><a name="XPathExtensions-ProcessQName"></a></p>
+<h4 id="process-qname">Process QName</h4>
+<div class="codehilite"><pre><span class="nv">$ode:processQName</span>
+</pre></div>
+
+
+<p><a name="XPathExtensions-CurrentEventDateTime"></a></p>
+<h4 id="currenteventdatetime">CurrentEventDateTime</h4>
+<p>This is equivalent to current-dateTime() XPath function, which works with instance replayer. </p>
+<div class="codehilite"><pre><span class="nv">$ode:currentEventDateTime</span>
+</pre></div>
+
+
+<div class="alert alert-info"><h4 class="alert-heading">Release Information</h4>
+ 1.3.4 or higher
+</div></div></div>
+ <div class="clear"></div>
+ </div>
+
+ <div id="copyright" class="container_16">
+ <p>Copyright © 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+ </div>
+ </body>
+</html>
Added: websites/staging/ode/trunk/content/xquery-extensions.html
==============================================================================
--- websites/staging/ode/trunk/content/xquery-extensions.html (added)
+++ websites/staging/ode/trunk/content/xquery-extensions.html Mon Nov 12 13:07:37 2012
@@ -0,0 +1,128 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+ <head>
+ <title>XQuery Extensions</title>
+
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+
+
+
+
+
+ </head>
+
+ <body>
+ <div id="page" class="container_16">
+ <div id="header" class="grid_8">
+ <img src="http://www.apache.org/images/feather-small.gif" alt="The Apache Software Foundation">
+ <h1>The Apache Software Foundation</h1>
+ <h2>XQuery Extensions</h2>
+ </div>
+ <div id="nav" class="grid_8">
+ <ul>
+ <!-- <li><a href="/" title="Welcome!">Home</a></li> -->
+ <li><a href="http://www.apache.org/foundation/" title="The Foundation">Foundation</a></li>
+ <li><a href="http://projects.apache.org" title="The Projects">Projects</a></li>
+ <li><a href="http://people.apache.org" title="The People">People</a></li>
+ <li><a href="http://www.apache.org/foundation/getinvolved.html" title="Get Involved">Get Involved</a></li>
+ <li><a href="http://www.apache.org/dyn/closer.cgi" title="Download">Download</a></li>
+ <li><a href="http://www.apache.org/foundation/sponsorship.html" title="Support Apache">Support Apache</a></li>
+ </ul>
+ <p><a href="/">Home</a></p>
+ <form name="search" id="search" action="http://www.google.com/search" method="get">
+ <input value="*.apache.org" name="sitesearch" type="hidden"/>
+ <input type="text" name="q" id="query">
+ <input type="submit" id="submit" value="Search">
+ </form>
+ </div>
+ <div class="clear"></div>
+ <div id="content" class="grid_16"><div class="section-content"><div class="alert alert-warning">
+ XQuery is available only in Ode 1.3 or later
+</div>
+
+<p>Apache ODE goes above and beyond the <a href="-ws-bpel-20.html">WS-BPEL</a> specification by allowing the use of [XQuery 1.0|http://www.w3.org/TR/xquery/] in queries and expressions.</p>
+<p>Unless specified otherwise, WS-BPEL considers XPath 1.0 to be the query/expression language, which is denoted by the default value of the "queryLanguage" and "expressionLanguage" attributes, viz. "urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0". In addition, we have out-of-the-box support for XPath 2.0.</p>
+<p><a name="XQueryExtensions-XQuery1.0"></a></p>
+<h3 id="xquery-10">XQuery 1.0</h3>
+<p>To use XQuery 1.0 in your processes just use the following <em>queryLanguage</em> and <em>expressionLanguage</em> attributes:</p>
+<div class="codehilite"><pre><span class="n">queryLanguage</span><span class="o">=</span><span class="s">"urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0"</span>
+<span class="n">expressionLanguage</span><span class="o">=</span><span class="s">"urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0"</span>
+</pre></div>
+
+
+<p>If you want support at the process just add these attributes to your root <em>process</em> element. If you want to stick with XPath 1.0 but want XQuery 1.0 support for a specific assignment you can also define these attributes on an <em>assign</em> element.</p>
+<p>For your convenience, all of the functions and variables, standard or otherwise, that are available in XPath 2.0 have been exposed in XQuery 1.0 as well.</p>
+<p><a name="XQueryExtensions-Examples"></a></p>
+<h4 id="examples">Examples</h4>
+<p>The following snippet illustrates how to use XQuery 1.0 in <em>assign</em> activities. Needless to say, you may use XQuery 1.0 anywhere an expression is permitted, such as in a <em>while</em>, <em>if</em>, <em>repeatUntil</em> or <em>forEach</em> activity.</p>
+<div class="codehilite"><pre><span class="nt"><process</span> <span class="na">name=</span><span class="s">"HelloXQueryWorld"</span>
+ <span class="na">targetNamespace=</span><span class="s">"http://ode/bpel/unit-test"</span>
+ <span class="na">xmlns:bpws=</span><span class="s">"http://docs.oasis-open.org/wsbpel/2.0/process/executable"</span>
+ <span class="na">xmlns=</span><span class="s">"http://docs.oasis-open.org/wsbpel/2.0/process/executable"</span>
+ <span class="na">xmlns:tns=</span><span class="s">"http://ode/bpel/unit-test"</span>
+ <span class="na">xmlns:xsd=</span><span class="s">"http://www.w3.org/2001/XMLSchema"</span>
+ <span class="na">xmlns:types=</span><span class="s">"http://ode/bpel/types"</span>
+ <span class="na">xmlns:test=</span><span class="s">"http://ode/bpel/unit-test.wsdl"</span>
+ <span class="na">xmlns:ode=</span><span class="s">"http://www.apache.org/ode/type/extension"</span>
+ <span class="na">queryLanguage=</span><span class="s">"urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0"</span>
+ <span class="na">expressionLanguage=</span><span class="s">"urn:oasis:names:tc:wsbpel:2.0:sublang:xquery1.0"</span><span class="nt">></span>
+
+ ...
+ <span class="nt"><assign</span> <span class="na">name=</span><span class="s">"assign1"</span><span class="nt">></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from</span> <span class="na">variable=</span><span class="s">"myVar"</span> <span class="na">part=</span><span class="s">"TestPart"</span><span class="nt">/></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"otherVar"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span><span class="cp"><![CDATA[<test:content>Hello</test:content>]]></span><span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"tempVar"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>
+ typeswitch (<span class="p">$</span><span class="nv">myVar</span><span class="p">.</span><span class="nv">TestPart</span>)
+ case <span class="p">$</span><span class="nv">a</span> as xs:string return "test"
+ default return "default"
+ <span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"otherVar"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span><span class="cp"><![CDATA[</span>
+<span class="cp"> typeswitch (</span><span class="p">$</span><span class="nv">myVar</span><span class="p">.</span><span class="nv">TestPart</span><span class="cp">) </span>
+<span class="cp"> case </span><span class="p">$</span><span class="nv">a</span><span class="cp"> as text() return <test:content/></span>
+<span class="cp"> default return <test:content/></span>
+<span class="cp"> ]]></span>
+ <span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"otherVar"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+ <span class="nt"><copy></span>
+ <span class="nt"><from></span>
+ for <span class="p">$</span><span class="nv">loopOnce</span> in (1)
+ return
+ concat(bpws:getVariableProperty("myVar", "test:content"), "XQuery World")
+ <span class="nt"></from></span>
+ <span class="nt"><to</span> <span class="na">variable=</span><span class="s">"myVar"</span> <span class="na">part=</span><span class="s">"TestPart"</span><span class="nt">/></span>
+ <span class="nt"></copy></span>
+ <span class="nt"></assign></span>
+ ...
+ <span class="nt"></sequence></span>
+<span class="nt"></process></span>
+</pre></div>
+
+
+<p><a name="XQueryExtensions-KnownLimitations"></a></p>
+<h4 id="known-limitations">Known Limitations</h4>
+<p>Currently, we do not support:
+<em> The use of modules in XQuery.
+</em> The use of update expressions in XQuery.</p></div></div>
+ <div class="clear"></div>
+ </div>
+
+ <div id="copyright" class="container_16">
+ <p>Copyright © 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+ </div>
+ </body>
+</html>