Server was unable to read request. There is an error in XML document. The string '' is not a valid AllXsd value.

Document created by tommy_conway636242 Employee on Apr 27, 2017Last modified by chris_stevens on Apr 28, 2017
Version 2Show Document
  • View in full screen mode

Issue

When making a call to an endpoint, an error occurs that may look something like this:

Server was unable to read request. ---> There is an error in XML document (4, 28). ---> The string '' is not a valid AllXsd value.

This occurs when you make the request and are sending parameters in, but one of the parameters is blank. For this example, if you used the Web Services SOAP Client connector and are using the 'DateParam' parameter, this parameter is sent using process properties in the parameter tab of the connector, but the property does not have a default value; therefore, it is not set before making the request.

 

When the request is sent, and the error is thrown, the request will look something like below, (where DateParam is blank):

<ns1:Envelope xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
<ns1:Body>
<ns2:GetProjects xmlns:ns2="http://Projects.KBA/">
<ns2:ProgramCode>123</ns2:ProgramCode>
<ns2:DateParam />
<ns2:Credentials>
<ns2:Username>Username</ns2:Username>
<ns2:Password>password</ns2:Password>
<ns2:DatabaseName>DBName</ns2:DatabaseName>
</ns2:Credentials>
</ns2:GetProjects>
</ns1:Body>
</ns1:Envelope>

 

Solution

The parameter being sent must have a value set. This can either be a static value when setting the parameter on the parameters tab, using a set properties shape to set a value for the property, or by making sure a default value is set in the property.

 

When the value is set, the request will look something like below, (DateParam now has a value):

<ns1:Envelope xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
<ns1:Body>
<ns2:GetProjects xmlns:ns2="http://Projects.KBA/">
<ns2:ProgramCode>123</ns2:ProgramCode>
<ns2:DateParam>2016-10-01T00:00:00.000-04:00</ns2:DateParam>
<ns2:DateParam />
<ns2:Credentials>
<ns2:Username>Username</ns2:Username>
<ns2:Password>password</ns2:Password>
<ns2:DatabaseName>DBName</ns2:DatabaseName>
</ns2:Credentials>
</ns2:GetProjects>
</ns1:Body>
</ns1:Envelope>

Attachments

    Outcomes