cancel
Showing results for 
Search instead for 
Did you mean: 

UDF: Get Namespace

Former Member
0 Kudos

Hi everybody,

Is it possible to read the namespace of the message-mapping, that is currently processed

Thanks a lot

Regards Mario

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi mario,

By using the udf u can get the name space under which the current mapping program is defined.

java.util.Map map;

map = container.getTransformationParameters( );

String const;

Const = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);

return const;

there r other systen veriable is also defined which can be access using UDF, these r

MESSAGE_CLASS,VERSION_MAJOR,VERSION_MINOR,PROCESSING_MODE,MESSAGE_ID,TIME_SENT,INTERFACE,INTERFACE_NAMESPACE,SENDER_PARTY,SENDER_SERVICE,RECEIVER_NAME,RECEIVER_NAMESPACE,RECEIVER_PARTY,RECEIVER_SERVICE,MAPPING_TRACE

regards,

navneet

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi...

Check this below thread.

Regards

Leela

aashish_sinha
Active Contributor
0 Kudos

Hi,

You can find the tag of your name space and also you can append the whole line which contains the tag into one output string and then later you can check. Thing is that, try finding the start of tag, if that tag found in xml, just append whole line till end of that tag to output string, using an UDF.

<tag> urn:test.urn </tag>

find tag and then append text to output amd then exit.

But as michael suggested, can you please let us know about the requirement.

Regards

Aashish Sinha

MichalKrawczyk
Active Contributor
0 Kudos

hi,

just out of curiosity - it's this the same as checking the name

of the mapping inside itself - does it make sense? how can you have more then one mapping namespace in a mapping ? can you tell your requirement ?

BTW

answering I don't know if there is such a possibility

Regards,

Michal Krawczyk

http://mypigenie.com XI/PI FAQ

Former Member
0 Kudos

Hi Michal,

the demand is following:

If have a CSV file in the imported archiv. This contains key-value pairs depending on the namespace.

As we are testing 2 new backend-systems we have to decide on the namespace, which backend to choose.

Regards Mario