8.3.4 Generating objects

In order to invoke the method of the synchronous reception (Web Services), use the created service class to generate proxy class objects. The procedures of generating proxy class objects are described below:

  1. Create objects of the CSCMsgSyncServiceDeliveryWSImplService class.
    Example:

    CSCMsgSyncServiceDeliveryWSImplService service
                = new CSCMsgSyncServiceDeliveryWSImplService();

  2. Create the CSCMsgSyncServiceDeliveryWSImpl.java class that is the proxy class corresponding to wsdl:portType.
    Example:

    CSCMsgSyncServiceDeliveryWSImpl ws
                = service.getCSCMsgSyncServiceDeliveryWSImpl();

  3. Using the created CSCMsgSyncServiceDeliveryWSImpl.java class object, invoke a method of the synchronous reception (Web Services).
    Example: When the request message is in XML

    String result = ws.invokeXML(               // Method invocation
                          serviceName,         // Service name
                          clientID,            // Client correlation ID
                          requestFormatID,     // Request format ID
                          responseFormatID,    // Response format ID
                          operationName,       // Operation name
                          userData);           // User message

    Example: When the request message is binary

    byte[] resultBinary = ws.invokeBinary(      // Method invocation
                             serviceName,      // Service name
                             clientID,         // Client correlation ID
                             requestFormatID,  // Request format ID
                             responseFormatID, // Response format ID
                             operationName,    // Operation name
                             userDataBinary.length,  // User message length
                             userDataBinary);  // User message

    Note
    A binary request message can be sent only when the message format used on the service component side is binary.