Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

CXF provides support for developing services using JavaScript and ECMAScript for XML(E4X). The pattern patterns used to develop these services are similar to JAX-WS Provider implementations that handle their requests and responses (either SOAP messages or SOAP payloads) as DOM documents.

Implementing a Service in JavaScript

Writing a service in JavaScriptis JavaScript is a two step process:

  1. Define the JAX-WS style metadata.
  2. Implement the services business logic.

...

For example, if you deployed a JavaScript service using the command shown in Example 4, your service would be deployed at http://cxf.apache.org/goodnessImage Removed.

Anchor
ex4
ex4
Panel
titleExample 4:Deploying a Service at a Specified Address

java org.apache.cxf.js.rhino.ServerApp -a http://cxf.apache.org/goodnessImage Removed hello_world.jsx

To deploy a number of services using a common base URL you could use the command shown in Example 5. If the service defined by hello_world.jsx had port name of helloWorld, ServerApp would publish it at http://cxf.apache.org/helloWorldImage Removed. If the service defined by goodbye_moon.js had a port name of blue, ServerApp would publish at http://cxf.apache.org/blueImage Removed.

Anchor
ex5
ex5
Panel
titleExample 5:Deploying a Group of Services to a Base Address

java org.apache.cxf.js.rhino.ServerApp -b http://cxf.apache.orgImage Removed hello_world.jsx goodbye_moon.js

You can also combine the arguments as shown in Example 6 and your service would be deployed at http://cxf.apache.org/goodnessImage Removed. ServerApp would publish three service endpoints:

Anchor
ex6
ex6
Panel
titleExample 6:Combining the Command Line Arguments

java org.apache.cxf.js.rhino.ServerApp -b http://cxf.apache.org

...

hello_world.jsx goodbye_moon.js -a http://cxf.apache.org/goodness

...

chocolate.jsx