on 10-31-2007 4:22 AM
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,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Latika/Biplab,
but when i am removing namespace attribute from source file i am getting mapping exception...::(
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.