You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Wouter Cloetens <wc...@raleigh.ibm.com> on 2000/08/19 20:16:11 UTC

RE: Version 2.0 Problem

Very close!
The getReader() request honours the (new to this version for the sake of i18n support) 
"charset=UTF-8" parameter to the Content-Type HTTP header. It attempts to return a 
Reader for that encoding, and Java barfs on that because it only recognises "UTF8" 
and not of the Mime-style "UTF-8". My multipart mime extensions use JavaMail's 
Mime-style to Java-style mapper to tackle this problem properly by supporting any 
type of charset, but if you want a simple fix, try this patch to line 160 
RPCRouterServlet.java:

replace:
      Reader requestReader = req.getReader ();
with:
      Reader requestReader = new InputStreamReader(request.getInputStream, 
"UTF8");

I don't have the opportunity to test this myself just now, so good luck...

I don't know why the problem doesn't seem to manifest itself on other configurations. 
Maybe newer versions of the JDSK or the servlet engine of Tomcat have a 
mime-to-java charset mapper in their getReader() implementation. Or maybe Java 2 
recognises mime-style charset types.

The {get|set}Attribute thing may be trickier to resolve. I haven't had the time to check 
out the new RPCRouterServlet yet, but I definitely plan to release WebSphere 
patches. I just may not have the chance any time soon. :-(

bfn, Wouter


On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:

>Hi Cory:
>
>I think there's something wrong there with the encoding style.  Apparently,
>from what I can tell from a net search, the reader is trying to load a class
>that can convert bytes to chars using the UTF-8 encoding style.  The proper
>name of this encoder is not sun.io.ByteToCharUTF-8, but
>sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a similar
>problem was encountered by some people using XML-RPC:
>
>http://helma.org/archives/xmlrpc/2000-May/000066.html
>
>I can imagine that it might be:
>
>1.  There's a bug somewhere that's not mapping the encoding name ("UTF-8")
>to the class name (sun.io.ByteToCharUTF8) properly.
>2.  You've set an encoding style in your request to UTF-8, and it's trying
>to respond in kind, but can't find a mapping.
>3.  Your server returns things in the UTF-8 style (unlike other servers that
>work), and #1 applies.
>
>  -----Original Message-----
>  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
>  Sent: Saturday, August 19, 2000 8:29 PM
>  To: soap-user@xml.apache.org
>  Subject: Version 2.0 Problem
>
>
>  I still cannot get the 2.0 version to run with WebSphere. I did find a
>couple of things out, and recompiled from source, but still no luck.
>
>  The RPCRouterServlet uses 'session.setAttribute' and
>'session.getAttribute' which are not supported by the Servlet 2.1 version
>that WebSphere uses. I tried replacing these two calls with:
>putValue/getValue (the deprecated version), to no avail. But it did let me
>recompile, but didn't fix the bug.
>
>  The servlet keeps failing on this line of code:
>
>  Reader requestReader = req.getReader ();
>
>  It is complaining about: java.lang.IllegalArgumentException:
>sun.io.ByteToCharUTF-8
>
>  I can't find where that might be coming from, and its such a simple call
>(that I have done many times in my environment) that its very puzzling.
>
>  I ran the TcpTunnelGui, and the results are below. The only thing that
>looks suspiscious at all is the header from the servlet side, which has:
>Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
>think UTF8 is standardly supported in the Servlet API 2.1 as well.
>
>  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
>required, but I have no idea, as getReader is such a simple call I can't see
>what's causing it.
>
>  Would it be possible to keep release 2.0 working with the Servlet 2.1 API
>(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be supported in
>WebSphere until the next release comes out, and there are a lot of people
>testing SOAP with WebSphere currently.
>
>  At any rate, let me know if more help is needed to debug this, as now that
>I have the source environment set up I can do more work on it if needed. The
>product looks very well put together now in version 2.0 and I'd really like
>to use it.
>
>  Thanks,
>
>  Cory
>
>  --------------------------------------
>
>  Client:
>
>  Host: surgefl2:8081
>
>  Content-Type: text/xml
>
>  Content-Length: 418
>
>  SOAPAction: ""
>
>
>
>  <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
>
>  <SOAP-ENV:Body>
>
>  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>
>  <symbol xsi:type="xsd:string">IBM</symbol>
>
>  </ns1:getQuote>
>
>  </SOAP-ENV:Body>
>
>  </SOAP-ENV:Envelope>
>
>
>  Server:
>
>  HTTP/1.1 200 ok
>
>  Date: Sun, 20 Aug 2000 03:17:11 GMT
>
>  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
>
>  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
>
>  Cache-Control: no-cache="set-cookie,set-cookie2"
>
>  Expires: Thu, 01 Dec 1994 16:00:00 GMT
>
>  content-length: 3991
>
>  Connection: close
>
>  Content-Type: text/xml;;charset=UTF-8
>
>
>
>  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
>
>   at
>sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
>
>   at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
>
>   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
>
>   at
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.jav
>a:286)
>
>   at
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServletR
>equestProxy.java:169)
>
>   at
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServletR
>equestProxy.java:169)
>
>   at
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:16
>1)
>
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
>
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
>
>   at
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
>.java:557)
>
>   at
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
>eServlet.java:160)
>
>   at
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
>t.java:287)
>
>   at
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
>Servlet.java:105)
>
>   at
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:34
>9)
>
>   at
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
>ager.java:705)
>
>   at
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
>er.java:631)
>
>   at
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
atch(W
>ebApp.java:1175)
>
>   at
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
va:1
>043)
>
>   at
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
a:10
>02)
>
>   at
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:172
>)
>
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
>
>   at
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
>.java:557)
>
>   at
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
>eServlet.java:160)
>
>   at
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
>t.java:287)
>
>   at
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
>Servlet.java:105)
>
>   at
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:34
>9)
>
>   at
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
>ager.java:705)
>
>   at
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
>er.java:631)
>
>   at
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
atch(W
>ebApp.java:1175)
>
>   at
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
va:1
>043)
>
>   at
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
a:10
>02)
>
>   at
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
:
>626)
>
>   at
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
>vocation.java:67)
>
>   at
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheabl
>eInvocationContext.java:106)
>
>   at
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
>estProcessor.java:144)
>
>   at
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
>.java:300)
>
>   at
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQ
>EventListenerImp.java:230)
>
>   at
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventL
>istenerImp.java:104)
>
>   at
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQE
>ventSource.java:202)
>
>   at
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
u
>nnable.notifyService(SQWrapperEventSource.java:347)
>
>   at
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
u
>nnable.run(SQWrapperEventSource.java:216)
>
>   at
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run
>(Compiled Code)
>
>   at java.lang.Thread.run(Thread.java:472)
>
>
>

--
http://www.workspot.net/~zombie/soap/
My opinions are irrelevant. They will be assimilated by my employer.


Re: Version 2.0 Problem

Posted by Cory Isaacson <ci...@capita2.com>.
I'll just live with my own mods for now, and Websphere has announced a newer
version, so hopefully it will come soon.

Cory
----- Original Message -----
From: "George I Matkovits" <ma...@uswest.net>
To: <so...@xml.apache.org>
Sent: Monday, August 21, 2000 11:54 AM
Subject: Re: Version 2.0 Problem


