After slugging through various issues on connections I was able to put a successful connection together for the API below.
However, the response is coming back empty.
It would be awesome if someone could question/comment/curse the below.
I am providing XML to a web services system.
I have been able to successfully run and get results back using postman but have had some struggles on hard coding the API call in R.
On a side note, i have a whole new appreciation for REST APIs. This SOAP messing is killing me.
Thank you all again,
Jarrod Brown
body_content <- '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.xxxxxxxx.com/bizconnect/SBU">
<SOAP-ENV:Body>
<ns1:GetSBUApplicationData>
<ns1:Subscriber>
<ns1:SubCode>123456</ns1:SubCode>
</ns1:Subscriber>
<ns1:UserID>xxxxxx</ns1:UserID>
<ns1:ReferenceID>A</ns1:ReferenceID>
<ns1:ResponseVersion>010</ns1:ResponseVersion>
<ns1:Application>
<ns1:Id>G020D</ns1:Id>
<ns1:Name/>
<ns1:Key>
<ns1:Field>
<ns1:Id>00920000</ns1:Id>
<ns1:Name/>
<ns1:Value>700000002</ns1:Value>
</ns1:Field>
</ns1:Key>
</ns1:Application>
</ns1:GetSBUApplicationData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>'
test2 <- POST(url = 'https://stg1-ss1.xxxxxxx.com/bizconnect/SBU/service',
authenticate("user_name", "user_password", type = "basic"),
add_headers("Content-Type" = "text/xml"),
body = body_content,
config = config(ssl_verifypeer = FALSE),
content_type("text/xml> ")
)