Thanks Guillaume,

I forgot to check but there is already a Jira (http://issues.apache.org/activemq/browse/SM-44) which states that Mime encodings will not be supported by HttpInOutBinding. Is that still the case?

I have had a quick look at the http parser below, it seems to do the trick quite nicely. It is also available as a Maven package at http://www.ibiblio.org/maven/nekohtml so it should integrate well into the build.

So the questions that remain are:

- Should the leightweight components support mime?
- Should they support http get?
- Should they recognise the text/html content-type and parse the document using nekohtml?

or

- Should this be only part of the http component?

I have also raised a jira for the SoapReader (http://issues.apache.org/activemq/browse/SM-409) so it does not assume by default that the first part of multi mime is xml. Once I have figured out how to add a patch, I will add it.

Stefan


Guillaume Nodet wrote:
FYI, there are also some http parsers that can generate valid xml content.
Take a look at http://people.apache.org/~andyc/neko/doc/html/index.html

Cheers,
Guillaume Nodet

On 4/24/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
Feel free to raise a jira and contribute a patch on servicemix-soap.
The dummy message is also needed for GET requests, so I guess we could
also use it in this case ...

Cheers,
Guillaume Nodet

On 4/24/06, Stefan Klinger <[EMAIL PROTECTED]> wrote:
Hello,

I have built my own lightweight binding components similar to the
o.a.s.components.http.* classes to use with http get in order to
retrieve html pages via ESB. The problem is that the HttpMarshaler/
HttpClientMarshaler expect the content of the http request/ response
body to be xml in order for them to include it in the NormalizedMessage
content. Unfortunately, this does not work with html as it is not xml
compliant, so I put the response body in as an attachment. I have tested
the new components and it seems to work fine.

I wonder whether for a more generic solution the lightweight Marshalers
should support other Mime-Types. Only if the content-type of the http
header is "text/xml" the http requests/ responses are transformed into
the NormalizedMessage contents, otherwise they use an dummy contents and
attach the request/response to the message. I'd be happy to work on this.

I know that the HttpComponent already allows for MultiMimeMessage Post
Requests, however, it expects at least one part of it to be xml (which I
don't like). I would much rather prefer for the SoapReader to check if
there is a xml part available, if yes, use it as content, otherwise
attach everything and use a dummy message content.

Any comments are most welcome.

Stefan



Reply via email to