It appears that the setContentType was introduced between
revisions 1.5 and 1.6 of RPCRouterServlet.java:
http://xml.apache.org/websrc/cvsweb.cgi/xml-soap/java/src/org/apache/soap/se
rver/http/RPCRouterServlet.java.diff?r1=1.5&r2=1.6&diff_format=h
The change was committed October 17th, 2000.
That means this code was exactly the same in v2.1 too. I am not
inclined to changing it at this point .. without knowing why
it was added. Also, the fact that it was not reported for so
long means that it must work pretty much all the time.
Conceptually, it seems to me that the change you're suggesting is
correct. However, given the age of that code ..
Sanjiva.
----- Original Message -----
From: "Jim Hazen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2001 4:38 PM
Subject: Bug in RPCRouterServlet doGet() in SOAP 2.2 rc3
> There seems to be a problem in the RPCRouterServlet doGet() method.
>
> Instead of printing the 'GET not supported. Talk to me using POST' HTTP
> response. My server (old version of Weblogic) starts throwing
> IllegalStateExceptions:
>
> java.lang.IllegalStateException: Attempt to change ContentType after
calling
> getPrintWriter()
>
> I've looked at the code and sure enough, this is the case.
>
> public void doGet (HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException {
> PrintWriter out = res.getWriter ();
>
> res.setContentType("text/html");
>
> ...
>
> If the setContentType and getWriter lines are swapped the problem goes
away.
>
> Could someone please make this simple fix before the final release.
>
> Thanks,
> Jim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]