HI All,
Note: The above 'Removing or Adding Namespaces to XML with No Namespace' title is discussed Oracle File adapter documentation.The below question related to that explanation.But I am not able to understand it clearly about how to use that concept(how to create wrapper XSD and what is the actual.xsd).
And also I am giving all the history so that one can understand my whole problem.
This is the link where it is explained>
http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/nfb.htm#BGBBHIHG
The code snippet I have to use for inbound xmls that don't have namespace is below.
--wrapper.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="myNamespace"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
nxsd:version="DTD">
<include schemaLocation="actual.xsd"/>
</schema>
Question:
I have a requirement wherein I have to read a xml file without namespace in my BPEL process.
What I am doing : I have created XSD file based on client given xml file(which does not have any namespace and I have to
map the data in elements in that xml to a service( input variable)).
My xml file is like below(example file):
<?xml version="1.0" ?>
< Order>
< Origin>cali</Origin>
<CustNum>34</CustNum>.
< /Order>
If you see above xml file,the order element does not have any namespace(xmlns attribute).I am using same file to create XSD.
XSD file like below:
<?xml version="1.0" encoding="US-ASCII"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns="http://www.exaple.org"
targetNamespace="http://www.exaple.org'
elementFormDefault="qualified"
>
<xsd:element name="Order">
---------------------------------------
-------------------------------------------
all other elements here
</xsd:element>
</schema>
file which is creating the (default)namespace and target namespace as "http://www.example.org".That is being selected in the schema dialog 'native format translation wizard'.
When I do like this and use transform activity to map the values in the above xml files to third party service ,I am getting below response in EM console flowtrace:
-------------------------------------------------------------------
<InvokeService_Order_InputVariable>
<part name="body">
<Order>
<schemans2:Origin/>
<schemans2:CustNum/>
</Order>
</InvokeService_Order_InputVariable>
---------------------------------------------------------------------------------------------------------------------
I am not getting any mapped values.
But I think I am doing something wrong in selecting xsd file for inbound xml files.What I need to do create wrapper.xsd(above code snippet)
What is the actaul.xsd?Is it the schema which is created in jdeveloper by using inbound sample file like above xml file?
Can anybody explain me how to resolve this problem giving example taking above xml file?
Thank you very much in advance.