SOAP API request failing with 500 Internal Service Error

Anonymous
Not applicable

SOAP API request failing with 500 Internal Service Error

Hi,

I've been writing a javascript based client to use the SOAP api.  My first test api call has been failing with a Error 500 (Internal Service Error).  I can't find any errors in the XML SOAP request.  When I comapre my XML SOAP request to the supplied examples, It seems to be equivelant to me.  Can anyone confirm where this request appears to be valid?  Is the webservice currently working?

Thanks! 

version="1.0" encoding="UTF-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Header>
<jns0:AuthenticationHeader>
<mktowsUserId>REMOVED-FROM-THIS-POST</mktowsUserId>
<requestSignature>REMOVED-FROM-THIS-POST</requestSignature>
<requestTimestamp>2014-01-03T16:01:49-08:00</requestTimestamp>
</jns0:AuthenticationHeader>
  </SOAP-ENV:Header>
<soap-env:Body xmlns:jns0='http://www.marketo.com/mktows/' >
<jns0:paramsGetMultipleLeads>
<leadSelector xsi:type="jns0:LeadKeySelector">
<keyType>EMAIL</keyType>
<keyValues>
<stringItem>byoung@4d.com</stringItem>
</keyValues>
</leadSelector>
<batchSize>10</batchSize>
</jns0:paramsGetMultipleLeads>
</soap-env:Body>
</soap-env:Envelope>
 
Tags (1)
4 REPLIES 4
Anonymous
Not applicable

Re: SOAP API request failing with 500 Internal Service Error

Brian
Are you using the sample code from http://dev.marketo.com?  Are you able to log into Marketo and get to the lead byoung@4d.com?  If yes to both questions, I'd request you to log a support ticket for further investigation.


Kenny_Elkington
Marketo Employee

Re: SOAP API request failing with 500 Internal Service Error

Hey Brian,

It appears that you haven't designated the namespace for the Marketo WSDL.  Try adding 'xmlns:jsn0="http://www.marketo.com/mktows/"' to the Envelope.
Anonymous
Not applicable

Re: SOAP API request failing with 500 Internal Service Error

Brian

When I was first building this client, I really found the SoapUI app (http://www.soapui.org/) v useful for isolating issues I was experiencing with the requests I was sending!

Drew

P.S. I do believe I agree with Kenny above, check your namespaces!
Anonymous
Not applicable

Re: SOAP API request failing with 500 Internal Service Error

Great! Thanks for all the responces.

I'm sure the namespaces are part of the problem and Soapui looks soooooo helpful.

It turns out, with some comparison testing between my output and the PHP example, I also found my header Request Signature wasn't being generated correctly.  It wasn't putting it through the Hmac SHA1 algorhythm at all!  Now that I've fixed that, I can get to the bottom of the XML problems.