|
Home > Archive > BizTalk Server General > July 2005 > Server didnt recognize HTTP Header SoapAction.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Server didnt recognize HTTP Header SoapAction.
|
|
| Luis Esteban Valencia 2005-07-27, 5:52 pm |
| Hello, according to my last post, I searched on the net and I see this
http://www.adminlife.com/247referen.../28/143158.aspx
It says that the ws publish wizard namespace must be the same that the ws
namespace that I put on my code.
The error changed. Take a look.
I used http://Localhost.OrderSystemWebServices/CreditCheck as
defaultnamespace in the wizard.
Thanks
La respuesta SOAP indica un error:
System.Web.Services.Protocols.SoapException: El servidor no reconoció el
valor del encabezado HTTP SOAPAction:
http://tempuri.org/ Demostración_Av...ensajeEntrante.
at
System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Configuration;
using System.IO;
namespace Localhost.OrderSystemWebServices
{
[WebService(Namespace="http://Localhost.OrderSystemWebServices/CreditCheck")
]
public class CreditCheck : System.Web.Services.WebService
{
public CreditCheck()
{
InitializeComponent();
}
#region Código generado por el Diseñador de componentes
//Requerido por el Diseñador de servicios Web
private IContainer components = null;
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido del método con el editor de código.
/// </summary>
private void InitializeComponent()
{
}
/// <summary>
/// Limpiar los recursos que se estén utilizando.
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion
// EJEMPLO DE SERVICIO WEB
// El servicio de ejemplo HelloWorld() devuelve la cadena Hola a todos
// Para generar, quite la marca de comentario de las siguientes líneas y,
después, guarde y genere el proyecto
// Para probar el servicio Web, presione F5
public class Cliente
{
public string idCliente;
public int creditocliente;
public void traerCredito(string clienteID)
{
string archivo;
StreamReader sr;
string linea;
archivo = ConfigurationSettings.AppSettings["Directorio"];
try
{
sr=File.OpenText(archivo);
while (sr.Peek() != -1)
{
linea= sr.ReadLine();
char[] splitter = {','};
string[] otr= linea.Split(splitter, 2);
if (otr[0].ToString() == clienteID.ToString())
{
creditocliente= Convert.ToInt32(otr[1]);
}
else
{
creditocliente= -1;
}
}
creditocliente= 0;
}
catch(Exception ex)
{
throw ex;
//creditocliente = -1;
}
}
}
// [WebMethod]
// public int traerCredito(int cliente)
// {
// StreamReader sr;
// string linea;
// try
// {
// sr=File.OpenText(archivo);
// while (sr.Peek() != -1)
// {
// linea= sr.ReadLine();
// char[] splitter = {','};
// string[] otr= linea.Split(splitter, 2);
// if (otr[0].ToString() == cliente.ToString())
// {
// return Convert.ToInt32(otr[1]);
// }
// else
// {
// return -1;
// }
// }
// return 0;
// }
// catch(Exception ex)
// {
// //throw ex;
// return -1;
// }
// }
[WebMethod]
public Cliente traerCredito(Cliente cliente)
{
cliente.traerCredito(cliente.idCliente);
return cliente;
}
}
}
| |
|
|
|
|
|