cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistencies with routing condition in Interface Determination

Former Member
0 Kudos

I used following conditions in Interface Determination...

/p1:MT_BLOB/Record/InterfaceDescriptor CP (curved equals sign) IN_CONT_0001
/p1:MT_BLOB/Record/InterfaceDescriptor CP (curved equals sign) IN_CONT_0002

But I got the error

<SAP:Code area="IF_DETERMINATION">CX_ID_PLSRV</SAP:Code> 
<SAP:P1>Problem evaluating a condition: An exception has occurred.</SAP:P1>

<Trace level="2" type="T">......extracting (new) for Extractor: XP /p1:MT_BLOB/Record/InterfaceDescriptor</Trace> 
<Trace level="2" type="T">......new reader had problems - try old one</Trace>

So I used the XPATH function in the condition

/p1:MT_BLOB/Record[contains(InterfaceDescriptor,"IN_CONT_0001")] EX

I get the error when JMS sender channel sends the message

<SAP:Code area="IF_DETERMINATION">NO_IIF_CASE_ASYNC</SAP:Code>
<SAP:Stack>Unable to find an inbound interface</SAP:Stack>

<Trace level="2" type="T">......extracting (old) for Extractor: XP /p1:MT_BLOB/Record[contains(InterfaceDescriptor,"IN_CONT_0001")]</Trace> 
<Trace level="2" type="T">...invalid InbIf: SI_VFX_CONT_0001_Inbound</Trace>

The message sent by JMS channel is like

<?xml version="1.0" encoding="utf-8" ?> 
<ns:MT_BLOB xmlns:ns="http://myown.com/xi/na/SD">
 <Record>
  <InterfaceDescriptor>IN_CONT_0001      </InterfaceDescriptor> 
  <RouteMapData>N CAG</RouteMapData> 
  <BLOB>00SUCCESSFUL INQUIRY L 00337420101008091429SRW00</BLOB> 
 </Record>
</ns:MT_BLOB>

However, when I send the same message from RWB, I do not get any error message.

<Trace level="2" type="T">......extracting (old) for Extractor: XP /p1:MT_BLOB/Record[contains(InterfaceDescriptor,"IN_CONT_0001")]</Trace> 
<Trace level="2" type="T">......extracting values found: 1</Trace> 
<Trace level="2" type="T">......extracting values found: 1</Trace> 
<Trace level="2" type="T">...valid InbIf with Condition: SI_VFX_CONT_0001_Inbound</Trace>

I fail tp understand what is wrong/missing in my config.

I greatly appreciate your inputs to resolve this error.

thx

praveen

Accepted Solutions (1)

Accepted Solutions (1)

sunil_singh13
Active Contributor
0 Kudos

Hi Praveen,

In general sense condition evaluates to be false only if it fails to match. In your case Nothing looks wrong except:

/p1:MT_BLOB/Record/InterfaceDescriptor

while in your payload it is

ns:MT_BLOB

manually edit the value /p1 to ns... or just check wats the value of p1..

Second thing is in your payload there is space after the value <InterfaceDescriptor>IN_CONT_0001 </InterfaceDescriptor>

I am not sure if this is causing the problem as you said your are able to send the message from RWB.

Thanks,

Sunil Singh

Former Member
0 Kudos

Sunil,

Thanks for the prompt response.

p1 is a prefix that is defined as 'http://myown.com/xi/na/SD' in the condition editor.

In the incoming XML the prefix ns is used and it is defined as 'http://myown.com/xi/na/SD' at MT_BLOB level. So I think it is not a problem.

Regd the space after IN_CONT_0001...yes it is expected, hence I tried CP/contains rather than for the exact match.

I'm using PI 7.1 with SPS 7. I'm guessing someone would have faced it as well and hoping can help me resolved it.

I'm trying to see if it has anything to do with the JMS adapter and the MessageTransform Bean.

praveen

stefan_grube
Active Contributor
0 Kudos

> I'm trying to see if it has anything to do with the JMS adapter and the MessageTransform Bean.

Usually the MessageTransform Bean trims trailing spaces, so I wonder why this does not happen in your scenario.

Could you post the configuration for the MessageTransform Bean?

Former Member
0 Kudos

Stefan,

I intentionally set the parameter xml.fieldContentFormatting to nothing because the my mapping is configured using substring functions on the field BLOB. If the spaces are trimmed, I'll get StringIndexOutofbound Exeption.

Here is my complete Module processing config.

Processing Sequence


Number	Module Name					Type			Module Key
1	SAP XI JMS Adapter/ConvertJMSMessageToBinary	Local Enterprise Bean	convert_JMS2Bin
2	SAP XI JMS Adapter/ConvertBinaryToXMBMessage	Local Enterprise Bean	convert_Bin2XI
3	localejbs/AF_Modules/MessageTransformBean	Local Enterprise Bean	Plain2XML
4	CallSapAdapter					Local Enterprise Bean	call_AF_MS

Module Configuration


Module Key	Parameter Name			Parameter Value
Plain2XML	Transform.Class			com.sap.aii.messaging.adapter.Conversion
Plain2XML	Transform.ContentType		text/xml;charset=utf-8
Plain2XML	xml.conversionType		SimplePlain2XML
Plain2XML	xml.documentName		MT_BLOB
Plain2XML	xml.documentNamespace		http://myown.com/xi/na/SD
Plain2XML	xml.fieldContentFormatting	nothing
Plain2XML	xml.fieldFixedLengths		30,80,15010
Plain2XML	xml.fieldNames			InterfaceDescriptor,RouteMapData,BLOB
Plain2XML	xml.keepIncompleteFields	YES
Plain2XML	xml.processFieldNames		fromConfiguration
Plain2XML	xml.structureTitle		Record

How relevant is the parameter igonreRecordsetName here?

Chris,

Yes, you are right, when I use CP operator, I should use the star/asterisk with IN_CONT_0001. In fact, I used the star/asterisk before and after IN_CONT_0001. But the result...same error message.

I used the XPATH function normalize-space as well. It yielded the same result as contains. No change.

Again, I'd like to highlight that this routing condition is working fine when I send the message from RWB.

thanks

praveen

Former Member
0 Kudos

After testing with other messages (IN_CONT_0002), I realized that this is happening because of a couple of NUL chars in the input file.

When I tested from RWB with IN_CONT_0001, that message did not have NUL chars, so they worked fine.

So now the problem is handling the NUL chars. How do I handle these chars?

I appreciate your inputs.

thx in adv

praveen

stefan_grube
Active Contributor
0 Kudos

This parameter causes the issue:

Plain2XML xml.fieldContentFormatting nothing

Do you really want to keep all whitespaces? As you have a fixed field structure, this usually is not necessary.

Remove the parameter or set value to "trim".

Former Member
0 Kudos

Thats great catch Stefan !!

Yes, the default value 'trim' actually trims NUL chars as well. That solved the problem.

As I was trying to avoid StringIndexOutofBound exception, I intentionally set it to 'nothing'. But, now I padded the fields with enough spaces to avoid StringIndexOutofBound exception.

Thanks a ton.

praveen

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Does the "CP" comparison operator need some "joker" chars, like "IN_CONT_001*" (so it does not take trailing spaces into account) ? Or maybe, tweaking your xpath with something like :

/p1:MT_BLOB/Record/\[normalize-space(InterfaceDescriptor)='IN_CONT_001'\]/InterfaceDescriptor EX

Rgds

Chris