> 'session.putValue'  has been depreciated and will probably be removed.
IMHO
> IBM's Websphare should keep up with the rest of the world! I find it
rather
> disturbing when new code is created around defunct APIs (where I work they
would
> kill me during my next code review :-) Perhaps we should have '#ifdef
> capability' in Java (-: The Servlet API V2.2 specification has been out
for
> sometime now.)
> Regards - George
>
> Cory Isaacson wrote:
>
> > Wouter,
> >
> > I did solve this by making the following mods:
> >
> > In Constants I changed:
> >
> > public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
> > charset=UTF-8";
> >
> > to:
> >
> > public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF8";
> >
> > And in RPCRouterServlet I changed:
> >
> >     targetObject = session.getAttribute (targetID);
> >
> > to:
> >
> >      targetObject = session.getValue (targetID);
> >
> > and:
> >
> >   session.setAttribute (targetID, targetObject);
> >
> >   session.putValue (targetID, targetObject);
> >
> > That did the trick, and unless there is a good reason not to, it would
be
> > nice to incorporate these changes into the source so that it works with
> > current versions of WebSphere. Functionality should not be affected on
other
> > servers with these changes.
> >
> > Cory
> >
> > ----- Original Message -----
> > From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
> > To: <so...@xml.apache.org>
> > Sent: Saturday, August 19, 2000 2:16 PM
> > Subject: RE: Version 2.0 Problem
> >
> > > Very close!
> > > The getReader() request honours the (new to this version for the sake
of
> > i18n support)
> > > "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts
to
> > return a
> > > Reader for that encoding, and Java barfs on that because it only
> > recognises "UTF8"
> > > and not of the Mime-style "UTF-8". My multipart mime extensions use
> > JavaMail's
> > > Mime-style to Java-style mapper to tackle this problem properly by
> > supporting any
> > > type of charset, but if you want a simple fix, try this patch to line
160
> > > RPCRouterServlet.java:
> > >
> > > replace:
> > >       Reader requestReader = req.getReader ();
> > > with:
> > >       Reader requestReader = new
InputStreamReader(request.getInputStream,
> > > "UTF8");
> > >
> > > I don't have the opportunity to test this myself just now, so good
luck...
> > >
> > > I don't know why the problem doesn't seem to manifest itself on other
> > configurations.
> > > Maybe newer versions of the JDSK or the servlet engine of Tomcat have
a
> > > mime-to-java charset mapper in their getReader() implementation. Or
maybe
> > Java 2
> > > recognises mime-style charset types.
> > >
> > > The {get|set}Attribute thing may be trickier to resolve. I haven't had
the
> > time to check
> > > out the new RPCRouterServlet yet, but I definitely plan to release
> > WebSphere
> > > patches. I just may not have the chance any time soon. :-(
> > >
> > > bfn, Wouter
> > >
> > >
> > > On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
> > >
> > > >Hi Cory:
> > > >
> > > >I think there's something wrong there with the encoding style.
> > Apparently,
> > > >from what I can tell from a net search, the reader is trying to load
a
> > class
> > > >that can convert bytes to chars using the UTF-8 encoding style.  The
> > proper
> > > >name of this encoder is not sun.io.ByteToCharUTF-8, but
> > > >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a
similar
> > > >problem was encountered by some people using XML-RPC:
> > > >
> > > >http://helma.org/archives/xmlrpc/2000-May/000066.html
> > > >
> > > >I can imagine that it might be:
> > > >
> > > >1.  There's a bug somewhere that's not mapping the encoding name
> > ("UTF-8")
> > > >to the class name (sun.io.ByteToCharUTF8) properly.
> > > >2.  You've set an encoding style in your request to UTF-8, and it's
> > trying
> > > >to respond in kind, but can't find a mapping.
> > > >3.  Your server returns things in the UTF-8 style (unlike other
servers
> > that
> > > >work), and #1 applies.
> > > >
> > > >  -----Original Message-----
> > > >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> > > >  Sent: Saturday, August 19, 2000 8:29 PM
> > > >  To: soap-user@xml.apache.org
> > > >  Subject: Version 2.0 Problem
> > > >
> > > >
> > > >  I still cannot get the 2.0 version to run with WebSphere. I did
find a
> > > >couple of things out, and recompiled from source, but still no luck.
> > > >
> > > >  The RPCRouterServlet uses 'session.setAttribute' and
> > > >'session.getAttribute' which are not supported by the Servlet 2.1
version
> > > >that WebSphere uses. I tried replacing these two calls with:
> > > >putValue/getValue (the deprecated version), to no avail. But it did
let
> > me
> > > >recompile, but didn't fix the bug.
> > > >
> > > >  The servlet keeps failing on this line of code:
> > > >
> > > >  Reader requestReader = req.getReader ();
> > > >
> > > >  It is complaining about: java.lang.IllegalArgumentException:
> > > >sun.io.ByteToCharUTF-8
> > > >
> > > >  I can't find where that might be coming from, and its such a simple
> > call
> > > >(that I have done many times in my environment) that its very
puzzling.
> > > >
> > > >  I ran the TcpTunnelGui, and the results are below. The only thing
that
> > > >looks suspiscious at all is the header from the servlet side, which
has:
> > > >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but
I
> > > >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> > > >
> > > >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> > > >required, but I have no idea, as getReader is such a simple call I
can't
> > see
> > > >what's causing it.
> > > >
> > > >  Would it be possible to keep release 2.0 working with the Servlet
2.1
> > API
> > > >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be
supported
> > in
> > > >WebSphere until the next release comes out, and there are a lot of
people
> > > >testing SOAP with WebSphere currently.
> > > >
> > > >  At any rate, let me know if more help is needed to debug this, as
now
> > that
> > > >I have the source environment set up I can do more work on it if
needed.
> > The
> > > >product looks very well put together now in version 2.0 and I'd
really
> > like
> > > >to use it.
> > > >
> > > >  Thanks,
> > > >
> > > >  Cory
> > > >
> > > >  --------------------------------------
> > > >
> > > >  Client:
> > > >
> > > >  Host: surgefl2:8081
> > > >
> > > >  Content-Type: text/xml
> > > >
> > > >  Content-Length: 418
> > > >
> > > >  SOAPAction: ""
> > > >
> > > >
> > > >
> > > >  <SOAP-ENV:Envelope
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > > >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> > > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > > >
> > > >  <SOAP-ENV:Body>
> > > >
> > > >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> > > >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > > >
> > > >  <symbol xsi:type="xsd:string">IBM</symbol>
> > > >
> > > >  </ns1:getQuote>
> > > >
> > > >  </SOAP-ENV:Body>
> > > >
> > > >  </SOAP-ENV:Envelope>
> > > >
> > > >
> > > >  Server:
> > > >
> > > >  HTTP/1.1 200 ok
> > > >
> > > >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> > > >
> > > >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> > > >
> > > >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> > > >
> > > >  Cache-Control: no-cache="set-cookie,set-cookie2"
> > > >
> > > >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> > > >
> > > >  content-length: 3991
> > > >
> > > >  Connection: close
> > > >
> > > >  Content-Type: text/xml;;charset=UTF-8
> > > >
> > > >
> > > >
> > > >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> > > >
> > > >   at
> > >
>sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> > > >
> > > >   at
> > sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> > > >
> > > >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
> > v
> > > >a:286)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> > R
> > > >equestProxy.java:169)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> > R
> > > >equestProxy.java:169)
> > > >
> > > >   at
> > >
> >
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
> > 6
> > > >1)
> > > >
> > > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> > > >
> > > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> > r
> > > >.java:557)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> > l
> > > >eServlet.java:160)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> > e
> > > >t.java:287)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> > e
> > > >Servlet.java:105)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> > 4
> > > >9)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> > n
> > > >ager.java:705)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> > g
> > > >er.java:631)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > > atch(W
> > > >ebApp.java:1175)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > > va:1
> > > >043)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > > a:10
> > > >02)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
> > 2
> > > >)
> > > >
> > > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> > r
> > > >.java:557)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> > l
> > > >eServlet.java:160)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> > e
> > > >t.java:287)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> > e
> > > >Servlet.java:105)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> > 4
> > > >9)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> > n
> > > >ager.java:705)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> > g
> > > >er.java:631)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > > atch(W
> > > >ebApp.java:1175)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > > va:1
> > > >043)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > > a:10
> > > >02)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> > > :
> > > >626)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
> > n
> > > >vocation.java:67)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
> > l
> > > >eInvocationContext.java:106)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
> > u
> > > >estProcessor.java:144)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
> > r
> > > >.java:300)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
> > Q
> > > >EventListenerImp.java:230)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
> > L
> > > >istenerImp.java:104)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
> > E
> > > >ventSource.java:202)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > > u
> > > >nnable.notifyService(SQWrapperEventSource.java:347)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > > u
> > > >nnable.run(SQWrapperEventSource.java:216)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
> > n
> > > >(Compiled Code)
> > > >
> > > >   at java.lang.Thread.run(Thread.java:472)
> > > >
> > > >
> > > >
> > >
> > > --
> > > http://www.workspot.net/~zombie/soap/
> > > My opinions are irrelevant. They will be assimilated by my employer.
> > >
>


Re: Version 2.0 Problem

Posted by Cory Isaacson <ci...@capita2.com>.
I'll just live with my own mods for now, and Websphere has announced a newer
version, so hopefully it will come soon.

Cory
----- Original Message -----
From: "George I Matkovits" <ma...@uswest.net>
To: <so...@xml.apache.org>
Sent: Monday, August 21, 2000 11:54 AM
Subject: Re: Version 2.0 Problem


> 'session.putValue'  has been depreciated and will probably be removed.
IMHO
> IBM's Websphare should keep up with the rest of the world! I find it
rather
> disturbing when new code is created around defunct APIs (where I work they
would
> kill me during my next code review :-) Perhaps we should have '#ifdef
> capability' in Java (-: The Servlet API V2.2 specification has been out
for
> sometime now.)
> Regards - George
>
> Cory Isaacson wrote:
>
> > Wouter,
> >
> > I did solve this by making the following mods:
> >
> > In Constants I changed:
> >
> > public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
> > charset=UTF-8";
> >
> > to:
> >
> > public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF8";
> >
> > And in RPCRouterServlet I changed:
> >
> >     targetObject = session.getAttribute (targetID);
> >
> > to:
> >
> >      targetObject = session.getValue (targetID);
> >
> > and:
> >
> >   session.setAttribute (targetID, targetObject);
> >
> >   session.putValue (targetID, targetObject);
> >
> > That did the trick, and unless there is a good reason not to, it would
be
> > nice to incorporate these changes into the source so that it works with
> > current versions of WebSphere. Functionality should not be affected on
other
> > servers with these changes.
> >
> > Cory
> >
> > ----- Original Message -----
> > From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
> > To: <so...@xml.apache.org>
> > Sent: Saturday, August 19, 2000 2:16 PM
> > Subject: RE: Version 2.0 Problem
> >
> > > Very close!
> > > The getReader() request honours the (new to this version for the sake
of
> > i18n support)
> > > "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts
to
> > return a
> > > Reader for that encoding, and Java barfs on that because it only
> > recognises "UTF8"
> > > and not of the Mime-style "UTF-8". My multipart mime extensions use
> > JavaMail's
> > > Mime-style to Java-style mapper to tackle this problem properly by
> > supporting any
> > > type of charset, but if you want a simple fix, try this patch to line
160
> > > RPCRouterServlet.java:
> > >
> > > replace:
> > >       Reader requestReader = req.getReader ();
> > > with:
> > >       Reader requestReader = new
InputStreamReader(request.getInputStream,
> > > "UTF8");
> > >
> > > I don't have the opportunity to test this myself just now, so good
luck...
> > >
> > > I don't know why the problem doesn't seem to manifest itself on other
> > configurations.
> > > Maybe newer versions of the JDSK or the servlet engine of Tomcat have
a
> > > mime-to-java charset mapper in their getReader() implementation. Or
maybe
> > Java 2
> > > recognises mime-style charset types.
> > >
> > > The {get|set}Attribute thing may be trickier to resolve. I haven't had
the
> > time to check
> > > out the new RPCRouterServlet yet, but I definitely plan to release
> > WebSphere
> > > patches. I just may not have the chance any time soon. :-(
> > >
> > > bfn, Wouter
> > >
> > >
> > > On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
> > >
> > > >Hi Cory:
> > > >
> > > >I think there's something wrong there with the encoding style.
> > Apparently,
> > > >from what I can tell from a net search, the reader is trying to load
a
> > class
> > > >that can convert bytes to chars using the UTF-8 encoding style.  The
> > proper
> > > >name of this encoder is not sun.io.ByteToCharUTF-8, but
> > > >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a
similar
> > > >problem was encountered by some people using XML-RPC:
> > > >
> > > >http://helma.org/archives/xmlrpc/2000-May/000066.html
> > > >
> > > >I can imagine that it might be:
> > > >
> > > >1.  There's a bug somewhere that's not mapping the encoding name
> > ("UTF-8")
> > > >to the class name (sun.io.ByteToCharUTF8) properly.
> > > >2.  You've set an encoding style in your request to UTF-8, and it's
> > trying
> > > >to respond in kind, but can't find a mapping.
> > > >3.  Your server returns things in the UTF-8 style (unlike other
servers
> > that
> > > >work), and #1 applies.
> > > >
> > > >  -----Original Message-----
> > > >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> > > >  Sent: Saturday, August 19, 2000 8:29 PM
> > > >  To: soap-user@xml.apache.org
> > > >  Subject: Version 2.0 Problem
> > > >
> > > >
> > > >  I still cannot get the 2.0 version to run with WebSphere. I did
find a
> > > >couple of things out, and recompiled from source, but still no luck.
> > > >
> > > >  The RPCRouterServlet uses 'session.setAttribute' and
> > > >'session.getAttribute' which are not supported by the Servlet 2.1
version
> > > >that WebSphere uses. I tried replacing these two calls with:
> > > >putValue/getValue (the deprecated version), to no avail. But it did
let
> > me
> > > >recompile, but didn't fix the bug.
> > > >
> > > >  The servlet keeps failing on this line of code:
> > > >
> > > >  Reader requestReader = req.getReader ();
> > > >
> > > >  It is complaining about: java.lang.IllegalArgumentException:
> > > >sun.io.ByteToCharUTF-8
> > > >
> > > >  I can't find where that might be coming from, and its such a simple
> > call
> > > >(that I have done many times in my environment) that its very
puzzling.
> > > >
> > > >  I ran the TcpTunnelGui, and the results are below. The only thing
that
> > > >looks suspiscious at all is the header from the servlet side, which
has:
> > > >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but
I
> > > >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> > > >
> > > >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> > > >required, but I have no idea, as getReader is such a simple call I
can't
> > see
> > > >what's causing it.
> > > >
> > > >  Would it be possible to keep release 2.0 working with the Servlet
2.1
> > API
> > > >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be
supported
> > in
> > > >WebSphere until the next release comes out, and there are a lot of
people
> > > >testing SOAP with WebSphere currently.
> > > >
> > > >  At any rate, let me know if more help is needed to debug this, as
now
> > that
> > > >I have the source environment set up I can do more work on it if
needed.
> > The
> > > >product looks very well put together now in version 2.0 and I'd
really
> > like
> > > >to use it.
> > > >
> > > >  Thanks,
> > > >
> > > >  Cory
> > > >
> > > >  --------------------------------------
> > > >
> > > >  Client:
> > > >
> > > >  Host: surgefl2:8081
> > > >
> > > >  Content-Type: text/xml
> > > >
> > > >  Content-Length: 418
> > > >
> > > >  SOAPAction: ""
> > > >
> > > >
> > > >
> > > >  <SOAP-ENV:Envelope
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > > >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> > > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > > >
> > > >  <SOAP-ENV:Body>
> > > >
> > > >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> > > >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > > >
> > > >  <symbol xsi:type="xsd:string">IBM</symbol>
> > > >
> > > >  </ns1:getQuote>
> > > >
> > > >  </SOAP-ENV:Body>
> > > >
> > > >  </SOAP-ENV:Envelope>
> > > >
> > > >
> > > >  Server:
> > > >
> > > >  HTTP/1.1 200 ok
> > > >
> > > >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> > > >
> > > >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> > > >
> > > >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> > > >
> > > >  Cache-Control: no-cache="set-cookie,set-cookie2"
> > > >
> > > >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> > > >
> > > >  content-length: 3991
> > > >
> > > >  Connection: close
> > > >
> > > >  Content-Type: text/xml;;charset=UTF-8
> > > >
> > > >
> > > >
> > > >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> > > >
> > > >   at
> > >
>sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> > > >
> > > >   at
> > sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> > > >
> > > >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
> > v
> > > >a:286)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> > R
> > > >equestProxy.java:169)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> > R
> > > >equestProxy.java:169)
> > > >
> > > >   at
> > >
> >
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
> > 6
> > > >1)
> > > >
> > > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> > > >
> > > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> > r
> > > >.java:557)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> > l
> > > >eServlet.java:160)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> > e
> > > >t.java:287)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> > e
> > > >Servlet.java:105)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> > 4
> > > >9)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> > n
> > > >ager.java:705)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> > g
> > > >er.java:631)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > > atch(W
> > > >ebApp.java:1175)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > > va:1
> > > >043)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > > a:10
> > > >02)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
> > 2
> > > >)
> > > >
> > > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> > r
> > > >.java:557)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> > l
> > > >eServlet.java:160)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> > e
> > > >t.java:287)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> > e
> > > >Servlet.java:105)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> > 4
> > > >9)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> > n
> > > >ager.java:705)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> > g
> > > >er.java:631)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > > atch(W
> > > >ebApp.java:1175)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > > va:1
> > > >043)
> > > >
> > > >   at
> > >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > > a:10
> > > >02)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> > > :
> > > >626)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
> > n
> > > >vocation.java:67)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
> > l
> > > >eInvocationContext.java:106)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
> > u
> > > >estProcessor.java:144)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
> > r
> > > >.java:300)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
> > Q
> > > >EventListenerImp.java:230)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
> > L
> > > >istenerImp.java:104)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
> > E
> > > >ventSource.java:202)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > > u
> > > >nnable.notifyService(SQWrapperEventSource.java:347)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > > u
> > > >nnable.run(SQWrapperEventSource.java:216)
> > > >
> > > >   at
> > >
> >
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
> > n
> > > >(Compiled Code)
> > > >
> > > >   at java.lang.Thread.run(Thread.java:472)
> > > >
> > > >
> > > >
> > >
> > > --
> > > http://www.workspot.net/~zombie/soap/
> > > My opinions are irrelevant. They will be assimilated by my employer.
> > >
>


