cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to set Conversation ID in UDF

Former Member
0 Kudos

I am trying to set Conversation ID in a Mapping UDF on a response message from ECC To XI to JMS Receiver.

GlobalContainer globalContainer ;

globalContainer = container.getGlobalContainer();

Map param = globalContainer.getParameters();

/*

param.put(StreamTransformationConstants.CONVERSATION_ID, "1234ConversationID);

The mapping executes without any error. But for some reason, the conversation Id does not show up under the SOAP:Main (SAP:ConversationId element) header at all.

Any ideas?

Thanks,

Badari

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Praveen, here is the code - its very simple. 'a' is a string value passed to the UDF:

GlobalContainer globalContainer ;

globalContainer = container.getGlobalContainer();

Map param = globalContainer.getParameters();

param.put(StreamTransformationConstants.CONVERSATION_ID, a);

return a;

Former Member
0 Kudos

Hi Badari,

I'm having exactly the same question as you had.

Did you find get an answer?

I'm able to set the parameter in an adapter module, but not from within a mapping (I also don't think it is possible to change them overthere, only accessing them).

Kind regards

Joris

0 Kudos

¿Did you finallly solved this issue?

Best regards,

Ivan.

Former Member
0 Kudos

Aamir/Praveen,

Thanks for the quick responses. The problem is the Conversation ID is "not" getting set in the header. And, there is no error in the UDF! Could this be an authorization issue ? Does XIAPPLUSER need any permissions to update the XI headers ?

Thanks,

Badari

former_member181985
Active Contributor
0 Kudos

Hi Badari,

Could you please provide your actual UDF code as it is.

Thanks,

Gujjeti

former_member181985
Active Contributor
0 Kudos

Hi Badari/Aamir,

Both are same. Have a look at the standard SAP java program for StreamTransformation Constants.

package com.sap.aii.mapping.api;

public interface StreamTransformationConstants

{

public static final String MESSAGE_CLASS = "MessageClass";

public static final String VERSION_MAJOR = "VersionMajor";

public static final String VERSION_MINOR = "VersionMinor";

public static final String PROCESSING_MODE = "ProcessingMode";

public static final String MESSAGE_ID = "MessageId";

public static final String REF_TO_MESSAGE_ID = "RefToMessageId";

public static final String CONVERSATION_ID = "ConversationId";

public static final String TIME_SENT = "TimeSent";

public static final String SENDER_PARTY = "SenderParty";

public static final String SENDER_PARTY_AGENCY = "SenderPartyAgency";

public static final String SENDER_PARTY_SCHEME = "SenderPartyScheme";

public static final String SENDER_SERVICE = "SenderService";

public static final String RECEIVER_PARTY = "ReceiverParty";

public static final String RECEIVER_PARTY_AGENCY = "ReceiverPartyAgency";

public static final String RECEIVER_PARTY_SCHEME = "ReceiverPartyScheme";

public static final String RECEIVER_SERVICE = "ReceiverService";

public static final String INTERFACE = "Interface";

public static final String INTERFACE_NAMESPACE = "InterfaceNamespace";

public static final String MAPPING_TRACE = "MappingTrace";

public static final String CONTENT_TYPE = "ContentType";

public static final String DYNAMIC_CONFIGURATION = "DynamicConfiguration";

/**

  • @deprecated Field SENDER_NAME is deprecated

*/

public static final String SENDER_NAME = "SenderName";

/**

  • @deprecated Field SENDER_NAMESPACE is deprecated

*/

public static final String SENDER_NAMESPACE = "SenderNamespace";

/**

  • @deprecated Field SENDER_SYSTEM is deprecated

*/

public static final String SENDER_SYSTEM = "SenderSystem";

public static final String RECEIVER_NAME = "ReceiverName";

public static final String RECEIVER_NAMESPACE = "ReceiverNamespace";

/**

  • @deprecated Field RECEIVER_SYSTEM is deprecated

*/

public static final String RECEIVER_SYSTEM = "ReceiverSystem";

/**

  • @deprecated Field DIRECTION is deprecated

*/

public static final String DIRECTION = "Direction";

/**

  • @deprecated Field DIRECTION_REQUEST is deprecated

*/

public static final String DIRECTION_REQUEST = "Request";

/**

  • @deprecated Field DIRECTION_RESPONSE is deprecated

*/

public static final String DIRECTION_RESPONSE = "Response";

/**

  • @deprecated Field DIRECTION_FAULT is deprecated

*/

public static final String DIRECTION_FAULT = "Fault";

}

Thanks,

Gujjeti

Former Member
0 Kudos

Hey Praveen

Both are not the same,please have a look at this help.sap document

http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm

specially the last line

For example, to read the message ID from the message header, the variable key must have the value MessageId and not MESSAGE_ID.

I m pulling the message ID in one of my scenarios and i get Null value when i try using MESSAGE_ID.

I get correct message ID in mapping when i use MessageId.

Thanx

Aamir

former_member181985
Active Contributor
0 Kudos

Hi Aamir,

You should give it as StreamTransformationConstants.MESSAGE_ID not as MESSAGE_ID.

As this is confined to StreamTransformationConstants class. static key word is assigned in the standard program.

So we can access it in two ways

1. StreamTransformationConstants.MESSAGE_ID

2. "ConversationId"

In first case we are using directly the string CONSTANT variable. In the second case direct string value. Correct me If I am still wrong as I have tested it before for dynamic configuration variable.

Thanks,

Gujjeti

Edited by: Praveen Gujjeti on May 12, 2008 10:15 PM

Edited by: Praveen Gujjeti on May 12, 2008 10:17 PM

Former Member
0 Kudos

Hey

as far as i know,you need to use ConversionId ,not CONVERSATION_ID

Thanx

Aamir