# Sage X3 SOAP Web Service Request Generator for run, read and save

> Source: https://netray.co/tools/sage-x3-soap-web-service-request-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Generate ready-to-post SOAP envelopes for the Sage X3 generic web service (CAdxWebServiceXmlCC): run a subprogram, read an object by key, or save an object.

## Category

other-erp

## Erp

Sage X3

## Audience

- Sage X3 developer
- Integration developer

## Tool

**Kind:** template

**Output:** code

**Language:** xml

**Fields:**

#### Syracuse server

**Key:** host

**Type:** text

**Default:** x3web01

#### Syracuse port

**Key:** port

**Type:** text

**Default:** 8124

#### Language code (codeLang)

**Key:** code_lang

**Type:** text

**Default:** ENG

#### Pool alias (poolAlias)

**Key:** pool_alias

**Type:** text

**Default:** WSDEMO

#### requestConfig

**Key:** request_config

**Type:** text

**Default:** adxwss.optreturn=JSON&adxwss.beautify=true

#### Subprogram publication (run)

**Key:** public_name_run

**Type:** text

**Default:** YGETSTOCK

#### Input XML for run

**Key:** input_xml

**Type:** textarea

**Default:** <PARAM><GRP ID="GRP1"><FLD NAME="ITMREF">A100</FLD><FLD NAME="STOFCY">FR011</FLD></GRP></PARAM>

#### Object publication (read/save)

**Key:** public_name_obj

**Type:** text

**Default:** YSOH

#### Key field (read)

**Key:** key_name

**Type:** text

**Default:** SOHNUM

#### Key value (read)

**Key:** key_value

**Type:** text

**Default:** SO-00012

#### Object XML for save

**Key:** object_xml

**Type:** textarea

**Default:** <PARAM><GRP ID="SOH0_1"><FLD NAME="SALFCY">FR011</FLD><FLD NAME="SOHTYP">SON</FLD><FLD NAME="BPCORD">C001</FLD></GRP><TAB ID="SOH4_1"><LIN><FLD NAME="ITMREF">A100</FLD><FLD NAME="QTY">5</FLD></LIN></TAB></PARAM>

**Blocks:**

#### Endpoint

**Body:** POST http://{{host}}:{{port}}/soap-generic/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Authorization: Basic <base64 of user:password>

<!-- WSDL: http://{{host}}:{{port}}/soap-wsdl/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC?wsdl -->

#### run: call a published subprogram

**Body:** <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">{{code_lang}}</codeLang>
        <poolAlias xsi:type="xsd:string">{{pool_alias}}</poolAlias>
        <poolId xsi:type="xsd:string"></poolId>
        <requestConfig xsi:type="xsd:string"><![CDATA[{{request_config}}]]></requestConfig>
      </callContext>
      <publicName xsi:type="xsd:string">{{public_name_run}}</publicName>
      <inputXml xsi:type="xsd:string"><![CDATA[{{input_xml}}]]></inputXml>
    </wss:run>
  </soapenv:Body>
</soapenv:Envelope>

#### read: one object by key

**Body:** <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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wss="http://www.adonix.com/WSS">
  <soapenv:Header/>
  <soapenv:Body>
    <wss:read soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <callContext xsi:type="wss:CAdxCallContext">
        <codeLang xsi:type="xsd:string">{{code_lang}}</codeLang>
        <poolAlias xsi:type="xsd:string">{{pool_alias}}</poolAlias>
        <poolId xsi:type="xsd:string"></poolId>
        <requestConfig xsi:type="xsd:string"><![CDATA[{{request_config}}]]></requestConfig>
      </callContext>
      <publicName xsi:type="xsd:string">{{public_name_obj}}</publicName>
      <objectKeys xsi:type="wss:ArrayOfCAdxParamKeyValue" soapenc:arrayType="wss:CAdxParamKeyValue[]">
        <key xsi:type="wss:CAdxParamKeyValue">
          <key xsi:type="xsd:string">{{key_name}}</key>
          <value xsi:type="xsd:string">{{key_value}}</value>
        </key>
      </objectKeys>
    </wss:read>
  </soapenv:Body>
</soapenv:Envelope>

#### save: create an object

**Body:** <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:save soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <callContext xsi:type="wss:CAdxCallContext">
        <codeLang xsi:type="xsd:string">{{code_lang}}</codeLang>
        <poolAlias xsi:type="xsd:string">{{pool_alias}}</poolAlias>
        <poolId xsi:type="xsd:string"></poolId>
        <requestConfig xsi:type="xsd:string"><![CDATA[{{request_config}}]]></requestConfig>
      </callContext>
      <publicName xsi:type="xsd:string">{{public_name_obj}}</publicName>
      <objectXml xsi:type="xsd:string"><![CDATA[{{object_xml}}]]></objectXml>
    </wss:save>
  </soapenv:Body>