Re: Version 2.0 Problem

Posted by George I Matkovits <ma...@uswest.net>.
'session.putValue'  has been depreciated and will probably be removed. IMHO
IBM's Websphare should keep up with the rest of the world! I find it rather
disturbing when new code is created around defunct APIs (where I work they would
kill me during my next code review :-) Perhaps we should have '#ifdef
capability' in Java (-: The Servlet API V2.2 specification has been out for
sometime now.)
Regards - George

Cory Isaacson wrote:

> Wouter,
>
> I did solve this by making the following mods:
>
> In Constants I changed:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
> charset=UTF-8";
>
> to:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml; charset=UTF8";
>
> And in RPCRouterServlet I changed:
>
>     targetObject = session.getAttribute (targetID);
>
> to:
>
>      targetObject = session.getValue (targetID);
>
> and:
>
>   session.setAttribute (targetID, targetObject);
>
>   session.putValue (targetID, targetObject);
>
> That did the trick, and unless there is a good reason not to, it would be
> nice to incorporate these changes into the source so that it works with
> current versions of WebSphere. Functionality should not be affected on other
> servers with these changes.
>
> Cory
>
> ----- Original Message -----
> From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
> To: <so...@xml.apache.org>
> Sent: Saturday, August 19, 2000 2:16 PM
> Subject: RE: Version 2.0 Problem
>
> > Very close!
> > The getReader() request honours the (new to this version for the sake of
> i18n support)
> > "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts to
> return a
> > Reader for that encoding, and Java barfs on that because it only
> recognises "UTF8"
> > and not of the Mime-style "UTF-8". My multipart mime extensions use
> JavaMail's
> > Mime-style to Java-style mapper to tackle this problem properly by
> supporting any
> > type of charset, but if you want a simple fix, try this patch to line 160
> > RPCRouterServlet.java:
> >
> > replace:
> >       Reader requestReader = req.getReader ();
> > with:
> >       Reader requestReader = new InputStreamReader(request.getInputStream,
> > "UTF8");
> >
> > I don't have the opportunity to test this myself just now, so good luck...
> >
> > I don't know why the problem doesn't seem to manifest itself on other
> configurations.
> > Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> > mime-to-java charset mapper in their getReader() implementation. Or maybe
> Java 2
> > recognises mime-style charset types.
> >
> > The {get|set}Attribute thing may be trickier to resolve. I haven't had the
> time to check
> > out the new RPCRouterServlet yet, but I definitely plan to release
> WebSphere
> > patches. I just may not have the chance any time soon. :-(
> >
> > bfn, Wouter
> >
> >
> > On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
> >
> > >Hi Cory:
> > >
> > >I think there's something wrong there with the encoding style.
> Apparently,
> > >from what I can tell from a net search, the reader is trying to load a
> class
> > >that can convert bytes to chars using the UTF-8 encoding style.  The
> proper
> > >name of this encoder is not sun.io.ByteToCharUTF-8, but
> > >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a similar
> > >problem was encountered by some people using XML-RPC:
> > >
> > >http://helma.org/archives/xmlrpc/2000-May/000066.html
> > >
> > >I can imagine that it might be:
> > >
> > >1.  There's a bug somewhere that's not mapping the encoding name
> ("UTF-8")
> > >to the class name (sun.io.ByteToCharUTF8) properly.
> > >2.  You've set an encoding style in your request to UTF-8, and it's
> trying
> > >to respond in kind, but can't find a mapping.
> > >3.  Your server returns things in the UTF-8 style (unlike other servers
> that
> > >work), and #1 applies.
> > >
> > >  -----Original Message-----
> > >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> > >  Sent: Saturday, August 19, 2000 8:29 PM
> > >  To: soap-user@xml.apache.org
> > >  Subject: Version 2.0 Problem
> > >
> > >
> > >  I still cannot get the 2.0 version to run with WebSphere. I did find a
> > >couple of things out, and recompiled from source, but still no luck.
> > >
> > >  The RPCRouterServlet uses 'session.setAttribute' and
> > >'session.getAttribute' which are not supported by the Servlet 2.1 version
> > >that WebSphere uses. I tried replacing these two calls with:
> > >putValue/getValue (the deprecated version), to no avail. But it did let
> me
> > >recompile, but didn't fix the bug.
> > >
> > >  The servlet keeps failing on this line of code:
> > >
> > >  Reader requestReader = req.getReader ();
> > >
> > >  It is complaining about: java.lang.IllegalArgumentException:
> > >sun.io.ByteToCharUTF-8
> > >
> > >  I can't find where that might be coming from, and its such a simple
> call
> > >(that I have done many times in my environment) that its very puzzling.
> > >
> > >  I ran the TcpTunnelGui, and the results are below. The only thing that
> > >looks suspiscious at all is the header from the servlet side, which has:
> > >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> > >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> > >
> > >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> > >required, but I have no idea, as getReader is such a simple call I can't
> see
> > >what's causing it.
> > >
> > >  Would it be possible to keep release 2.0 working with the Servlet 2.1
> API
> > >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be supported
> in
> > >WebSphere until the next release comes out, and there are a lot of people
> > >testing SOAP with WebSphere currently.
> > >
> > >  At any rate, let me know if more help is needed to debug this, as now
> that
> > >I have the source environment set up I can do more work on it if needed.
> The
> > >product looks very well put together now in version 2.0 and I'd really
> like
> > >to use it.
> > >
> > >  Thanks,
> > >
> > >  Cory
> > >
> > >  --------------------------------------
> > >
> > >  Client:
> > >
> > >  Host: surgefl2:8081
> > >
> > >  Content-Type: text/xml
> > >
> > >  Content-Length: 418
> > >
> > >  SOAPAction: ""
> > >
> > >
> > >
> > >  <SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >  <SOAP-ENV:Body>
> > >
> > >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> > >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > >
> > >  <symbol xsi:type="xsd:string">IBM</symbol>
> > >
> > >  </ns1:getQuote>
> > >
> > >  </SOAP-ENV:Body>
> > >
> > >  </SOAP-ENV:Envelope>
> > >
> > >
> > >  Server:
> > >
> > >  HTTP/1.1 200 ok
> > >
> > >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> > >
> > >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> > >
> > >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> > >
> > >  Cache-Control: no-cache="set-cookie,set-cookie2"
> > >
> > >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> > >
> > >  content-length: 3991
> > >
> > >  Connection: close
> > >
> > >  Content-Type: text/xml;;charset=UTF-8
> > >
> > >
> > >
> > >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> > >
> > >   at
> > >sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> > >
> > >   at
> sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> > >
> > >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
> v
> > >a:286)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
> >org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
> 6
> > >1)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
> 2
> > >)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> > :
> > >626)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
> n
> > >vocation.java:67)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
> l
> > >eInvocationContext.java:106)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
> u
> > >estProcessor.java:144)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
> r
> > >.java:300)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
> Q
> > >EventListenerImp.java:230)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
> L
> > >istenerImp.java:104)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
> E
> > >ventSource.java:202)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.notifyService(SQWrapperEventSource.java:347)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.run(SQWrapperEventSource.java:216)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
> n
> > >(Compiled Code)
> > >
> > >   at java.lang.Thread.run(Thread.java:472)
> > >
> > >
> > >
> >
> > --
> > http://www.workspot.net/~zombie/soap/
> > My opinions are irrelevant. They will be assimilated by my employer.
> >


