|
From: Patrick Y. <kc...@ce...> - 2003-03-20 09:54:05
|
RE: [ebxmlms-develop] SOAPException: Unable to internalize messag e =
(Invalid Content-Typ e:text/html)Peter,
Thank you for your note.
Please check out the latest CVS source tree and try again. We have =
committed the change to make the Content-Type not wrapped. What a =
coincident! We have made the change to get Hermes deployable in =
Websphere.
Regards, -Patrick
----- Original Message -----=20
From: Mayne, Peter=20
To: 'ebx...@li...'=20
Sent: Thursday, March 20, 2003 6:13 AM
Subject: RE: [ebxmlms-develop] SOAPException: Unable to internalize =
messag e (Invalid Content-Typ e:text/html)
This turns out to be a bug in Apache. If the header is wrapped (as the =
Content-Type header is) and it is a multiple of eight bytes long when =
unwrapped (which this one is), then not enough space is allocated for =
the header value, and the next header overwrites the end of this value.
Therefore, the Content-Type header breaks, which breaks the parsing of =
the SOAP message. However, instead of an obvious error (like "could not =
find boundary"), SAAJ throws something about text/html, which doesn't =
appear anywhere.
There's one problem fixed, anyway.=20
PJDM=20
--=20
Peter Mayne=20
Technology Consultant=20
Spherion Technology Solutions=20
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602=20
T: 61 2 62689727 F: 61 2 62689777=20
-----Original Message-----=20
From: Mayne, Peter=20
Sent: Wednesday, 19 March 2003 4:36 PM=20
To: 'ebx...@li...'=20
Subject: RE: [ebxmlms-develop] SOAPException: Unable to internalize =
messag e (Invalid Content-Typ e:text/html)=20
That doesn't seem to be the problem, but it nudged me into looking in =
the right place.=20
I'm using Apache (to provide SSL + user authentication) in front of =
Tomcat, connected with the JK2 connector. I've inserted some debugging =
printlns in MessageServicehandler to figure out what's going on.
If I send the incoming message directly to Tomcat, everything works =
fine. In particular, the content type is:=20
multipart/related; type=3D"text/xml";=20
boundary=3D"----=3D_Part_9_24374438.1048047839137"=20
If I send the incoming message to Tomcat via Apache, the content-type =
is:=20
multipart/related; type=3D"text/xml";=20
boundary=3D"----=3D_Part_9_24374438.1048047839137"SOAPAction=20
which is obviously incorrect, and which therefore causes=20
soapMessage =3D messageFactory.createMessage=20
(headers, new ByteArrayInputStream(requestBytes)); =
because the headers are broken. (If I insert some more code just =
before this to take the extra text out of the header, everything works =
fine.)
Wild guess: the bug would appear to be in the JK2 area. More debugging =
coming up...=20
Incidentally, I was seeing this problem a long time before I started =
using JK2. I have no idea what was doing it then.=20
PJDM=20
--=20
Peter Mayne=20
Technology Consultant=20
Spherion Technology Solutions=20
Level 1, 243 Northbourne Avenue, Lyneham, ACT, 2602=20
T: 61 2 62689727 F: 61 2 62689777=20
> -----Original Message-----=20
> From: Ng Chi Yuen [Cyng] [mailto:cy...@cs...]=20
> Sent: Wednesday, 19 March 2003 2:40 PM=20
> To: Ebxmlms Developers List=20
> Subject: Re: [ebxmlms-develop] SOAPException: Unable to=20
> internalize message (Invalid Content-Typ e:text/html)=20
>=20
>=20
> Hi,=20
>=20
> > java.security.PrivilegedActionException:=20
> javax.xml.soap.SOAPException:=20
> > Unable to internalize message=20
> >=20
> > with the accompanying exceptions. I have no idea what=20
> causes it: they'll=20
> > just start happening. I have no diea how to stop it either;=20
> eventually=20
> > things will go back to normal.=20
> >=20
> > Would anybody care to hazard a guess as to what's going on?=20
> >=20
> > javax.xml.soap.SOAPException: Invalid Content-Type:text/html=20
> ^^^^^^^^^=20
>=20
> It seems that your receiver answers HTTP_OK (200) with=20
> Content-Type being text/html. When JAXM sends a SOAPMessage out, it=20
> expects a text/xml response for HTTP_OK when unmarshalling=20
> the response=20
> message. Otherwise, SOAPException will be thrown by JAXM.=20
>=20
> Regards,=20
> CY=20
>=20
> --------------------------------------------------------------=20
> --------------=20
> Ng Chi Yuen, CY. cy...@ce... =20
> http://www.cecid.hku.hk/=20
> Technology Officer,=20
> Centre for=20
> E-Commerce Infrastructure Development,=20
> The University of Hong Kong=20
> --------------------------------------------------------------=20
> --------------=20
>=20
>=20
>=20
> -------------------------------------------------------=20
> This SF.net email is sponsored by: Does your code think in ink?=20
> You could win a Tablet PC. Get a free Tablet PC hat just for =
playing.=20
> What are you waiting for?=20
> http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en=20
> _______________________________________________=20
> ebxmlms-develop mailing list=20
> ebx...@li...=20
> https://lists.sourceforge.net/lists/listinfo/ebxmlms-develop=20
>=20
The information contained in this email and any attachments to it:=20
(a) may be confidential and if you are not the intended recipient, any =
interference with,=20
use, disclosure or copying of this material is unauthorised and =
prohibited; and=20
(b) may contain personal information of the recipient and/or the =
sender as defined=20
under the Privacy Act 1988 (Cth). Consent is hereby given by the =
recipient(s) to=20
collect, hold and use such information and any personal information =
contained in a=20
response to this email, for any reasonable purpose in the ordinary =
course of=20
Spherion's=20
business, including forwarding this email internally or disclosing it =
to a third party. All=20
personal information collected by Spherion will be handled in =
accordance with=20
Spherion's Privacy Policy. If you have received this email in error, =
please notify the=20
sender and delete it.=20
(c) you agree not to employ or arrange employment for any candidate(s) =
supplied in=20
this email and any attachments without first entering into a =
contractual agreement with=20
Spherion. You further agree not to divulge any information contained =
in this document=20
to any person(s) or entities without the express permission of =
Spherion.=20
|