3.2.2 Apache Axis for Java Web Service Client Programming Toolkit

SALT supports the AXIS wsdl2java utility which generates java stub code from the WSDL document. The AXIS Web service programming model is similar to WebLogic.

Tip:

  • Use the AXIS specific WSDL document for HTTP MIME attachment support

    SALT supports HTTP MIME transportation for Oracle Tuxedo CARRAY data. A special option must be specified for WSDL online downloading and the tmwsdlgen utility.

    Online Download:

    http://salt.host:portnumber//wsdl?mappolicy=raw&toolkit=axis

    tmwsdlgen Utility

    tmwsdlgen -c WSDF_FILE -m raw -t axis

  • Disable multiple-reference format in AXIS when RPC/encoded style is used
    TuxedoWebServiceLocator service = new TuxedoWebServiceLocator();
    service.getEngine().setOption("sendMultiRefs", false);¦
  • Use Apache Sandensha project with SALT for WS-ReliableMessaging communication.

    Interoperability has been tested for WS-ReliableMessaging between SALT and the Apache Sandensha project. The Sandensha asynchronous mode and send offer must be set in the code.

    A sample Apache Sandensha asynchronous mode and send offer code example is shown in the example below:

Example 3-4 Sample Apache Sandensha Asynchronous Mode and “send offer” Code Example


/* Call the service */
           TuxedoWebService service = new TuxedoWebServiceLocator();

       Call call = (Call) service.createCall();
           SandeshaContext ctx = new SandeshaContext();

           ctx.setAcksToURL("http://127.0.0.1:" + defaultClientPort + "/axis/services/RMService");
       ctx.setReplyToURL("http://127.0.0.1:" + defaultClientPort + "/axis/services/RMService");
       ctx.setSendOffer(true);
       ctx.initCall(call, targetURL, "urn:wsrm:simpapp", Constants.ClientProperties.IN_OUT);

       call.setUseSOAPAction(true);
       call.setSOAPActionURI("ToUpperWS");
       call.setOperationName(new javax.xml.namespace.QName("urn:pack.simpappsimpapp_typedef.salt11", "ToUpperWS"));
       call.addParameter("inbuf", XMLType.XSD_STRING, ParameterMode.IN);
       call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);

           String input = new String();
           String output = new String();
       int i;
           for (i = 0; i < 3; i++ ) {
                      input = "request" + "_" + String.valueOf(i);

              System.out.println("Request:"+input);
                   output = (String) call.invoke(new Object[]{input});
                   System.out.println("Reply:" + output);
            }

ctx.setLastMessage(call);
       input = "request" + "_" + String.valueOf(i);
       System.out.println("Request:"+input);
           output = (String) call.invoke(new Object[]{input});