I have some recent experience with REST API's but recently found out the APIs I am needing to use for a project are SOAP not REST. This is very new to me. The developer of the APIs put a postman collection together and sent them over. I can execute the APIs in postman but I need to be able to run the APIs outside of postman and in other environments like Watson.
I'm having problems finding informative material on how to use SOAP APIs in R.
If anyone has any advice or suggestions I would appreciate it.
Below is a JSON file extract from the Postman application.
Am I able to run SOAP using httr like I would if it were REST?
"info": {
"_postman_id": "39505a21-b11a-43ff-af13-ff163f717df6",
"name": "Super BizUpdate",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get Orphans - Prod",
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "password_masked",
"type": "string"
},
{
"key": "username",
"value": "username_masked",
"type": "string"
},
{
"key": "saveHelperData",
"type": "any"
},
{
"key": "showPassword",
"value": false,
"type": "boolean"
}
]
},
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/soap+xml"
}
],
"body": {
"mode": "raw",
"raw": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"http://www.company_name.com/bizconnect/SBU\">\n<SOAP-ENV:Body>\n <ns1:GetSBUApplicationData>\n <ns1:Subscriber>\n <ns1:SubCode>123456</ns1:SubCode>\n </ns1:Subscriber>\n <ns1:UserID>INTUSER1A</ns1:UserID>\n <ns1:ReferenceID>A</ns1:ReferenceID>\n <ns1:ResponseVersion>010</ns1:ResponseVersion>\n <ns1:Application>\n <ns1:Id>G020H</ns1:Id>\n <ns1:Name/>\n <ns1:Key>\n <ns1:Field>\n <ns1:Id>00030001</ns1:Id>\n <ns1:Name/>\n <ns1:Value>0900979490</ns1:Value>\n </ns1:Field>\n <ns1:Field>\n <ns1:Id>00920018</ns1:Id>\n <ns1:Name/>\n <ns1:Value>Home Depot Inc</ns1:Value>\n </ns1:Field>\n <ns1:Field>\n <ns1:Id>00900081</ns1:Id>\n <ns1:Name/>\n <ns1:Value>N</ns1:Value>\n </ns1:Field>\n <ns1:Field>\n <ns1:Id>00920033</ns1:Id>\n <ns1:Name/>\n <ns1:Value>GA</ns1:Value>\n </ns1:Field>\n <ns1:Field>\n <ns1:Id>00920121</ns1:Id>\n <ns1:Name/>\n <ns1:Value>USA</ns1:Value>\n </ns1:Field>\n <ns1:Criteria>\n <ns1:Field>\n <ns1:Id>00920109</ns1:Id>\n <ns1:Name/>\n <ns1:Value>1</ns1:Value>\n </ns1:Field>\n <ns1:ComparisonOperator>GE</ns1:ComparisonOperator>\n <ns1:Value/>\n <ns1:LogicalOperator>AND</ns1:LogicalOperator>\n </ns1:Criteria>\n <ns1:Criteria>\n <ns1:Field>\n <ns1:Id>00920110</ns1:Id>\n <ns1:Name/>\n <ns1:Value>5</ns1:Value>\n </ns1:Field>\n <ns1:ComparisonOperator>LE</ns1:ComparisonOperator>\n <ns1:Value/>\n <ns1:LogicalOperator>AND</ns1:LogicalOperator>\n </ns1:Criteria>\n </ns1:Key>\n </ns1:Application>\n </ns1:GetSBUApplicationData>\n</SOAP-ENV:Body>\n</SOAP-ENV:Envelope>"
},
"url": {
"raw": "https://ss1.company_name.com/bizconnect/SBU/service",
"protocol": "https",
"host": [
"ss1",
"company_name",
"com"
],
"path": [
"bizconnect",
"SBU",
"service"
]
}
},
"response": []
}