Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 84304 invoked by uid 500); 4 Jun 2002 01:46:03 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 84295 invoked from network); 4 Jun 2002 01:46:03 -0000 Message-ID: From: Tom Jordahl To: "'axis-dev@xml.apache.org'" Subject: RE: Proposed change to RPCElement.java & BodyBuilder.java Date: Mon, 3 Jun 2002 21:45:58 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C20B69.93051290" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C20B69.93051290 Content-Type: text/plain; charset="iso-8859-1" John, Please verify the patch on tomorrows build or from CVS. FYI - in the future, its better to supply a context-diff for patches. Thanks! -- Tom Jordahl -----Original Message----- From: John Brothers [mailto:johnbr@undefined.com] Sent: Friday, May 31, 2002 8:05 PM To: axis-dev@xml.apache.org Subject: Re: Proposed change to RPCElement.java & BodyBuilder.java Here are the diffs, built against the 5-31-02 release, with failure and success cases both tested via GetQuote. I've never built a patch before, so if I need to do something else, let me know. -----------------------------------CUT BELOW HERE------------------------------- RPCElement.java 86c86 < OperationDesc [] operations) throws ClassNotFoundException --- > OperationDesc [] operations) 106,109d105 < < if (serviceDesc == null) { < throw new ClassNotFoundException(JavaUtils.getMessage("noClassForService00", lc)); < } BodyBuilder.java 158,172c158,159 < < try { < < element = new RPCElement(namespace, localName, prefix, < attributes, context, operations); < < } catch (ClassNotFoundException e) { < < // SAXException is already known to this method, so I < // don't have an exception-handling propogation explosion. < // < throw new SAXException(e); < } < < --- > element = new RPCElement(namespace, localName, prefix, > attributes, context, operations); axisNLS.properties 280d279 < noClassForService00=Could not find class for the service named: {0}\nHint: you need to copy your class files/tree into the right location (which depends on the servlet system you are using). ----------------------------------------- END CUT ABOVE HERE ---------------------------------------- ----- Original Message ----- From: Tom Jordahl To: 'axis-dev@xml.apache.org' Sent: Friday, May 31, 2002 2:55 PM Subject: RE: Proposed change to RPCElement.java & BodyBuilder.java John, I think this is a good patch. The patch needs to have the string message go in the message file (in utils.axisNLS.properties) and needs to be applied to the current source. John, can you rev the patch, then we can stick it in. I wil try and get to a revised patch, but if I am slow, someone else can feel free to apply it. Thanks John! -- Tom Jordahl Macromedia -----Original Message----- From: John Brothers [mailto:johnbr@undefined.com] Sent: Tuesday, May 28, 2002 1:55 PM To: axis-dev@xml.apache.org Subject: Proposed change to RPCElement.java & BodyBuilder.java Hello, I have been learning SOAP via Axis, and I encountered a NullPointerException in RPCElement() when trying to test out a new service that I had written. I eventually discovered that this was caused by Axis's inability to find the class file(s) for my service (I had used a link instead of copying the directory). I submit that it would be more informative to the user (and more elegant) to throw a ClassNotFoundException instead of a NullPointerException in that case, to help the user more quickly discover the "directory tree copy" requirement. I have been able to test the failure case using SimpleAxisServer and the 5-27 build (it successfully throws the exception), but I haven't been able to test the success case, and I can't spend any more time on it right now. I am attaching the change diffs, in the hopes that you might be able to incorporate them and save someone else the pain that I went through. Thanks, jb ---------- johnbr@undefined.com (678) 467 3504 ------_=_NextPart_001_01C20B69.93051290 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
John,
 
Please=20 verify the patch on tomorrows build or from CVS.
FYI -=20 in the future, its better to supply a context-diff for=20 patches.
 
Thanks!
 
--
Tom=20 Jordahl
 
-----Original Message-----
From: John Brothers=20 [mailto:johnbr@undefined.com]
Sent: Friday, May 31, 2002 = 8:05=20 PM
To: axis-dev@xml.apache.org
Subject: Re: = Proposed=20 change to RPCElement.java & BodyBuilder.java

