Skip to content
Developerhome
X3

Example of importing a customer in real time

  Less than to read

This example illustrates the import of one customer.


The data for the file-based import would look like this:

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

SOAP Request

<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>    /** AOWSIMPORT = web service name **/
      <inputXml xsi:type="xsd:string">
        <![CDATA[{
          "GRP1": {
            "I_MODIMP": "BPC",       /** import template **/
            "I_AOWSTA": "NO",        /** do not use temp storage space **/
            "I_EXEC": "REALTIME",    /** execute the import immediately **/
            "I_RECORDSEP": "|",      /** record separator **/
            "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>

SOAP Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wss="http://www.adonix.com/WSS">
   <soapenv:Body>
      <runResponse>
         <runReturn xsi:type="wss:CAdxResultXml">
            <resultXml xsi:type="xsd:string">{
              "GRP1": {
                "I_MODIMP": "BPC",
                "I_AOWSTA": "NO",
                "I_EXEC": "REALTIME",
                "I_RECORDSEP": "|",
                "I_FILE": "",
                "O_REQNUM": "0",    /** no query number because import was real-time **/
                "O_STATUS": "0",    /** no web service error **/
                "O_MESSA": ""       /** no error message **/
              }
            }</resultXml>
            <messages xsi:type="soapenc:Array" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" soapenc:arrayType="wss:CAdxMessage[1]">
               <messages href="#id0"/>
            </messages>
            <status xsi:type="xsd:int">1</status>
            <technicalInfos xsi:type="wss:CAdxTechnicalInfos">
               <busy xsi:type="xsd:boolean">false</busy>
               <changeLanguage xsi:type="xsd:boolean">false</changeLanguage>
               <changeUserId xsi:type="xsd:boolean">false</changeUserId>
               <flushAdx xsi:type="xsd:boolean">false</flushAdx>
               <loadWebsDuration xsi:type="xsd:double">168</loadWebsDuration>
               <nbDistributionCycle xsi:type="xsd:int">-1</nbDistributionCycle>
               <poolDistribDuration xsi:type="xsd:double">1</poolDistribDuration>
               <poolEntryIdx xsi:type="xsd:int">4392</poolEntryIdx>
               <poolExecDuration xsi:type="xsd:double">12007</poolExecDuration>
               <poolRequestDuration xsi:type="xsd:double">-1</poolRequestDuration>
               <poolWaitDuration xsi:type="xsd:double">83</poolWaitDuration>
               <processReport xsi:type="xsd:string" xsi:nil="true"/>
               <processReportSize xsi:type="xsd:int">-1</processReportSize>
               <reloadWebs xsi:type="xsd:boolean">false</reloadWebs>
               <resumitAfterDBOpen xsi:type="xsd:boolean">false</resumitAfterDBOpen>
               <rowInDistribStack xsi:type="xsd:int" xsi:nil="true"/>
               <totalDuration xsi:type="xsd:double">12343</totalDuration>
               <traceRequest xsi:type="xsd:string"/>
               <traceRequestSize xsi:type="xsd:int">0</traceRequestSize>
            </technicalInfos>
         </runReturn>
      </runResponse>
      <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="wss:CAdxMessage">
         <type>1</type>                             /** 1 = warning/information **/
         <message>Update of . . . OL10</message>    /** customer existed so this was an update **/
      </multiRef>
   </soapenv:Body>
</soapenv:Envelope>