0

So this is in relation to my question here.

So I have an existing wcf service running already, hosted on IIS. I created a Router Service that will do some XPath filtering on the header. So if the header is match then go to service1. Now, I hosted my Router Service on IIS and I can access it like http://iis.com/myrouter/router.svc/ and give me this wsdl stuff. Now when I try to request a service method on service1 like this http://iis.com/myrouter/router.svc/general/getMyMethod?blah=blahblah. It gives me a 404 error. I used fiddler by the way.

On my request through fiddler I added my custom header like "service_version:1". I used a namespace by the way on my <namespaceTable> but I don't know how to append it on my request. Anyway, my main concern is how can I make my Router Service work on IIS?

Update: I am using System.ServiceModel.Routing.RoutingService by the way. So what I am trying to accomplish is Routing Services.

Your help is greatly appreciated.

Community
  • 1
  • 1
mr.b
  • 2,708
  • 8
  • 39
  • 64
  • Yes sir. And I have an existing wcf service that is working already and I want to do some routing for versioning purpose. – mr.b Jun 06 '12 at 03:17
  • Did you test this same service this way prior? The reason I'm asking this question is because if it's a SOAP service you wouldn't access it with a URL quite like that - the SOAP package has to be constructed and sent in. – Mike Perrenoud Jun 06 '12 at 03:19
  • Sorry for misleading you sir. My service is capable of SOAP and REST. So I've tried requesting directly for service1 like this. http://iss.com/service.svc/getSomething?id=234234 – mr.b Jun 06 '12 at 03:25
  • I modified my answer to address that - it should help you. – Mike Perrenoud Jun 06 '12 at 03:30

1 Answers1

0

You are likely facing this. A SOAP service can't be accessed that way because it relies on the SOAP package. Here is another article that should lead you down the right direction. However, the direction it leads you down is that testing a SOAP service by hand is not to be desired and probably a futile effort.

However, one note is that it leads you to use the WCF Test Client - that's the best direction to go my friend and it's very easy to use. Provide the URL and it will do the rest.

Invoke soap wcf service in Fiddler like in Wcf test client

Accessing the RESTful Endpoint

If you're trying to test the RESTful endpoint then the issue is likely surrounding the routing that is configured. Please refer to this link for assistance - make sure you're setting up your service the same because the attributes they use build the routing properly. Remember that you're not going to reference the RESTful endpoint with the same address as the SOAP endpoint.

http://geekswithblogs.net/michelotti/archive/2010/08/21/restful-wcf-services-with-no-svc-file-and-no-config.aspx

You can also check out this link.

Hosting WCF soap and rest endpoints side by side

Community
  • 1
  • 1
Mike Perrenoud
  • 66,820
  • 29
  • 157
  • 232
  • Thank you for your reply sir. My Service1 is working the way it should be and I can do a request to it. What I am trying to accomplish is Routing Services. So I created a Router Service that does the routing to my existing WCF service. My problem right now is my Router Service is not working. – mr.b Jun 06 '12 at 03:32