on 08-04-2009 8:12 AM
Hello All,
I have a problem with target namescape prefix.
Output xml contains ns:1 where as i want this to be ns:0
I have a XSD Vendor on target side and RFC struture in source side.I found in Message mapping itself 1st field i.e. root node Vendor coming as
ns:1Vendor
Can anyone help me how i can change this.
Regards,
Vikrant
> I have a problem with target namescape prefix.
> Output xml contains ns:1 where as i want this to be ns:0
You need not change this. It does not matter what prefix you have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vikrant,
One way is to develop the custom adapter module, read the payload content into a string by using getText() method, replace the prefix ns:1 to ns:0 and set the payload back by using the method setText()
Regards,
Chandra Shekhar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Use Custom Adapter Module and use Java Method ReplaceAll ( ns0:, ns1:);
It will replace all values or nodes with ns0: by ns1:
This will be more precise and can be achievable at one go.
Regards,
Anurag Garg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried an end-to-end configuration without changing anything?
This namespace should not matter actually. Do your receiver side only accepts ns:0?
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kaushik,
You can try using XMLAnonymizerBean as mentioned by stefan in this blog:
/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
else you can open your target xsd and change the prefix of the namespace which should take care of this.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My target xsd looks like as below
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:novartis.com:pi:test:SHAHSH7" targetNamespace="urn:novartis.com:pi:test:SHAHSH7">
<xsd:element name="Vendors" type="Vendors" />
<xsd:complexType name="Vendors">
<xsd:sequence>
<xsd:element name="Vendor" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Vendor_No" type="xsd:string" minOccurs="0">
</xsd:element>
<xsd:element name="Active_Ind_01" type="xsd:string" minOccurs="0">
</xsd:element>
<xsd:element name="Active_Ind_02" type="xsd:string" minOccurs="0">
.
.
Can you please let me know where i can make a change which will refelect this .
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.