Skip to Content
avatar image
Former Member

Custom adapter module

Hi, My requirement was to call 2 webservices in a row, First one to post the data by using a unique session id value and second is to close the call by passing same session id. I used custom adapter module to call the second webservice and calling it in module section of SOAP receiver channel which is calling the first web service.

In processing sequence I am calling the custom module (i.e. CallLogout) after standard SOAPadapterBean entry (i.e. sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean), As shown below -

With this, I am getting an error in adapter engine - java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.MessageKey.getMessageId() of an object loaded from local variable 'msgKey';


The moment I change the sequence, and call my custom adapter before standard soapadapterBean entry, the module call works fine. However it does not fit to my requirement because I need to call logout service only after soap adapter service call.


My question is - Can we use MessageKey after calling standard adapter bean. If not, is there a way I can make it working. Below is an extract of my code where I am using MessageKey for auditlog -


amk = new MessageKey(msg.getMessageId(), msg.getMessageDirection());
Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,
                    "Source XML parsed succesfully");

Thanks,

Amol

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 16, 2015 at 02:07 AM

    Hi Amol,

    If you go with a custom adapter module you would have to execute the logout as the primary service call and use the custom module to execute the first web service.  Out of curiosity however what is the overall design?  And how come the client is not simply making two successive web service calls based on the requirement?

    Regards,

    Ryan Crosby

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2015 at 10:10 AM

    You can use soap lookup to gey session id...

    Add comment
    10|10000 characters needed characters exceeded