By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,294 Members | 1,564 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,294 IT Pros & Developers. It's quick & easy.

Urgent Help on Protocols.SoapException

P: n/a
Dear all,

I'm having problem with C# Web Services, in the Web Services it suppose to
call another Web Services to return XmlNode to current Web Services. Below is
the sample code :-

WServices.WServices WSObj = new WServices.WServices();
WSObj.Credentials = System.Net.CredentialCache.DefaultCredentials;
XmlNode objNode = WSObj.GetCustomerByID(CustomerID); --> Catch Exception

But after it GetCustomerByID it return errors as below :-

"System.Web.Services.Protocols.SoapException: Server did not recognize the
value of HTTP Header SOAPAction...at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)"

I have added
"[SoapDocumentService(RoutingStyle=SoapServiceRoutin gStyle.RequestElement)]"
but it still return the same errors.

Help Needed urgently.

Thanks in advance.
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

I don't think the porblem in this case is that you use element or action
style dispatching. My guess is that the other side simply sees a malformed
http request. A reason for this could very well be that you are using default
credentials for authenticating. Normally that's fine, but in this case (as
you are running in a pipeline worker process) you'll pick up some weird
credentials:

a) if all your stuff is default and you run on IIS 6, you'll go out as
NetworkService, which may not have rights on the other box;
b) if all your stuff is default and you run on IIS 5, you'll go out as
aspnet user, which is a local account and won't have rights on the other box;
c) if you configured <identity impersonation='true' /> then you're on an
impersonation token which (barring delegation) will have no rights on the
other machine (null session) ..

Can you set the credentials to explicit credentials (like new
NetworkCredentials(username, pwd, domain)) to test if this is the problem ?
Do you really need to send in credentials at all ? If the remote server does
anonymous access, there's no need to ...

HTH,

-- Henkk
"Mae Lim" wrote:
Dear all,

I'm having problem with C# Web Services, in the Web Services it suppose to
call another Web Services to return XmlNode to current Web Services. Below is
the sample code :-

WServices.WServices WSObj = new WServices.WServices();
WSObj.Credentials = System.Net.CredentialCache.DefaultCredentials;
XmlNode objNode = WSObj.GetCustomerByID(CustomerID); --> Catch Exception

But after it GetCustomerByID it return errors as below :-

"System.Web.Services.Protocols.SoapException: Server did not recognize the
value of HTTP Header SOAPAction...at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)"

I have added
"[SoapDocumentService(RoutingStyle=SoapServiceRoutin gStyle.RequestElement)]"
but it still return the same errors.

Help Needed urgently.

Thanks in advance.

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more .NET Framework Questions on Bytes