Here are the diffs, built against = the 5-31-02=20 release, with failure and success cases both tested via = GetQuote.  I've=20 never built a patch before, so if I need to do something else, let me = know.
 
-----------------------------------CUT BELOW=20 HERE-------------------------------
RPCElement.java
86c86
<     &= nbsp;           &= nbsp;    =20 OperationDesc [] operations) throws=20 = ClassNotFoundException
---
>      = ;            = ;    =20 OperationDesc [] operations)
106,109d105
<=20 =
<          &nbs= p;   =20 if (serviceDesc =3D=3D null)=20 = {
<          &nb= sp;      =20 throw new = ClassNotFoundException(JavaUtils.getMessage("noClassForService00",=20 = lc));
<          = ;    =20 }
 
 
 
BodyBuilder.java
158,172c158,159
<=20 =
<          &nbs= p;   =20 try {
<=20 =
<          &nbs= p;      =20 element =3D new RPCElement(namespace, localName,=20 = prefix,
<         &nb= sp;           &nb= sp;           &nb= sp;        =20 attributes, context, operations);
<=20 =
<          &nbs= p;   =20 } catch (ClassNotFoundException e) {
<=20 =
<          &nbs= p;      =20 // SAXException is already known to this method, so=20 = I
<          &nb= sp;      =20 // don't have an exception-handling propogation=20 = explosion.
<         =         =20 = //
<          &n= bsp;      =20 throw new=20 = SAXException(e);
<        =       =20 }
<
<=20 =
---
>         &nb= sp;      =20 element =3D new RPCElement(namespace, localName,=20 = prefix,
>         &nb= sp;           &nb= sp;           &nb= sp;       =20 attributes, context, operations);
 
 
 
 
 
axisNLS.properties
280d279
< = noClassForService00=3DCould not find=20 class for the service named: {0}\nHint: you need to = <b>copy</b>=20 your class files/tree into the right location (which depends on the = servlet=20 system you are using).
----------------------------------------- = END CUT=20 ABOVE HERE ----------------------------------------
 
----- Original Message -----
From:=20 Tom=20 Jordahl
Sent: Friday, May 31, 2002 = 2:55=20 PM
Subject: RE: Proposed change = to=20 RPCElement.java & BodyBuilder.java

John,
I=20 think this is a good patch.  The patch needs to have the = string message=20 go in the message file (in  utils.axisNLS.properties) and = needs to be=20 applied to the current source.
 
John, can you rev the patch, then we can stick it=20 in.
 
I=20 wil try and get to a revised patch, but if I am slow, someone else = can feel=20 free to apply it.
 
Thanks John!
--
Tom Jordahl
Macromedia
 
-----Original Message-----
From: John Brothers=20 [mailto:johnbr@undefined.com]
Sent: Tuesday, May 28, 2002 = 1:55=20 PM
To: axis-dev@xml.apache.org
Subject: = Proposed change=20 to RPCElement.java & BodyBuilder.java

Hello,
 
   I have been learning = SOAP via=20 Axis, and I encountered a NullPointerException in RPCElement() when = trying=20 to test out a new service that I had written.  I = eventually=20 discovered that this was caused by Axis's inability to find = the class=20 file(s) for my service (I had used a link instead of copying = the=20 directory). 
 
   I submit that it = would be more=20 informative to the user (and more elegant) to throw a=20 ClassNotFoundException instead of a NullPointerException in that = case, to=20 help the user more quickly discover the "directory tree copy"=20 requirement.
 
  I have been able to test = the failure=20 case using SimpleAxisServer and the 5-27 build (it = successfully throws=20 the exception), but I haven't been able to test the success case, = and I=20 can't spend any more time on it right now.  I am attaching the = change=20 diffs, in the hopes that you might be able to incorporate them and = save=20 someone else the pain that I went through.
 
Thanks,
    jb
 
----------
johnbr@undefined.com  = ;            = ;    =20 (678) 467  = 3504
------_=_NextPart_001_01C20B69.93051290--