cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Configuration for determining filename

Former Member
0 Kudos

Hi ,

I am using dynamic configuration for determining the filename sent by the sender

I am using the following code::

int i = 0;

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

String ourSourceFileName = conf.get(key);

if (ourSourceFileName.equals("data.txt"))

{

for (i = 0 ; i < 1 ; i++)

{

result.addValue(ourSourceFileName);

}

}

i have also 'checked' filename in set Adapter specific message propertiesas in sender communication channel.

But Still it is not working.

Please provide some help on it.

Thanks & Regards

Nilima

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Nilima,

Go to transaction sxi_monitor in XI server and get the relevant message. Left pane shows the soap header. Under Header for Inbound side check the header node Dynamic configuration. Check whether u have the file name along with its attributes (Name space of File Adapter Metadata in Repository)

Regards,

Sudharshan

MichalKrawczyk
Active Contributor
0 Kudos

hi,

check your inbound message in SXI_MONITOR

if you see the dynamicconfiguration at all

in the message header

(and if the FileName is populated there)

Hope you have XI SP14 or more +

hope you don't test it in the message tab

but in the real message flow right ?

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

Hi,

Michal

In SXMB-MONIthe response part contains DYNAMIC CONFIGURATION node

and it displays::

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<!-- Response

-->

<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName"><b>try1.txt</b></SAP:Record>

</SAP:DynamicConfiguration>

please sir provide some help on it.

Thanks once again.

Former Member
0 Kudos

Hi Nilima,

In ur function u check for a different file name.

If one and only if file name matches u will get value in the result Queue.

Regards,

Sudharshan

MichalKrawczyk
Active Contributor
0 Kudos

hi,

but in your code you check for <b>data.txt</b> and not

for <b>try1.txt</b> ?

so how can the if work ?

maybe try without the if for a start - just to check

if it's being filled correctly

Regards,

michal

Former Member
0 Kudos

Hi,

Michal,

Sorry that was a mistake.

It is not "data.txt" It's actually "try.txt" only.

Still it is not working

Thanks.

MichalKrawczyk
Active Contributor
0 Kudos

hi,

but you don't have any errors ?

can you try without the IF ?

are you sure you copied/pasted

the whole code from my weblog?

Regards,

michal

Former Member
0 Kudos

Hi,

DynamicConfigurationKey key = DynamicConfigurationKey.create("http:" + "/" + "/" + "sap.com/xi/XI/System/File", "FileName");

replace key object creation statement in ur code with the above line of code.

Regards,

Sudharshan

Former Member
0 Kudos

Hi,

I am using the mapping in my transformation step of bpm.

So,I hope that using that code in BPM is not causing any problem.

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

Am not sure, but is it possible for you to move the transformation step outside the BPM and then see if it works fine?

Regards,

Bhavesh