on 10-11-2010 7:36 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.