This discussion is archived
2 Replies Latest reply: Nov 19, 2012 11:02 PM by oracledigger RSS

.Net Client for SOA Web Service

936418 Newbie
Currently Being Moderated
Hi, I need consume a SOA Web Service from a .Net Web Application, the Web Service have the policy "oracle/wss_username_token_client_policy" can some one give a light on my way?
I can consume the service without the policy but when I apply the policy I get an error.

====Code for consume the Web Service whithout Policy (Web Service Reference In Visual Studio 2010)
AutenticarWSR.autenticar proxy = new AutenticarWSR.autenticar();
AutenticarWSR.autenticar_Request req = new AutenticarWSR.autenticar_Request();
AutenticarWSR.autenticar_Response res = new AutenticarWSR.autenticar_Response();
req.entrada = "1";

res = proxy.Callautenticar(req);

lblResultado.Text = res.resultado;

====Code for consume the Web Service whith Policy (Web Service Reference In Visual Studio 2010)
AutenticarWSRS.autenticar proxy = new AutenticarWSRS.autenticar();
AutenticarWSRS.autenticar_Request req = new AutenticarWSRS.autenticar_Request();
AutenticarWSRS.autenticar_Response res = new AutenticarWSRS.autenticar_Response();

ICredentials credenciales = new NetworkCredential("crm", "usuariocrm123");

req.entrada = "1";

proxy.PreAuthenticate = false;

proxy.Credentials = credenciales;

res = proxy.Callautenticar(req);

lblResultado.Text = res.resultado;

The Error:
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

Thankss

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points