on 03-02-2007 2:26 PM
Dear all,
I have a message BMP to File and i am using External Definitions .XSD and .WSDL files.
The payload I am sending to an HTTP site looks like this :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:Order xmlns:ns1="rrn:org.xcbl:schemas/xcbl/v3_5/xcbl35.xsd">
- <ns1:OrderHeader>
- <ns1:OrderNumber>
<ns1:BuyerOrderNumber>2000032962</ns1:BuyerOrderNumber>
</ns1:OrderNumber>
<ns1:OrderIssueDate>2005-10-18</ns1:OrderIssueDate>
</ns1:OrderHeader>
</ns1:Order>
But I need a XLM without namespace prefix like this:
<?xml version="1.0" encoding="UTF-8" ?>
- <Order xmlns:ns1="rrn:org.xcbl:schemas/xcbl/v3_5/xcbl35.xsd">
- <OrderHeader>
- <OrderNumber>
<:BuyerOrderNumber>2000032962</ns1:BuyerOrderNumber>
<OrderNumber>
<OrderIssueDate>2005-10-18</ns1:OrderIssueDate>
<OrderHeader>
<Order>
How can I do this,
Thank's.
Fernando
Technically the XML messages are the same with or without namespace prefixes. So there should not be any problem at the receiver site.
If the receiver does not accept namespace prefix at all, you can eliminate them with the XMLAnonymizerBean.
/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
If you have not upgraded to SP14 (XI 3.0) so far, you need to write an own Java mapping or adapter module or XSLT mapping to get rid of the prefixes.
Regards
Stefan
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 used XMLAnonymizerBean of the right way and worked fine. (BPM -> File).
Thank's a lot.
No, I need to use XMLAnonymizerBean also with sender soap adapter. But in your blog you say: <i>"Note: It is not possible to use this module in the sender SOAP adapter as this adapter type does not support any additional modules."</i>
But Renjith comments above:
<i>"I thought you can use adapter modules in any adapter"</i>
Can we user XMLAnonymizerBean to sender SOAP adapter?
Best regards,
Fernando
HI Fernando,
That was my unerstanding, only after seeing your reply did i check stefan's blog....
since he has particularly noted that the additional adapter modules cannot be used in SOAP sender channel..it must be right...
Thanks,
Renjith
Note : it was totally my mistake
and stefan is correct...please check the help link and it clearly says that we cannot use additional adapter modules for soap sender adapter...
http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/frameset.htm
Message was edited by:
Renjith Andrews
Hi Fernando,
You can remove the namespace prefixes using an XSLT mapping if they are causing problems with applications outside of XI.
Try the following code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.arconw.com/XI/XSLT_Library/XmlNamespacePrefixRemoval"
version="1.0">
<xsl:output method = "xml" />
<xsl:template match="/">
<xsl:apply-templates select="*" mode="remprefix"/>
</xsl:template>
<xsl:template match="*" mode="remprefix">
<xsl:variable name="newname" select="local-name(.)"/>
<xsl:element name="{$newname}" namespace ="{namespace-uri()}">
<xsl:apply-templates mode="copyall" select="@*|comment()|processing-instruction()|text()"/>
<xsl:apply-templates select="*" mode="remprefix"/>
</xsl:element>
</xsl:template>
<xsl:template mode="copyall" match="@*|comment()|processing-instruction()|text()">
<xsl:copy>
<xsl:apply-templates mode="copyall" select="@*|comment()|processing-instruction()|text()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Please assign forum points if you find this useful ***
Thanks,
Paul D.
Message was edited by:
Paul Digance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
remove the namespace in our Message Type
Regards
Sreeram.G.Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fernando,
see you have .XSD files.....open your .XSD file in notepad..........here you will see your namespaces.......remove namespaces where you dont want.....save your .XSD files.....then in External defintiotn import this last file......then your namespaces will be removed....
Thanks,
Rajeev Gupta
Message was edited by:
RAJEEV GUPTA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
check question:
12. I have a problem with namespaces in XI - Is there a way to remove them?
on the XI FAQ page
but this will only work if you work with data types (and message types)
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.