0 Replies Latest reply on Sep 11, 2007 7:00 AM by 426329

    HTTP Adapter receiver.customizer_class

    426329
      I'm trying to do something with the reply from a HTTPS-message from a website.

      The HTTPCustomizedSender works fine, I tested:

      import oracle.oai.agent.adapter.technology.HTTPSenderCustomizer;
      import oracle.oai.agent.adapter.sdk.Agent;
      import oracle.oai.agent.adapter.transport.TransportMessage;
      import oracle.oai.agent.adapter.sdk.MessageObject;
      import oracle.oai.agent.adapter.sdk.AttributeObject;
      public class CustomizedSenderResponse implements HTTPSenderCustomizer {
      public void customizeTransportMessage (Agent agent, TransportMessage transportMessage,
      MessageObject mobj, AttributeObject aobj)
      {
      agent.logTraceMessage ("Sent message sender xml:" + transportMessage.getBodyAsString(),
      null,null,null);
      }
      }

      Now I want to catch the reply from the website (I can see the reply when I set the tracelevel to 2 in the adapter.ini), so accordingly to the documentation I should implement the CustomerReceiver class:

      import oracle.oai.agent.adapter.technology.ReceiverCustomizer;
      import oracle.oai.agent.adapter.sdk.Agent;
      import oracle.oai.agent.adapter.transport.TransportMessage;
      public class CustomizedReceiverResponse implements ReceiverCustomizer {
      public void customizeTransportMessage (Agent agent, int receiverType,
      TransportMessage transportMessage)

      {

      }

      public String createReplyMessage(Agent agent, int status, TransportMessage transportMessage)
      {
      agent.logTraceMessage ("Return message receiver :" + transportMessage.getBodyAsString(),
      null,null,null);
      agent.logTraceMessage ("Return message receiver:" + transportMessage.getResponse(),
      null,null,null);
      return "Successfull";
      }
      }

      But it's not working, it even seems the parameter http.receiver.customizer_class=CustomizedReceiverResponse
      is not recognized by the adapter

      We are using version 9.0.2.0.2 of Interconnect