Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

Help needed with error message - Error-Failed to Connect to or Import SOAP Data

johnson
New Contributor
New Contributor

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?

5 REPLIES 5

SB
Saviynt Employee
Saviynt Employee

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.


Regards,
Sahil

johnson
New Contributor
New Contributor

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"
}

SB
Saviynt Employee
Saviynt Employee

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. 


Regards,
Sahil

johnson
New Contributor
New Contributor

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"
}

SB
Saviynt Employee
Saviynt Employee

Can you check your HR_IMPORT_JSON format from the one defined in SOAP connector guide and see if there is a difference. 

https://docs.saviyntcloud.com/bundle/SOAP-v2020x/page/Content/Understanding-the-Integration-Between-...


Regards,
Sahil