Configuring Apache Jserv to recognise XML as correct context type of text/xml

Configuring Apache Jserv to recognise XML as correct context type of text/xml

Post by Aston Wr » Thu, 23 May 2002 17:20:02



Firstly, please excuse my ignorance if this is trivial, but I have
tried to find the answer in all the available FAQs and documentation.
Now to the problem.

I am trying to configure Apache Jserv to post XML messages into an
Oracle Advanced Queue. The way it which the Oracle documentation says
it should work is that the XML message is posted to a configured
Apache port. Apache then calls Jserv which runs a servlet that calls
an Oracle supplied Java method which posts the data to the advanced
queue.

The problem that I am having though is that Oracle appears sending
back a response error message of Invalid Content Type'. I think I
know why this is - because I have overridden the Oracle's doPost
method and outputted the content-type of the message that is being
posted. It appears that Apache is setting the content type to whatever
client posted the XML message and not the content type of the XML
message itself as Oracle expects (Oracle expects a content type of
text/xml).  So for example when I attempt to post the XML message from
a browser the content type set by Apache is
application/www-url-form-encoded. If I run it from a supplied
standalone Java program, Apache sets the content type to
application/octet-stream.

I have tried messing about with the mime.types and magic files but
this has not worked. Apache only appears to change content type
depending on the type of client posting the message as opposed to what
the message payload actually is.

Is there any way that I can either force the content type to be
changed or configure Apache so that it determines the correct content
type for the XML message?

Aston Wray