on 03-15-2006 2:36 PM
Hi,
I have got a message mapping which results in the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<ns14:expost_generation xmlns:ns14="http://mywebsite.xsd">
<timeStamp>2006-03-15T15:27:16</timeStamp>
<source name="xyz">
<generation date="abc" value="def" />
<generation date="abc" value="def" />
<generation date="abc" value="def" />
</source>
</ns14:expost_generation>
My problem is that I have to suppres the ns14 prefix. The opening tag should be: <expost_generation xmlns="http://mywebsite.xsd">
The closing tag: </expost_generation>
Does anybody know how to achieve this?
Kind regards,
Heiko
Hi Heiko,
You could try this:
Create an XSD for your target message in an external tool (like notepad or a xml editor).
Import the XSD at the node Interface Objects -> External Definitions.
Use this XSD directly (by drag and drop) in your message and interface mapping.
Now you are in complete control of the namespaces.
Regards,
Arjan Aalbers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Heiko,
on the level of the expost_generation-Tag the two definitions you gave are logically equivalent. Hence, no software consuming the XMLs should prefer one style.
However, when we look at the subelements there is a great difference.
In the xml you posted first all subelements (timeStamp, source,...) lie in no namespace.
On the other hand when you declare the tag expost_generation as you described afterwards (with a default namespace declaration) and then proceed as in the first example, then all the subelements will lie in this namespace, too (unless you again reset the default namespace in all these elements).
I assume that the Schema you use in the Message Mapping describes a document with only the root being namespace qualified but the service consuming the document expects a document with all tags being namespace qualified.
Greetings
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephan,
thanks for your analysis. This might be the case. Unfortunately we have no influence on the behaviour of the message consumer. But a collegue of mine has found a solution to the problem. We remove the namespace declaration from the message type. We add the namspace afterwards, using an XSLT based mapping.
Cheers,
Heiko
Hi Heiko,
The namespace prefix will automatically addaed by XI in Mapping. If you want you can avoid the namespaces in the Message Type.
Go thru this link might be useful.
/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.