Re: Version 2.0 Problem

Posted by George I Matkovits <ma...@uswest.net>.
'session.putValue'  has been depreciated and will probably be removed. IMHO
IBM's Websphare should keep up with the rest of the world! I find it rather
disturbing when new code is created around defunct APIs (where I work they would
kill me during my next code review :-) Perhaps we should have '#ifdef
capability' in Java (-: The Servlet API V2.2 specification has been out for
sometime now.)
Regards - George

Cory Isaacson wrote:

> Wouter,
>
> I did solve this by making the following mods:
>
> In Constants I changed:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
> charset=UTF-8";
>
> to:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml; charset=UTF8";
>
> And in RPCRouterServlet I changed:
>
>     targetObject = session.getAttribute (targetID);
>
> to:
>
>      targetObject = session.getValue (targetID);
>
> and:
>
>   session.setAttribute (targetID, targetObject);
>
>   session.putValue (targetID, targetObject);
>
> That did the trick, and unless there is a good reason not to, it would be
> nice to incorporate these changes into the source so that it works with
> current versions of WebSphere. Functionality should not be affected on other
> servers with these changes.
>
> Cory
>
> ----- Original Message -----
> From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
> To: <so...@xml.apache.org>
> Sent: Saturday, August 19, 2000 2:16 PM
> Subject: RE: Version 2.0 Problem
>
> > Very close!
> > The getReader() request honours the (new to this version for the sake of
> i18n support)
> > "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts to
> return a
> > Reader for that encoding, and Java barfs on that because it only
> recognises "UTF8"
> > and not of the Mime-style "UTF-8". My multipart mime extensions use
> JavaMail's
> > Mime-style to Java-style mapper to tackle this problem properly by
> supporting any
> > type of charset, but if you want a simple fix, try this patch to line 160
> > RPCRouterServlet.java:
> >
> > replace:
> >       Reader requestReader = req.getReader ();
> > with:
> >       Reader requestReader = new InputStreamReader(request.getInputStream,
> > "UTF8");
> >
> > I don't have the opportunity to test this myself just now, so good luck...
> >
> > I don't know why the problem doesn't seem to manifest itself on other
> configurations.
> > Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> > mime-to-java charset mapper in their getReader() implementation. Or maybe
> Java 2
> > recognises mime-style charset types.
> >
> > The {get|set}Attribute thing may be trickier to resolve. I haven't had the
> time to check
> > out the new RPCRouterServlet yet, but I definitely plan to release
> WebSphere
> > patches. I just may not have the chance any time soon. :-(
> >
> > bfn, Wouter
> >
> >
> > On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
> >
> > >Hi Cory:
> > >
> > >I think there's something wrong there with the encoding style.
> Apparently,
> > >from what I can tell from a net search, the reader is trying to load a
> class
> > >that can convert bytes to chars using the UTF-8 encoding style.  The
> proper
> > >name of this encoder is not sun.io.ByteToCharUTF-8, but
> > >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a similar
> > >problem was encountered by some people using XML-RPC:
> > >
> > >http://helma.org/archives/xmlrpc/2000-May/000066.html
> > >
> > >I can imagine that it might be:
> > >
> > >1.  There's a bug somewhere that's not mapping the encoding name
> ("UTF-8")
> > >to the class name (sun.io.ByteToCharUTF8) properly.
> > >2.  You've set an encoding style in your request to UTF-8, and it's
> trying
> > >to respond in kind, but can't find a mapping.
> > >3.  Your server returns things in the UTF-8 style (unlike other servers
> that
> > >work), and #1 applies.
> > >
> > >  -----Original Message-----
> > >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> > >  Sent: Saturday, August 19, 2000 8:29 PM
> > >  To: soap-user@xml.apache.org
> > >  Subject: Version 2.0 Problem
> > >
> > >
> > >  I still cannot get the 2.0 version to run with WebSphere. I did find a
> > >couple of things out, and recompiled from source, but still no luck.
> > >
> > >  The RPCRouterServlet uses 'session.setAttribute' and
> > >'session.getAttribute' which are not supported by the Servlet 2.1 version
> > >that WebSphere uses. I tried replacing these two calls with:
> > >putValue/getValue (the deprecated version), to no avail. But it did let
> me
> > >recompile, but didn't fix the bug.
> > >
> > >  The servlet keeps failing on this line of code:
> > >
> > >  Reader requestReader = req.getReader ();
> > >
> > >  It is complaining about: java.lang.IllegalArgumentException:
> > >sun.io.ByteToCharUTF-8
> > >
> > >  I can't find where that might be coming from, and its such a simple
> call
> > >(that I have done many times in my environment) that its very puzzling.
> > >
> > >  I ran the TcpTunnelGui, and the results are below. The only thing that
> > >looks suspiscious at all is the header from the servlet side, which has:
> > >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> > >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> > >
> > >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> > >required, but I have no idea, as getReader is such a simple call I can't
> see
> > >what's causing it.
> > >
> > >  Would it be possible to keep release 2.0 working with the Servlet 2.1
> API
> > >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be supported
> in
> > >WebSphere until the next release comes out, and there are a lot of people
> > >testing SOAP with WebSphere currently.
> > >
> > >  At any rate, let me know if more help is needed to debug this, as now
> that
> > >I have the source environment set up I can do more work on it if needed.
> The
> > >product looks very well put together now in version 2.0 and I'd really
> like
> > >to use it.
> > >
> > >  Thanks,
> > >
> > >  Cory
> > >
> > >  --------------------------------------
> > >
> > >  Client:
> > >
> > >  Host: surgefl2:8081
> > >
> > >  Content-Type: text/xml
> > >
> > >  Content-Length: 418
> > >
> > >  SOAPAction: ""
> > >
> > >
> > >
> > >  <SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >  <SOAP-ENV:Body>
> > >
> > >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> > >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > >
> > >  <symbol xsi:type="xsd:string">IBM</symbol>
> > >
> > >  </ns1:getQuote>
> > >
> > >  </SOAP-ENV:Body>
> > >
> > >  </SOAP-ENV:Envelope>
> > >
> > >
> > >  Server:
> > >
> > >  HTTP/1.1 200 ok
> > >
> > >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> > >
> > >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> > >
> > >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> > >
> > >  Cache-Control: no-cache="set-cookie,set-cookie2"
> > >
> > >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> > >
> > >  content-length: 3991
> > >
> > >  Connection: close
> > >
> > >  Content-Type: text/xml;;charset=UTF-8
> > >
> > >
> > >
> > >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> > >
> > >   at
> > >sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> > >
> > >   at
> sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> > >
> > >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
> v
> > >a:286)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
> >org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
> 6
> > >1)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
> 2
> > >)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> > :
> > >626)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
> n
> > >vocation.java:67)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
> l
> > >eInvocationContext.java:106)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
> u
> > >estProcessor.java:144)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
> r
> > >.java:300)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
> Q
> > >EventListenerImp.java:230)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
> L
> > >istenerImp.java:104)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
> E
> > >ventSource.java:202)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.notifyService(SQWrapperEventSource.java:347)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.run(SQWrapperEventSource.java:216)
> > >
> > >   at
> >
> >com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
> n
> > >(Compiled Code)
> > >
> > >   at java.lang.Thread.run(Thread.java:472)
> > >
> > >
> > >
> >
> > --
> > http://www.workspot.net/~zombie/soap/
> > My opinions are irrelevant. They will be assimilated by my employer.
> >


Re: Version 2.0 Problem

Posted by Cory Isaacson <ci...@capita2.com>.
Steve,

You are correct, I am using Servlet 2.1 and JDK 1.1.7. I can upgrade to JDK
1.1.8 which works with WebSphere, but the Servlet 2.2 API does not work (I
tried it yesterday). The new version of WebSphere (3.5) will use JDK 1.2 and
Servlet 2.2, but I don't know when that will really be available.

In the meantime, I'll just run with the simple fixes I made, as it works
fine. But I think there will be a lot of WebSphere folks that this version
will not work for as-is.

Thanks,

Cory
----- Original Message -----
From: "Steven J. McDowall" <sj...@visi.com>
To: <so...@xml.apache.org>
Sent: Sunday, August 20, 2000 10:18 AM
Subject: RE: Version 2.0 Problem


