Respected Sir,

I have to read records from a file and insert them into Database tables.
Below are the tables into which records are to be inserted. All fields are
varchar.





I created dataservice named 'MDS_USERBUSINESS'(attached) for this.

Then created a proxy service named 'WriteToDB2.xml'(attached) which reads
data from input file 'inputfor_writeToDb.xml' (attached) converts it into
format required for dataservice and invokes data service.(attached)

I tried to hit the proxy service from  soapui. It inserted the data in db.



But when i trigger the same service via putting file in inputDB folder
using vfs. It is giving below error. Please guide.

[2018-03-22 11:48:49,412] [EI-Core] ERROR - DBInOutMessageReceiver Error in
in-out message receiver
DS Fault Message: Input Message and request_box Axis Operation didn't match.
DS Code: UNKNOWN_ERROR

at
org.wso2.carbon.dataservices.core.dispatch.DataServiceRequest.createDataServiceRequest(DataServiceRequest.java:96)

With Regards,
Aditya
<data disableLegacyBoxcarringMode="true" enableBatchRequests="true" enableBoxcarring="true" name="MDS_USERBUSINESS" transports="http https local">
   <config enableOData="false" id="USERBUSINESS_DSOURCE">
      <property name="carbon_datasource_name">MDS_insurance</property>
   </config>
   <query id="Bussiness" useConfig="USERBUSINESS_DSOURCE">
      <sql>INSERT INTO dbo.TAGNBUSINESS( ID, NAME, STREETADDRESS, POSTADDRESS, POSTOFFICE) VALUES (?,?,?,?,?)</sql>
      <param name="ID" sqlType="STRING"/>
      <param name="NAME" sqlType="STRING"/>
      <param name="STREETADDRESS" sqlType="STRING"/>
      <param name="POSTADDRESS" sqlType="STRING"/>
      <param name="POSTOFFICE" sqlType="STRING"/>
   </query>
   <query id="User" useConfig="USERBUSINESS_DSOURCE">
      <sql>INSERT INTO dbo.TAGNUSER( USERNAME, PASSWORD, NAME, TITLE, BUSINESSPLACE) VALUES (?,?,?,?,?)</sql>
      <param name="USERNAME" sqlType="STRING"/>
      <param name="PASSWORD" sqlType="STRING"/>
      <param name="NAME" sqlType="STRING"/>
      <param name="TITLE" sqlType="STRING"/>
      <param name="BUSINESSPLACE" sqlType="STRING"/>
   </query>
   <operation name="BussinessOp">
      <call-query href="Bussiness">
         <with-param name="ID" query-param="ID"/>
         <with-param name="NAME" query-param="NAME"/>
         <with-param name="STREETADDRESS" query-param="STREETADDRESS"/>
         <with-param name="POSTADDRESS" query-param="POSTADDRESS"/>
         <with-param name="POSTOFFICE" query-param="POSTOFFICE"/>
      </call-query>
   </operation>
   <operation name="UserOp">
      <call-query href="User">
         <with-param name="USERNAME" query-param="USERNAME"/>
         <with-param name="PASSWORD" query-param="PASSWORD"/>
         <with-param name="NAME" query-param="NAME"/>
         <with-param name="TITLE" query-param="TITLE"/>
         <with-param name="BUSINESSPLACE" query-param="BUSINESSPLACE"/>
      </call-query>
   </operation>
</data>
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse";
       name="WriteToDB2"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="vfs,http,https">
   <target>
      <inSequence>
         <log level="custom">
            <property name="property_name"
                      value="&#34;Inside FlatFile ***************************************** &#34;"/>
         </log>
         <property name="FORCE_SC_ACCEPTED"
                   scope="axis2"
                   type="STRING"
                   value="true"/>
         <property name="REST_URL_POSTFIX" scope="axis2" type="STRING" value=""/>
         <log description="" level="full"/>
         <datamapper config="gov:datamapper/InputforUserBusiness.dmc"
                     inputSchema="gov:datamapper/InputforUserBusiness_inputSchema.json"
                     inputType="XML"
                     outputSchema="gov:datamapper/InputforUserBusiness_outputSchema.json"
                     outputType="XML"/>
         <log level="full">
            <property name="message" value="after datamapper"/>
         </log>
         <header name="Action" scope="default" value="urn:request_box"/>
         <log level="full">
            <property name="property_name" value="After DataMapper ************************"/>
         </log>
      </inSequence>
      <outSequence/>
      <faultSequence/>
      <endpoint name="endpoint_urn_uuid_1FF78996948B9A0B6E14565751214774-1218279313">
         <wsdl port="SOAP11Endpoint"
               service="MDS_USERBUSINESS"
               uri="http://localhost:8280/services/MDS_USERBUSINESS?wsdl"/>
      </endpoint>
   </target>
   <parameter name="transport.PollInterval">50ms</parameter>
   <parameter name="transport.vfs.FileURI">file:///C:/Flatfile/inputDB</parameter>
   <parameter name="transport.vfs.ContentType">application/xml</parameter>
   <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
   <parameter name="transport.vfs.MoveAfterFailure">file:///C:/Flatfile/failure</parameter>
   <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
   <parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter>
   <parameter name="transport.vfs.Locking">disable</parameter>
   <parameter name="transport.vfs.MoveAfterProcess">file:///C:/Flatfile/orgFilesProcessedSuccessfully</parameter>
   <description/>
</proxy>
                                
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to