Trying to Duplicate SOAPUI Request in R

0

I have a successful request that works fine in SOAPUI after setting up the WSDL and SSL cert/password. This is the raw HTTP request data from SOAPUI:

POST https://dlws.bloomberg.com/dlps HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "submitGetDataRequest"
Content-Length: 1116
Host: dlws.bloomberg.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

I won't include the SOAP request body because Stack Overflow is complaining about the amount of code in my question but it is safe to assume there is nothing wrong with the body in this case. I can provide it in the comments if needed though.

I'm attempting to duplicate this request in R using the httr package but I'm making a mistake somewhere and I can't figure it out. Here is my R code:

headerfields <- c("Accept-Encoding" = "gzip,deflate", 
                  "Content-Type" = "text/xml;charset=UTF-8", 
                  "SOAPAction" = "submitGetDataRequest",
                  "Connection" = "Keep-Alive")

httr::POST("https://dlws.bloomberg.com/dlps", add_headers(headerfields), 
user_agent("Apache-HttpClient/4.1.1 (java 1.5)"), body = body, 
config(sslcert = "C:/DLWSDotnetSample/DLWSDotnetSample/DLWSCert.p12", sslkey = "********"))

The error I'm getting is: Error in curl::curl_fetch_memory(url, handle = handle) : schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed). More detail may be available in the Windows System event log. But it's likely that I'm not even making it to the SSL handshake because I've the host claims that I never touched their servers.

Any insight on this would be great, this has been driving me crazy for weeks.

r
web-services
http
ssl
soap
asked on Stack Overflow Jan 23, 2020 by Kyle Dixon

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0