Boden
Boden

Reputation: 4167

Sending XML over HTTP in a simple, neutral way

We have some standalone devices that will send XML messages to arbitrary processing software (may be developed by us, may be 3rd party) over HTTP. The messages are relatively simple, and will conform to an existing schema. No specific reply is necessary.

I suddenly find myself lost in a world of web service technology jargon. I'd like the following:

  1. To keep the devices as simple as possible, and not tied to any particular technology like SOAP (unless it's beneficial).
  2. To make it as simple as possible to consume the messages. For instance, I could just send XML over HTTP, but then the receiver would have to manually process the message (I think). It would be great if anyone could use WSDL-like tools to easily create consumers in any language.

Please help fill in the giant gaps in my understanding...and point me in the right direction. Thanks!

UPDATE: I should have made myself a little more clear. I'm not against using any "technology", I'm just looking for advice to strike a good balance. The standalone devices will have very limited capabilities, but enough to send an XML message over HTTP -- I don't want to complicate these things any more than I have to.

Then I can certainly just consume and manually process the XML messages..... but it would be neat if there was a way to generate this code (the way I can generate code from WSDL). What I've got is an .xsd describing the messages themselves, nothing more.

Upvotes: 1

Views: 5901

Answers (4)

Lawrence Mandel
Lawrence Mandel

Reputation: 140

Following on the comment above about WADL, you can also try WSDL 2.0. While not widely adopted yet, WSDL 2.0 does contain good support for REST style services. WSDL 2.0 is supported in Apache Axis2, which I think includes support in its WSDL2Java tool.

Upvotes: 1

Zach
Zach

Reputation: 2155

I know you said you want to stay away from particular technologies like SOAP unless they're beneficial, but one of the main benefits that well-defined technologies have are sets of tools for parsing messages in a consistent manner. Having said that, I don't think SOAP is right for you.

I would aim for a RESTful architecture since the messages are just plain XML and there are libraries for emitting and consuming REST-style messages in a variety of languages. You can typically hit the ground running faster with REST than with comparable technologies like SOAP, but there are still paradigms to learn.

Edit: You could describe your service using WADL which describes the RESTful architecture and includes any relevant schema. You could then use the WADL2Java tool or another WADL tool to generate the endpoint stubs. I think this approach is the closes to what you want to do while leveraging your existing schemas and not having to change your client code. Here is a sample WADL file and a little bit of info on it.

Upvotes: 2

bmargulies
bmargulies

Reputation: 100133

It seems to me that you want two contradictory things here. Anything that provides tools will be a particular technology.

However one possibility is this:

Apache CXF has a plain XML-over-http binding.

But it won't create consumers in any language. For that I really can't suggest anything except SOAP or REST.

Upvotes: 1

Pete Nelson
Pete Nelson

Reputation: 1338

Could you programatically do a form post of the XML?

C# Programmatic Form Post

Upvotes: 1

Related Questions