I am using Appian v7.5. I am getting the following error when trying to call a w

I am using Appian v7.5. I am getting the following error when trying to call a webservice that requires authentication. When using a Call Web Service smart service, I am able to provide my credentials and get WSDL. Appian is able to parse the same with no issues. But when I wrote the following SAIL code, I get an error "The WSDL requires authentication. Please provide valid credentials". can some one help to figure out how to pass the credentials (I read documentation for v7.5 and following the same).

with(
local!wsCredentials: a!wsHttpCredentials(
username: "sakruv01",
password: "abcd1234"
),
local!wsNameSpace: "{schemas.afsimage.com/.../configadminservice}",
local!actualWSResponse: webservicequery(
a!wsConfig(
wsdlUrl: "lab53ctx123vm:8080/.../DGConfigAdminWebService.asmx
service: local!wsNameSpace & "DGConfigAdminWebService",
operation: l...

OriginalPostID-132302

OriginalPostID-132302

  Discussion posts and replies are publicly visible

Parents
  • I just want to clarify what I changed. This is the relevant part that I updated. Notice how I am directly using the type!WsConfig which has a property called endpointCredentials. This is because there's a bug before 7.6 where if using !WsConfig the endpointCredentials attribute of type!WsConfig won't be mapped because the a!WsConfig is trying to map the values to invocationCredentials instead of endpointCredentials. This is resolved in Appian 7.6 all hotfixes where you can now use a!WsConfig.

    type!WsConfig(
               wsdlUrl: "lab53ctx123vm:8080/.../DGConfigAdminWebService.asmx
               service: local!wsNameSpace & "DGConfigAdminWebService",
               port: "DGConfigAdminWebServiceSoap12",
               operation: local!wsNameSpace & "AddMerchant",
               wsdlCredentials: a!wsHttpCredentials("sakruv01","abcd1234",null),
               endpointCredentials: local!wsCredentials
               )
Reply
  • I just want to clarify what I changed. This is the relevant part that I updated. Notice how I am directly using the type!WsConfig which has a property called endpointCredentials. This is because there's a bug before 7.6 where if using !WsConfig the endpointCredentials attribute of type!WsConfig won't be mapped because the a!WsConfig is trying to map the values to invocationCredentials instead of endpointCredentials. This is resolved in Appian 7.6 all hotfixes where you can now use a!WsConfig.

    type!WsConfig(
               wsdlUrl: "lab53ctx123vm:8080/.../DGConfigAdminWebService.asmx
               service: local!wsNameSpace & "DGConfigAdminWebService",
               port: "DGConfigAdminWebServiceSoap12",
               operation: local!wsNameSpace & "AddMerchant",
               wsdlCredentials: a!wsHttpCredentials("sakruv01","abcd1234",null),
               endpointCredentials: local!wsCredentials
               )
Children
No Data