02/21/2023 12:07 PM
Hello,
I am writing the syntax for HR_IMPORT_JSON for a SOAP connection and I am getting a "Error- Failed to Connect to or Import SOAP Data: JSONOBject["clientnamewebservice"] not found" response from the job. I already have a successful SOAP connection to the target application. Looking through the logs it appears I get a Response Code: 200, then it's calling the URL, the next line is suggesting to add '?WSDL?' even though the URL I've provided already has it, and then it ends with a Response Code: 404.
What exactly does this error message mean?
02/21/2023 02:59 PM
The issue appears to be due to the json format. Can you share the complete JSON you are using.
Also, can you confirm how you validated if the Connection was established successfully.
02/21/2023 05:42 PM
Hi Sahil,
I tested the SOAP connection to the target application and it came back successful in Saviynt. After I got a successful connection I then went on to write the HR_IMPORT_JSON syntax.
I am using a WSDL URL to make a API call, getUserInfo, using a specific user ID. Username and password are hardcoded for authentication. Sensitive information has been redacted.
{
"CONNECTION1": "clientnamewebservice",
"REQUESTXML1": "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"> <soap:Body> <getUserInfo xmlns=\"URL\"> <username>USERNAME</username> <password>PASSWORD</password> <user:userName>USERID WHO I AM IMPORTING</user:userName> <offset>0</offset> <limit>1</limit> </getUserInfo> </soap:Body> </soap:Envelope>",
"REQUESTPARAMS1": {
"Content-Type": "text/xml; charset=utf-8"
},
"RESPONSEDATAPATH1": "Body.getUsersInAccountResponse.getUsersInAccountResult.UserObject",
"RESPONSETOTALRESULTS1": "PAGINATE",
"USERMAPPING2": "ATTRIBUTES:MAPPED"
}
02/22/2023 09:41 AM
Can you confirm if clientnamewebservice is defined in your Connection JSON as well
Can you also share the Connection json you are using. (make sure to mask the creds) before sharing.
02/23/2023 08:09 AM
Thank you for the suggestion. It fixed one part. I am now getting another error from the job.
Error - Error parsing parameter HR_IMPORT_JSON - For input string: ""
Connection JSON
{
"authentications": {
"clientnamewebservice": {
"properties": {
"SOAP_ENDPOINT": "URL",
"USERNAME": "USERNAME",
"PASSWORD": "PASSWORD",
"PAGE_SIZE": "1000",
"REQUEST PARAMS": {
"Content-Type": "text/xml"
}
}
}
}
}
HR_IMPORT_JSON
{
"CONNECTION": "clientnamewebservice",
"REQUESTXML": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:user=\"URL/webservices/user/UserAPI/\">
<soapenv:Header><soap:authentication><soap:username>USERNAME</soap:username><soap:password>PASSWORD</soap:password></soap:authentication></soapenv:Header>
<soapenv:Body><user:getUserInfo><user:userName>USER WHO I AM MAKING REQUEST FOR</user:userName></user:getUserInfo></soapenv:Body></soapenv:Envelope>",
"REQUESTPARAMS": {"Content-Type": "text/xml"},
"RESPONSEDATAPATH": "Body.getUserInfoResponse.UserInfoResponse",
"USERMAPPING": "FirstName:firstname,LastName:lastname,UserName:username"
}
02/23/2023 08:37 AM - edited 02/23/2023 08:38 AM
Can you check your HR_IMPORT_JSON format from the one defined in SOAP connector guide and see if there is a difference.