DTN ProphetX® Web Services

Connectivity Overview

PXWeb supports different options for connectivity, which are based on commonly accepted industry standards.

There are three main items to consider when writing a 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 five 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
https://pxweb.dtn.com/PXWebSvc/PXServiceWeb.svc HTTP/GET HTTP query format XML string

Note: The HTTP/GET invocation to PXWeb has a limit of 2048 characters in the length of the request string.

EndPoints

The SOAP based services expose the following endpoints:

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