Using Business Services with HTTP Request/Reply

When you use business services to do an HTTP request/reply, follow these rules:

  • The listener servlet checks for authorization before calling the published business service. Therefore, you must have authorization to invoke the specified method on the published business service.

  • The value object class of the method to be called must have only one string field and the accessor (getter/setter) method for the string field. The received XML payload will be passed to the method in this string field.

  • The method to be called must have three parameters. This code sample shows the signature for this method:

    public responseVO methodToBeCalled((IContext context, IConnection 
    connection,requestVO vo)
    
    Note: This method must have a public modifier. The wizard that you use to create the structure for a published business service generates a method with a protected modifier. You must change the method from protected to public so that the published business service can be called from the listener service.
  • The listener servlet does not wait for a response from the business service call. Any response is ignored.

  • This kind of published business service must be used as the bridge between getting a response from external sites and calling the processor business service that does the business logic.