>
> Cory..
>
> I am pretty sure those changes are because of two things:
>
> 1) Your using an old Servlet JSDK.. The get/set attribute is 2.2
> and I think you're using only 2.1 ?? Any chance you could try using
> 2.2 in Websphere??
>
> 2) The UTF8 and UTF-8 problem is due to an old JRE.. I think 1.1.8
> and above fixed it.. There was an "error" (not really but..) about
> the official name in the older JRE's not accepting the "proper" name..
> That was fixed later on, which is probably why no one besides you
> had those errors..
>
> I don't think these fixes are going to go in since the official
> and newest versions are correct.. and especially the charset since
> utf-8 is the proper name according to the RFC's..
>
> -Steve
>
>
> -----Original Message-----
> From: Cory Isaacson [mailto:cisaacson@capita2.com]
> Sent: Sunday, August 20, 2000 6:46 AM
> To: soap-user@xml.apache.org; Wouter Cloetens
> Subject: Re: Version 2.0 Problem
>
>
> Wouter,
>
> I did solve this by making the following mods:
>
> In Constants I changed:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
> charset=UTF-8";
>
> to:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF8";
>
> And in RPCRouterServlet I changed:
>
>     targetObject = session.getAttribute (targetID);
>
> to:
>
>      targetObject = session.getValue (targetID);
>
> and:
>
>   session.setAttribute (targetID, targetObject);
>
>   session.putValue (targetID, targetObject);
>
> That did the trick, and unless there is a good reason not to, it would be
> nice to incorporate these changes into the source so that it works with
> current versions of WebSphere. Functionality should not be affected on
other
> servers with these changes.
>
> Cory
>
> ----- Original Message -----
> From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
> To: <so...@xml.apache.org>
> Sent: Saturday, August 19, 2000 2:16 PM
> Subject: RE: Version 2.0 Problem
>
>
> > Very close!
> > The getReader() request honours the (new to this version for the sake of
> i18n support)
> > "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts
to
> return a
> > Reader for that encoding, and Java barfs on that because it only
> recognises "UTF8"
> > and not of the Mime-style "UTF-8". My multipart mime extensions use
> JavaMail's
> > Mime-style to Java-style mapper to tackle this problem properly by
> supporting any
> > type of charset, but if you want a simple fix, try this patch to line
160
> > RPCRouterServlet.java:
> >
> > replace:
> >       Reader requestReader = req.getReader ();
> > with:
> >       Reader requestReader = new
InputStreamReader(request.getInputStream,
> > "UTF8");
> >
> > I don't have the opportunity to test this myself just now, so good
luck...
> >
> > I don't know why the problem doesn't seem to manifest itself on other
> configurations.
> > Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> > mime-to-java charset mapper in their getReader() implementation. Or
maybe
> Java 2
> > recognises mime-style charset types.
> >
> > The {get|set}Attribute thing may be trickier to resolve. I haven't had
the
> time to check
> > out the new RPCRouterServlet yet, but I definitely plan to release
> WebSphere
> > patches. I just may not have the chance any time soon. :-(
> >
> > bfn, Wouter
> >
> >
> > On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
> >
> > >Hi Cory:
> > >
> > >I think there's something wrong there with the encoding style.
> Apparently,
> > >from what I can tell from a net search, the reader is trying to load a
> class
> > >that can convert bytes to chars using the UTF-8 encoding style.  The
> proper
> > >name of this encoder is not sun.io.ByteToCharUTF-8, but
> > >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a
similar
> > >problem was encountered by some people using XML-RPC:
> > >
> > >http://helma.org/archives/xmlrpc/2000-May/000066.html
> > >
> > >I can imagine that it might be:
> > >
> > >1.  There's a bug somewhere that's not mapping the encoding name
> ("UTF-8")
> > >to the class name (sun.io.ByteToCharUTF8) properly.
> > >2.  You've set an encoding style in your request to UTF-8, and it's
> trying
> > >to respond in kind, but can't find a mapping.
> > >3.  Your server returns things in the UTF-8 style (unlike other servers
> that
> > >work), and #1 applies.
> > >
> > >  -----Original Message-----
> > >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> > >  Sent: Saturday, August 19, 2000 8:29 PM
> > >  To: soap-user@xml.apache.org
> > >  Subject: Version 2.0 Problem
> > >
> > >
> > >  I still cannot get the 2.0 version to run with WebSphere. I did find
a
> > >couple of things out, and recompiled from source, but still no luck.
> > >
> > >  The RPCRouterServlet uses 'session.setAttribute' and
> > >'session.getAttribute' which are not supported by the Servlet 2.1
version
> > >that WebSphere uses. I tried replacing these two calls with:
> > >putValue/getValue (the deprecated version), to no avail. But it did let
> me
> > >recompile, but didn't fix the bug.
> > >
> > >  The servlet keeps failing on this line of code:
> > >
> > >  Reader requestReader = req.getReader ();
> > >
> > >  It is complaining about: java.lang.IllegalArgumentException:
> > >sun.io.ByteToCharUTF-8
> > >
> > >  I can't find where that might be coming from, and its such a simple
> call
> > >(that I have done many times in my environment) that its very puzzling.
> > >
> > >  I ran the TcpTunnelGui, and the results are below. The only thing
that
> > >looks suspiscious at all is the header from the servlet side, which
has:
> > >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> > >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> > >
> > >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> > >required, but I have no idea, as getReader is such a simple call I
can't
> see
> > >what's causing it.
> > >
> > >  Would it be possible to keep release 2.0 working with the Servlet 2.1
> API
> > >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be
supported
> in
> > >WebSphere until the next release comes out, and there are a lot of
people
> > >testing SOAP with WebSphere currently.
> > >
> > >  At any rate, let me know if more help is needed to debug this, as now
> that
> > >I have the source environment set up I can do more work on it if
needed.
> The
> > >product looks very well put together now in version 2.0 and I'd really
> like
> > >to use it.
> > >
> > >  Thanks,
> > >
> > >  Cory
> > >
> > >  --------------------------------------
> > >
> > >  Client:
> > >
> > >  Host: surgefl2:8081
> > >
> > >  Content-Type: text/xml
> > >
> > >  Content-Length: 418
> > >
> > >  SOAPAction: ""
> > >
> > >
> > >
> > >  <SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >  <SOAP-ENV:Body>
> > >
> > >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> > >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > >
> > >  <symbol xsi:type="xsd:string">IBM</symbol>
> > >
> > >  </ns1:getQuote>
> > >
> > >  </SOAP-ENV:Body>
> > >
> > >  </SOAP-ENV:Envelope>
> > >
> > >
> > >  Server:
> > >
> > >  HTTP/1.1 200 ok
> > >
> > >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> > >
> > >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> > >
> > >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> > >
> > >  Cache-Control: no-cache="set-cookie,set-cookie2"
> > >
> > >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> > >
> > >  content-length: 3991
> > >
> > >  Connection: close
> > >
> > >  Content-Type: text/xml;;charset=UTF-8
> > >
> > >
> > >
> > >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> > >
> > >   at
> >
>sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> > >
> > >   at
> sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> > >
> > >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
> v
> > >a:286)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
>
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
> 6
> > >1)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
> 2
> > >)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> > :
> > >626)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
> n
> > >vocation.java:67)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
> l
> > >eInvocationContext.java:106)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
> u
> > >estProcessor.java:144)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
> r
> > >.java:300)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
> Q
> > >EventListenerImp.java:230)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
> L
> > >istenerImp.java:104)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
> E
> > >ventSource.java:202)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.notifyService(SQWrapperEventSource.java:347)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.run(SQWrapperEventSource.java:216)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
> n
> > >(Compiled Code)
> > >
> > >   at java.lang.Thread.run(Thread.java:472)
> > >
> > >
> > >
> >
> > --
> > http://www.workspot.net/~zombie/soap/
> > My opinions are irrelevant. They will be assimilated by my employer.
> >
>
>


Re: Version 2.0 Problem

Posted by Cory Isaacson <ci...@capita2.com>.
Steve,

You are correct, I am using Servlet 2.1 and JDK 1.1.7. I can upgrade to JDK
1.1.8 which works with WebSphere, but the Servlet 2.2 API does not work (I
tried it yesterday). The new version of WebSphere (3.5) will use JDK 1.2 and
Servlet 2.2, but I don't know when that will really be available.

In the meantime, I'll just run with the simple fixes I made, as it works
fine. But I think there will be a lot of WebSphere folks that this version
will not work for as-is.

Thanks,

Cory
----- Original Message -----
From: "Steven J. McDowall" <sj...@visi.com>
To: <so...@xml.apache.org>
Sent: Sunday, August 20, 2000 10:18 AM
Subject: RE: Version 2.0 Problem


>
> Cory..
>
> I am pretty sure those changes are because of two things:
>
> 1) Your using an old Servlet JSDK.. The get/set attribute is 2.2
> and I think you're using only 2.1 ?? Any chance you could try using
> 2.2 in Websphere??
>
> 2) The UTF8 and UTF-8 problem is due to an old JRE.. I think 1.1.8
> and above fixed it.. There was an "error" (not really but..) about
> the official name in the older JRE's not accepting the "proper" name..
> That was fixed later on, which is probably why no one besides you
> had those errors..
>
> I don't think these fixes are going to go in since the official
> and newest versions are correct.. and especially the charset since
> utf-8 is the proper name according to the RFC's..
>
> -Steve
>
>
> -----Original Message-----
> From: Cory Isaacson [mailto:cisaacson@capita2.com]
> Sent: Sunday, August 20, 2000 6:46 AM
> To: soap-user@xml.apache.org; Wouter Cloetens
> Subject: Re: Version 2.0 Problem
>
>
> Wouter,
>
> I did solve this by making the following mods:
>
> In Constants I changed:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
> charset=UTF-8";
>
> to:
>
> public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF8";
>
> And in RPCRouterServlet I changed:
>
>     targetObject = session.getAttribute (targetID);
>
> to:
>
>      targetObject = session.getValue (targetID);
>
> and:
>
>   session.setAttribute (targetID, targetObject);
>
>   session.putValue (targetID, targetObject);
>
> That did the trick, and unless there is a good reason not to, it would be
> nice to incorporate these changes into the source so that it works with
> current versions of WebSphere. Functionality should not be affected on
other
> servers with these changes.
>
> Cory
>
> ----- Original Message -----
> From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
> To: <so...@xml.apache.org>
> Sent: Saturday, August 19, 2000 2:16 PM
> Subject: RE: Version 2.0 Problem
>
>
> > Very close!
> > The getReader() request honours the (new to this version for the sake of
> i18n support)
> > "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts
to
> return a
> > Reader for that encoding, and Java barfs on that because it only
> recognises "UTF8"
> > and not of the Mime-style "UTF-8". My multipart mime extensions use
> JavaMail's
> > Mime-style to Java-style mapper to tackle this problem properly by
> supporting any
> > type of charset, but if you want a simple fix, try this patch to line
160
> > RPCRouterServlet.java:
> >
> > replace:
> >       Reader requestReader = req.getReader ();
> > with:
> >       Reader requestReader = new
InputStreamReader(request.getInputStream,
> > "UTF8");
> >
> > I don't have the opportunity to test this myself just now, so good
luck...
> >
> > I don't know why the problem doesn't seem to manifest itself on other
> configurations.
> > Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> > mime-to-java charset mapper in their getReader() implementation. Or
maybe
> Java 2
> > recognises mime-style charset types.
> >
> > The {get|set}Attribute thing may be trickier to resolve. I haven't had
the
> time to check
> > out the new RPCRouterServlet yet, but I definitely plan to release
> WebSphere
> > patches. I just may not have the chance any time soon. :-(
> >
> > bfn, Wouter
> >
> >
> > On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
> >
> > >Hi Cory:
> > >
> > >I think there's something wrong there with the encoding style.
> Apparently,
> > >from what I can tell from a net search, the reader is trying to load a
> class
> > >that can convert bytes to chars using the UTF-8 encoding style.  The
> proper
> > >name of this encoder is not sun.io.ByteToCharUTF-8, but
> > >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a
similar
> > >problem was encountered by some people using XML-RPC:
> > >
> > >http://helma.org/archives/xmlrpc/2000-May/000066.html
> > >
> > >I can imagine that it might be:
> > >
> > >1.  There's a bug somewhere that's not mapping the encoding name
> ("UTF-8")
> > >to the class name (sun.io.ByteToCharUTF8) properly.
> > >2.  You've set an encoding style in your request to UTF-8, and it's
> trying
> > >to respond in kind, but can't find a mapping.
> > >3.  Your server returns things in the UTF-8 style (unlike other servers
> that
> > >work), and #1 applies.
> > >
> > >  -----Original Message-----
> > >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> > >  Sent: Saturday, August 19, 2000 8:29 PM
> > >  To: soap-user@xml.apache.org
> > >  Subject: Version 2.0 Problem
> > >
> > >
> > >  I still cannot get the 2.0 version to run with WebSphere. I did find
a
> > >couple of things out, and recompiled from source, but still no luck.
> > >
> > >  The RPCRouterServlet uses 'session.setAttribute' and
> > >'session.getAttribute' which are not supported by the Servlet 2.1
version
> > >that WebSphere uses. I tried replacing these two calls with:
> > >putValue/getValue (the deprecated version), to no avail. But it did let
> me
> > >recompile, but didn't fix the bug.
> > >
> > >  The servlet keeps failing on this line of code:
> > >
> > >  Reader requestReader = req.getReader ();
> > >
> > >  It is complaining about: java.lang.IllegalArgumentException:
> > >sun.io.ByteToCharUTF-8
> > >
> > >  I can't find where that might be coming from, and its such a simple
> call
> > >(that I have done many times in my environment) that its very puzzling.
> > >
> > >  I ran the TcpTunnelGui, and the results are below. The only thing
that
> > >looks suspiscious at all is the header from the servlet side, which
has:
> > >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> > >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> > >
> > >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> > >required, but I have no idea, as getReader is such a simple call I
can't
> see
> > >what's causing it.
> > >
> > >  Would it be possible to keep release 2.0 working with the Servlet 2.1
> API
> > >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be
supported
> in
> > >WebSphere until the next release comes out, and there are a lot of
people
> > >testing SOAP with WebSphere currently.
> > >
> > >  At any rate, let me know if more help is needed to debug this, as now
> that
> > >I have the source environment set up I can do more work on it if
needed.
> The
> > >product looks very well put together now in version 2.0 and I'd really
> like
> > >to use it.
> > >
> > >  Thanks,
> > >
> > >  Cory
> > >
> > >  --------------------------------------
> > >
> > >  Client:
> > >
> > >  Host: surgefl2:8081
> > >
> > >  Content-Type: text/xml
> > >
> > >  Content-Length: 418
> > >
> > >  SOAPAction: ""
> > >
> > >
> > >
> > >  <SOAP-ENV:Envelope
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> > >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> > >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >  <SOAP-ENV:Body>
> > >
> > >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> > >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> > >
> > >  <symbol xsi:type="xsd:string">IBM</symbol>
> > >
> > >  </ns1:getQuote>
> > >
> > >  </SOAP-ENV:Body>
> > >
> > >  </SOAP-ENV:Envelope>
> > >
> > >
> > >  Server:
> > >
> > >  HTTP/1.1 200 ok
> > >
> > >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> > >
> > >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> > >
> > >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> > >
> > >  Cache-Control: no-cache="set-cookie,set-cookie2"
> > >
> > >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> > >
> > >  content-length: 3991
> > >
> > >  Connection: close
> > >
> > >  Content-Type: text/xml;;charset=UTF-8
> > >
> > >
> > >
> > >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> > >
> > >   at
> >
>sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> > >
> > >   at
> sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> > >
> > >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
> v
> > >a:286)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
> R
> > >equestProxy.java:169)
> > >
> > >   at
> >
>
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
> 6
> > >1)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
> 2
> > >)
> > >
> > >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
> r
> > >.java:557)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
> l
> > >eServlet.java:160)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
> e
> > >t.java:287)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
> e
> > >Servlet.java:105)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
> 4
> > >9)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
> n
> > >ager.java:705)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
> g
> > >er.java:631)
> > >
> > >   at
> > >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> > atch(W
> > >ebApp.java:1175)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> > va:1
> > >043)
> > >
> > >   at
> >
>com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> > a:10
> > >02)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> > :
> > >626)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
> n
> > >vocation.java:67)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
> l
> > >eInvocationContext.java:106)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
> u
> > >estProcessor.java:144)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
> r
> > >.java:300)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
> Q
> > >EventListenerImp.java:230)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
> L
> > >istenerImp.java:104)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
> E
> > >ventSource.java:202)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.notifyService(SQWrapperEventSource.java:347)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> > u
> > >nnable.run(SQWrapperEventSource.java:216)
> > >
> > >   at
> >
>
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
> n
> > >(Compiled Code)
> > >
> > >   at java.lang.Thread.run(Thread.java:472)
> > >
> > >
> > >
> >
> > --
> > http://www.workspot.net/~zombie/soap/
> > My opinions are irrelevant. They will be assimilated by my employer.
> >
>
>


