1

I already tried some different SOAP-messages, even one which has an empty header and body, but without success to get into my SoapHttpRouter-derived class :-(

Also, when I hit the .asmx-URL with the browser it comes to that error.. here detailed stack trace of the error:

[NotSupportedException: WSE003: The input was not a valid SOAP message.]
Microsoft.Web.Services2.Messaging.SoapHttpRouter.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object asyncState) +134
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8677954
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

I hope that someone is out there who had the same problem. I would appreciate your help very much!

John Saunders
  • 160,644
  • 26
  • 247
  • 397

3 Answers3

0

Typically when I get that message it's because there is a server side error and it's sending the default HTML error page back instead of the properly formatted SOAP message.

I would try stepping through the server-side code (if possible) to make sure there aren't any problems.

JonnyD
  • 591
  • 1
  • 6
  • 12
0

Were you aware that WSE 2.0 is extremely obsolete? Even more so than WSE 3.0.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • Thx, i am aware of that wse is sth like replaced by wcf.. but unfortunately i don´t think i can use wcf. can i host wcf services inside an classical c# .NET 2.0 webservice project also? i dont want to make a new project only for the routing purpose.. :-( is there any good example of using wcf for routing (classical!) web service calls like i would do it with wse 2.0´s SoapHttpRouter ?? –  Jul 29 '09 at 08:30
  • i forgot to say my url is always dynamical.. that means the actual destinationUrl is appended after an '&' to the SoapHttpRouter-URL. at least it planned to be so, so, using a static referralCache.config wouldn´t do it.. –  Jul 29 '09 at 08:33
  • At the least, you might upgrade to WSE 3.0, which is slightly less obsolete. You should also learn there is no reason not to "upgrade" to .NET 3.5 SP1, since that has the same CLR as .NET 2.0. .NET 3.5 SP1 applies .NET 2.0 SP2, then adds some extra assemblies your existing applications will not use. – John Saunders Jul 29 '09 at 11:49
  • If you look at http://social.msdn.microsoft.com/Search/en-US/?query=wcf%20routing&ac=1, you'll find http://msdn.microsoft.com/en-us/magazine/cc500646.aspx and many others. – John Saunders Jul 29 '09 at 11:53
  • Thank you John, and thanks for your link on WCF-Routing also! I know that it´s the same runtime working in both cases.. some year(s) ago i even verified this with the process explorer, before we migrated to .NET 2.0 ..but tell this our chief system/security admin :-) like we´re working in some kind of "security aware businness", at this moment not all of our web nodes does have .NET 3.5 installed.. i don´t know when this is going to happen, but i´ll work on this, maybe i will use the WCF for this task, but for ambition reasons i just want to get it working with WSE too! ;-) –  Jul 31 '09 at 11:21
  • You should at least upgrade to WSE 3.0. And, ask your admin if he needs to hear it from Microsoft. If so, I'll find the URLs. – John Saunders Jul 31 '09 at 11:54
  • My solution to route SOAPHttp-Msg´s would be to append an &routeTo=http://www.xy.org/soap/calc.asmx (the actual destinationURL) to the URL of the SOAP-Router.. so that on the client side it would look like soaphttpclient.url is sth like: http://my.router1/routesoaphttpmessage.asmx&routeTo=http://www.xy.org/soap/calc.asmx Can this work like that? Can this be done with WCF also? And.. if last answer is true, finally.. can i host a single wcf service inside a web service project type in vs 2008? How to host this in my production environment? –  Jul 31 '09 at 12:52
  • It work´s now! further, i did a little research, like i could see wcf is nothing than the successor of wse 3.0. so it seems to me at least.. but i also can´t imagine that there are so many really important improvements with the particular SoapHttpRouter class in wse 3.0.. –  Aug 05 '09 at 08:30
  • Actually, the technology of WCF is quite different from the ASMX technology that WSE was based on. It does not rely on ASP.NET, for instance. It's more similar to the technology of .NET Remoting. In any case, remember that WSE was always intended as an interim solution while the standards were being finialized. That's been done, and ASMX, WSE, and .NET Remoting have all been replaced by WCF, which can do all that they could, and a lot more, by using a model that abstracts their functionality in a cleaner, more extensible manner. – John Saunders Aug 05 '09 at 13:08
0

I recently ran into this issue. The solution for me was to add the SOAPAction HttpHeader to the request, so that the request header looked something like this:

POST <web service url> HTTP/1.1
Content-Type: text/xml; charset=utf-8
SOAPAction: <action url>
Host: <host>
Content-Length: xxx
TRex
  • 1