DTN ProphetX® Web Services

New Rest Interface

ProphetX Web Services now supports a new REST and JSON based interface with a OpenAPI / Swagger specification.
The documentation spec can be found here: OpenAPI Specification The rest of this page describes the older SOAP based interfaces for PXWeb.

SOAP Connectivity Overview

SOAP is not enabled by default in PXWeb. If you need to use SOAP requests, please contact your sales representative or PXWeb support to have SOAP activated.

There are two main items to consider when writing a SOAP client program for PXWeb:

All code samples in this overview are written in C# but there is sample code in other languages in the rest of the connectivity section.

DTO vs. STD Invocation

The two mechanisms supported for invocation have different advantages and disadvantages.

DTO

DTO stands for "Data Transfer Object" and it is based on passing an object, the DTO, as the only parameter on the call to a web services operation. The actual values required by the operation are passed as attributes of the DTO.

    // Prepare parameter object
    GetMarketScansDto request = new GetMarketScansDto() {
       UserID="user", Password="pswd", Limit="10"
    };
    
    // Call PXWeb operation and receive an XML element as the result
    XmlElement xml = client.GetMarketScans( request );
	

When using this method, optional parameters do not need to be set explicitly unless the default value is not adequate for the current need.

One advantage of this method is that there is not need to change the code on the client side if PXWeb adds new parameters to the same operation.  The client side would need to be modified only if there is interest in using the new parameters with a value different from the default value.

STD

In a STD call, the values required by the operation are passed directly in the call.

    // Call PXWeb operation and receive an XML element as the result
    XmlElement xml = client.GetMarketScans( "user", "pswd", "", "", "", "10" );
	

This method of invocation is relatively simpler.  However, all parameters need to be explicitly passed including the optional ones, which can be entered as empty strings.

The recommendation is to use the DTO based request, which protects better the investment on the client side development from future changes on the service.

XML Element vs. XML String

PXWeb is able to return the result in any of two forms.

XML Element

The result is an XML element, which can be handled using XML oriented facilities of the client environment.

    // Call PXWeb operation and receive an XML Element as the result
    XmlElement xml = client.GetMarketScans( request );

    // Convert to XML string
    string response = xml.InnerXml;
	

XML String

The result is basically a string containing XML text, which can be managed using string handling facilities of the client environment.

    // Call PXWeb operation and receive an XML string as the result
    string response = client.GetMarketScans( request );

    // Convert to XML document
    XmlDocument xml = new XmlDocument();
    xml.LoadXml( response );
	

Web Services

PXWeb supports the same set of operations on four SOAP web services and the difference between each one relies on the type of connectivity, invocation or return type.

URLs

Each web service is exposed via a different URL as follows:

URLProtocolRequest TypeResponse Type
https://pxweb.dtn.com/PXWebSvc/PXServiceDto.svc?wsdl SOAP Data Transfer Object (DTO) XML string
https://pxweb.dtn.com/PXWebSvc/PXServiceDtoXml.svc?wsdl SOAP Data Transfer Object (DTO) XML element
https://pxweb.dtn.com/PXWebSvc/PXServiceStd.svc?wsdl SOAP List of parameters XML string
https://pxweb.dtn.com/PXWebSvc/PXServiceStdXml.svc?wsdl SOAP List of parameters XML element

EndPoints

The SOAP based services expose the following endpoints:

EndpointDescription
BasicHttpSSLBased on SOAP 1.1 with SSL support
WsHttpSSLBased on SOAP 1.2 with SSL support