RE: Version 2.0 Problem

Posted by "Steven J. McDowall" <sj...@visi.com>.
Cory..

I am pretty sure those changes are because of two things:

1) Your using an old Servlet JSDK.. The get/set attribute is 2.2
and I think you're using only 2.1 ?? Any chance you could try using
2.2 in Websphere??

2) The UTF8 and UTF-8 problem is due to an old JRE.. I think 1.1.8
and above fixed it.. There was an "error" (not really but..) about
the official name in the older JRE's not accepting the "proper" name..
That was fixed later on, which is probably why no one besides you
had those errors..

I don't think these fixes are going to go in since the official
and newest versions are correct.. and especially the charset since
utf-8 is the proper name according to the RFC's..

-Steve


-----Original Message-----
From: Cory Isaacson [mailto:cisaacson@capita2.com]
Sent: Sunday, August 20, 2000 6:46 AM
To: soap-user@xml.apache.org; Wouter Cloetens
Subject: Re: Version 2.0 Problem


Wouter,

I did solve this by making the following mods:

In Constants I changed:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF-8";

to:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml; charset=UTF8";

And in RPCRouterServlet I changed:

    targetObject = session.getAttribute (targetID);

to:

     targetObject = session.getValue (targetID);

and:

  session.setAttribute (targetID, targetObject);

  session.putValue (targetID, targetObject);

That did the trick, and unless there is a good reason not to, it would be
nice to incorporate these changes into the source so that it works with
current versions of WebSphere. Functionality should not be affected on other
servers with these changes.

Cory

----- Original Message -----
From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
To: <so...@xml.apache.org>
Sent: Saturday, August 19, 2000 2:16 PM
Subject: RE: Version 2.0 Problem


> Very close!
> The getReader() request honours the (new to this version for the sake of
i18n support)
> "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts to
return a
> Reader for that encoding, and Java barfs on that because it only
recognises "UTF8"
> and not of the Mime-style "UTF-8". My multipart mime extensions use
JavaMail's
> Mime-style to Java-style mapper to tackle this problem properly by
supporting any
> type of charset, but if you want a simple fix, try this patch to line 160
> RPCRouterServlet.java:
>
> replace:
>       Reader requestReader = req.getReader ();
> with:
>       Reader requestReader = new InputStreamReader(request.getInputStream,
> "UTF8");
>
> I don't have the opportunity to test this myself just now, so good luck...
>
> I don't know why the problem doesn't seem to manifest itself on other
configurations.
> Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> mime-to-java charset mapper in their getReader() implementation. Or maybe
Java 2
> recognises mime-style charset types.
>
> The {get|set}Attribute thing may be trickier to resolve. I haven't had the
time to check
> out the new RPCRouterServlet yet, but I definitely plan to release
WebSphere
> patches. I just may not have the chance any time soon. :-(
>
> bfn, Wouter
>
>
> On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
>
> >Hi Cory:
> >
> >I think there's something wrong there with the encoding style.
Apparently,
> >from what I can tell from a net search, the reader is trying to load a
class
> >that can convert bytes to chars using the UTF-8 encoding style.  The
proper
> >name of this encoder is not sun.io.ByteToCharUTF-8, but
> >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a similar
> >problem was encountered by some people using XML-RPC:
> >
> >http://helma.org/archives/xmlrpc/2000-May/000066.html
> >
> >I can imagine that it might be:
> >
> >1.  There's a bug somewhere that's not mapping the encoding name
("UTF-8")
> >to the class name (sun.io.ByteToCharUTF8) properly.
> >2.  You've set an encoding style in your request to UTF-8, and it's
trying
> >to respond in kind, but can't find a mapping.
> >3.  Your server returns things in the UTF-8 style (unlike other servers
that
> >work), and #1 applies.
> >
> >  -----Original Message-----
> >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> >  Sent: Saturday, August 19, 2000 8:29 PM
> >  To: soap-user@xml.apache.org
> >  Subject: Version 2.0 Problem
> >
> >
> >  I still cannot get the 2.0 version to run with WebSphere. I did find a
> >couple of things out, and recompiled from source, but still no luck.
> >
> >  The RPCRouterServlet uses 'session.setAttribute' and
> >'session.getAttribute' which are not supported by the Servlet 2.1 version
> >that WebSphere uses. I tried replacing these two calls with:
> >putValue/getValue (the deprecated version), to no avail. But it did let
me
> >recompile, but didn't fix the bug.
> >
> >  The servlet keeps failing on this line of code:
> >
> >  Reader requestReader = req.getReader ();
> >
> >  It is complaining about: java.lang.IllegalArgumentException:
> >sun.io.ByteToCharUTF-8
> >
> >  I can't find where that might be coming from, and its such a simple
call
> >(that I have done many times in my environment) that its very puzzling.
> >
> >  I ran the TcpTunnelGui, and the results are below. The only thing that
> >looks suspiscious at all is the header from the servlet side, which has:
> >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> >
> >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> >required, but I have no idea, as getReader is such a simple call I can't
see
> >what's causing it.
> >
> >  Would it be possible to keep release 2.0 working with the Servlet 2.1
API
> >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be supported
in
> >WebSphere until the next release comes out, and there are a lot of people
> >testing SOAP with WebSphere currently.
> >
> >  At any rate, let me know if more help is needed to debug this, as now
that
> >I have the source environment set up I can do more work on it if needed.
The
> >product looks very well put together now in version 2.0 and I'd really
like
> >to use it.
> >
> >  Thanks,
> >
> >  Cory
> >
> >  --------------------------------------
> >
> >  Client:
> >
> >  Host: surgefl2:8081
> >
> >  Content-Type: text/xml
> >
> >  Content-Length: 418
> >
> >  SOAPAction: ""
> >
> >
> >
> >  <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> >
> >  <SOAP-ENV:Body>
> >
> >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >
> >  <symbol xsi:type="xsd:string">IBM</symbol>
> >
> >  </ns1:getQuote>
> >
> >  </SOAP-ENV:Body>
> >
> >  </SOAP-ENV:Envelope>
> >
> >
> >  Server:
> >
> >  HTTP/1.1 200 ok
> >
> >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> >
> >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> >
> >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> >
> >  Cache-Control: no-cache="set-cookie,set-cookie2"
> >
> >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> >
> >  content-length: 3991
> >
> >  Connection: close
> >
> >  Content-Type: text/xml;;charset=UTF-8
> >
> >
> >
> >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> >
> >   at
> >sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> >
> >   at
sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> >
> >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> >
> >   at
>
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
v
> >a:286)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
6
> >1)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
2
> >)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> :
> >626)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
n
> >vocation.java:67)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
l
> >eInvocationContext.java:106)
> >
> >   at
>
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
u
> >estProcessor.java:144)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
r
> >.java:300)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
Q
> >EventListenerImp.java:230)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
L
> >istenerImp.java:104)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
E
> >ventSource.java:202)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.notifyService(SQWrapperEventSource.java:347)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.run(SQWrapperEventSource.java:216)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
n
> >(Compiled Code)
> >
> >   at java.lang.Thread.run(Thread.java:472)
> >
> >
> >
>
> --
> http://www.workspot.net/~zombie/soap/
> My opinions are irrelevant. They will be assimilated by my employer.
>



RE: Version 2.0 Problem

Posted by "Steven J. McDowall" <sj...@visi.com>.
Cory..

I am pretty sure those changes are because of two things:

