cancel
Showing results for 
Search instead for 
Did you mean: 

Real time : File Adapter : query

Former Member
0 Kudos

Hi Folks,

At development time( file adapter) we test our scenario by creating a sample XML file using message mapping tool .

The type of message we get from this contains Message Type tag with namespace Attribute.

<ns0:MT_XYZ xmlns:ns0="urn:xyz">

My question is in do in real time we need to tell them that create message type with the anmespace attribute we are using ? and also how to suppress namespace and will it bring any complications in the process ?

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi santosh,

its not necessary. u can suppress the namespace in XML by manually deleting the 'XML namespace' from message type. then it wont appear in ur xml structure.

[reward if helpful]

regards,

latika.

Answers (5)

Answers (5)

Former Member
0 Kudos

Guys,

I have developed the whole scenario and it is working fine with namespace but now after deleting the namespace from all message types it is throwing mapping error.

I have followed the same blog...

what is the remedy ?

Also i saw that now in message type after i removed the namespace the strucrure is showig p1:Datatype(p1: my data type name)

which should not be...Am i right...?

Regards

Former Member
0 Kudos

Latika/Biplab,

but when i am removing namespace attribute from source file i am getting mapping exception...::(

Regards,

Former Member
0 Kudos

Hi,

Did u follow the same steps as pointed in the blog ?

From MT - /people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

<b>Cheers,

*RAJ*</b>

Shabarish_Nair
Active Contributor
0 Kudos

remove the namespace from the MT. that should do the trick.

Ref: to the blog i had mentioned.

Former Member
0 Kudos

hi santosh,

remove namesapece from MT first activate it.

then check in message mapping also. in Test tab see the src code the namespace mst hav been removed. u can even test the mappipng here. it shud not give any error.

[reward if helpful]

regards,

latika.

Former Member
0 Kudos

Santosh,

1. When using the File adapter and Content Conversion to read the file into XI, you can allocate a specific message namespace

2. If the namespace does becomes an issue for your scenario then use an additional mapping step to remove the namespace. For example we have the

Mesage Type MT_NAMES which has a a type of NAMES

Subelement NAMEREC (0 .. unbounded)

Subelements NAME1 and NAME2

Sample xml

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

<ns1:MT_NAMES xmlns:ns1="http://namespace">

<NAMEREC>

<NAME1>AAA</NAME1>

<NAME2>BBB</NAME2>

</NAMEREC>

<NAMEREC>

<NAME1>CCC</NAME1>

<NAME2>DDD</NAME2>

</NAMEREC>

</ ns1:MT_NAMES>

Apply the XSL map

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:nsNN="http://namespace" >

<xsl:template match="/">

<xsl:for-each select="nsNN:MT_NAMES">

<NAMES>

<xsl:copy-of select="NAMEREC"/>

</NAMES>

</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

The namespace has been removed from the xml

<?xml version="1.0" encoding="utf-8" ?>

<NAMES>

<NAMEREC>

<NAME1>AAA</NAME1>

<NAME2>BBB</NAME2>

</NAMEREC>

<NAMEREC>

<NAME1>CCC</NAME1>

<NAME2>DDD</NAME2>

</NAMEREC>

</NAMERS>

Regards,

Mike

Shabarish_Nair
Active Contributor
0 Kudos

<i>My question is in do in real time we need to tell them that create message type with the anmespace attribute we are using ? and also how to suppress namespace and will it bring any complications in the process ?</i>

>>

its completely scenario dependend. namespace of course plays a role in your message transfer.

In case your target system expects a specific namespace you will have to ensure that the correct namespace is used in your DT/MT also.

But there is also a way by avoiding namespaces coming in your message.

See below;

the XMLAnonymizerBean - /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

From MT - /people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

Former Member
0 Kudos

actually including namespace inside XML is a standard format of XML messages

but its not neccessary....to always include it....Sometimes we get XSD's from client...which are not having namespace...but it works fine....so its depend upon the requirement!!