WSO2 SOA Enablement Server for Java 6.6 API Backward Compatibility  Locate

This section describes changes that have been made since version 4.0.

Changes in Runtime API between 6.0 and 5.0  Locate

The following methods have been added:

In addition, SequenceRuntimeException has been replaced by SequenceException , which must be checked now.

Changes in Previous Versions in Runtime API  Locate

A new Runtime API was designed for WSO2 SOA Enablement Server for Java 4.5 and has been developed further in WSO2 SOA Enablement Server for Java 4.7, 5.0, 5.5, 6.0, 6.5, 6.5.1, 6.5.2, 6.5.3 and 6.6. It enables developers to start and publish a Web service or register handlers and interceptors.

The classes and interfaces of the new API can be found in the package org.systinet.wasp.webservice.

Several changes have been made since WSO2 SOA Enablement Server for Java 4.5:

  • Support for JAX-RPC handlers WSO2 SOA Enablement Server for Java header processors have been deprecated starting in version 5.0, with backward compatibility.

  • Support for service endpoint and service client listeners added.

  • Advanced lookup methods moved from the Registry class to the ServiceClient.create() method.

  • Support for custom attributes associated with classes, fields or methods added.

The old classes and interfaces from version 4.0 have been deprecated. Use the new classes and interfaces instead.

For more information about the new runtime API see Runtime Publishing.

org.idoox.wasp.types Package  Locate

We added the package org.idoox.wasp.types to WSO2 SOA Enablement Server for Java in version 4.6. This package provides classes and interfaces that represent special data types. These data types are handled in a special way when relayed over SOAP.

These data types are:

  • Attachments

    • MessageAttachment - represents an attachment in the SOAP message.

    • RequestMessageAttachment - represents a request attachment in the SOAP request message.

    • ResponseMessageAttachment - represents a response attachment in the SOAP response message Holder - every generated holder inherits from this interface.

    See Service Using Attachments and the org.idoox.wasp.types Javadoc.

  • Holders

    • InOutHolder - every generated in/out holder inherits from this interface.

    • OutHolder - every generated out holder inherits from this interface.

Please see Holder Generator and the API for org.idoox.wasp.types.

[Important]Important

All classes and interfaces that were in the package org.idoox.wasp in WSO2 SOA Enablement Server for Java 4.0 are deprecated since version 4.5. Use these classes in org.idoox.wasp.types instead.

This package provides classes and interfaces for the new WSO2 SOA Enablement Server for Java asynchronous invocation. The AsyncReciept and AsyncReturn interfaces from the package org.idoox.wasp.types are deprecated starting in version 4.6. Use the new ones instead.

See Asynchronous Invocation and the Javadoc for org.systinet.wasp.async for more information.

Deployment Descriptor Backward Compatibility  Locate

This section describes changes that have been made since version 4.0 of WSO2 SOA Enablement Server.

  • New package namespace  http://systinet.com/wasp/package/1.3

    • The 4.7 version used the namespace http://systinet.com/wasp/package/1.2

      The 4.5 version used the namespace http://systinet.com/wasp/package/1.1

      The 4.0 version used http://systinet.com/wasp/package/1.0.

  • New support for specifying the accepting and initiating provider in the service-endpoint and service-client elements  In the 4.0 version you had to define a configuration/config section inside the service-endpoint or service-client element. Starting in version 4.5, service-endpoint and service-client have directly relevant attributes. (The old approach with configuration/config still works).

  • New support for specifying asynchrony attributes async-transport and async-time-out in service-client  These attributes were moved from client-processing directly to service-client. The old approach with client-processing still works if and only if the deployment descriptor contains one local client-processing element.

  • New support for persistent configuration JAX-RPC handlers WSO2 SOA Enablement Server for Java header processors have been deprecated starting in version 4.5, with backward compatibility.

  • New support for custom extended configuration in the deployment descriptor Custom configuration is no longer defined inside the section configuration/config for the package namespace http://systinet.com/wasp/package/1.2. Instead, extended configuration elements must have a different namespace than the package namespace. See Custom Configuration for more details.

    Thanks to backward compatibility and on-the-fly migration, you can use your existing deployment descriptor with WSO2 SOA Enablement Server for Java 6.6 without any changes.

    When the deployment framework detects a package with a deployment descriptor with the WSO2 SOA Enablement Server for Java 4.7 package namespace, this deployment descriptor is automatically migrated to WSO2 SOA Enablement Server for Java 6.6.

