You need to sign in to do that
Don't have an account?
kevindotcar
Soap err I can't seem to get around
Hi all,
I'm trying to send the following SOAP msg:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<soapenv:Header> <ns1:SessionHeader soapenv:mustUnderstand='0'
xmlns:ns1='urn:enterprise.soap.sforce.com'>
<ns2:sessionId xmlns:ns2='urn:enterprise.soap.sforce.com'>AsNCSeX5jsUoLXQ=</ns2:sessionId>
</ns1:SessionHeader>
<ns3:QueryOptions soapenv:mustUnderstand='0' xmlns:ns3='SoapService'>
<ns4:batchSize xmlns:ns4='urn:enterprise.soap.sforce.com'>100</ns4:batchSize>
</ns3:QueryOptions> </soapenv:Header>
<soapenv:Body> <query xmlns='urn:enterprise.soap.sforce.com'>
<queryString>SELECT contactId, lastModifiedDate, Case_Reason__c,
Customer_Svc_Related__c FROM Case WHERE lastModifiedDate <= 2006-09-21T02:00:01Z
AND Customer_Svc_Related__c = 'Yes' AND isClosed = True
</queryString></query> </soapenv:Body> </soapenv:Envelope>
...And I get the response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmln
s:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSc
hema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>org.xml.sax.SAXParseException: The content of elements must cons
ist of well-formed character data or markup.</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
BUT- the weird part is if I make the "WHERE" clause
into "...lastModifiedDate >= 2006-09-21T02:00:01Z"
instead of "WHERE lastModifiedDate <= 2006-09-21T02:00:01Z" - it works fine-
Anyone have a fix or an alternative to this coding?
Thanks in advance.
KC
I'm trying to send the following SOAP msg:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<soapenv:Header> <ns1:SessionHeader soapenv:mustUnderstand='0'
xmlns:ns1='urn:enterprise.soap.sforce.com'>
<ns2:sessionId xmlns:ns2='urn:enterprise.soap.sforce.com'>AsNCSeX5jsUoLXQ=</ns2:sessionId>
</ns1:SessionHeader>
<ns3:QueryOptions soapenv:mustUnderstand='0' xmlns:ns3='SoapService'>
<ns4:batchSize xmlns:ns4='urn:enterprise.soap.sforce.com'>100</ns4:batchSize>
</ns3:QueryOptions> </soapenv:Header>
<soapenv:Body> <query xmlns='urn:enterprise.soap.sforce.com'>
<queryString>SELECT contactId, lastModifiedDate, Case_Reason__c,
Customer_Svc_Related__c FROM Case WHERE lastModifiedDate <= 2006-09-21T02:00:01Z
AND Customer_Svc_Related__c = 'Yes' AND isClosed = True
</queryString></query> </soapenv:Body> </soapenv:Envelope>
...And I get the response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmln
s:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSc
hema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>org.xml.sax.SAXParseException: The content of elements must cons
ist of well-formed character data or markup.</faultstring>
<detail/>
</soapenv:Fault>
</soapenv:Body>
BUT- the weird part is if I make the "WHERE" clause
into "...lastModifiedDate >= 2006-09-21T02:00:01Z"
instead of "WHERE lastModifiedDate <= 2006-09-21T02:00:01Z" - it works fine-
Anyone have a fix or an alternative to this coding?
Thanks in advance.
KC
>Standard XML rules apply, you need to encode <, > and & in character data.
>Cheers
>Simon
Hi Simon
Sorry- I don't know what this means; I'm just sending a SOAP request from Curl.
KC
Sorry again- I think I got it!
Thanks!
KC
For those finding this thread and still not sure of the answer:
use ">" for ">",
"<" for "<", etc
Ran into a strange problem when trying to display c-code in a browser: something like "x<9" would not display, but "x < 9" would (space after the "<".
FWIW