This is Part 3 of a 5 part series on creating and consuming web services for Sage X3 Version 12. This part will focus on creating web services. In Part 1 we discussed setup of a Sage X3 Web Services Pool, and in Part 2 we discussed creating and publishing web services based on X3 objects and subprograms.
Sage X3 Web Services can be tested in an interactive mode, to view the call parameters, make test calls and view the results. The web service tester in Version 12 resides within the X3 menu.
1. Log on to the Sage X3 web client.
2. Navigate to Administration > Administration > Administration > Web Services > Classic SOAP Web services.
3. Below is the initial screen for the web services tester. Click the highlighted link to display the STUB.
4. At the top right section of the screen is a field called “Url”. This is the URL that will be used to consume the SOAP web services. Right-click on the Url and select Copy to get the full URL link for the X3 instance.
5. Click the down arrow to expand the operations list.
6. Below is the list of operations.
7. The most commonly used operations are:
3. From the Actions menu, click Invoke.
4. The web services XML description will be displayed. This can provide useful information for consuming the web service.
There are several different operations that can be called when using an object based web service. The most commonly used operations are displayed below.
The Query operation allows you to query and return the left list of an object. The left list is the selection list on the left portion of an object window.
1. From the web service operations, click the query link.3. From the Actions menu, click Invoke.
4.The web services XML result will be displayed. Below is a subset of the results.
The Read operation allows you to read and object by record key. It returns all of the fields you would normally see on the object window in an XML format.
1. From the web service operations, click the read link.
2. This will open the window to run the web service. Enter the fields as shown below.
3. From the Actions menu, click Invoke.
4. The web services XML result will be displayed. Below is a subset of the results. The GRP IDs in the XML represent the Screen IDs in X3.
The save operation allows you to create a new record based on an object. From the web service operations, click the save link.
1. This will open the window to run the web service. Enter the fields as shown below.
2. From the Actions menu, click Invoke.
3. The web services XML result will be displayed. When creating a new record, the new SOHNUM will be included in the result XML. Below is a subset of the results.
The modify operation allows you to modify an existing record based on an object.
From the web service operations, click the save link.
1. This will open the window to run the web service. Enter the fields as shown below.
2. From the Actions menu, click Invoke.
3. The web services XML result will be displayed.
1. From the web service operations, click the run link.
3. From the Actions menu, click Invoke.
4. The web services XML result will be displayed. Below is a subset of the results.
You have now learned how to use the web services tester to test both object-based and subprogram-based web services. This information is useful to ensure that the web services are working, and also to test the XML payload and results of the web services, which his helpful when calling the web services from code, such as .Net, Java and PHP.
Day 1 - Creating a Classic SOAP Pool
Day 2 - Creating and Publishing Web Services
Day 4- Consuming Web Services in .NET
Day 5 - Consuming X3 Subprogram Web Services from .Net
Contact us if you want to learn more about Sage ERP X3 Web Services features or to request help with your system.