For more information about deployment and deployment descriptors see Deployment in the Publishing Web services section of the Developer's Guide.

Remote References and Per-Client Instantiation  Locate

For historical reasons, remote references and per-client instantiation used non-qualified elements in WSO2 SOA Enablement Server for Java 4.0. Non-qualified elements are used in encoded use.

From WSO2 SOA Enablement Server for Java 4.5 default use is literal. Therefore remote references and per-client instantiation cannot be directly used between WSO2 SOA Enablement Server for Java 4.0 and later versions.

For a WSO2 SOA Enablement Server for Java 4.0 client to communicate with a later server, remote references or per-client instantiation, the encoding service must be deployed on the server side. To correctly set up encoding, add this element to your service-endpoint element in the deployment descriptor. The format is different for SOAP 1.1 and SOAP 1.2 encoding:

Example 3. Adding <encoding> to <service-endpoint> in a Deployment Descriptor, SOAP 1.1

<service-endpoint ...
   xmlns:enc="http://systinet.com/wasp/package/extension"> 
  <enc:encoding>http://schemas.xmlsoap.org/soap/encoding/</enc:encoding> 
</service-endpoint>

Example 4. Adding <encoding> to <service-endpoint> in a Deployment Descriptor, SOAP 1.2

<service-endpoint ...
        xmlns:enc="http://systinet.com/wasp/package/extension">
    <enc:encoding>http://www.w3.org/2002/06/soap-encoding</enc:encoding>
</service-endpoint>

Once you have modified your deployment descriptor, you need to deploy your service endpoint with an encoded WSDL. This task should be left to the automatic WSDL generation process in WSO2 SOA Enablement Server for Java. A correct WSDL is generated based on changes to the deployment descriptor. Alternately, you can create you own encoded WSDL using Java2WSDL and the --soap-encoding-style parameter. See Java2WSDL in Tools for details.

If you want to create an encoding service in runtime, you must add a key-value pair to the context data in ServiceEndpointContext. The key is ServiceEndpointContext.WSDL_ENCODING_URI and the value is the encoding URI, such as http://www.w3.org/2002/06/soap-encoding in Example 4. If this value is not specified, literal use is assumed.

Transport Coupling in Asynchronous Invocations  Locate

Starting in WSO2 SOA Enablement Server for Java 5.0, asynchronous invocations with transport coupling use the WS-Addressing protocol. This has become the recognised de-facto standard for message correlation and addressing.

WS-Routing, used previously, was disabled in the default installation for performance reasons. If you want to invoke services running on an older server than WSO2 SOA Enablement Server for Java 5.0 with transport coupling or invoke services running on WSO2 SOA Enablement Server for Java 6.6 from older clients with transport coupling, you need to reconfigure WSO2 SOA Enablement Server for Java 6.6 to use WS-Routing headers.

You have two ways of getting WSO2 SOA Enablement Server for Java 6.6 to use WS-Routing:

  1. Install WSO2 SOA Enablement Server for Java 6.6 with backward compatibility

  2. Install without backward compatibility and modify the WSO2 SOA Enablement Server for Java configuration.

To modify the, edit conf/clientconf.xml and conf/serverconf.xml and uncomment the following lines (there are six occurrences of this one line):

<!--instance>WSRouting_HP</instance-->

so they will look like this:

<instance>WSRouting_HP</instance>

WS-Addressing Specification  Locate

