P
Pete Wright
Hi All,
I'm trying to develop a custom SoapHttpHandler, but it just doesn't want to
work. Here's my handler
public class BrokerRoutingHandler :
Microsoft.Web.Services2.Messaging.SoapHttpRouter
{
protected override Uri ProcessRequestMessage( SoapEnvelope message)
{
System.Diagnostics.EventLog EventLog1 = new
System.Diagnostics.EventLog();
if (!System.Diagnostics.EventLog.SourceExists("Broker"))
System.Diagnostics.EventLog.CreateEventSource(
"Broker", "Application");
EventLog1.Source = "Broker";
EventLog1.WriteEntry ("Intercepted a message and passed it on.");
// Code goes here to intercept the message and have a tweak.
return base.ProcessRequestMessage (message);
}
}
Simple enough - the idea is that when this intercepts a message it will post
to the event log just so I know it's doing something.
I updated the web.config as the WSE documenation says to do for content
based routing, to include this
<system.web>
:
:
<httpHandlers>
<add type="BrokerService.BrokerRoutingHandler, BrokerService" path="*.asmx"
verb="*" />
</httpHandlers>
</system.web>
So, any request for any web service hits my customer handler.
To build the application I created a standard web service project, with a
web service in it, then added in WSE2.0 support, and then added in the class
above.
The problem is, when I hit F5 to run the app just to make sure everything's
ok, I get this
"WSE003: The input was not a valid SOAP message"
I have tried pretty much all I can think of to solve this. Any ideas?
(All replies to the group please -I've searched Google relentlessly for a
solution or anyone that's come across WSE003 as an error code and found
nothing, so we should probably keep this public.)
Cheers,
I'm trying to develop a custom SoapHttpHandler, but it just doesn't want to
work. Here's my handler
public class BrokerRoutingHandler :
Microsoft.Web.Services2.Messaging.SoapHttpRouter
{
protected override Uri ProcessRequestMessage( SoapEnvelope message)
{
System.Diagnostics.EventLog EventLog1 = new
System.Diagnostics.EventLog();
if (!System.Diagnostics.EventLog.SourceExists("Broker"))
System.Diagnostics.EventLog.CreateEventSource(
"Broker", "Application");
EventLog1.Source = "Broker";
EventLog1.WriteEntry ("Intercepted a message and passed it on.");
// Code goes here to intercept the message and have a tweak.
return base.ProcessRequestMessage (message);
}
}
Simple enough - the idea is that when this intercepts a message it will post
to the event log just so I know it's doing something.
I updated the web.config as the WSE documenation says to do for content
based routing, to include this
<system.web>
:
:
<httpHandlers>
<add type="BrokerService.BrokerRoutingHandler, BrokerService" path="*.asmx"
verb="*" />
</httpHandlers>
</system.web>
So, any request for any web service hits my customer handler.
To build the application I created a standard web service project, with a
web service in it, then added in WSE2.0 support, and then added in the class
above.
The problem is, when I hit F5 to run the app just to make sure everything's
ok, I get this
"WSE003: The input was not a valid SOAP message"
I have tried pretty much all I can think of to solve this. Any ideas?
(All replies to the group please -I've searched Google relentlessly for a
solution or anyone that's come across WSE003 as an error code and found
nothing, so we should probably keep this public.)
Cheers,