.Net service to .Net client : Server did not recognize the value of HTTP Header SOAPAction: .

M

Matt Greer

Hello,

I have searched high and low for a solution to this problem, but I can
not resolve it. We are getting the error

"Server did not recognize the value of HTTP Header SOAPAction: ."

which is very common and seems to get generated for many different
reasons. I've not found anyone who appears to get this error for the
same reason as I am.


I am trying to duplicate a web service found on the web so that I can
run it locally. The web service on the web was implemented with BEA
Weblogic server 8.1 in Java. I downloaded their WSDL, and using
wsdl.exe generated a stub web service class. I added this file to my
project and subclassed the stub class, and my subclass implemented the
methods I was interested in, leaving the rest as stubs.

With a client written in C#, I added a reference to the java web
service. I can use this web service with no problems. Then when I set
it dynamic and replace the java service's URL for my local one, I get
the above error when I attempt to use a web method.

My local web service runs fine from the sample web interface.

How can I force .Net to use my WSDL and not generate its own? I have
attempted to use the attribute

[WebServiceBinding(Name="...",
Namespace="...",
Location="http://localhost/Service/wsdl.xml")]
public class MyService : TheStubServiceGeneratedByWsdlExe {
....

That wsdl.xml is the wsdl acquired from the java service. But
accessing the WSDL with http://.../Service.asmx?WSDL, always resorts
to the dynamically generated one.

I have also attempted the attribute SoapRpcMethod on my web methods. I
understand that is intended for non .Net clients primarily. I'm not
all that familiar with web services under .Net yet (I'm reading
furiously! :) )

Any help is appreciated, thanks.

Matt
 
J

Jan Tielens

How can I force .Net to use my WSDL and not generate its own? I have
attempted to use the attribute

Check out KB 815149:
HOW TO: Disable the Documentation Protocol for ASP.NET Web Services
http://support.microsoft.com/default.aspx?scid=kb;en-us;815149

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


Matt Greer said:
Hello,

I have searched high and low for a solution to this problem, but I can
not resolve it. We are getting the error

"Server did not recognize the value of HTTP Header SOAPAction: ."

which is very common and seems to get generated for many different
reasons. I've not found anyone who appears to get this error for the
same reason as I am.


I am trying to duplicate a web service found on the web so that I can
run it locally. The web service on the web was implemented with BEA
Weblogic server 8.1 in Java. I downloaded their WSDL, and using
wsdl.exe generated a stub web service class. I added this file to my
project and subclassed the stub class, and my subclass implemented the
methods I was interested in, leaving the rest as stubs.

With a client written in C#, I added a reference to the java web
service. I can use this web service with no problems. Then when I set
it dynamic and replace the java service's URL for my local one, I get
the above error when I attempt to use a web method.

My local web service runs fine from the sample web interface.

How can I force .Net to use my WSDL and not generate its own? I have
attempted to use the attribute

[WebServiceBinding(Name="...",
Namespace="...",
Location="http://localhost/Service/wsdl.xml")]
public class MyService : TheStubServiceGeneratedByWsdlExe {
...

That wsdl.xml is the wsdl acquired from the java service. But
accessing the WSDL with http://.../Service.asmx?WSDL, always resorts
to the dynamically generated one.

I have also attempted the attribute SoapRpcMethod on my web methods. I
understand that is intended for non .Net clients primarily. I'm not
all that familiar with web services under .Net yet (I'm reading
furiously! :) )

Any help is appreciated, thanks.

Matt
 
C

chriso

Hello,

I have searched high and low for a solution to this problem, but I can
not resolve it. We are getting the error

"Server did not recognize the value of HTTP Header SOAPAction: ."

Hi Matt,

I am very new to this as well, but I did have a similar problem, so
maybe my solution will help you too.

Add the following line before the definition of the web service class:

[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]

This means that the SOAPAction HTTP header can be "" or even
"BilboBaggins" and the server will locate the correct method by
looking at the HTTP Request-URI (based on the first child element
following the <Body> XML element of the SOAP message), rather than the
SoapAction HTTP header to route the request to the correct method.

Hope this helps,

chriso
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top