Skip to Content
author's profile photo Former Member
Former Member

Converting Adapter Module from XI 3.0 to PI 7.11

Hi All,

I'm in the process of converting an adapter module originally written for XI 3.0 to an PI 7.11 module.

I am unable to find replacements for some parts of the code. Do you know what are the PI 7.11 equivalent statements for the below code:

XI 3.0 Code:

import com.sap.aii.adapter.xi.ms.XIMessage;
import com.sap.aii.messaging.mo.Message;
import com.sap.aii.messaging.mo.xmb.XMBMessageOperator;

XIMessage aXIMessage = (XIMessage) inputModuleData.getPrincipalData();
Message xmbMessage = (Message) aXIMessage.getXMBMessage();

XMBMessageOperator.setSystemAckRequested(xmbMessage, true);
XMBMessageOperator.setSystemErrorAckRequested(xmbMessage, true);

Appreciate all your help/thoughts on the issue.

Regards,

Sumant.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2011 at 08:58 PM

    Here is the full code of the method:

    	public ModuleData process(
    		ModuleContext moduleContext,
    		ModuleData inputModuleData)
    		throws ModuleException {
    
    		XIMessage aXIMessage = (XIMessage) inputModuleData.getPrincipalData();
    		Message xmbMessage = (Message) aXIMessage.getXMBMessage();
    
    		AuditMessageKey amk =
    			new AuditMessageKey(
    				aXIMessage.getMessageId(),
    				AuditDirection.INBOUND);
    		Audit.addAuditLogEntry(
    			amk,
    			AuditLogStatus.SUCCESS,
    			"FileSetAckBean: Module called");
    
    		XMBMessageOperator.setSystemAckRequested(xmbMessage, true);
    		XMBMessageOperator.setSystemErrorAckRequested(xmbMessage, true);
    		inputModuleData.setPrincipalData(aXIMessage);
    
    		return inputModuleData;
    	}

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi

      when i try to cast

      XIMessage aXIMessage = (XIMessage) imd.getPrincipalData();

      com.sap.aii.messaging.mo.Message xmb_m = (com.sap.aii.messaging.mo.Message) aXIMessage.getXMBMessage();

      i receive class cast exception.

      What is wrong ?

      Does it work for both inbound and outbound scenerios ?

      Br

      Maciej

  • Posted on Jun 15, 2011 at 09:25 PM

    The package com.sap.aii.messaging.mo is in internal SAP package and should not be used by customers.

    In PI 7.11 there is an equivalent package com.sap.aii.af.sdk.xi.mo

    This blog might be useful to find the right libraries for compiling:

    SOAP Sender Adapter Modules

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.