Versions Compared

Key

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

...

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); 
}

...

xs:any Example: Using a Described Type

The following function calls a Document/Literal/Bare method. The bare parameter element is declared as:

...

What if your xs:any calls for more than one item? You supply an array of holders, since each holder could be some different element..h3

xs:any Using Raw XML

CXF also allows you to provide the XML yourself. The XML you provide must be valid. If the elements are qualified, you must
define the namespace definitions with appropriate xmlns attributes. Here is an example. Note in this example that the
element is qualified; it lives in the uri:iam namespace. JAXB does not permit unqualified elements, at least in the current version
of the reference implementation that CXF uses.

If your xs:any accept accepts multiple elements, you supply a single holder with a XML fragment containing multiple elements.

...