function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BomanBoman 

SOAP WS invocation returns incorrect Boolean response

This what the external WS sends out as a response:

 

<?xml version="1.0" encoding="UTF-8" standalone="no" ?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.xyzsite.com/XsdFromWsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><tns1:ReleaseTicketResponse xmlns:tns1="http://tempuri.org/"><tns1:ReleaseTicketResult xmlns:ns="http://www.w3.org/2001/XMLSchema" xsi:type="ns:boolean">1</tns1:ReleaseTicketResult>

 

But, in SFDC, the response I receive (instead of being a TRUE, since 1 = TRUE) shows ReleaseTicketResult as FALSE. Any suggestions? Thanks.

 

WebService.ReleaseTicketResponse_element:[ReleaseTicketResult=false, ReleaseTicketResult_type_info=(ReleaseTicketResult, http://www.w3.org/2001/XMLSchema, boolean, 1, 1, false), apex_schema_type_info=(http://tempuri.org/, true, false), field_order_type_info=(ReleaseTicketResult)
SuperfellSuperfell

This looks to be a bug in callouts. (I've passed it on to the relevant team) You might be able to work around it by changing the wsdl to say its a string and handling the conversion yourself, but this might not work as the element has an explicit xsi:type on it.