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

Discussion in 'ASP .Net Web Services' started by Matt Greer, Feb 3, 2004.

  1. Matt Greer

    Matt Greer Guest

    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
     
    Matt Greer, Feb 3, 2004
    #1
    1. Advertising

  2. Matt Greer

    Jan Tielens Guest

    > 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" <> wrote in message
    news:...
    > 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
     
    Jan Tielens, Feb 4, 2004
    #2
    1. Advertising

  3. Matt Greer

    chriso Guest

    (Matt Greer) wrote in message news:<>...
    > 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
     
    chriso, Feb 6, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=

    Server did not recognize the value of HTTP Header SOAPAction

    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=, May 25, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    28,743
    =?Utf-8?B?TWlndWVsIElzaWRvcm8=?=
    May 25, 2007
  2. Juan Rodriguez

    Server did not recognize the value of HTTP Header SOAPAction

    Juan Rodriguez, Aug 28, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    161
    Juan Rodriguez
    Aug 28, 2003
  3. Hazzard
    Replies:
    3
    Views:
    226
    Hazzard
    Sep 13, 2003
  4. Steve Evans
    Replies:
    2
    Views:
    159
    Steve Evans
    Jan 20, 2004
  5. Paul Turelinckx
    Replies:
    0
    Views:
    176
    Paul Turelinckx
    Feb 9, 2004
Loading...

Share This Page