on 05-19-2008 1:55 PM
Hi All,
I am facing a strange problem when generating the output XML file. The file is generating in XML format with an additional ns1 in each line.
Any idea on this guys.
<b>
<ns1:iABC xmlns:ns1="http://www.ABC.com/xmlschema/ABC/">
<ns1:header>
<ns1:flow>ACT</ns1:flow>
<ns1:sender name="XYZ">
</ns1:sender>
<ns1:receiver name="PQR">
</ns1:receiver>
<ns1:generationDate>2008-05-19</ns1:generationDate>
<ns1:fileIdent>2008/05/19T13:32:00</ns1:fileIdent>
</ns1:header>
<ns1:ID ="0000000000000000000000012"></b>
Many Thanks,
JGD
Edited by: JGD on May 19, 2008 2:56 PM
Stefan,
It is really giving me the same output without the namespace.
Even tried to use it<b> http://aaaaaaaa/bbbb/cccc "</b>
<b>output generated:</b>
<?xml version='1.0' encoding='utf-8'?>
<iSeriesCspIntegration>
<header>
..
.
..
</iSeriesCspIntegration>
<b>XSD USED:</b>
<?xml version="1.0" encoding="ISO-8859-1"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cf="http://www.ABC.com/xmlschema/cspintegration/" targetNamespace="http://www.checkfreeisolutions.com/xmlschema/cspintegration/" elementFormDefault="unqualified" attributeFormDefault="unqualified">
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guys,
No idea on :::
<b> simple SAX based java program that transforms the message mapping xml to the format you need. </b>
Where to write how to populate ,,,
But right now after using the bean found that it is deleting the namespace along with the prefix.
Is there any other else that can be done to overcome this.
Many Thanks,
JGD.
Edited by: JGD on May 20, 2008 1:34 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
I tried with the bolg provided by you it seems that the prefix is deleted so also it is deleting the namespace.
Here is what i have provided in the Communication Channel:
<b>
Module Name = AF_Modules/XMLAnonymizerBean
Type = Local Enterprise bean
Parameter Name = anonymizer.acceptNamespaces
Parameter Value = " http://aaaaaaaa/bbbb/cccc
</b>
The output generated :
<?xml version='1.0' encoding='utf-8'?>
<iSeriesCspIntegration>
<header>
..
..
</iSeriesCspIntegration>
Yes the prefix are deleted but this is also deleting the Namespace, which should not be the case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
well, that's really a problem
Do you have any complicated logic in your message mapping?
I think you have 2 options:
1 to use plain java mapping
2 to use 2 steps mapping:
- Message mapping
- simple SAX based java program that transforms the message mapping xml to the format you need.
Best regards
Dmitry
> Parameter Value = " http://aaaaaaaa/bbbb/cccc
First the namespace, then the prefix:
Parameter Value = http://aaaaaaaa/bbbb/cccc ''
I tested with the example in the blog and it worked for me.
Regards
Stefan
Good to here from you guys,
I have already made the changes in the XSD and made it unqualified , also i have made the changes Message Type by makeing the XML Namespace as <b> Blank. </b>
Now the only problem is, i am geting <b>ns0:</b> only at the starting and at the end . Please check the below details for complete understanding.
<i>
<?xml version="1.0" encoding="UTF-8"?><b>
<ns0:iSeriesCspIntegration xmlns:ns0="http://www.ABC.com/xmlschema/cspintegration/"></b><header>
...
...
...
..
<b></ns0:iSeriesCspIntegration></b></i>
Stefan,
I am trying with the web-blog provided by you , and check it out, but seems to be not happening.
I am testing right now , will be soon update it to you guys.
Many Thanks,
JGD.
Edited by: JGD on May 20, 2008 12:46 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes both seems to be same.
But the client doesn't want that extra ns0 or ns1 padded to the generated xml file:
So any idea to overcome this one.
Many Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am geting one text file and generating one xml file. The target structure is from a xsd provided by client.
I am geting all my fields perfectly as expected , the only problem in the output xml file generated with an extra <b>"ns0:" </b> added to the starting and the ending line.
Now i just want to remove that from my output xml file.
So any idea on this will be of great help.
Many Thanks.
Edited by: JGD on May 20, 2008 7:37 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sameer/All,
I somehow manage to get rid of the prefix that was attached to each and every line.
But now the problem is it is only appending at the starting and at the end of the file:
<i>
<?xml version="1.0" encoding="UTF-8"?><b>
<ns0:iSeriesCDEF xmlns:ns0="http://www.ABC.com/xmlschema/CDEF/"></b>
<header>
<flow>ACTRSP</flow>
<sender name="AB"></sender><b>
</ns0:iSeriesCDEF></b>
</i>
Any way to bypass this wiould of great help...
Many Thanks,
JGD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sameer,
I am using an XSD provided by the thrd party to produce my target structure.
So source is just a text file and target is an xml file(Use XSD structure)
So when i remove the xml namespace in the source MT then it is running into error in the mapping test run.
Here is the header of the XSD used:
<?xml version="1.0" encoding="ISO-8859-1"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:cf="http://www.ABC.com/xmlschema/cspintegration/" targetNamespace="http://www.ABC.com/xmlschema/cspintegration/" elementFormDefault="qualified" attributeFormDefault="unqualified">
Any idea on this will be of great help.
Many thanks,
JGD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan.
Well, the answer is "no"
According to XML spec both declarations
<iABC xmlns="http://www.ABC.com/xmlschema/ABC/">
and
<ns:iABC xmlns=ns:"http://www.ABC.com/xmlschema/ABC/">
are semantically identical.
Any standard xml parser will work with both declarations the same way. The mapping tool always use the first way.
Sometimes legacy systems use "xml like" format with some special restrictions.
In this case the only way to handle that is to use workarounds like with the anonymizer bean.
Another problem I'm aware of is the target file encoding. That's "not officially" solved with hidden menu which you can see if you hold CTRL+SHIFT keys and right click on data flow editor. The last menu item is "encoding" - you can set the encoding of the resulting xml there
Best regards
Dmitry
> Another problem I'm aware of is the target file encoding. That's "not officially" solved with hidden menu which you can see if you hold CTRL+SHIFT keys and right click on data flow editor. The last menu item is "encoding" - you can set the encoding of the resulting xml there
Hi Dmitry,
I think we should not recommend the hidden tools, as there is no hint in mapping editor, that the encoding is changed. And it is not supported in 7.1, so there might be issues after upgrade.
Regards
Stefan
Hi Stefan.
I'm not recommending that.I just found this feature by playing around with SAP message mapping tool
BTW, as I know there should never be any problems after upgrade if the mapping is not changed. Any old mappings working with old runtime with pre-generated code. If the mapping wasn't open for editing, it always work as before.
Best regards
Dmitry
Hi,
This is coming in the mapping.
Whenever i select one target node(Suppose say the name node) then in the mapping logic it is showing me as
<b>ns0:Name</b>
Any idea gurus,
Many thanks,
JGD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sameer,
Thanks for your quick reply,
Could you please elaborate this.
Many thanks
JGD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remove the values from the XML Namespace tab, while creating the Message Type.
regards
Sameer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.