soapui - Soap UI FailedAuthentication : The security token cannot be authenticated, WCF Client Could not establish trust relationship for the SSL/TLS s -
i connecting external webservice using wcf. have no control on external webservice. using soap ui test connection. request working fine till yesterday , security token cannot authenticated exception. per service wsdl, request needs username, pwd authentication
why seeing error on soap ui. service url. https://orserviceb2btest.oracleoutsourcing.com:443/soa-infra/services/default/mmissoaprequestreceiver!1.0*soa_d48cf4e0-5e7b-43ad-b430-727180d48841/routeeditransactions_ep
this how soap ui request looks
<soapenv:envelope xmlns:cor="http://www.caqh.org/soap/wsdl/corerule2.2.0.xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:header> <wsse:security soapenv:mustunderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:usernametoken wsu:id="usernametoken-25"> <wsse:username>sid</wsse:username> <wsse:password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#passwordtext">pwd</wsse:password> </wsse:usernametoken> </wsse:security> </soapenv:header> <soapenv:body> <cor:coreenveloperealtimerequest> <payloadtype>x12_270_request_005010x279a1</payloadtype> <processingmode>realtime</processingmode> <payloadid>339408072</payloadid> <timestamp>2013-07-13:t23:30:29:45</timestamp> <senderid>sid</senderid> <receiverid>oud</receiverid> <coreruleversion>2.2.0</coreruleversion> <payload>input string </payload> </cor:coreenveloperealtimerequest> </soapenv:body> </soapenv:envelope>
response
<env:envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:header/> <env:body> <env:fault xmlns:ns0="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <faultcode>ns0:failedauthentication</faultcode> <faultstring>failedauthentication : security token cannot authenticated.</faultstring> <faultactor/> </env:fault> </env:body> </env:envelope>
the same request wcf client gives following error not establish trust relationship ssl/tls secure channel authority 'orserviceb2btest.oracleoutsourcing.com'.
so tried setting servercertificate
_orclient.clientcredentials.servicecertificate.defaultcertificate = getcertificatefromstore(" *.oracleoutsourcing.com"); private static x509certificate2 getcertificatefromstore(string certname) { // certificate store current user. x509store store = new x509store(storelocation.currentuser); try { store.open(openflags.readonly); // place certificates in x509certificate2collection object. x509certificate2collection certcollection = store.certificates; x509certificate2collection signingcert = certcollection.find(x509findtype.findbysubjectname, certname, false); if (signingcert.count == 0) return null; // return first certificate in collection, has right name , current. return signingcert[0]; } { store.close(); } }
this simple request working , see security token authentication problem.
Comments
Post a Comment