tags:

views:

58

answers:

3

I'm looking to add a web services interface to an existing server application. The set of services to expose is not known at compile time and can change over the runtime life of the server.

From a tech standpoint all the server/web services endpoints will be on Windows.

In our server app a user will have the option to register workflows as 'web services callable'. This will create the WSDL defining this particular workflow service.

For the calling endpoint I'm thinking of an HttpModule that accepts the inbound web service request, unpacks the request and converts the XML data types into our server applications "domain", calls the server and finally converts the server outputs back into XML for return down the http connection.

Does that make sense?

Critical comments welcomed.

+1  A: 

an HttpModule that accepts the inbound web service request, unpacks the request and converts the XML data types into our server applications "domain", calls the server and finally converts the server outputs back into XML for return down the http connection.

That is what all web service frameworks do (e.g. Metro, Axis). So I can't see your problem. What's your concern with this approach?

The downside for the client is that, as far as I understand it, availability of your services may change over time. So you should consider a way to inform the client if the service is available (other than getting a time out error because it is not there), e.g. WS-ResourceLifetime or UUDI.

wierob
I think the extra piece over the standard WS engine is that the WSDLs are dynamic, new ones can arrive frequently, so some kind of dynamic deploy facility is needed.
djna
I'm not sure I know enough to have any concerns about the approach just yet. I was hoping that someone, somewhere had already approached this problem and could provide the beenfit of their experience. As you say existing web services frameworks have to work this way so that's validation enough.
TheArtTrooper
+2  A: 

In effect writing your own WS engine. Clearly doable, but quite a bit of work to get right from scratch. I guess if you find some open source implementation, then adapting it should be possible.

A rather dirtier alternative, but one I've seen applied in another context, is to go for a simgle WS interface

String call( String workkFlowName, String payload)

The payload and response are both Strings containing any XML. So the caller needs to undestand the schemas for those XMLs. From the client's perspective the amount of coding effort is not much different. Your coding effort would I think be significantly redcued.

djna
I like the idea that clients can use the discovery/proxy generating tools of their chosen environment to strongly bind against a specific service. Nevertheless I take your point about it making the server-side easier and a dedicated client person wouldn't have too much of a hardship with it either.
TheArtTrooper
A: 

I ended up creating a C# class that implements the IHttpHandler interface. The implementation serves up the WSDL of the services exposed from our app and accepts SOAP posts to invoke the services. In the end most of the work went on converting SOAP types to our types and vice versa.

TheArtTrooper