...
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:
- Define the JAX-WS style metadata.
- 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/goodness
.
Anchor | ||||
---|---|---|---|---|
|
Panel | ||
---|---|---|
| ||
|
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/helloWorld
. If the service defined by goodbye_moon.js
had a port name of blue
, ServerApp
would publish at http://cxf.apache.org/blue
.
Anchor | ||||
---|---|---|---|---|
|
Panel | ||
---|---|---|
| ||
|
You can also combine the arguments as shown in Example 6 and your service would be deployed at http://cxf.apache.org/goodness
. ServerApp
would publish three service endpoints:
- The service defined by
hello_world.jsx
athttp://cxf.apache.org/helloWorld
. - The service defined by
goodbye_moon.js
athttp://cxf.apache.org/blue
. - The service defined by
chocolate.jsx
athttp://cxf.apache.org/goodness
.
Anchor | ||||
---|---|---|---|---|
|
Panel | ||
---|---|---|
| ||
|
...
|
...
|