on 03-23-2010 3:48 PM
Hi experts,
Is there any way of extracting an xsd file from an wsdl definition?Is it possible to extract the WSDL inline XSD into an external XSD file?
I want to achieve that because I need removing the namespace prefix from the XML tags when trying to map an external definition in PI.
In my integration I have a really complex xml incoming from the web service. And it is exposed as a main WSDL where it is defined the header of the XML and many imports of XSD definitions begining like this:
[.......]
<wsdl:types>
<xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ccccc" xmlns:ns0="http://com.xxxxxx" xmlns:ns1="http://com.yyyyy" elementFormDefault="unqualified">
<xsd:import schemaLocation="file1.xsd" namespace="http://com.xxxxxx"/>
<xsd:import schemaLocation="file2.xsd" namespace="http://com.yyyyy"/>
[.......]
<xsd:complexType name="oneOfThese">
<xsd:choice>
<xsd:element ref="ns0:file1"/>
<xsd:element ref="ns1:file2"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="getProductResponseType">
<xsd:sequence>
[.......]
<xsd:element name="product" nillable="true" type="tns:oneOfThese"/>
</xsd:sequence>
</xsd:complexType>
So, when I get the external definition to a message mapping the imported schemas (file1.xsd, file2.xsd) get the namespace definition in his tags:
<ok/>
<errorCode/>
<errorDescription/>
<internalCode/>
<product>
<ns1:informeFinanciero xmlns:ns1="http://com.repsol.informa.contabilidad/schema/informeFinanciero">
<ns1:identificacionLocalizacion>
<ns1:identificacion>
<ns1:tipoIdentificaciones>
<ns1:tipologia/>
<ns1:valor/>
</ns1:tipoIdentificacion>
</ns1:tipoIdentificaciones>
</product>
So as you can see the mapping expects the xml with the namespace prefix ( <ns1:name> ) in the tags.
My problem is that I need my xml without this tags in the message mapping. I know that if taking the XSD imported definition instead the WSDL it works.
So my question is:
Is there any way of doing the mapping to not expect the namespace prefix?
Regards
Gonzalo
Edited by: Gonzalo del Castillo on Mar 23, 2010 4:48 PM
Hi Gonzalo,
I dont think even if you convert into xsd it will go. The best would be to use XMLAnonymizerBean in your sender communication channel. Please see stefans blog for this:
/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.