1) Your using an old Servlet JSDK.. The get/set attribute is 2.2
and I think you're using only 2.1 ?? Any chance you could try using
2.2 in Websphere??

2) The UTF8 and UTF-8 problem is due to an old JRE.. I think 1.1.8
and above fixed it.. There was an "error" (not really but..) about
the official name in the older JRE's not accepting the "proper" name..
That was fixed later on, which is probably why no one besides you
had those errors..

I don't think these fixes are going to go in since the official
and newest versions are correct.. and especially the charset since
utf-8 is the proper name according to the RFC's..

-Steve


-----Original Message-----
From: Cory Isaacson [mailto:cisaacson@capita2.com]
Sent: Sunday, August 20, 2000 6:46 AM
To: soap-user@xml.apache.org; Wouter Cloetens
Subject: Re: Version 2.0 Problem


Wouter,

I did solve this by making the following mods:

In Constants I changed:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF-8";

to:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml; charset=UTF8";

And in RPCRouterServlet I changed:

    targetObject = session.getAttribute (targetID);

to:

     targetObject = session.getValue (targetID);

and:

  session.setAttribute (targetID, targetObject);

  session.putValue (targetID, targetObject);

That did the trick, and unless there is a good reason not to, it would be
nice to incorporate these changes into the source so that it works with
current versions of WebSphere. Functionality should not be affected on other
servers with these changes.

Cory

----- Original Message -----
From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
To: <so...@xml.apache.org>
Sent: Saturday, August 19, 2000 2:16 PM
Subject: RE: Version 2.0 Problem


> Very close!
> The getReader() request honours the (new to this version for the sake of
i18n support)
> "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts to
return a
> Reader for that encoding, and Java barfs on that because it only
recognises "UTF8"
> and not of the Mime-style "UTF-8". My multipart mime extensions use
JavaMail's
> Mime-style to Java-style mapper to tackle this problem properly by
supporting any
> type of charset, but if you want a simple fix, try this patch to line 160
> RPCRouterServlet.java:
>
> replace:
>       Reader requestReader = req.getReader ();
> with:
>       Reader requestReader = new InputStreamReader(request.getInputStream,
> "UTF8");
>
> I don't have the opportunity to test this myself just now, so good luck...
>
> I don't know why the problem doesn't seem to manifest itself on other
configurations.
> Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> mime-to-java charset mapper in their getReader() implementation. Or maybe
Java 2
> recognises mime-style charset types.
>
> The {get|set}Attribute thing may be trickier to resolve. I haven't had the
time to check
> out the new RPCRouterServlet yet, but I definitely plan to release
WebSphere
> patches. I just may not have the chance any time soon. :-(
>
> bfn, Wouter
>
>
> On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
>
> >Hi Cory:
> >
> >I think there's something wrong there with the encoding style.
Apparently,
> >from what I can tell from a net search, the reader is trying to load a
class
> >that can convert bytes to chars using the UTF-8 encoding style.  The
proper
> >name of this encoder is not sun.io.ByteToCharUTF-8, but
> >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a similar
> >problem was encountered by some people using XML-RPC:
> >
> >http://helma.org/archives/xmlrpc/2000-May/000066.html
> >
> >I can imagine that it might be:
> >
> >1.  There's a bug somewhere that's not mapping the encoding name
("UTF-8")
> >to the class name (sun.io.ByteToCharUTF8) properly.
> >2.  You've set an encoding style in your request to UTF-8, and it's
trying
> >to respond in kind, but can't find a mapping.
> >3.  Your server returns things in the UTF-8 style (unlike other servers
that
> >work), and #1 applies.
> >
> >  -----Original Message-----
> >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> >  Sent: Saturday, August 19, 2000 8:29 PM
> >  To: soap-user@xml.apache.org
> >  Subject: Version 2.0 Problem
> >
> >
> >  I still cannot get the 2.0 version to run with WebSphere. I did find a
> >couple of things out, and recompiled from source, but still no luck.
> >
> >  The RPCRouterServlet uses 'session.setAttribute' and
> >'session.getAttribute' which are not supported by the Servlet 2.1 version
> >that WebSphere uses. I tried replacing these two calls with:
> >putValue/getValue (the deprecated version), to no avail. But it did let
me
> >recompile, but didn't fix the bug.
> >
> >  The servlet keeps failing on this line of code:
> >
> >  Reader requestReader = req.getReader ();
> >
> >  It is complaining about: java.lang.IllegalArgumentException:
> >sun.io.ByteToCharUTF-8
> >
> >  I can't find where that might be coming from, and its such a simple
call
> >(that I have done many times in my environment) that its very puzzling.
> >
> >  I ran the TcpTunnelGui, and the results are below. The only thing that
> >looks suspiscious at all is the header from the servlet side, which has:
> >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> >
> >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> >required, but I have no idea, as getReader is such a simple call I can't
see
> >what's causing it.
> >
> >  Would it be possible to keep release 2.0 working with the Servlet 2.1
API
> >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be supported
in
> >WebSphere until the next release comes out, and there are a lot of people
> >testing SOAP with WebSphere currently.
> >
> >  At any rate, let me know if more help is needed to debug this, as now
that
> >I have the source environment set up I can do more work on it if needed.
The
> >product looks very well put together now in version 2.0 and I'd really
like
> >to use it.
> >
> >  Thanks,
> >
> >  Cory
> >
> >  --------------------------------------
> >
> >  Client:
> >
> >  Host: surgefl2:8081
> >
> >  Content-Type: text/xml
> >
> >  Content-Length: 418
> >
> >  SOAPAction: ""
> >
> >
> >
> >  <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> >
> >  <SOAP-ENV:Body>
> >
> >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >
> >  <symbol xsi:type="xsd:string">IBM</symbol>
> >
> >  </ns1:getQuote>
> >
> >  </SOAP-ENV:Body>
> >
> >  </SOAP-ENV:Envelope>
> >
> >
> >  Server:
> >
> >  HTTP/1.1 200 ok
> >
> >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> >
> >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> >
> >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> >
> >  Cache-Control: no-cache="set-cookie,set-cookie2"
> >
> >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> >
> >  content-length: 3991
> >
> >  Connection: close
> >
> >  Content-Type: text/xml;;charset=UTF-8
> >
> >
> >
> >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> >
> >   at
> >sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> >
> >   at
sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> >
> >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> >
> >   at
>
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
v
> >a:286)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
6
> >1)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
2
> >)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> :
> >626)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
n
> >vocation.java:67)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
l
> >eInvocationContext.java:106)
> >
> >   at
>
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
u
> >estProcessor.java:144)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
r
> >.java:300)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
Q
> >EventListenerImp.java:230)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
L
> >istenerImp.java:104)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
E
> >ventSource.java:202)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.notifyService(SQWrapperEventSource.java:347)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.run(SQWrapperEventSource.java:216)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
n
> >(Compiled Code)
> >
> >   at java.lang.Thread.run(Thread.java:472)
> >
> >
> >
>
> --
> http://www.workspot.net/~zombie/soap/
> My opinions are irrelevant. They will be assimilated by my employer.
>



Re: Version 2.0 Problem

Posted by Cory Isaacson <ci...@capita2.com>.
Wouter,

I did solve this by making the following mods:

In Constants I changed:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF-8";

to:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml; charset=UTF8";

And in RPCRouterServlet I changed:

    targetObject = session.getAttribute (targetID);

to:

     targetObject = session.getValue (targetID);

and:

  session.setAttribute (targetID, targetObject);

  session.putValue (targetID, targetObject);

That did the trick, and unless there is a good reason not to, it would be
nice to incorporate these changes into the source so that it works with
current versions of WebSphere. Functionality should not be affected on other
servers with these changes.

Cory

----- Original Message -----
From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
To: <so...@xml.apache.org>
Sent: Saturday, August 19, 2000 2:16 PM
Subject: RE: Version 2.0 Problem


> Very close!
> The getReader() request honours the (new to this version for the sake of
i18n support)
> "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts to
return a
> Reader for that encoding, and Java barfs on that because it only
recognises "UTF8"
> and not of the Mime-style "UTF-8". My multipart mime extensions use
JavaMail's
> Mime-style to Java-style mapper to tackle this problem properly by
supporting any
> type of charset, but if you want a simple fix, try this patch to line 160
> RPCRouterServlet.java:
>
> replace:
>       Reader requestReader = req.getReader ();
> with:
>       Reader requestReader = new InputStreamReader(request.getInputStream,
> "UTF8");
>
> I don't have the opportunity to test this myself just now, so good luck...
>
> I don't know why the problem doesn't seem to manifest itself on other
configurations.
> Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> mime-to-java charset mapper in their getReader() implementation. Or maybe
Java 2
> recognises mime-style charset types.
>
> The {get|set}Attribute thing may be trickier to resolve. I haven't had the
time to check
> out the new RPCRouterServlet yet, but I definitely plan to release
WebSphere
> patches. I just may not have the chance any time soon. :-(
>
> bfn, Wouter
>
>
> On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
>
> >Hi Cory:
> >
> >I think there's something wrong there with the encoding style.
Apparently,
> >from what I can tell from a net search, the reader is trying to load a
class
> >that can convert bytes to chars using the UTF-8 encoding style.  The
proper
> >name of this encoder is not sun.io.ByteToCharUTF-8, but
> >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a similar
> >problem was encountered by some people using XML-RPC:
> >
> >http://helma.org/archives/xmlrpc/2000-May/000066.html
> >
> >I can imagine that it might be:
> >
> >1.  There's a bug somewhere that's not mapping the encoding name
("UTF-8")
> >to the class name (sun.io.ByteToCharUTF8) properly.
> >2.  You've set an encoding style in your request to UTF-8, and it's
trying
> >to respond in kind, but can't find a mapping.
> >3.  Your server returns things in the UTF-8 style (unlike other servers
that
> >work), and #1 applies.
> >
> >  -----Original Message-----
> >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> >  Sent: Saturday, August 19, 2000 8:29 PM
> >  To: soap-user@xml.apache.org
> >  Subject: Version 2.0 Problem
> >
> >
> >  I still cannot get the 2.0 version to run with WebSphere. I did find a
> >couple of things out, and recompiled from source, but still no luck.
> >
> >  The RPCRouterServlet uses 'session.setAttribute' and
> >'session.getAttribute' which are not supported by the Servlet 2.1 version
> >that WebSphere uses. I tried replacing these two calls with:
> >putValue/getValue (the deprecated version), to no avail. But it did let
me
> >recompile, but didn't fix the bug.
> >
> >  The servlet keeps failing on this line of code:
> >
> >  Reader requestReader = req.getReader ();
> >
> >  It is complaining about: java.lang.IllegalArgumentException:
> >sun.io.ByteToCharUTF-8
> >
> >  I can't find where that might be coming from, and its such a simple
call
> >(that I have done many times in my environment) that its very puzzling.
> >
> >  I ran the TcpTunnelGui, and the results are below. The only thing that
> >looks suspiscious at all is the header from the servlet side, which has:
> >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> >
> >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> >required, but I have no idea, as getReader is such a simple call I can't
see
> >what's causing it.
> >
> >  Would it be possible to keep release 2.0 working with the Servlet 2.1
API
> >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be supported
in
> >WebSphere until the next release comes out, and there are a lot of people
> >testing SOAP with WebSphere currently.
> >
> >  At any rate, let me know if more help is needed to debug this, as now
that
> >I have the source environment set up I can do more work on it if needed.
The
> >product looks very well put together now in version 2.0 and I'd really
like
> >to use it.
> >
> >  Thanks,
> >
> >  Cory
> >
> >  --------------------------------------
> >
> >  Client:
> >
> >  Host: surgefl2:8081
> >
> >  Content-Type: text/xml
> >
> >  Content-Length: 418
> >
> >  SOAPAction: ""
> >
> >
> >
> >  <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> >
> >  <SOAP-ENV:Body>
> >
> >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >
> >  <symbol xsi:type="xsd:string">IBM</symbol>
> >
> >  </ns1:getQuote>
> >
> >  </SOAP-ENV:Body>
> >
> >  </SOAP-ENV:Envelope>
> >
> >
> >  Server:
> >
> >  HTTP/1.1 200 ok
> >
> >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> >
> >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> >
> >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> >
> >  Cache-Control: no-cache="set-cookie,set-cookie2"
> >
> >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> >
> >  content-length: 3991
> >
> >  Connection: close
> >
> >  Content-Type: text/xml;;charset=UTF-8
> >
> >
> >
> >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> >
> >   at
> >sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> >
> >   at
sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> >
> >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> >
> >   at
>
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
v
> >a:286)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
6
> >1)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
2
> >)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> :
> >626)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
n
> >vocation.java:67)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
l
> >eInvocationContext.java:106)
> >
> >   at
>
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
u
> >estProcessor.java:144)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
r
> >.java:300)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
Q
> >EventListenerImp.java:230)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
L
> >istenerImp.java:104)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
E
> >ventSource.java:202)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.notifyService(SQWrapperEventSource.java:347)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.run(SQWrapperEventSource.java:216)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
n
> >(Compiled Code)
> >
> >   at java.lang.Thread.run(Thread.java:472)
> >
> >
> >
>
> --
> http://www.workspot.net/~zombie/soap/
> My opinions are irrelevant. They will be assimilated by my employer.
>


