DO NOT REPLY [Bug 16097] New: - xml schema anyType not set in WSDL

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16097

xml schema anyType not set in WSDL

   Summary: xml schema anyType not set in WSDL
   Product: Axis
   Version: 1.1beta
  Platform: Other
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: WSDL processing
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When trying to compile the wrapped wsdl for the following class

public class test
{
  public test() {}
  public void Func(java.lang.Exception m) {}
}

java2WSDL warns that java.lang.Exception will be converted to a xml schema
anyType, but the wsdl file created contains type="tns2:Exception" with tns2
undefined instead.

Expected result: type="xsd:anyType" (since xsd is defined as xml schema in the
wsdl file)


compile log:

Z:\>java org.apache.axis.wsdl.Java2WSDL -y wrapped
-o test.wsdl -l"http://localhost:8080/axis/services/test"; -n urn:test -p"test"
urn:test  test
[WARN] Types - -The class java.lang.Exception is defined in a java or javax
package and cannot be converted into an xml schema type.  An xml schema anyType
will be used to define this class in the wsdl file.

resulting wsdl file:


http://schemas.xmlsoap.org/wsdl/";
xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="urn:test"
xmlns:intf="urn:test" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
 
  http://www.w3.org/2001/XMLSchema";>
   http://schemas.xmlsoap.org/soap/encoding/"/>
   

 
  
 

   
  
 
   
   
   
  
   
   
  
 
 
  
   
   
  http://schemas.xmlsoap.org/soap/http"/>
  
 
 

 
 

 
  
   
   
  
 http://localhost:8080/axis/services/test"/>
  
   




