开发者

Soap one request two responses

开发者 https://www.devze.com 2023-04-01 03:56 出处:网络
I\'m trying to access a SOAP 1.1 WebService from .NET project. I reference the Service, create the Proxy. When i invoke the service it gives me an error: System.ArgumentException: An item with the sam

I'm trying to access a SOAP 1.1 WebService from .NET project. I reference the Service, create the Proxy. When i invoke the service it gives me an error: System.ArgumentException: An item with the same key has already been added

I invoke the Service using SOAPUi and service work fine. But when i see the httplog i notice that are two responses for the same reques开发者_如何学JAVAt.

First response give me an :"HTTP/1.1 401 Unauthorized[\r][\n]" Second response gives the the result OK. "HTTP/1.1 200 OK

I'm using the code in C#:

zenvia_estadoClient client = new zenvia_estadoClient("zenvia_estado");
client.ClientCredentials.UserName.Password = "MyPass";
client.ClientCredentials.UserName.UserName = "MyUser";
var resultado = client.ZmmIntEnviaEstado(new ZmmIntEnviaEstado() {    PiBanfn= "something" });
client.Close();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号