Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
javascript
javascript
function apache_org_hello_world_soap_http_types_sayHiResponse () {
    this._responseType = '';
}

function apache_org_hello_world_soap_http_types_sayHiResponse_getResponseType() { return this._responseType;}
apache_org_hello_world_soap_http_types_sayHiResponse.prototype.getResponseType = 
  apache_org_hello_world_soap_http_types_sayHiResponse_getResponseType;
function apache_org_hello_world_soap_http_types_sayHiResponse_setResponseType(value) {this._responseType = value;}
apache_org_hello_world_soap_http_types_sayHiResponse.prototype.setResponseType = 
  apache_org_hello_world_soap_http_types_sayHiResponse_setResponseType;

...

In general, you will probably feel the need to read the JavaScript code to understand the binding in complex cases. One possible future enhancement of the generator is to generate more comments, or perhaps even an HTML explanation, to assist in this process.

Examples of Calling Services

Here are some snippets of calls to services. You should expect to inspect the generated JavaScript to learn the names of classes and functions.

A Document/Literal/Bare Service

The present author finds that, at least for JAX-WS, BARE has a lot to recommend it, as it avoids surprising interactions between JAX-WS and JAXB.

Code Block
javascript
javascript


function errorCallback(httpStatus, httpStatusText) 
{
	globalErrorStatus = httpStatus; // integer HTTP status
	globalStatusText = httpStatusText; // Textual HTTP status
}

function successCallback(responseObject) 
{
// the parameter is an object of the type declared for the
// method.
	globalResponseObject = responseObject;
}

function compliantTest(url)
{
    var intf;
    // class for the service.
    intf = new org_apache_cxf_javascript_fortest_SimpleDocLitBare();
    intf.url = url;
    var bareParam = new my_param_class_object();
    bareParam.setWhatever(someValue);
    // ...
    intf.compliant(successCallback, errorCallback, bareParam); 
}