Abhishek C
Abhishek C

Reputation: 63

Getting Error while using VFS in WSO2 ESB

My configuration is trying to pick up a xml file (contents below).I coded a proxy service with VFS parameters (available below). However i am getting these errors during execution. The file is not getting picked up from the location.

Error message:

[2014-07-11 20:30:28,878] ERROR - VFSTransportListener Error processing File URI : file:///C:/wso2VFS/wso2Input/order_in.xml org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found Orderdetail

Input XML file (Order_in.txt)

<?xml version="1.0" encoding="UTF-8"?>
<Orderdetail xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:noNamespaceSchemaLocation='C:\wso2VFS\wso2Input\order_input.xsd'>
     <Order>
           <orderid>20000</orderid>
           <itemname>Apple iphone</itemname>
           <storenumber>6932</storenumber>
           <address>Mooresville</address>
           <zipcode>28117</zipcode>
           <ordertotal>6712</ordertotal>
     </Order>
</Orderdetail>

Upvotes: 1

Views: 681

Answers (1)

Jean-Michel
Jean-Michel

Reputation: 5946

You should specify the content type as application/xml inside your proxy definition, add this parameter :

<parameter name="transport.vfs.ContentType">application/xml</parameter>

Upvotes: 5

Related Questions