Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
15 replies
Subscribers
5 subscribers
Views
3684 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
I am using Appian v7.5. I am getting the following error when trying to call a w
venkats533
over 9 years ago
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
0
venkats533
over 9 years ago
...ocal!wsNameSpace & "AddMerchant",
port: "DGConfigAdminWebServiceSoap12",
wsdlCredentials: local!wsCredentials,
invocationCredentials: local!wsCredentials
),
{
AddMerchantSoapIn: {
rule!BW_CMPO_EDS_getMerchantObj()
}
}
),
local!actualWSResponse
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
If you're not in 7.6 with all hotfixes then try this:
with(
local!wsCredentials: a!wsHttpCredentials(
username: "sakruv01",
password: "abcd1234"
),
local!wsNameSpace: "{
schemas.afsimage.com/.../configadminservice}",
local!actualWSResponse: webservicequery(
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
),
{
AddMerchantSoapIn: {
rule!BW_CMPO_EDS_getMerchantObj()
}
}
),
local!actualWSResponse
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Please copy and paste my code and test. Do not modify.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
Edurado, you are the man. Now I am past authentication error, but got 401. Do you know what is this 401 means ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
just got the following from "
en.wikipedia.org/.../List_of_HTTP_status_codes"
401 Unauthorized - so at least authentication is passed. Thanks a lot.
Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
!!! who would guess that using keynames like username, password, domain are not recommended for a!wsHttpCredentials function !!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Is it working fine now?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
I would say yes - because the original problem is gone now. I may have to use a specific header custom to the external web service I am trying to use.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
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
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
venkats533
over 9 years ago
Eduardo, I am able to go past authentication and now I am getting the following error:
"Can not serialize OM Element Fault" any help ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>