Skip to content
Developerhome
X3

Example of exporting in real time with a parameter error

  Less than to read

This example demonstrates exporting all customers, with an error due to an invalid input parameter value: I_EXEC is incorrect.


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">AOWSEXPORT</publicName>    /** AOWSEXPORT = web service name **/
      <inputXml xsi:type="xsd:string">
        <![CDATA[{
          "GRP1": {
            "I_MODEXP": "BPC",       /** export template **/
            "I_CHRONO": "NO"         /** do not use chrono management **/
          },
          "GRP2": [
            {
              "I_TCRITERE": "1=1"    /** selection criteria **/
            }
          ],
          "GRP3": {
            "I_EXEC": "REAL",        /** invalid value for execution type **/
            "I_RECORDSEP": "|        /** record separator **/
          }
        }]]>
      </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>
      <wss:runResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <runReturn xsi:type="wss:CAdxResultXml">
            <messages xsi:type="soapenc:Array" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" soapenc:arrayType="wss:CAdxMessage[0]"/>
            <resultXml xsi:type="xsd:string">{
              "GRP1": {
                "I_MODEXP": "BPC",
                "I_CHRONO": "NO"
              },
              "GRP2": [
                {
                  "I_TCRITERE": "[F:BPC]BPCNUM='AO001'"
                },
                {
                  "I_TCRITERE": "1=1"
                }
              ],
              "GRP3": {
                "I_EXEC": "REAL",
                "I_RECORDSEP": "|",
                "O_FILE": "",
                "O_REQNUM": "0",        /** no query number because import was real-time **/
                "O_STATUS": "4",        /** 4 = web service error occurred **/
                "O_MESSA": "The possible values for the I_EXEC parameter are BATCH and REALTIME"
              }
            }</resultXml>
            <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">57</loadWebsDuration>
               <nbDistributionCycle xsi:type="xsd:int">-1</nbDistributionCycle>
               <poolDistribDuration xsi:type="xsd:double">1034</poolDistribDuration>
               <poolEntryIdx xsi:type="xsd:int">7376</poolEntryIdx>
               <poolExecDuration xsi:type="xsd:double">92</poolExecDuration>
               <poolRequestDuration xsi:type="xsd:double">-1</poolRequestDuration>
               <poolWaitDuration xsi:type="xsd:double">111</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">1320</totalDuration>
               <traceRequest xsi:type="xsd:string"/>
               <traceRequestSize xsi:type="xsd:int">0</traceRequestSize>
            </technicalInfos>
         </runReturn>
      </wss:runResponse>
   </soapenv:Body>
</soapenv:Envelope>