</soapenv:Envelope>

**Notes:** Operation names and parameter order (run: callContext, publicName, inputXml; read: callContext, publicName, objectKeys; save: callContext, publicName, objectXml), the http://www.adonix.com/WSS namespace and the soap-generic endpoint match the CAdxWebServiceXmlCC WSDL and the V12 SOAP help. The GRP, TAB and FLD names in the sample payloads are placeholders: take the real ones from getDescription or the publication in GESAWE. codeUser and password in callContext are deprecated; the user comes from the Syracuse login and the endpoint login map.

## Content

**Intro:** This generator builds SOAP envelopes for the Sage X3 V7+ generic web service CAdxWebServiceXmlCC: run for a published subprogram, read for an object by key, and save to create an object. It also gives the endpoint and WSDL URLs for an on-premises Syracuse server.

**Sections:**

#### How to use it

**Body:** Enter the Syracuse host and port, the pool alias of a started web service pool, the language and the publication names. Paste the run, read or save envelope into SoapUI, Postman or your integration code and post it to the endpoint with basic authentication. Start with read on a known key: if that works, pool, user and publication are all correct, and any later problem is in your payload.

**Bullets:**

- requestConfig adxwss.optreturn=JSON returns resultXml as JSON.
- adxwss.trace.on=on gives verbose traces while you debug.
- Keep the payload inside CDATA so it is not parsed as SOAP.

#### Where this lives in Sage X3

**Body:** Publications are created in Development > Utilities > Web services (GESAWE) for objects, subprograms and import templates, and each must be published before it can be called. Pools are configured in Syracuse Administration > Web services; poolAlias in the callContext must match the alias of a started pool. The WSDL at /soap-wsdl/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC?wsdl lists all operations: run, save, delete, read, query, getDescription, modify, actionObject and the line operations.

#### Worked example

**Body:** A publication YSOH of the sales order object, read with key SOHNUM = SO-00012, returns status 1 and the order in resultXml, grouped by the publication's GRP and TAB IDs. To create an order, call getDescription on YSOH first to see the exact group and field names, then fill the save payload: header fields in a GRP, lines in a TAB with one LIN per line. A status of 0 means failure; read the messages array for the reason, which is usually a mandatory field or a control in the entry transaction.

#### Version differences and gotchas

**Body:** In V6 the callContext carried codeUser and password; from V7 these are ignored and the user comes from the HTTP authentication and the endpoint login map. Send codeLang with a language code that exists in the folder, such as ENG. Pools have a fixed number of channels, so bulk loads should be throttled or the pool sized up. Republish the web service after any change to the object, screen or subprogram, especially after a patch or update.

**Cta:** If you want SOAP and REST calls to Sage X3 wrapped as safe, approved actions for a private AI assistant on your servers, we can set that up.

**Faq:**

#### What is CAdxWebServiceXmlCC in Sage X3?

**Answer:** It is the generic SOAP web service of Sage X3 V7 and later, served by Syracuse at /soap-generic/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC. One endpoint handles every publication: you name the publication in publicName and choose the operation, such as run, read, query or save.

#### What is poolAlias in a Sage X3 SOAP call?

**Answer:** poolAlias is mandatory and must equal the alias of a web service pool configured and started in Syracuse Administration > Web services. The pool holds pre-started X3 sessions for one endpoint, which is how the call reaches the right folder. A wrong or stopped pool gives an error before your publication runs.

#### How do I pass a key to the Sage X3 read operation?

**Answer:** Use objectKeys, an array of CAdxParamKeyValue items, each with a key element holding the field name and a value element holding its value, for example SOHNUM and SO-00012. For objects with composite keys, add one item per key field in key order.

#### Can Salesforce integrate with Sage X3 through SOAP?

**Answer:** Yes, usually through middleware that calls CAdxWebServiceXmlCC: read and query publications to sync customers, items and prices, and save on the sales order publication to create orders. Keep Syracuse inside your network, give the integration its own user and pool, and log every request and resultXml.

## Search terms

sage x3 api soap, sage x3 soap web service, cadxwebservicexmlcc, integrating sage x3, sage x3 api integration, sage x3 integration, salesforce sage x3 integration, sage x3 web services pool

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