By default, WSO2 SOA Enablement Server for Java 6.6 uses a newer version of the WS-Addressing specification than does WSO2 SOA Enablement Server for Java 5.0 (please see WS-Addressing). Therefore, when a WSO2 SOA Enablement Server for Java 6.6 client needs to communicate with a WSO2 SOA Enablement Server for Java 5.0 server and vice versa, the correct WS-Addressing SpecVersion must be set in the WSO2 SOA Enablement Server for Java 6.6 configuration (persistent deployment) or code (runtime).

[Note]Note

The default behavior of WSO2 SOA Enablement Server for Java 6.6 can be changed by changing the addressing URI to http://schemas.xmlsoap.org/ws/2003/03/addressing (used by WSO2 SOA Enablement Server for Java 5.0) in the following line in the WASP_HOME/conf/policy.xml file:

<wsu:SpecVersion URI="http://schemas.xmlsoap.org/ws/2004/03/addressing"
                     wsp:Preference="1" wsp:Usage="wsp:Observed"/>

so that it will look like:

<wsu:SpecVersion URI="http://schemas.xmlsoap.org/ws/2003/03/addressing" 
                     wsp:Preference="1" wsp:Usage="wsp:Observed" />

[Note]Note

WSO2 SOA Enablement Server for Java 6.6 understands the following WS-Addressing specifications:

WSO2 SOA Enablement Server for Java 6.6 Client vs. WSO2 SOA Enablement Server for Java 5.0 Server  Locate

The client should use an older version of the WS-Addressing specification for sending messages to a service.

Runtime settings The following lines should be added into the client code:

Policy policyOut = PolicyManager.createPolicy();
SpecVersionAssertion specVersion = new SpecVersionAssertion(Constants.NAMESPACE_WSA_2003_3, 
                                    PolicyUsage.OBSERVED);
specVersion.setPreference(2);
policyOut.add(specVersion);
EndpointReference eprefOut = new EndpointReference(SERVICE_PATH);
PolicyManager.attachPolicy(eprefOut, policyOut);

Persistent deployment Add the following section to the client package's policy.xml file:

<wsp:PolicyAttachment>
    <wsp:AppliesTo>
        <wsa:EndpointReference>
            <wsa:Address>
                http://localhost:6060/demo/advanced/async/coupling/OrdersMgmtService
            </wsa:Address>
        </wsa:EndpointReference>
    </wsp:AppliesTo>
    <wsp:Policy>
       <wsu:SpecVersion URI="http://schemas.xmlsoap.org/ws/2003/03/addressing" 
                            wsp:Preference="2" wsp:Usage="wsp:Observed" />
    </wsp:Policy>
</wsp:PolicyAttachment>
                            

WSO2 SOA Enablement Server for Java 5.0 Client vs. WSO2 SOA Enablement Server for Java 6.6 Server  Locate

The service should use an older version of the WS-Addressing specification to send messages back to the client.

Runtime settings The following lines should be added into the service code:

Policy policy = PolicyManager.createPolicy();
SpecVersionAssertion specVersion = new SpecVersionAssertion(Constants.NAMESPACE_WSA_2003_3, 
                                    PolicyUsage.OBSERVED);
specVersion.setPreference(2);
policy.add(specVersion);
ServiceEndpointReference epref = new ServiceEndpointReference(serviceEndpointPath);
PolicyManager.attachPolicy(epref, policy);

Persistent deployment Add the following section to the service package's policy.xml file:

<wsp:PolicyAttachment>
    <wsp:AppliesTo>
        <wasp:ServiceEndpointReference>
            <wasp:Path>/demo/advanced/async/coupling/AsyncCallback_1</wasp:Path>
        </wasp:ServiceEndpointReference>
    </wsp:AppliesTo>
    <wsp:Policy>
        <wsu:SpecVersion URI="http://schemas.xmlsoap.org/ws/2003/03/addressing" 
                             wsp:Preference="2" wsp:Usage="wsp:Observed" />
    </wsp:Policy>
</wsp:PolicyAttachment>