Quantcast
Channel: Topliners : All Content - All Communities
Viewing all articles
Browse latest Browse all 3423

SOAP Service API - Query Throws Error On Equals Sign

$
0
0

Hi Code It,

 

When attempting to use the query method of the SOAP Service API and query for an email address that contains an equals sign "=" - I receive an error. Can you please advise on how I should go about escaping the equals sign?

 

Take for example this query for "ilya=test@test.com":

 

Request:

 

<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="https://secure.eloqua.com/API/1.2" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ins1="http://www.microsoft.com/practices/EnterpriseLibrary/2007/01/wcf/validation" xmlns:ins2="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF" xmlns:ins3="http://schemas.datacontract.org/2004/07/EloquaNet.Activity">

   <env:Header>

      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

         <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

            <wsse:Username>IHSIncSandbox\Ilya.Hoffman</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">[REMOVED]</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </env:Header>

   <env:Body>

      <tns:Query>

         <tns:eloquaType>

            <tns:ID>0</tns:ID>

            <tns:Name>Contact</tns:Name>

            <tns:Type>Base</tns:Type>

         </tns:eloquaType>

         <tns:searchQuery>C_EmailAddress='ilya=test@test.com'</tns:searchQuery>

         <tns:fieldNames>

            <ins0:string>C_EmailAddress</ins0:string>

         </tns:fieldNames>

         <tns:pageNumber>1</tns:pageNumber>

         <tns:pageSize>200</tns:pageSize>

      </tns:Query>

   </env:Body>

</env:Envelope>

 

Response:

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

   <s:Header>

      <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

         <u:Timestamp u:Id="_0">

            <u:Created>2013-09-07T16:40:35.521Z</u:Created>

            <u:Expires>2013-09-07T16:45:35.521Z</u:Expires>

         </u:Timestamp>

      </o:Security>

   </s:Header>

   <s:Body>

      <s:Fault>

         <faultcode>s:Client</faultcode>

         <faultstring xml:lang="en-US">The creator of this fault did not specify a Reason.</faultstring>

         <detail>

            <ValidationFault xmlns="http://www.microsoft.com/practices/EnterpriseLibrary/2007/01/wcf/validation" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

               <Details xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Practices.EnterpriseLibrary.Validation.Integration.WCF">

                  <a:ValidationDetail>

                     <a:Key i:nil="true"/>

                     <a:Message>The SearchQuery parameter is not in the correct format.</a:Message>

                     <a:Tag>searchQuery</a:Tag>

                  </a:ValidationDetail>

               </Details>

            </ValidationFault>

         </detail>

      </s:Fault>

   </s:Body>

</s:Envelope>


Viewing all articles
Browse latest Browse all 3423

Trending Articles