views:

1558

answers:

3

I am working on a web application that was recently converted from Visual Studio 2003 to Visual Studio 2008. The application contained some web services that were written using the .NET 1.1 Framework and Web Service Enhancements 2.0. They were converted to the .NET 3.5 framework using the VS 2008 Conversion Wizard Tool.

A client application which is still written using the .NET 1.1 framework has a reference to the updated web service and try to consume the web service and received the following error:

System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: (web service URI)

The URL Behavior is set to static for the reference and the proxy class inheritance was changed from System.Web.Services.Protocols.SoapHttpClientProtocol namespace to Microsoft.Web.Services2.WebServicesExtension namespace

If you need additional information or need to see some source code, please let me know.

A: 

Does the web service work otherwise? Is it possible your new updated 2.0 web service exists in the same application domain as a 1.1 application? In that case you'll want to make your own app-domain.

If its not local try using Fiddler to see everything that is going back and forth.

benjynito
+1  A: 

If you go directly to the asmx url with a web browser, and then click on the method you want to call, what's the SOAPAction that they want?

next, check the Reference.vb code and see what the SoapDocumentMethodAttribute attribute is set to.

Do they match?

Eric Tuttleman
Eric,They do not match. The web service reference in the application is pointing to the staging web service instance and the SoapDocumentMethodAttribute is set to the production web service.
Michael Kniskern
I believe that the SoapDocumentMethodAttribute is what is sent in from SOAPAction. It's a namespace name, rather than an actual url that will be followed, so normally I keep them the same from prod, dev, and uat. I usually just always do the prod url
Eric Tuttleman
In theory, wouldn't the SoapDocumentMethodAttribute get updated once they update the web reference in their application? I agree, I kept the namespace for my web services to the production environment where they are hosted.
Michael Kniskern
Sorry, rebinding it via the wsdl would update it, not updating the URL in the gui though. I hear what you're saying, but if it had been updated, it would match. Right?
Eric Tuttleman
I just spoke with the client and it looks like they are going to pursue the option of upgrading the application to use the .NET 2.0 Framework. Also, they are going to re-write the web service to either use the WSE 3.0 or remove the WSE all together.
Michael Kniskern
Thanks for the update, good luck Michael!
Eric Tuttleman
A: 

I assume you are trying to call a WCF (.net 3.5) service from a WSE2 (.net 1.1) client.

Microsoft said they didn't intend to support backwards compatibility between WSE versions. Each new version is considered a technology preview and has a set of new features implemented which break the compatibility.

WCF, though, is said to be compatible with WSE3.

So you have two options:

  1. Port the client application to WCF (or at least WSE3) to make it compatible with the service.
  2. Re-implement the service using WSE2 explicitly (it will work even under .net 3.5) using basically the same code as before.
DreamSonic
We calling a .NET 1,1 web service that was previous using the WSE 2.0 that was upgraded to the .NET 3.5 framework. We did not refactor or upgrade any of the components, it was upgraded using the VS 2008 conversion wizard.
Michael Kniskern
Check the original and converted web.configs to see the difference.
DreamSonic