Re: Version 2.0 Problem

Posted by Cory Isaacson <ci...@capita2.com>.
Wouter,

I did solve this by making the following mods:

In Constants I changed:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml;
charset=UTF-8";

to:

public static String HEADERVAL_CONTENT_TYPE_UTF8 = "text/xml; charset=UTF8";

And in RPCRouterServlet I changed:

    targetObject = session.getAttribute (targetID);

to:

     targetObject = session.getValue (targetID);

and:

  session.setAttribute (targetID, targetObject);

  session.putValue (targetID, targetObject);

That did the trick, and unless there is a good reason not to, it would be
nice to incorporate these changes into the source so that it works with
current versions of WebSphere. Functionality should not be affected on other
servers with these changes.

Cory

----- Original Message -----
From: "Wouter Cloetens" <wc...@raleigh.ibm.com>
To: <so...@xml.apache.org>
Sent: Saturday, August 19, 2000 2:16 PM
Subject: RE: Version 2.0 Problem


> Very close!
> The getReader() request honours the (new to this version for the sake of
i18n support)
> "charset=UTF-8" parameter to the Content-Type HTTP header. It attempts to
return a
> Reader for that encoding, and Java barfs on that because it only
recognises "UTF8"
> and not of the Mime-style "UTF-8". My multipart mime extensions use
JavaMail's
> Mime-style to Java-style mapper to tackle this problem properly by
supporting any
> type of charset, but if you want a simple fix, try this patch to line 160
> RPCRouterServlet.java:
>
> replace:
>       Reader requestReader = req.getReader ();
> with:
>       Reader requestReader = new InputStreamReader(request.getInputStream,
> "UTF8");
>
> I don't have the opportunity to test this myself just now, so good luck...
>
> I don't know why the problem doesn't seem to manifest itself on other
configurations.
> Maybe newer versions of the JDSK or the servlet engine of Tomcat have a
> mime-to-java charset mapper in their getReader() implementation. Or maybe
Java 2
> recognises mime-style charset types.
>
> The {get|set}Attribute thing may be trickier to resolve. I haven't had the
time to check
> out the new RPCRouterServlet yet, but I definitely plan to release
WebSphere
> patches. I just may not have the chance any time soon. :-(
>
> bfn, Wouter
>
>
> On Sat, 19 Aug 2000 20:54:51 -0700, Eric M. Dashofy wrote:
>
> >Hi Cory:
> >
> >I think there's something wrong there with the encoding style.
Apparently,
> >from what I can tell from a net search, the reader is trying to load a
class
> >that can convert bytes to chars using the UTF-8 encoding style.  The
proper
> >name of this encoder is not sun.io.ByteToCharUTF-8, but
> >sun.io.ByteToCharUTF8.  (Note the lack of a dash).  Apparently, a similar
> >problem was encountered by some people using XML-RPC:
> >
> >http://helma.org/archives/xmlrpc/2000-May/000066.html
> >
> >I can imagine that it might be:
> >
> >1.  There's a bug somewhere that's not mapping the encoding name
("UTF-8")
> >to the class name (sun.io.ByteToCharUTF8) properly.
> >2.  You've set an encoding style in your request to UTF-8, and it's
trying
> >to respond in kind, but can't find a mapping.
> >3.  Your server returns things in the UTF-8 style (unlike other servers
that
> >work), and #1 applies.
> >
> >  -----Original Message-----
> >  From: Cory Isaacson (Compuflex) [mailto:cisaacson@compuflex.com]
> >  Sent: Saturday, August 19, 2000 8:29 PM
> >  To: soap-user@xml.apache.org
> >  Subject: Version 2.0 Problem
> >
> >
> >  I still cannot get the 2.0 version to run with WebSphere. I did find a
> >couple of things out, and recompiled from source, but still no luck.
> >
> >  The RPCRouterServlet uses 'session.setAttribute' and
> >'session.getAttribute' which are not supported by the Servlet 2.1 version
> >that WebSphere uses. I tried replacing these two calls with:
> >putValue/getValue (the deprecated version), to no avail. But it did let
me
> >recompile, but didn't fix the bug.
> >
> >  The servlet keeps failing on this line of code:
> >
> >  Reader requestReader = req.getReader ();
> >
> >  It is complaining about: java.lang.IllegalArgumentException:
> >sun.io.ByteToCharUTF-8
> >
> >  I can't find where that might be coming from, and its such a simple
call
> >(that I have done many times in my environment) that its very puzzling.
> >
> >  I ran the TcpTunnelGui, and the results are below. The only thing that
> >looks suspiscious at all is the header from the servlet side, which has:
> >Content-Type: text/xml;;charset=UTF-8, which parallels the error, but I
> >think UTF8 is standardly supported in the Servlet API 2.1 as well.
> >
> >  My guess is that something in the Servlet 2.2 API (or Java 1.2) is
> >required, but I have no idea, as getReader is such a simple call I can't
see
> >what's causing it.
> >
> >  Would it be possible to keep release 2.0 working with the Servlet 2.1
API
> >(and JDK 1.1.7)? The Servlet 2.2 API (and JDK 1.2) will not be supported
in
> >WebSphere until the next release comes out, and there are a lot of people
> >testing SOAP with WebSphere currently.
> >
> >  At any rate, let me know if more help is needed to debug this, as now
that
> >I have the source environment set up I can do more work on it if needed.
The
> >product looks very well put together now in version 2.0 and I'd really
like
> >to use it.
> >
> >  Thanks,
> >
> >  Cory
> >
> >  --------------------------------------
> >
> >  Client:
> >
> >  Host: surgefl2:8081
> >
> >  Content-Type: text/xml
> >
> >  Content-Length: 418
> >
> >  SOAPAction: ""
> >
> >
> >
> >  <SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> >xmlns:xsd="http://www.w3.org/1999/XMLSchema"
> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
> >
> >  <SOAP-ENV:Body>
> >
> >  <ns1:getQuote xmlns:ns1="urn:xmltoday-delayed-quotes"
> >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> >
> >  <symbol xsi:type="xsd:string">IBM</symbol>
> >
> >  </ns1:getQuote>
> >
> >  </SOAP-ENV:Body>
> >
> >  </SOAP-ENV:Envelope>
> >
> >
> >  Server:
> >
> >  HTTP/1.1 200 ok
> >
> >  Date: Sun, 20 Aug 2000 03:17:11 GMT
> >
> >  Server: IBM_HTTP_Server/1.3.6.2 Apache/1.3.7-dev (Win32)
> >
> >  Set-Cookie: sesessionid=CZD1K5AAAAAAAGC20O04DQQ;Path=/
> >
> >  Cache-Control: no-cache="set-cookie,set-cookie2"
> >
> >  Expires: Thu, 01 Dec 1994 16:00:00 GMT
> >
> >  content-length: 3991
> >
> >  Connection: close
> >
> >  Content-Type: text/xml;;charset=UTF-8
> >
> >
> >
> >  java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
> >
> >   at
> >sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:87)
> >
> >   at
sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:117)
> >
> >   at java.io.InputStreamReader.<init>(InputStreamReader.java:82)
> >
> >   at
>
>com.ibm.servlet.engine.srt.SRTServletRequest.getReader(SRTServletRequest.ja
v
> >a:286)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getReader(HttpServlet
R
> >equestProxy.java:169)
> >
> >   at
>
>org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:1
6
> >1)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:566)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:17
2
> >)
> >
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:639)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManage
r
> >.java:557)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecyc
l
> >eServlet.java:160)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServl
e
> >t.java:287)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycl
e
> >Servlet.java:105)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:3
4
> >9)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMa
n
> >ager.java:705)
> >
> >   at
>
>com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletMana
g
> >er.java:631)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDisp
> atch(W
> >ebApp.java:1175)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.ja
> va:1
> >043)
> >
> >   at
> >com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.jav
> a:10
> >02)
> >
> >   at
>
>com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java
> :
> >626)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedI
n
> >vocation.java:67)
> >
> >   at
>
>com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Cacheab
l
> >eInvocationContext.java:106)
> >
> >   at
>
>com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletReq
u
> >estProcessor.java:144)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListene
r
> >.java:300)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(S
Q
> >EventListenerImp.java:230)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEvent
L
> >istenerImp.java:104)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQ
E
> >ventSource.java:202)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.notifyService(SQWrapperEventSource.java:347)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectR
> u
> >nnable.run(SQWrapperEventSource.java:216)
> >
> >   at
>
>com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.ru
n
> >(Compiled Code)
> >
> >   at java.lang.Thread.run(Thread.java:472)
> >
> >
> >
>
> --
> http://www.workspot.net/~zombie/soap/
> My opinions are irrelevant. They will be assimilated by my employer.
>