views:

34

answers:

2

hey there!

The brand-new WCF-based code needs (in the meanwhile) to provide a service to a legacy code that works in plain HTTP. So that, along with new SOAPed requests, I need to tailor some oldskul-style communication (on a different port): to be able to receive plain HTTP, analyse the request body and send the plain HTTP with some body in response.

Looked at the System.ServiceModel.ServiceHost API but couldn't find anything appropriate. Any advice will be generously accepted. It is strongly preferred to leave the legacy code as it is, do I have a real choice here? Thanks in advance!

A: 

Your best bet is to attempt to use BasicHttpBinding. It should be interoperable with older web services.

Bernard
This would only work if you use SOAP.
Aliostad
I think you're right. It seems that WebHttpBinding would be a better option.
Bernard
+1  A: 

I think the main question is how your service and the body of your messages are defined.

WCF currently has more flexibility allowing for sending and receiving non-SOAP XML messages, JSON, ATOM, ATOMPub, ... but if you are sending plain text or custom format as the body of your messages, WCF is probably not the way to go.

So what is your message body?

UPDATE

WebHttpBinding is the way to go: http://msdn.microsoft.com/en-us/library/system.servicemodel.webhttpbinding.aspx

Aliostad
some custom-tailored XML both in body and in the request - let's assume it's a plain text even
BreakPhreak
I have updated, have a look any issue let me know.
Aliostad