SOAP Web services import/export example

Test environment

This example is shown from a Sage X3 test environment.


Important:

  • This test is done with the SEED endpoint and folder.
  • The given values are valid within the SEED test folder. They are not accurate for a live production folder.

Classic function SOAP pools configuration

  1. Create the POOL web service SEED
    • Alias: Name of the POOL
    • Maximum size: Maximum number of SOAP web services sessions (1 is perfect for a test endpoint)
    • Initialisation size: Number of SOAP web service sessions at the starting of Web server (1 is perfect for a test endpoint)
    • Auto start: Set to On. The pool starts when the web server is starting.
    • Stopped manually: Authorization to stop this pool manually
    • Endpoint
    • Locale and User: Used for launching SOAP web services sessions
  2. Start the POOL web service
  3. Check the pool status
    • The W0 node process is available
    • The web service session PID is 9192

Use the SoapUI testing tool

Soapui is an advanced REST and SOAP testing tool.

  1. Go to the SoapUI website
  2. Download the SoapUI Open Source version
  3. Install it either on the Sage X3 server or on your machine using the Easy Windows setup

Export: AOWSEXPORT

  1. Create a SOAP project
  2. Set Sage X3 SOAP web service WSDL the following way:
    http://name-of-X3-web-server:port/soap-wsdl/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC?wsdl
  3. Click OK
  4. Open Request1 for the Run web service operation
  5. Add a basic authentication to call the web service
    Note: In a live environment it is better to use an authentication with an ssl certificate.




  6. Click OK



    • Username: web server user
    • Passwd: web server password
    • Pre-emptive auth: authenticate pre-emptively
  7. Update the xml imput stream
    • codeLang: web service call language
    • poolAlias: web service pool name
    • requestConfig: web service call configuration
      • adxwss.optreturn = JSON or XML: Web service result format
      • adxwss.beautify = true or false: Gives a CRLF in the result of web service
    • publicName: SOAP web service name
    • inputXml: the input stream with JSON or XML format. Set the value to {}
  8. Click Execute.


    • status: 0=NOK or 1=OK
    • resultXml: Web service result in XML or JSON format. It depends of the requestConfig tag.
  9. Copy the resultxml tag value and copy to the inputxml tag
  10. Update the input xml for keep the mandatory tags
    ``` { "GRP1": { "I_MODEXP": "ITM", "I_CHRONO": "NO" }, "GRP2" : [ {"I_TCRITERE" : "ITMSTA=1"}, {"I_TCRITERE" : "1=1"} ], "GRP3": { "I_EXEC": "REALTIME", "I_RECORDSEP": "|" } } ```
    • I_MODEXP: Template export
    • I_CHRONO: No chrono management
    • Array of I_TCRITERE, see the Export interactive function
      The json array is similar to the criteria array in the function.
  11. Execute the web service with the right values
    1. O_FILE: content of the export file with | instead of CRLF