Authentication Failure
Trying to connect via SoapUI. I can connect via REST but cannot connect via SOAP.
Here is the call that I'm making...I'm just trying to make the base getLead connection but am failing on auth. What is it that I'm doing wrong?
<soapenv:Envelope xmlns:soapenv="schemas.xmlsoap.org/soap/envelope/" xmlns:mkt="marketo.com/mktows/">
<soapenv:Header>
<mkt:AuthenticationHeader>
<!-- my mktowsUserIdfield begins with "MKTOWS_" and is the 'User ID' FIELD FROM ADMIN UI -->
<mktowsUserId>XXXXXXXXXXXXXX</mktowsUserId>
<!--
My requestSignature below is calculated below. Perhaps this is what I'm messing up on. I'm calculating it in java as below:
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
String text = df.format(new Date());
String requestTimestamp = text.substring(0, 22) + ":" + text.substring(22);
String encryptString = requestTimestamp + "MKTOWS_XXX-XXX-XXX_X" ;
SecretKeySpec secretKey = new SecretKeySpec("[Encryption Key from admin UI]".getBytes(), "HmacSHA1");
Mac mac = Mac.getInstance("HmacSHA1");
mac.init(secretKey);
byte[] rawHmac = mac.doFinal(encryptString.getBytes());
char[] hexChars = Hex.encodeHex(rawHmac);
String requestSignature = new String(hexChars);
-->
<requestSignature>91d8dfd424143deb8fa58d65b09d0787b7c099f2</requestSignature>
<requestTimestamp>2017-04-27T14:41:00-08:00</requestTimestamp>
<!--Optional:-->
<partnerId></partnerId>
<!--Optional:-->
<audit></audit>
<!--Optional:-->
<mode></mode>
</mkt:AuthenticationHeader>
</soapenv:Header>
<soapenv:Body>
<mkt:paramsGetLead>
<leadKey>
<keyType>EMAIL</keyType>
<keyValue>freddiemac@yahoo.com</keyValue>
</leadKey>
</mkt:paramsGetLead>
</soapenv:Body>
</soapenv:Envelope>