DO NOT REPLY [Bug 16098] New: - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent

   Summary: NullPointerException in SOAPPart.setContent
   Product: Axis
   Version: current (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Basic Architecture
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi

I have found a bug in the setContent method of the SOAPPart class.

When the method is called it will (besides updating the currentContent object)
try to update the currentMessage and currentForm objects as well. When doing
this it is assumed that calling getByteStream on the InputSource object returned
from the org.apache.axis.utils.XMLUtils.sourceToInputSource



DO NOT REPLY [Bug 16098] - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:37 ---
Created an attachment (id=4422)
A fix for the setContent method



DO NOT REPLY [Bug 16098] - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:38 ---
Created an attachment (id=4423)
Two new strings for usage by the setContent patch



DO NOT REPLY [Bug 16099] New: - currentContent not set in SOAPPart object when created

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16099

currentContent not set in SOAPPart object when created

   Summary: currentContent not set in SOAPPart object when created
   Product: Axis
   Version: current (nightly)
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Basic Architecture
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hi

When a new SOAPPart object is created the currentContent object is not set,
unless the setContent method is called explicitly after wards. The result of
this is that null is always returned when you call the getContent method.

As I see it this can be fixed in a number of places in the SOAPPart class. The
most obvious would be in the constructor (e.g., in a method called from the
constructor) or directly in the getContent method.

I have attached a fix to this bug report which fixes the problem in the
getContent method. If you would rather have it fixed somewhere else, please do
so or mail me so I can create another fix.

You can reproduce the problem by running the jaxrpc branch of the CTS for J2EE 1.4

Cheers
Claus Nyhus Christensen
[EMAIL PROTECTED]



DO NOT REPLY [Bug 16099] - currentContent not set in SOAPPart object when created

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16099

currentContent not set in SOAPPart object when created





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:46 ---
Created an attachment (id=4424)
Diff that fixes the problem in the getContent method



DO NOT REPLY [Bug 16099] - currentContent not set in SOAPPart object when created

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16099

currentContent not set in SOAPPart object when created





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:46 ---
Created an attachment (id=4425)
added a string used by the patch



DO NOT REPLY [Bug 16098] - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:48 ---
Created an attachment (id=4426)
Two new strings for usage by the setContent patch



DO NOT REPLY [Bug 16098] - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:48 ---
Created an attachment (id=4427)
A fix for the setContent method



DO NOT REPLY [Bug 16098] - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 09:56 ---
Ups, it seems that some of the text for my bug report was cut away :(

Here is what it should have said:

Hi

I have found a bug in the setContent method of the SOAPPart class.

When the method is called it will (besides updating the currentContent object)
try to update the currentMessage and currentForm objects as well. When doing
this it is assumed that calling getByteStream on the InputSource object returned
from the org.apache.axis.utils.XMLUtils.sourceToInputSource is not null. This is
however not allways the case if, e.g., the source parameter for the method is of
the StreamSource type.

In the org.apache.axis.utils.XMLUtils.sourceToInputSource method, both the
setByteStream and setCharacterStream methods are called if the source is a
StreamSource. The setContent method should therefore test if null is returned
from getByteStream, and if it is, call getCharacterStream and use this instead.

You can reproduce the problem by running the jaxrpc and jaxr branches of the CTS
for J2EE 1.4

I have attached a diff which fixes the problem. Since it is the first time a
submits diffs for axis I hope that my usage for resources.properties is correct.

Cheers
Claus Nyhus Christensen
[EMAIL PROTECTED]



cvs commit: xml-axis-wsif/java/doc/wsdl_extensions jms_bindings.htm

2003-01-15 Thread owenb
owenb   2003/01/15 03:48:11

  Removed: java/doc faq.htm run.htm how_to_provider.htm build.htm
trace.htm tests.htm how_to_wsdl_extensions.htm
mime_attachments.htm
   java/doc/wsdl_extensions/j2c_extensions
wsif_j2c_extensions.htm
   java readme.htm
   java/doc/wsdl_extensions jms_bindings.htm
  Log:
  Remove old .htm files since they have been replaced with .html versions



cvs commit: xml-axis-wsif/java/doc RELEASE_TASKS.txt

2003-01-15 Thread owenb
owenb   2003/01/15 04:15:20

  Modified:java/doc RELEASE_TASKS.txt
  Log:
  Completed task of changing doc file extensoins to .html
  
  Revision  ChangesPath
  1.20  +2 -2  xml-axis-wsif/java/doc/RELEASE_TASKS.txt
  
  Index: RELEASE_TASKS.txt
  ===
  RCS file: /home/cvs/xml-axis-wsif/java/doc/RELEASE_TASKS.txt,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- RELEASE_TASKS.txt 14 Jan 2003 13:56:57 -  1.19
  +++ RELEASE_TASKS.txt 15 Jan 2003 12:15:20 -  1.20
  @@ -26,8 +26,6 @@
 and regularly monitor bugzilla bugs and decide as appropriate if fix should be 
included in RCx or final
   * checkproblem with build srcdist and zip taks that throws NPE (at least on IBM JDK)
   * piotrp? fix build for JCA samples
  -* owen: fix documentation/web pages - we need to be constistant with file 
extensions - always use .html rather than .htm. This is currently
  -  causing broken links!! See bugzilla bug # 15691
   * documentation: we have most of it now but some reading/checking will only make it 
better
   * we need more people to check documentation
   * document each sample (Nirmal is doing great work here both writing and 
documenting samples)
  @@ -58,6 +56,8 @@
   * DONE [alek] test process to build binary and source distributions
   * DONE [nirmal + alek] document how to run samples (step by step)
   * DONE [nirmal + alek] document how to build (step by step)
  +* DONE owen: fix documentation/web pages - we need to be constistant with file 
extensions - always use .html rather than .htm. This is currently
  +  causing broken links!! See bugzilla bug # 15691
   
   - Post 2.0 release
   
  
  
  



RE: cvs commit: xml-axis/addons - New directory

2003-01-15 Thread Glen Daniels

Should this be xml-axis/java/addons?

--Glen

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 12:23 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: xml-axis/addons - New directory
> 
> 
> jmsnell 2003/01/14 21:23:19
> 
>   xml-axis/addons - New directory
> 



cvs commit: xml-axis/java/src/org/apache/axis/wsdl/symbolTable SymbolTable.java

2003-01-15 Thread dims
dims2003/01/15 05:38:34

  Modified:java/src/org/apache/axis/wsdl/symbolTable SymbolTable.java
  Log:
  Fix for Bug 16083 - WSDL2Java suddenly breaking with NPE
  
  Notes:
  - If we dont find type="???" in mime:content set it by default to text/plain.
  - probably broke when i was adding dime/mime support in wsdl.
  
  Revision  ChangesPath
  1.69  +4 -1  
xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java
  
  Index: SymbolTable.java
  ===
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- SymbolTable.java  3 Jan 2003 14:23:10 -   1.68
  +++ SymbolTable.java  15 Jan 2003 13:38:34 -  1.69
  @@ -2001,7 +2001,10 @@
   if(getInnerCollectionComponentQName(node)!=null)
   dims += "[]";
   }
  -bEntry.setMIMEInfo(op.getName(), content.getPart(), 
content.getType(), dims);
  +String type = content.getType();
  +if(type == null || type.length() == 0)
  +type = "text/plain";
  +bEntry.setMIMEInfo(op.getName(), content.getPart(), type, dims);
   }
   else if (obj instanceof SOAPBody) {
   String use = ((SOAPBody) obj).getUse();
  
  
  



DO NOT REPLY [Bug 16083] - WSDL2Java suddenly breaking with NPE

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16083

WSDL2Java suddenly breaking with NPE

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 13:43 ---
Fixed in latest cvs.

-- dims



[GUMP] Build Failure - Axis

2003-01-15 Thread Sam Ruby

This email is autogenerated from the output from:
<http://cvs.apache.org/builds/gump/2003-01-15/xml-axis.html>


Build results exceed maximum length.
Please see URL above for details.
Last 50 lines of build output follows.

 [echo] mailapi.present=true
 [echo] attachments.present=true
 [echo] jimi.present=true
 [echo] security.present=true
 [echo] jdk14.jsse.present=true
 [echo] sun.jsse.present=true
 [echo] ibm.jsse.present=${ibm.jsse.present}
 [echo] commons-httpclient.present=true
 [echo] axis-ant.present=true
 [echo] httpunit.present=true
 [echo] jms.present=true

 [echo] --- Property values ---
 [echo] debug=on
 [echo] deprecation=true
 [echo] build.compiler=${build.compiler}
 [echo] javac.fork=no
 [echo] axis_nojavadocs=${env.axis_nojavadocs}

 [echo] -- Network Settings ---

 [echo] http.proxyHost = 
 [echo] http.proxyPort = 
 [echo] http.nonProxyHosts = localhost
 [echo] http.proxyUser = 
 [echo] http.proxyPassword = 

 [echo] -- Test Environment for AXIS ---

 [echo] test.functional.remote = no
 [echo] test.functional.local = yes
 [echo] test.functional.both = no
 [echo] test.functional.reportdir = /home/rubys/jakarta/xml-axis/java/test-reports
 [echo] test.functional.SimpleAxisPort = 8080
 [echo] test.functional.TCPListenerPort = 8088
 [echo] test.functional.fail = yes

 [echo] -- Internal Message Exchange ---

 [echo] compile.ime = ${compile.ime}

 [echo] classpath: 
\home\rubys\jakarta\xml-axis\java\${xerces.jar};\home\rubys\jakarta\xml-axis\java\test\lib\jakarta-oro-2.0.5.jar;\home\rubys\jakarta\xml-axis\java\lib\jsse.jar;\home\rubys\jakarta\xml-axis\java\lib\JimiProClasses.zip;\home\rubys\jakarta\xml-axis\java\lib\activation.jar;\home\rubys\jakarta\xml-axis\java\lib\mailapi.jar;\usr\java\j2sdk1.4.1_01\lib\tools.jar;\home\rubys\jakarta\xml-axis\java\${j2ee.jar};\home\rubys\jakarta\xml-axis\java\lib\junit.jar;\home\rubys\jakarta\xml-axis\java\lib\commons-logging.jar;\home\rubys\jakarta\xml-axis\java\lib\log4j-1.2.4.jar;\home\rubys\jakarta\xml-axis\java\lib\wsdl4j.jar;\home\rubys\jakarta\xml-axis\java\lib\commons-discovery.jar;\home\rubys\jakarta\xml-xalan\java\build\xalan.jar;\home\rubys\jakarta\xml-commons\java\external\build\xml-apis.jar;\home\rubys\jakarta\xml-xerces2\java\build\xmlParserAPIs.jar;\home\rubys\jakarta\xml-xerces2\java\build\xercesImpl.jar;\home\rubys\jakarta\xml-axis\java;\usr\java\j2sdk1.4.1_01\jre\lib\rt.jar;\home\rubys\jakarta\jakarta-oro\jakarta-oro-20030115.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\nodeps.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant-junit.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant-stylebook.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant-swing.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant-trax.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant-xalan2.jar;\home\rubys\jakarta\jakarta-commons\discovery\dist\commons-discovery.jar;\home\rubys\jakarta\jakarta-commons\logging\dist\commons-logging.jar;\home\rubys\jakarta\jakarta-commons\logging\dist\commons-logging-api.jar;\home\rubys\jakarta\jakarta-servletapi\dist\lib\servlet.jar;\home\rubys\jakarta\httpunit\lib\httpunit.jar;\home\rubys\jakarta\jakarta-commons\httpclient\dist\commons-httpclient.jar;\home\rubys\jakarta\dist\junit\junit.jar;\opt\Jimi\JimiProClasses.zip;\opt\jaf-1.0.1\activation.jar;\opt\javamail-1.2\mail.jar;\opt\jsse1.0.3\lib\jsse.jar;\opt\jsse1.0.3\lib\jnet.jar;\opt\jsse1.0.3\lib\jcert.jar;\opt\jms1.0.2\lib\jms.jar;\home\rubys\jakarta\xml-security\build\xmlsec.jar;\home\rubys\jakarta\wsdl4j\build\lib\wsdl4j.jar;\home\rubys\jakarta\wsdl4j\build\lib\qname.jar;\home\rubys\jakarta\jakarta-log4j\log4j-20030115.jar;\home\rubys\jakarta\xml-axis\java\build\lib\axis-ant.jar;\home\rubys\jakarta\xml-axis\java\build\classes;\home\rubys\jakarta\xml-axis\java\build\tools


transport-layer:
Caught exception (org.apache.tools.ant.BuildException) while expanding classpath: 
/home/rubys/jakarta/xml-axis/java/samples/transport/lib not found.

BUILD FAILED
file:///home/rubys/jakarta/xml-axis/java/xmls/taskdefs_post_compile.xml:2: 
/home/rubys/jakarta/xml-axis/java/samples/transport/lib not found.

Total time: 6 minutes 38 seconds



cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava JavaGeneratorFactory.java

2003-01-15 Thread dims
dims2003/01/15 05:53:07

  Modified:java/src/org/apache/axis/wsdl/toJava
JavaGeneratorFactory.java
  Log:
  getTypes() is not necessary if all we are interested are Types and Not Elements, so 
just use getTypeIndex
  
  Revision  ChangesPath
  1.33  +5 -9  
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java
  
  Index: JavaGeneratorFactory.java
  ===
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- JavaGeneratorFactory.java 30 Dec 2002 14:36:46 -  1.32
  +++ JavaGeneratorFactory.java 15 Jan 2003 13:53:03 -  1.33
  @@ -685,16 +685,12 @@
   // the same (ignores [] ).
   if (firstType) {
   firstType = false;
  -Vector types = symbolTable.getTypes();
  -for (int j = 0; j < types.size(); ++j) {
  +Iterator types = 
symbolTable.getTypeIndex().values().iterator();
  +while (types.hasNext()) {
   TypeEntry type = (TypeEntry)
  -types.elementAt(j);
  -if (type != entry && 
  -!(type instanceof Element) &&
  -type.getBaseType() == null &&
  -sameJavaClass(
  -((Type) entry).getName(),
  -type.getName())) {
  +types.next();
  +if (type != entry && type.getBaseType() == null 
&&
  +sameJavaClass(entry.getName(), 
type.getName())) {
   v.add(type);  
   }
   }
  
  
  



DO NOT REPLY [Bug 16098] - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 13:57 ---
Claus,

Can you please send in a test case as well? test\saaj\*.java has some example on
test cases for SAAJ.

Thanks,
dims



DO NOT REPLY [Bug 16099] - currentContent not set in SOAPPart object when created

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16099

currentContent not set in SOAPPart object when created





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 13:58 ---
Claus,

Can you please send in a test case as well? test\saaj\*.java has some example on
test cases for SAAJ.

Thanks,
dims



cvs commit: xml-axis/java/src/org/apache/axis SOAPPart.java

2003-01-15 Thread dims
dims2003/01/15 06:06:09

  Modified:java/src/org/apache/axis/i18n resource.properties
   java/src/org/apache/axis SOAPPart.java
  Log:
  Fix for Bug 16098 - NullPointerException in SOAPPart.setContent
  from [EMAIL PROTECTED] (Claus Nyhus Christensen)
  
  Fix for Bug 16099 - currentContent not set in SOAPPart object when created
  from [EMAIL PROTECTED] (Claus Nyhus Christensen)
  
  Revision  ChangesPath
  1.46  +4 -0  xml-axis/java/src/org/apache/axis/i18n/resource.properties
  
  Index: resource.properties
  ===
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/i18n/resource.properties,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- resource.properties   10 Jan 2003 06:56:32 -  1.45
  +++ resource.properties   15 Jan 2003 14:06:09 -  1.46
  @@ -1125,3 +1125,7 @@
   foundJWS00=There is a Web Service here
   #NOTE in foundJWS01, do not translate WSDL
   foundJWS01=Click to see the WSDL
  +
  +noCharacterOrByteStream=InputSource has neither character stream nor byte stream
  +couldNotReadFromCharStream=Could not read from character stream
  +errorGetDocFromSOAPEnvelope=Could not get document from SOAPEnvelope
  \ No newline at end of file
  
  
  
  1.53  +51 -5 xml-axis/java/src/org/apache/axis/SOAPPart.java
  
  Index: SOAPPart.java
  ===
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/SOAPPart.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- SOAPPart.java 11 Dec 2002 22:38:06 -  1.52
  +++ SOAPPart.java 15 Jan 2003 14:06:09 -  1.53
  @@ -72,6 +72,8 @@
   import javax.xml.soap.MimeHeaders;
   import javax.xml.soap.SOAPException;
   import javax.xml.transform.Source;
  +import javax.xml.transform.dom.DOMSource;
  +import javax.xml.transform.stream.StreamSource;
   import java.io.ByteArrayOutputStream;
   import java.io.IOException;
   import java.io.InputStream;
  @@ -79,6 +81,9 @@
   import java.io.StringWriter;
   import java.io.UnsupportedEncodingException;
   import java.io.Writer;
  +import java.io.Reader;
  +import java.io.BufferedReader;
  +import java.io.ByteArrayInputStream;
   import java.util.Iterator;
   import java.util.Vector;
   
  @@ -112,9 +117,6 @@
   
   //private Hashtable headers = new Hashtable();
   private MimeHeaders mimeHeaders = new MimeHeaders();
  -private String contentId;
  -private String contentLocation;
  -
   
   private static final String[] formNames =
   { "", "FORM_STRING", "FORM_INPUTSTREAM", "FORM_SOAPENVELOPE",
  @@ -605,7 +607,6 @@
* Sets Content-Id of this part.
*  already defined.
* @param newCid new Content-Id
  - * @returns void
*/
   public void setContentId(String newCid){
   setMimeHeader(HTTPConstants.HEADER_CONTENT_ID,newCid);
  @@ -659,7 +660,26 @@
   
   contentSource = source;
   InputSource in = 
org.apache.axis.utils.XMLUtils.sourceToInputSource(contentSource);
  -setCurrentMessage(in.getByteStream(), FORM_INPUTSTREAM);
  +InputStream is = in.getByteStream();
  +if(is != null) {
  +setCurrentMessage(is, FORM_INPUTSTREAM);
  +} else {
  +Reader r = in.getCharacterStream();
  +if(r == null) {
  +throw new 
SOAPException(Messages.getMessage("noCharacterOrByteStream"));
  +}
  +BufferedReader br = new BufferedReader(r);
  +String line = null;
  +StringBuffer sb = new StringBuffer();
  +try {
  +while((line = br.readLine()) != null) {
  +sb.append(line);
  +}
  +} catch (IOException e) {
  +throw new 
SOAPException(Messages.getMessage("couldNotReadFromCharStream"), e);
  +}
  +setCurrentMessage(sb.toString(), FORM_STRING);
  +}
   }
   
   /**
  @@ -672,6 +692,32 @@
* @see #setContent(javax.xml.transform.Source) 
setContent(javax.xml.transform.Source)
*/
   public Source getContent() throws SOAPException {
  + if(contentSource == null) {
  +switch(currentForm) {
  +case FORM_STRING:
  +String s = (String)currentMessage;
  +contentSource = new StreamSource(new StringReader(s));
  +break;
  +case FORM_INPUTSTREAM:
  +contentSource = new StreamSource((InputStream)currentMessage);
  +break;
  +case FORM_SOAPENVELOPE:
  +SOAPEnvelope se = (SOAPEnvelope)currentMessage;
  +try {
  +contentSource = new DOMSource(se.getAsDocument());
  +} catch (Exception e) {
  +throw 

DO NOT REPLY [Bug 16098] - NullPointerException in SOAPPart.setContent

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16098

NullPointerException in SOAPPart.setContent

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 14:10 ---
Checked in the patch. Thanks Claus for considering Axis for your trifork j2ee
server work :)

-- dims



DO NOT REPLY [Bug 16099] - currentContent not set in SOAPPart object when created

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16099

currentContent not set in SOAPPart object when created

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 14:11 ---
Checked in the patch. Thanks Claus for considering Axis for your trifork j2ee
server work :)

-- dims



DO NOT REPLY [Bug 16110] New: - Fault Code empty on the client if AxisFault is subclassed

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16110

Fault Code empty on the client if AxisFault is subclassed

   Summary: Fault Code empty on the client if AxisFault is
subclassed
   Product: Axis
   Version: 1.1beta
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Major
  Priority: Other
 Component: Serialization/Deserialization
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If I have a service that throws an AxisFault all works fine. 

If I subclass AxisFault, and throw that exception from my service, the 
faultCode is blank, when caught in the client.



DO NOT REPLY [Bug 15837] - Attachments fail if in the wrong order

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15837

Attachments fail if in the wrong order

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Priority|Other   |High



RE: cvs commit: xml-axis/addons - New directory

2003-01-15 Thread James M Snell
I debated that, but figured that the addons should exist on essentially 
the same level as proposals and stay out of the main java distribution 
tree.

- James Snell
 IBM Emerging Technologies
 [EMAIL PROTECTED]
 (559) 587-1233 (office)
 (700) 544-9035 (t/l)
 Programming Web Services With SOAP
 O'Reilly & Associates, ISBN 0596000952

 Have I not commanded you? Be strong and courageous. 
 Do not be terrified, do not be discouraged, for the Lord your 
 God will be with you whereever you go.- Joshua 1:9



Glen Daniels <[EMAIL PROTECTED]>
01/15/2003 04:46 AM
Please respond to axis-dev


To
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc

bcc

Subject
RE: cvs commit: xml-axis/addons - New directory




Should this be xml-axis/java/addons?

--Glen

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 12:23 AM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: xml-axis/addons - New directory
>
>
> jmsnell 2003/01/14 21:23:19
>
>   xml-axis/addons - New directory
> 




Fw: MessageElement is not for mortals

2003-01-15 Thread James M Snell
FYI: Attached is a note from an IBM researcher who has been using Axis to 
create some demos for the IBM Web Services Toolkit.  It details from 
issues she has had to deal with in regards to the MessageElement class. 
After the 1.1 Release, I will work on incorporating her suggested 
enhancements into the code but wanted to make folks aware of the issue.  I 
will also post this to the bugzilla database.

- James Snell
 IBM Emerging Technologies
 [EMAIL PROTECTED]
 (559) 587-1233 (office)
 (700) 544-9035 (t/l)
 Programming Web Services With SOAP
 O'Reilly & Associates, ISBN 0596000952

 Have I not commanded you? Be strong and courageous. 
 Do not be terrified, do not be discouraged, for the Lord your 
 God will be with you whereever you go.- Joshua 1:9
- Forwarded by James M Snell/Fresno/IBM on 01/15/2003 09:35 AM -

Julie Macnaught/Middletown/IBM wrote on 01/15/2003 09:09:34 AM:

> The purpose of this note is to document issues I encountered during 
> the development of the WSRP WSTK demo with respect to Axis and the 
> org.apache.axis.message.MessageElement class.  I suspect the 
> MessageElement class is not meant for programmers to use directly, 
> but this is a requirement in our case.
> 
> Background:
> 
> The WSDL for the demo makes use of "any" in several places in order 
> to allow user defined xml data to be passed in messages.  Here is an
> example of its use in defining the Property type:
> 
>   
> 
>   
> 
> 
> 
>   
> 
>   

> The WSDL2Java tool generates the type for this as a Property class 
> that contains an array of MessageElements like so:
> 
> public class Property  implements java.io.Serializable {
> private org.apache.axis.message.MessageElement [] _any;
> private java.lang.String name;  // attribute
> private java.lang.String lang;  // attribute
> private java.lang.String resourceName;  // attribute
> 
> public Property() {
> }
> 
> public org.apache.axis.message.MessageElement [] get_any() {
> return _any;
> }
> 
> public void set_any(org.apache.axis.message.MessageElement [] _any) 
{
> this._any = _any;
> }
>  .
>  .
>  .
> 
> In order to use the Property class, the programmer must create 
> MessageElements and MessageElement arrays as well as try to obtain 
> the contents of a MessageElement instance.
> 
> Issues:
> 
> 1.  Constructing a MessageElement:
>  If I want to create a Property, I must construct a MessageElement. 
> There are 9 constructors in the MessageElement class.  The Javadoc 
> does not describe any of the them.  It matters which one is chosen. 
> After a lot of experimentation,  I ended up using the 
> MessageElement(org.w3c.Element) constructor.   Under the covers, the
> MessageElement class has several member variables for holding value 
> information.  The constructor you use determines which member 
> variable gets used (e.g. Text vs Element vs children), and also 
> determines how you try to "get" the value later.   There are also 
> many possibilities for using the no-argument constructor and the 
> calling one of the multitude of set methods. The setObjectValue 
> method is tempting, but the value doesn't make it across the network
> connection.
> 
> 2. Retrieving the value:
>  There is no usable "get" method on a MessageElement.   Even if you 
> knew how it was created and where the data was stored in the 
> MessageElement (e.g. textRep, elementRep), there is no corresponding
> get method.  There is a method called  getAsDOM, but this method 
> calls getAsString and then parses the result.  The protected method 
> getAsString() method requires a MessageContext which is used to 
> obtain a SerializationContext.  Since I created the MessageElement 
> myself, there is no MessageContext.  If you call toString(), it just
> calls getAsString() .
> 
> Workarounds:
> 
> I ended up creating a class called MessageElementHelper which has 
> methods to create a MessageElement, to clone a MessageElement and to
> fetch its content.  It implements SerializationContext so I can use 
> the output() method and fake out the serialization context.   Note 
> that I had to inspect the source code for MessageElement in order to
> derive this solution.
> 
> Here it is:
> [attachment "MessageElementHelper.java" deleted by James M 
Snell/Fresno/IBM] 
> 
> Conclusions:
> 
> I hope I described the problem well enough without going in to too 
> much detail.  Folks using "any" in their messages are going to have 
> to use MessageElement and it's painful.  I have a couple of 
> suggestions going forward.
>  1. change the WSDL2Java program to generate something more useable 
> than MessageElement arrays.
>  2. document MessageElement more precisely, specifically for this use 
case
>  3. wrap MessageElement in a more usable form and change WSDL2Java 
> correspondingly. It would be nice to have setElement(w3c.dom.
> Element)

Call Parameter details

2003-01-15 Thread James M Snell
Question: why isn't there a way to list the input/output parameters that 
have been configured on the org.apache.axis.client.Call object? 

Example, using the code below, I can initialize a call object from WSDL, 
but never see what parameters the initialization added to the Call. 

  Service service = new Service("implementation.wsdl", serviceQN);
  Call op1 = (Call)service.createCall(portQN, "operation1");
  // how do I get information about the expected parameters? (e.g. 
names, parameter mode, type)

At the very least, we should have a method that returns an array of 
parameter names that we can feed into the getParameterTypeByName and 
getParameterTypeByQName methods, etc. Ideally, there should be a method of 
inspecting the entire operation description.  Am I missing something?

- James Snell
 IBM Emerging Technologies
 [EMAIL PROTECTED]
 (559) 587-1233 (office)
 (700) 544-9035 (t/l)
 Programming Web Services With SOAP
 O'Reilly & Associates, ISBN 0596000952

 Have I not commanded you? Be strong and courageous. 
 Do not be terrified, do not be discouraged, for the Lord your 
 God will be with you whereever you go.- Joshua 1:9



Re: Call Parameter details

2003-01-15 Thread Davanum Srinivas
Yep...I had to jump thru hoops to get this to work -
xml-axis/java/samples/client/DynamicInvoker.java

Thanks,
dims

--- James M Snell <[EMAIL PROTECTED]> wrote:
> Question: why isn't there a way to list the input/output parameters that 
> have been configured on the org.apache.axis.client.Call object? 
> 
> Example, using the code below, I can initialize a call object from WSDL, 
> but never see what parameters the initialization added to the Call. 
> 
>   Service service = new Service("implementation.wsdl", serviceQN);
>   Call op1 = (Call)service.createCall(portQN, "operation1");
>   // how do I get information about the expected parameters? (e.g. 
> names, parameter mode, type)
> 
> At the very least, we should have a method that returns an array of 
> parameter names that we can feed into the getParameterTypeByName and 
> getParameterTypeByQName methods, etc. Ideally, there should be a method of 
> inspecting the entire operation description.  Am I missing something?
> 
> - James Snell
>  IBM Emerging Technologies
>  [EMAIL PROTECTED]
>  (559) 587-1233 (office)
>  (700) 544-9035 (t/l)
>  Programming Web Services With SOAP
>  O'Reilly & Associates, ISBN 0596000952
> 
>  Have I not commanded you? Be strong and courageous. 
>  Do not be terrified, do not be discouraged, for the Lord your 
>  God will be with you whereever you go.- Joshua 1:9


=
Davanum Srinivas - http://xml.apache.org/~dims/

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



Re: Call Parameter details

2003-01-15 Thread Doug Davis





You've got to be kidding!  :-)
What if you don't have WSDL - say you're handed a Call object and just want
to query it?
-Dug


Davanum Srinivas <[EMAIL PROTECTED]> on 01/15/2003 03:25:58 PM

Please respond to [EMAIL PROTECTED]

To:[EMAIL PROTECTED]
cc:
Subject:Re: Call Parameter details


Yep...I had to jump thru hoops to get this to work -
xml-axis/java/samples/client/DynamicInvoker.java

Thanks,
dims

--- James M Snell <[EMAIL PROTECTED]> wrote:
> Question: why isn't there a way to list the input/output parameters that
> have been configured on the org.apache.axis.client.Call object?
>
> Example, using the code below, I can initialize a call object from WSDL,
> but never see what parameters the initialization added to the Call.
>
>   Service service = new Service("implementation.wsdl", serviceQN);
>   Call op1 = (Call)service.createCall(portQN, "operation1");
>   // how do I get information about the expected parameters? (e.g.
> names, parameter mode, type)
>
> At the very least, we should have a method that returns an array of
> parameter names that we can feed into the getParameterTypeByName and
> getParameterTypeByQName methods, etc. Ideally, there should be a method
of
> inspecting the entire operation description.  Am I missing something?
>
> - James Snell
>  IBM Emerging Technologies
>  [EMAIL PROTECTED]
>  (559) 587-1233 (office)
>  (700) 544-9035 (t/l)
>  Programming Web Services With SOAP
>  O'Reilly & Associates, ISBN 0596000952
>
>  Have I not commanded you? Be strong and courageous.
>  Do not be terrified, do not be discouraged, for the Lord your
>  God will be with you whereever you go.- Joshua 1:9


=
Davanum Srinivas - http://xml.apache.org/~dims/

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com






Re: [GUMP] Build Failure - Axis

2003-01-15 Thread Steve Loughran
ahh, this is really starting to irritate me

 [echo] lib.dir = /home/rubys/jakarta/xml-axis/java/lib

so all is well, yet  we are still failing with
/home/rubys/jakarta/xml-axis/java/samples/transport/lib not found, so the
hypothesis 'its about the value of lib.dir' is somehow howr

I am going to add some more echo logging.



- Original Message -
From: "Sam Ruby" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 05:52
Subject: [GUMP] Build Failure - Axis




>
>  [echo] --- Property values ---
>  [echo] debug=on
>  [echo] deprecation=true
>  [echo] build.compiler=${build.compiler}
>  [echo] javac.fork=no
>  [echo] axis_nojavadocs=${env.axis_nojavadocs}
>
>  [echo] -- Network Settings ---
>
>  [echo] http.proxyHost =
>  [echo] http.proxyPort =
>  [echo] http.nonProxyHosts = localhost
>  [echo] http.proxyUser =
>  [echo] http.proxyPassword =
>
>  [echo] -- Test Environment for AXIS ---
>
>  [echo] test.functional.remote = no
>  [echo] test.functional.local = yes
>  [echo] test.functional.both = no
>  [echo] test.functional.reportdir =
/home/rubys/jakarta/xml-axis/java/test-reports
>  [echo] test.functional.SimpleAxisPort = 8080
>  [echo] test.functional.TCPListenerPort = 8088
>  [echo] test.functional.fail = yes
>
>  [echo] -- Internal Message Exchange ---
>
>  [echo] compile.ime = ${compile.ime}
>
>  [echo] classpath:
\home\rubys\jakarta\xml-axis\java\${xerces.jar};\home\rubys\jakarta\xml-axis
\java\test\lib\jakarta-oro-2.0.5.jar;\home\rubys\jakarta\xml-axis\java\lib\j
sse.jar;\home\rubys\jakarta\xml-axis\java\lib\JimiProClasses.zip;\home\rubys
\jakarta\xml-axis\java\lib\activation.jar;\home\rubys\jakarta\xml-axis\java\
lib\mailapi.jar;\usr\java\j2sdk1.4.1_01\lib\tools.jar;\home\rubys\jakarta\xm
l-axis\java\${j2ee.jar};\home\rubys\jakarta\xml-axis\java\lib\junit.jar;\hom
e\rubys\jakarta\xml-axis\java\lib\commons-logging.jar;\home\rubys\jakarta\xm
l-axis\java\lib\log4j-1.2.4.jar;\home\rubys\jakarta\xml-axis\java\lib\wsdl4j
.jar;\home\rubys\jakarta\xml-axis\java\lib\commons-discovery.jar;\home\rubys
\jakarta\xml-xalan\java\build\xalan.jar;\home\rubys\jakarta\xml-commons\java
\external\build\xml-apis.jar;\home\rubys\jakarta\xml-xerces2\java\build\xmlP
arserAPIs.jar;\home\rubys\jakarta\xml-xerces2\java\build\xercesImpl.jar;\hom
e\rubys\jakarta\xml-axis\java;\usr\java\j2sdk1.4.1_01\jr!
>
e\lib\rt.jar;\home\rubys\jakarta\jakarta-oro\jakarta-oro-20030115.jar;\home\
rubys\jakarta\jakarta-ant\dist\lib\ant.jar;\home\rubys\jakarta\jakarta-ant\d
ist\lib\nodeps.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant-junit.jar;\h
ome\rubys\jakarta\jakarta-ant\dist\lib\ant-stylebook.jar;\home\rubys\jakarta
\jakarta-ant\dist\lib\ant-swing.jar;\home\rubys\jakarta\jakarta-ant\dist\lib
\ant-trax.jar;\home\rubys\jakarta\jakarta-ant\dist\lib\ant-xalan2.jar;\home\
rubys\jakarta\jakarta-commons\discovery\dist\commons-discovery.jar;\home\rub
ys\jakarta\jakarta-commons\logging\dist\commons-logging.jar;\home\rubys\jaka
rta\jakarta-commons\logging\dist\commons-logging-api.jar;\home\rubys\jakarta
\jakarta-servletapi\dist\lib\servlet.jar;\home\rubys\jakarta\httpunit\lib\ht
tpunit.jar;\home\rubys\jakarta\jakarta-commons\httpclient\dist\commons-httpc
lient.jar;\home\rubys\jakarta\dist\junit\junit.jar;\opt\Jimi\JimiProClasses.
zip;\opt\jaf-1.0.1\activation.jar;\opt\javamail-1.2\mail.jar;\opt\jsse1.0.3\
lib!
> \jsse.jar;\opt\jsse1.0.3\lib\jnet.jar;\opt\jsse1.0.3\lib\!
>
jcert.jar;\opt\jms1.0.2\lib\jms.jar;\home\rubys\jakarta\xml-security\build\x
mlsec.jar;\home\rubys\jakarta\wsdl4j\build\lib\wsdl4j.jar;\home\rubys\jakart
a\wsdl4j\build\lib\qname.jar;\home\rubys\jakarta\jakarta-log4j\log4j-2003011
5.jar;\home\rubys\jakarta\xml-axis\java\build\lib\axis-ant.jar;\home\rubys\j
akarta\xml-axis\java\build\classes;\home\rubys\jakarta\xml-axis\java\build\t
ools
>
>
> transport-layer:
> Caught exception (org.apache.tools.ant.BuildException) while expanding
classpath: /home/rubys/jakarta/xml-axis/java/samples/transport/lib not
found.
>
> BUILD FAILED
> file:///home/rubys/jakarta/xml-axis/java/xmls/taskdefs_post_compile.xml:2:
/home/rubys/jakarta/xml-axis/java/samples/transport/lib not found.
>
> Total time: 6 minutes 38 seconds
>




cvs commit: xml-axis/java/xmls targets.xml

2003-01-15 Thread stevel
stevel  2003/01/15 12:50:58

  Modified:java/xmls targets.xml
  Log:
  using inheritAll to pass down the current env settings to the transport sample.
  
  This sample is special in that by setting the dir param of the  call, we are 
moving its base dir from axis.home to axis.home/samples/transport, so things that get 
recreated are relative to a different place. To make matters worse, ant always passes 
stuff on the command line down, so lib.dir=lib is still there.
  
  Alternate tactics here would be to remove the dir attr and put the complete path in 
the antfile, or set inheritAll=false and pass down those properties we thing 
important: axis.home being the key one.
  
  Revision  ChangesPath
  1.54  +2 -1  xml-axis/java/xmls/targets.xml
  
  Index: targets.xml
  ===
  RCS file: /home/cvs/xml-axis/java/xmls/targets.xml,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- targets.xml   14 Jan 2003 17:47:16 -  1.53
  +++ targets.xml   15 Jan 2003 20:50:58 -  1.54
  @@ -609,5 +609,6 @@
 
   
 
  -
  +
 
  
  
  



DO NOT REPLY [Bug 16141] New: - Wrong return ParameterDesc returned during deserialization when using a split WSDL description

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16141

Wrong return ParameterDesc returned during deserialization when using a split WSDL 
description

   Summary: Wrong return ParameterDesc returned during
deserialization when using a split WSDL description
   Product: Axis
   Version: 1.1beta
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Serialization/Deserialization
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Ok, this one is a bit strange.  I'm in the process of tracking it down, but it 
hasn't been easy.  I'm using the attached WSDL documents to initialize a 
Service and Call object.  When using the single WSDL document 
(NasdaqQuotes.wsdl) everything works fine.  When using the split WSDL documents 
(NasdaqQuotes_Impl.wsdl and NasdaqQuotes_Interface.wsdl) I'm getting a "Bad 
Types" exception while deserializing the response message.

I traced the exception to the org.apache.axis.message.RPCHandler class and 
through a bit of debugging found the basic problem but I'm not yet sure what's 
causing the problem.

On line 215 in RPCHandler, the code attempts to get the method return 
ParameterDesc using a QName.  Now, the QName that is passed in is exactly what 
is expected given the WSDL portType and message descriptions 
("getPriceReturn"), but the ParameterDesc that is returned is the ParameterDesc 
for the input parameter ("symbol") ... (see the WSDL to understand where I'm 
getting these names).  So basically, the OperationDesc is returning the wrong 
ParameterDesc for the operations return value... but it ONLY happens when using 
a split WSDL description. Testing with a number of other split WSDL 
descriptions and I get the exact same problem.


  [215] if (isResponse) {
  [216]   paramDesc = operation.getOutputParamByQName(qname);
  [217] } else {
  [218]   paramDesc = operation.getInputParamByQName(qname);
  [219] }


Line [216] is the one where the problem occurs.



DO NOT REPLY [Bug 16141] - Wrong return ParameterDesc returned during deserialization when using a split WSDL description

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16141

Wrong return ParameterDesc returned during deserialization when using a split WSDL 
description





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 21:15 ---
Created an attachment (id=4451)
Single WSDL File



DO NOT REPLY [Bug 16141] - Wrong return ParameterDesc returned during deserialization when using a split WSDL description

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16141

Wrong return ParameterDesc returned during deserialization when using a split WSDL 
description





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 21:15 ---
Created an attachment (id=4452)
Split WSDL #1



DO NOT REPLY [Bug 16141] - Wrong return ParameterDesc returned during deserialization when using a split WSDL description

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16141

Wrong return ParameterDesc returned during deserialization when using a split WSDL 
description





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 21:15 ---
Created an attachment (id=4453)
Split WSDL #2



cvs commit: xml-axis/java/src/org/apache/axis/description OperationDesc.java

2003-01-15 Thread jmsnell
jmsnell 2003/01/15 14:04:39

  Modified:java/src/org/apache/axis/description OperationDesc.java
  Log:
  Fixing a problem with the getOutputParamByQName method.  See bug #16141
  
  Revision  ChangesPath
  1.31  +13 -9 xml-axis/java/src/org/apache/axis/description/OperationDesc.java
  
  Index: OperationDesc.java
  ===
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/description/OperationDesc.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- OperationDesc.java17 Dec 2002 13:35:03 -  1.30
  +++ OperationDesc.java15 Jan 2003 22:04:38 -  1.31
  @@ -359,18 +359,22 @@
   ParameterDesc param = null;
   
   for (Iterator i = parameters.iterator(); i.hasNext();) {
  -param = (ParameterDesc) i.next();
  +ParameterDesc pnext = (ParameterDesc)i.next();
   if (param.getQName().equals(qname) &&
  -param.getMode() != ParameterDesc.IN)
  -return param;
  +param.getMode() != ParameterDesc.IN) {
  +param = pnext;
  +break;
  +}
   }
   
  -if (null == returnDesc.getQName() ){
  -param= new ParameterDesc( returnDesc); //Create copy
  -param.setQName(qname);
  -}
  -else if ( qname.equals(returnDesc.getQName())) {
  -param = returnDesc;
  +if (param == null) {
  +if (null == returnDesc.getQName() ){
  +param= new ParameterDesc( returnDesc); //Create copy
  +param.setQName(qname);
  +}
  +else if ( qname.equals(returnDesc.getQName())) {
  +param = returnDesc;
  +}
   }
   
   return param;
  
  
  



Re: cvs commit: xml-axis/java/src/org/apache/axis/description OperationDesc.java

2003-01-15 Thread Davanum Srinivas
James,

Does this fix the problem? (16141)

Thanks,
dims

--- [EMAIL PROTECTED] wrote:
> jmsnell 2003/01/15 14:04:39
> 
>   Modified:java/src/org/apache/axis/description OperationDesc.java
>   Log:
>   Fixing a problem with the getOutputParamByQName method.  See bug #16141
>   
>   Revision  ChangesPath
>   1.31  +13 -9 
>xml-axis/java/src/org/apache/axis/description/OperationDesc.java
>   
>   Index: OperationDesc.java
>   ===
>   RCS file: 
>/home/cvs/xml-axis/java/src/org/apache/axis/description/OperationDesc.java,v
>   retrieving revision 1.30
>   retrieving revision 1.31
>   diff -u -r1.30 -r1.31
>   --- OperationDesc.java  17 Dec 2002 13:35:03 -  1.30
>   +++ OperationDesc.java  15 Jan 2003 22:04:38 -  1.31
>   @@ -359,18 +359,22 @@
>ParameterDesc param = null;
>
>for (Iterator i = parameters.iterator(); i.hasNext();) {
>   -param = (ParameterDesc) i.next();
>   +ParameterDesc pnext = (ParameterDesc)i.next();
>if (param.getQName().equals(qname) &&
>   -param.getMode() != ParameterDesc.IN)
>   -return param;
>   +param.getMode() != ParameterDesc.IN) {
>   +param = pnext;
>   +break;
>   +}
>}
>
>   -if (null == returnDesc.getQName() ){
>   -param= new ParameterDesc( returnDesc); //Create copy
>   -param.setQName(qname);
>   -}
>   -else if ( qname.equals(returnDesc.getQName())) {
>   -param = returnDesc;
>   +if (param == null) {
>   +if (null == returnDesc.getQName() ){
>   +param= new ParameterDesc( returnDesc); //Create copy
>   +param.setQName(qname);
>   +}
>   +else if ( qname.equals(returnDesc.getQName())) {
>   +param = returnDesc;
>   +}
>}
>
>return param;
>   
>   
>   


=
Davanum Srinivas - http://xml.apache.org/~dims/

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



DO NOT REPLY [Bug 16141] - Wrong return ParameterDesc returned during deserialization when using a split WSDL description

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16141

Wrong return ParameterDesc returned during deserialization when using a split WSDL 
description

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 22:12 ---
Ok, figured it out... there were two issues.. one in the Axis code and the 
other in my WSDL.  The Axis code issue was covering up the WSDL issue.

First, the Axis code... in OperationDesc, the method getOutputParamByQName
(QName) was returning the wrong information when searching for a parameter that 
did not exist.  It would loop through the array of parameters looking for a 
matching QName.. if it did not find a match, it would return the last parameter 
it checked.  I changed the method so that if a matching QName wasn't found, the 
method returns a null which is what the calling code in RPCHandler expects.

Once I solved that issue, I had to go back and figure out why the parameter I 
was looking for wasn't being found.  The reason is that the parameter name in 
the WSDL definition did not match the serialized parameter name in the SOAP 
Envelope. (WSDL Spec Section 3.5: "Each message part (parameter) appears under 
the wrapper, represented by an accessor named identically to the corresponding 
parameter of the call").  I renamed the message part in the WSDL definition and 
all worked perfectly.

Why was this showing up only in split WSDL documents? Because only the split 
WSDL documents had the wrong description.  The single WSDL documents I was 
using were created by appending ?WSDL to the end of the service URL which, of 
course, generated the appropriate WSDL.

It's always the little things you overlook that cause the biggest hassles isn't 
it :-)

Anyway, the fix to OperationDesc has been committed and the code works.



Re: cvs commit: xml-axis/java/src/org/apache/axis/descriptionOperationDesc.java

2003-01-15 Thread James M Snell
The Axis part of the problem, yes. See the bug detail for full info.

- James Snell
 IBM Emerging Technologies
 [EMAIL PROTECTED]
 (559) 587-1233 (office)
 (700) 544-9035 (t/l)
 Programming Web Services With SOAP
 O'Reilly & Associates, ISBN 0596000952

 Have I not commanded you? Be strong and courageous. 
 Do not be terrified, do not be discouraged, for the Lord your 
 God will be with you whereever you go.- Joshua 1:9



Davanum Srinivas <[EMAIL PROTECTED]>
01/15/2003 02:07 PM
Please respond to axis-dev


To
[EMAIL PROTECTED]
cc

bcc

Subject
Re: cvs commit: xml-axis/java/src/org/apache/axis/description 
OperationDesc.java



James,

Does this fix the problem? (16141)

Thanks,
dims

--- [EMAIL PROTECTED] wrote:
> jmsnell 2003/01/15 14:04:39
>
>   Modified:java/src/org/apache/axis/description OperationDesc.java
>   Log:
>   Fixing a problem with the getOutputParamByQName method.  See bug 
#16141
>
>   Revision  ChangesPath
>   1.31  +13 -9 
xml-axis/java/src/org/apache/axis/description/OperationDesc.java
>
>   Index: OperationDesc.java
>   ===
>   RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/description/OperationDesc.java,v
>   retrieving revision 1.30
>   retrieving revision 1.31
>   diff -u -r1.30 -r1.31
>   --- OperationDesc.java  17 Dec 2002 13:35:03 -  1.30
>   +++ OperationDesc.java  15 Jan 2003 22:04:38 -  1.31
>   @@ -359,18 +359,22 @@
>ParameterDesc param = null;
>
>for (Iterator i = parameters.iterator(); i.hasNext();) {
>   -param = (ParameterDesc) i.next();
>   +ParameterDesc pnext = (ParameterDesc)i.next();
>if (param.getQName().equals(qname) &&
>   -param.getMode() != ParameterDesc.IN)
>   -return param;
>   +param.getMode() != ParameterDesc.IN) {
>   +param = pnext;
>   +break;
>   +}
>}
>
>   -if (null == returnDesc.getQName() ){
>   -param= new ParameterDesc( returnDesc); //Create copy
>   -param.setQName(qname);
>   -}
>   -else if ( qname.equals(returnDesc.getQName())) {
>   -param = returnDesc;
>   +if (param == null) {
>   +if (null == returnDesc.getQName() ){
>   +param= new ParameterDesc( returnDesc); //Create copy
>   +param.setQName(qname);
>   +}
>   +else if ( qname.equals(returnDesc.getQName())) {
>   +param = returnDesc;
>   +}
>}
>
>return param;
>
>
>


=
Davanum Srinivas - http://xml.apache.org/~dims/

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com




cvs commit: xml-axis/java/src/org/apache/axis/description OperationDesc.java

2003-01-15 Thread jmsnell
jmsnell 2003/01/15 15:11:18

  Modified:java/src/org/apache/axis/description OperationDesc.java
  Log:
  Fixing a minor oops
  
  Revision  ChangesPath
  1.32  +2 -2  xml-axis/java/src/org/apache/axis/description/OperationDesc.java
  
  Index: OperationDesc.java
  ===
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/description/OperationDesc.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- OperationDesc.java15 Jan 2003 22:04:38 -  1.31
  +++ OperationDesc.java15 Jan 2003 23:11:18 -  1.32
  @@ -360,8 +360,8 @@
   
   for (Iterator i = parameters.iterator(); i.hasNext();) {
   ParameterDesc pnext = (ParameterDesc)i.next();
  -if (param.getQName().equals(qname) &&
  -param.getMode() != ParameterDesc.IN) {
  +if (pnext.getQName().equals(qname) &&
  +pnext.getMode() != ParameterDesc.IN) {
   param = pnext;
   break;
   }
  
  
  



RE: cvs commit: xml-axis/java/src/org/apache/axis/description OperationDesc.java

2003-01-15 Thread Glen Daniels
Thanks for the fix, James!

However, um, wouldn't just adding "else { param = null; }" to the final if in the 
earlier version have been a little simpler?

--G

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 5:05 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: xml-axis/java/src/org/apache/axis/description
> OperationDesc.java
> 
> 
> jmsnell 2003/01/15 14:04:39
> 
>   Modified:java/src/org/apache/axis/description OperationDesc.java
>   Log:
>   Fixing a problem with the getOutputParamByQName method.  
> See bug #16141
>   
>   Revision  ChangesPath
>   1.31  +13 -9 
> xml-axis/java/src/org/apache/axis/description/OperationDesc.java
>   
>   Index: OperationDesc.java
>   ===
>   RCS file: 
> /home/cvs/xml-axis/java/src/org/apache/axis/description/Operat
> ionDesc.java,v
>   retrieving revision 1.30
>   retrieving revision 1.31
>   diff -u -r1.30 -r1.31
>   --- OperationDesc.java  17 Dec 2002 13:35:03 -  1.30
>   +++ OperationDesc.java  15 Jan 2003 22:04:38 -  1.31
>   @@ -359,18 +359,22 @@
>ParameterDesc param = null;
>
>for (Iterator i = parameters.iterator(); i.hasNext();) {
>   -param = (ParameterDesc) i.next();
>   +ParameterDesc pnext = (ParameterDesc)i.next();
>if (param.getQName().equals(qname) &&
>   -param.getMode() != ParameterDesc.IN)
>   -return param;
>   +param.getMode() != ParameterDesc.IN) {
>   +param = pnext;
>   +break;
>   +}
>}
>
>   -if (null == returnDesc.getQName() ){
>   -param= new ParameterDesc( returnDesc); //Create copy
>   -param.setQName(qname);
>   -}
>   -else if ( qname.equals(returnDesc.getQName())) {
>   -param = returnDesc;
>   +if (param == null) {
>   +if (null == returnDesc.getQName() ){
>   +param= new ParameterDesc( returnDesc); 
> //Create copy
>   +param.setQName(qname);
>   +}
>   +else if ( qname.equals(returnDesc.getQName())) {
>   +param = returnDesc;
>   +}
>}
>
>return param;
>   
>   
>   
> 



DO NOT REPLY [Bug 16083] - WSDL2Java suddenly breaking with NPE

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16083

WSDL2Java suddenly breaking with NPE





--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 23:22 ---
yes, works for me now. Thanks.



DO NOT REPLY [Bug 16147] New: - AxisFaults printed in GET ?wsdl messages vulnerable to cross site scripting attacks

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16147

AxisFaults printed in GET ?wsdl messages vulnerable to cross site scripting attacks

   Summary: AxisFaults printed in GET ?wsdl messages vulnerable to
cross site scripting attacks
   Product: Axis
   Version: current (nightly)
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Deployment / Registries
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The current CVS code only prints stack traces to the caller when the
axis.development.system property is true, but if this problem existed before
last week's changes (quite likely), then this problem may well exist in Axis1.0 too.

1. if you supply a service URL to the wsdl get with an invalid name and axis is
configured as a development system (not the default), then you get the service
string displayed in HTML. So this URL:

http://localhost:8080/axis/services/bold?wsdl

would result in bold being displayed in bold in the html response. It would take
a lot of effort to use this to insert script into the page, but conceivable.
Were that done the sole benefit would be to get at cookies, session theft, which
doesnt make any sense in Axis on its own, as the caller is a SOAP call, not a
user. But put axis in another webapp, or into a domain with shared cookies, and
there is a security risk.

fix: escape everything before displaying it.



cvs commit: xml-axis/java/src/org/apache/axis AxisFault.java

2003-01-15 Thread stevel
stevel  2003/01/15 15:30:40

  Modified:java/src/org/apache/axis AxisFault.java
  Log:
  bug 16147; extend dumpString() to allow for the option to escape all fault strings. 
This is an option as we dont want it during debugging, just html display.
  
  Revision  ChangesPath
  1.67  +30 -6 xml-axis/java/src/org/apache/axis/AxisFault.java
  
  Index: AxisFault.java
  ===
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisFault.java,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- AxisFault.java14 Jan 2003 06:40:53 -  1.66
  +++ AxisFault.java15 Jan 2003 23:30:40 -  1.67
  @@ -315,7 +315,18 @@
* turn the fault and details into a string
* @return stringified fault details
*/
  -public String dumpToString()
  +public String dumpToString() {
  +return dumpToString(true);
  +}
  +
  +/**
  + * turn the fault and details into a string, with or without XML escaping.
  + * subclassers: for security (cross-site-scripting) reasons, 
  + * escape everything that could contain caller-supplied data. 
  + * @param escapeText flag to control whether to XML escape everything
  + * @return stringified fault details
  + */
  +public String dumpToString(boolean escapeText)
   {
   String details = new String();
   
  @@ -336,7 +347,7 @@
 + XMLUtils.getInnerXMLString(e);
   }
   }
  -
  +
   String subCodes = new String();
   if (faultSubCode != null) {
   for (int i = 0; i < faultSubCode.size(); i++) {
  @@ -345,13 +356,26 @@
   
   }
   }
  +String code=faultCode.toString();
  +String errorString=faultString;
  +String actor=faultActor;
  +String node=faultNode;
  +
  +if (escapeText) {
  +//encode everything except details and subcodes, which are already
  +//dealt with one way or another.
  +code= XMLUtils.xmlEncodeString(code);
  +errorString = XMLUtils.xmlEncodeString(errorString);
  +actor= XMLUtils.xmlEncodeString(actor);
  +node = XMLUtils.xmlEncodeString(node);
  +}
   
   return "AxisFault" + JavaUtils.LS
  -+ " faultCode: " + faultCode + JavaUtils.LS
  ++ " faultCode: " + code + JavaUtils.LS
   + " faultSubcode: " + subCodes + JavaUtils.LS
  -+ " faultString: " + faultString + JavaUtils.LS
  -+ " faultActor: " + faultActor + JavaUtils.LS
  -+ " faultNode: " + faultNode + JavaUtils.LS
  ++ " faultString: " + errorString + JavaUtils.LS
  ++ " faultActor: " + actor + JavaUtils.LS
  ++ " faultNode: " + node + JavaUtils.LS
   + " faultDetail: " + details + JavaUtils.LS
   ;
   }
  
  
  



cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java

2003-01-15 Thread stevel
stevel  2003/01/15 15:31:51

  Modified:java/src/org/apache/axis/transport/http AxisServlet.java
  Log:
  bug 16147; faults are only written to HTML in one place, and we use the new 
AxisFault.dumpFault(boolean) method to escape them; same for the localised mesage.
  
  Revision  ChangesPath
  1.155 +17 -5 
xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- AxisServlet.java  10 Jan 2003 06:56:31 -  1.154
  +++ AxisServlet.java  15 Jan 2003 23:31:51 -  1.155
  @@ -365,8 +365,7 @@
   if(exception instanceof AxisFault) {
   AxisFault fault=(AxisFault)exception;
   processAxisFault(fault);
  -writer.println("Fault - " + fault.toString() + " ");
  -writer.println("" + fault.dumpToString() + " ");
  +writeFault(writer, fault);
   } else {
   logException(exception);
   writer.println("Exception - " + exception + "");
  @@ -403,6 +402,20 @@
   protected void logException(Exception e) {
   exceptionLog.info(Messages.getMessage("exception00"), e);
   }
  +
  +/**
  + * this method writes a fault out to an HTML stream. This includes
  + * escaping the strings to defend against cross-site scripting attacks
  + * @param writer
  + * @param axisFault
  + */
  +private void writeFault(PrintWriter writer, AxisFault axisFault) {
  +String localizedMessage = 
XMLUtils.xmlEncodeString(axisFault.getLocalizedMessage());
  +writer.println("Fault - " + localizedMessage + "");
  +writer.println(axisFault.dumpToString(true));
  +writer.println("");
  +}
  +
   /**
* scan through the request for parameters, invoking the endpoint
* if we get a method param. If there was no method param then the
  @@ -634,11 +647,10 @@
   
   if(axisFault!=null && isDevelopment()) {
   //dev systems only give fault dumps
  -writer.println("Exception - " + axisFault.getLocalizedMessage()+ 
"");
  -writer.println(axisFault.dumpToString());
  -writer.println("");
  +writeFault(writer, axisFault);
   }
   }
  +
   
   /**
* This method lists the available services; it is called when there is
  
  
  



DO NOT REPLY [Bug 16147] - AxisFaults printed in GET ?wsdl messages vulnerable to cross site scripting attacks

2003-01-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16147

AxisFaults printed in GET ?wsdl messages vulnerable to cross site scripting attacks

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-01-15 23:33 ---
fixed in CVS.



RE: cvs commit: xml-axis/java/src/org/apache/axis AxisFault.java

2003-01-15 Thread Glen Daniels

+1 to the concept

-0 to the implementation

Wouldn't it be clearer to call it dumpToEncodedString() or somesuch and avoid the 
boolean arg?

--Glen

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 6:31 PM
> To: [EMAIL PROTECTED]
> Subject: cvs commit: xml-axis/java/src/org/apache/axis AxisFault.java
> 
> 
> stevel  2003/01/15 15:30:40
> 
>   Modified:java/src/org/apache/axis AxisFault.java
>   Log:
>   bug 16147; extend dumpString() to allow for the option to 
> escape all fault strings. This is an option as we dont want 
> it during debugging, just html display.
>   
>   Revision  ChangesPath
>   1.67  +30 -6 
> xml-axis/java/src/org/apache/axis/AxisFault.java
>   
>   Index: AxisFault.java
>   ===
>   RCS file: 
> /home/cvs/xml-axis/java/src/org/apache/axis/AxisFault.java,v
>   retrieving revision 1.66
>   retrieving revision 1.67
>   diff -u -r1.66 -r1.67
>   --- AxisFault.java  14 Jan 2003 06:40:53 -  1.66
>   +++ AxisFault.java  15 Jan 2003 23:30:40 -  1.67
>   @@ -315,7 +315,18 @@
> * turn the fault and details into a string
> * @return stringified fault details
> */
>   -public String dumpToString()
>   +public String dumpToString() {
>   +return dumpToString(true);
>   +}
>   +
>   +/**
>   + * turn the fault and details into a string, with or 
> without XML escaping.
>   + * subclassers: for security (cross-site-scripting) reasons, 
>   + * escape everything that could contain caller-supplied data. 
>   + * @param escapeText flag to control whether to XML 
> escape everything
>   + * @return stringified fault details
>   + */
>   +public String dumpToString(boolean escapeText)
>{
>String details = new String();
>
>   @@ -336,7 +347,7 @@
>  + XMLUtils.getInnerXMLString(e);
>}
>}
>   -
>   +
>String subCodes = new String();
>if (faultSubCode != null) {
>for (int i = 0; i < faultSubCode.size(); i++) {
>   @@ -345,13 +356,26 @@
>
>}
>}
>   +String code=faultCode.toString();
>   +String errorString=faultString;
>   +String actor=faultActor;
>   +String node=faultNode;
>   +
>   +if (escapeText) {
>   +//encode everything except details and 
> subcodes, which are already
>   +//dealt with one way or another.
>   +code= XMLUtils.xmlEncodeString(code);
>   +errorString = XMLUtils.xmlEncodeString(errorString);
>   +actor= XMLUtils.xmlEncodeString(actor);
>   +node = XMLUtils.xmlEncodeString(node);
>   +}
>
>return "AxisFault" + JavaUtils.LS
>   -+ " faultCode: " + faultCode + JavaUtils.LS
>   ++ " faultCode: " + code + JavaUtils.LS
>+ " faultSubcode: " + subCodes + JavaUtils.LS
>   -+ " faultString: " + faultString + JavaUtils.LS
>   -+ " faultActor: " + faultActor + JavaUtils.LS
>   -+ " faultNode: " + faultNode + JavaUtils.LS
>   ++ " faultString: " + errorString + JavaUtils.LS
>   ++ " faultActor: " + actor + JavaUtils.LS
>   ++ " faultNode: " + node + JavaUtils.LS
>+ " faultDetail: " + details + JavaUtils.LS
>;
>}
>   
>   
>   
> 



Re: cvs commit: xml-axis/java/src/org/apache/axis AxisFault.java

2003-01-15 Thread Steve Loughran

- Original Message -
From: "Glen Daniels" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 15:43
Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis AxisFault.java


>
> +1 to the concept
>
> -0 to the implementation
>
> Wouldn't it be clearer to call it dumpToEncodedString() or somesuch and
avoid the boolean arg?

one thing is that there is some ugly hacker in the dumpToString() stuff to
deal with non namespaced stuff in the fault details (like, um, all the
strings we create), and I didnt want to replicate all of it...the only
difference between the normal and the encoded dump is a bit in the middle.

I thought about making the default action simply encode everything...we do
that with the fault details in the dumo already, after all; if that is the
action you'd prefer its trivial to do that.

The main place that we dump faults other than in the response to a GET is
debug traces. When there isnt stuff to escape in the fault string or
similar, encoding makes no visible difference, and so we have to ask 'do we
mind if log traces escape invalid XML chars?'. If the answer is no, then
I'll make escaping the only way to get a dump, and life is much simpler.

-steve




cvs commit: xml-axis/java build.xml

2003-01-15 Thread stevel
stevel  2003/01/15 17:26:15

  Modified:java build.xml
  Log:
  improving java dependency checking; this reduces the no. of changes which need a 
clean build to take. This task works by extracting the import info from .class files 
(and caching it), then deletes class files that are out of date w.r.t. any 
dependencies, not just the direct source file. So everything but constant import 
should get picked up.
  
  Revision  ChangesPath
  1.224 +3 -0  xml-axis/java/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.223
  retrieving revision 1.224
  diff -u -r1.223 -r1.224
  --- build.xml 2 Jan 2003 13:10:47 -   1.223
  +++ build.xml 16 Jan 2003 01:26:15 -  1.224
  @@ -87,6 +87,9 @@
 
 
 
  +
  +  
   
  
  
  



Re: Stateful Web Services

2003-01-15 Thread Toshiyuki Kimura
Hi Steve,

> -Original Message-
> From: Steve Loughran [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 16, 2003 8:12 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Stateful Web Services
 :
> The weakness of cookies is they are transport specific and very dependent
> upon implementations of HTTP, some particular weak implementations
> (java.net.HttpUrlConnection) handle cookies badly (it used to let you set
>1
> cookie, but them someone fixed it in 1.3 to stop you doing that).
>
> but I like them as they are simple, integrate well with the server, and
> integrate with load balancing level seven routers, things like ArrowPoints
> that make sure that requests to a cluster go back to the previous server,
> provided it is still happy.

  This is one of the reason why I think it's useful using the cookie based
session management on the HTTP protocol bindings, currently.

> I dont see any soap header aware routers around, and given the lack of a
> standard header that isnt surprising, ignoring the details of how hard it
> would be to buffer and route inbound messages without actually parsing
bits
> of them.

  Here is the additional info:


Regards,

Toshiyuki Kimura <[EMAIL PROTECTED]>
R&D Headquarters
NTT DATA Corp.



cvs commit: xml-axis/proposals/jabber/src TestClient.java Test.java

2003-01-15 Thread jmsnell
jmsnell 2003/01/15 22:24:06

  Modified:proposals/jabber/src/com/snellspace/axis/jabber
JabberSender.java JabberConnection.java
JabberServer.java
   proposals/jabber/src TestClient.java Test.java
  Log:
  Fixing a bug in Jabber message serialization
  
  Revision  ChangesPath
  1.2   +24 -24
xml-axis/proposals/jabber/src/com/snellspace/axis/jabber/JabberSender.java
  
  Index: JabberSender.java
  ===
  RCS file: 
/home/cvs/xml-axis/proposals/jabber/src/com/snellspace/axis/jabber/JabberSender.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JabberSender.java 31 Dec 2002 20:38:34 -  1.1
  +++ JabberSender.java 16 Jan 2003 06:24:05 -  1.2
  @@ -23,23 +23,29 @@
* @author James M Snell <[EMAIL PROTECTED]>
*/
   public class JabberSender 
  -  extends BasicHandler {
  +  extends BasicHandler
  +  implements JabberHandler {
  +
  +  private Packet packet = null;
   
 public void invoke(
   MessageContext context) 
 throws AxisFault {
   JabberConnection connection = 
 initializeConnection(context);
  -Holder holder = new Holder();
   Packet request = 
 createRequestPacketFromMessage(
   context.getRequestMessage(), 
   context);
  -connection.send(request, holder);
  +connection.send(request, this);
   try {
  -  holder.waitForPacket();
  +  synchronized(this) {
  +while (packet == null) {
  +  wait(1000);
  +}
  +  }
   } catch (InterruptedException e) {}
  -Packet response = holder.getPacket();
  +Packet response = packet;
   context.setResponseMessage(
 createResponseMessageFromPacket(
   response, 
  @@ -92,7 +98,11 @@
   DefaultExtension ext = (DefaultExtension)e.nextElement();
   StringBuffer buf = new StringBuffer(ext.toString());
   if (buf.indexOf(Constants.URI_DEFAULT_SOAP_ENV) > 0) {
  -message = new Message(ext.toString());
  +  String envbuf =
  +buf.substring(
  +  buf.indexOf(">") + 1,
  +  buf.indexOf(""));
  +message = new Message(envbuf);
   } else {
 // ignore non soap stuff for now
   }
  @@ -101,24 +111,6 @@
 return message;
 }
   
  -  private class Holder 
  -implements JabberHandler {
  -  private Packet packet;
  -  public Packet getPacket() {
  -return this.packet;
  -  }
  -  public synchronized void waitForPacket()
  -throws InterruptedException {
  -  if (packet != null) return;
  -  wait();
  -  }
  -  public synchronized void receivedPacket(
  -Packet packet) {
  -  this.packet = packet;
  -  notifyAll();
  -  }
  -  }
  -  
 public static class AxisExtension
   extends XMLData 
   implements MessageExtension, QueryExtension {
  @@ -136,8 +128,16 @@
   String env = 
 message.getSOAPPart().
   getEnvelope().toString();
  +
  +buffer.append("");
   buffer.append(env);
  +buffer.append("");
 } catch (SOAPException e) {}
 }  
  +  }
  +  
  +  public synchronized void receivedPacket(Packet packet) {
  +this.packet = packet;
  +notifyAll();
 }
   }
  
  
  
  1.2   +6 -1  
xml-axis/proposals/jabber/src/com/snellspace/axis/jabber/JabberConnection.java
  
  Index: JabberConnection.java
  ===
  RCS file: 
/home/cvs/xml-axis/proposals/jabber/src/com/snellspace/axis/jabber/JabberConnection.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JabberConnection.java 31 Dec 2002 20:38:34 -  1.1
  +++ JabberConnection.java 16 Jan 2003 06:24:05 -  1.2
  @@ -24,6 +24,8 @@
   public class JabberConnection
 implements ConnectionListener, PacketListener {
   
  +  public static boolean DEBUG = false;
  +
 protected ConnectionBean cb;
 protected String loginid;
 protected boolean connected;
  @@ -91,6 +93,9 @@
 public void receivedPacket(
   PacketEvent event) {
   Packet packet = event.getPacket();
  +if (DEBUG) {
  +  System.out.println("receivedPacket >>"  + packet);
  +}
   if (!connected) {
 if (processLogin(packet)) {
   connected = true;
  @@ -103,7 +108,7 @@
 }
   
 protected void processPacket(
  -Packet packet) {
  +Packet packet) {  
 try {
   ContentPacket cp = (ContentPacket)packet;
   JabberHandler handler = 
  
  
  
  1.2   +11