TWAHIRWA TWAHIRWA Posted April 24 Share Posted April 24 I’m learning about using web services for data import, and I have a question. I looked at the “Import one customer” example, but my question is: how can I automate this process? Considering that in the XML file, under the section GRP1, the I_FILE field contains hardcoded customer data for import, is it possible to specify a URL pointing to a file hosted on a server instead? <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wss="http://www.adonix.com/WSS"> <soapenv:Header/> <soapenv:Body> <wss:run soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <callContext xsi:type="wss:CAdxCallContext"> <codeLang xsi:type="xsd:string">ENG</codeLang> <poolAlias xsi:type="xsd:string">IMPORT-EXPORT</poolAlias> <poolId xsi:type="xsd:string"></poolId> <requestConfig xsi:type="xsd:string"> <![CDATA[adxwss.optreturn=JSON&adxwss.beautify=true&adxwss.trace.on=off]]> </requestConfig> </callContext> <publicName xsi:type="xsd:string">AOWSIMPORT</publicName> <inputXml xsi:type="xsd:string"> <![CDATA[{ "GRP1": { "I_MODIMP": "BPC", "I_AOWSTA": "NO", "I_EXEC": "REALTIME", "I_RECORDSEP": "|", "I_FILE":"B;FR;OL10;Urban Cycle;UrbanCycle;SA;001;001;001;001;EUR;49120544900011;349;FR22491205449;FR001;FRA;CH30NETEOM;LOCAL;700;700;610000;1;FR251;;;;;|A;001;Urban Cycle;35, Chaussée de la Madeleine;;;44000;NANTES;FR;251899270;251899278|A;002;U.C. Dépot;2 Boulevard Arcole;;;31000;TOULOUSE;FR;066581312;|D;001;Urban Cycle;FR251;3;FR201;EXW;2;;;;|R;FR;30004480581456789012313;BNP Paribas|END" } }]]> </inputXml> </wss:run> </soapenv:Body> </soapenv:Envelope> What is the benefit of using this import method when we can simply use the BPC model for direct import in Import/Export ? I don’t quite understand how we can automate imports via a webservice constructed in this way; do you have any examples ? Link to comment Share on other sites More sharing options...
Alex Lamarca Tió Posted April 25 Share Posted April 25 Hi Twahirwa, I would say that the advantage of using this method, instead of files, is that actually you do not need to manage physical files for the import/export. You can build the I_FILE in your code, and then call the API to perform the import/export, without having to create a file. Hope it helps, best regards, Alex 2 Link to comment Share on other sites More sharing options...
Ribas Aloy, Marc Posted June 4 Share Posted June 4 Hi Twahirwa, Providing URL pointing to a file is not supported. You should instead design the web service client app to manage the access to that URL and populate the I_FILE field with the contents (replacing CRLF by Pipe chars) and then invoke the web service. Please note that this WS can be invoked in either REALTIME or BATCH. If you invoke it in BATCH mode the response time will be much faster and you will get the Batch Req nb to retrieve later on to check the status of the import that will be automatically managed by batch. You have further information in the online help: Import export SOAP web service | (sageerpx3.com) Regards, 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now