rineholt 02/04/29 12:41:17
Modified: java build.xml
java/src/org/apache/axis/attachments
BoundaryDelimitedStream.java
java/src/org/apache/axis/client Call.java
java/src/org/apache/axis/description OperationDesc.java
ParameterDesc.java
java/src/org/apache/axis/encoding
DeserializationContextImpl.java
DeserializerImpl.java
Log:
Fixed a boundary type problem with attachemnts.
Added axis_nojavadocs environment varible setting to true will never build javadocs
Added some debug logging for OperationDesc, ParamterDesc for stuff I'm still looking
into.
Revision Changes Path
1.131 +24 -6 xml-axis/java/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/build.xml,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- build.xml 23 Apr 2002 17:07:37 -0000 1.130
+++ build.xml 29 Apr 2002 19:41:17 -0000 1.131
@@ -206,12 +206,28 @@
<echo message="--- Property values ---" />
<echo message="debug=${debug}" />
<echo message="deprecation=${deprecation}" />
+ <!-- Set environment variable axis_nojavadocs=true to never generate javadocs.
Case sensative! -->
+ <echo message="axis_nojavadocs=${env.axis_nojavadocs}"/>
- <uptodate property="javadoc.notrequired"
+ <uptodate property="javadoc.notoutofdate"
targetfile="${build.javadocs}/index.html">
<srcfiles dir="${src.dir}" includes="**/*.java" />
</uptodate>
+ <condition property="axis_nojavadocs" value="true">
+ <equals arg1="true" arg2="${env.axis_nojavadocs}"/>
+ </condition>
+ <condition property="axis_nojavadocs" value="false">
+ <equals arg1="${axis_nojavadocs}" arg2="$${axis_nojavadocs}"/>
+ </condition>
+
+ <condition property="javadoc.notrequired" value="true">
+ <or>
+ <equals arg1="${javadoc.notoutofdate}" arg2="true"/>
+ <equals arg1="true" arg2="${axis_nojavadocs}"/>
+ </or>
+ </condition>
+
</target>
<!-- =================================================================== -->
@@ -490,17 +506,19 @@
<!-- =================================================================== -->
<!-- Creates the binary distribution -->
<!-- =================================================================== -->
- <target name="dist" depends="compile, javadocs, samples, junit" >
- <mkdir dir="${dist.dir}"/>
+ <target name="javadocsdist" depends="javadocs" unless="javadoc.notrequired">
<mkdir dir="${dist.dir}/docs"/>
<mkdir dir="${dist.dir}/docs/apiDocs"/>
+ <copy todir="${dist.dir}/docs/apiDocs">
+ <fileset dir="${build.javadocs}"/>
+ </copy>
+ </target>
+ <target name="dist" depends="compile, javadocsdist, samples, junit" >
+ <mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/lib"/>
<mkdir dir="${dist.dir}/samples"/>
<mkdir dir="${dist.dir}/webapps/axis"/>
- <copy todir="${dist.dir}/docs/apiDocs">
- <fileset dir="${build.javadocs}"/>
- </copy>
<copy todir="${dist.dir}/lib">
<fileset dir="${build.lib}"/>
</copy>
1.11 +15 -13
xml-axis/java/src/org/apache/axis/attachments/BoundaryDelimitedStream.java
Index: BoundaryDelimitedStream.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/attachments/BoundaryDelimitedStream.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- BoundaryDelimitedStream.java 24 Mar 2002 18:51:28 -0000 1.10
+++ BoundaryDelimitedStream.java 29 Apr 2002 19:41:17 -0000 1.11
@@ -174,7 +174,8 @@
return readFromStream(b, 0, b.length);
}
private final int readFromStream( final byte[] b, final int start, final int
length) throws java.io.IOException{
- int minRead= Math.min(boundaryBufLen *2, length);
+ int minRead= Math.max(boundaryBufLen *2, length);
+ minRead= Math.min(minRead, length-start);
int br= 0;
int brTotal=0;
do
@@ -360,22 +361,23 @@
*
*/
protected int boundaryPosition( byte[] searchbuf, int start, int end) {
-
int foundAt = boundarySearch(searchbuf, start, end);
//First find the boundary marker
if (BOUNDARY_NOT_FOUND != foundAt) { //Something was found.
-
- //If the marker has a "--" at the end then this is the last boundary.
- if ( searchbuf[foundAt + boundaryLen] == '-' &&
- searchbuf[foundAt + boundaryLen + 1 ] == '-' ) {
- theEnd = true;
- }
- else if ( searchbuf[foundAt + boundaryLen] != 13 ||
- searchbuf[foundAt + boundaryLen + 1 ] != 10 ) {
- //If there really was no crlf at then end then this is not a boundary.
- foundAt = BOUNDARY_NOT_FOUND;
- }
+ if(foundAt + boundaryLen +2 > end) foundAt= BOUNDARY_NOT_FOUND;
+ else{
+ //If the marker has a "--" at the end then this is the last boundary.
+ if ( searchbuf[foundAt + boundaryLen] == '-' &&
+ searchbuf[foundAt + boundaryLen + 1 ] == '-' ) {
+ theEnd = true;
+ }
+ else if ( searchbuf[foundAt + boundaryLen] != 13 ||
+ searchbuf[foundAt + boundaryLen + 1 ] != 10 ) {
+ //If there really was no crlf at then end then this is not a boundary.
+ foundAt = BOUNDARY_NOT_FOUND;
+ }
+ }
}
return foundAt;
}
1.118 +3 -0 xml-axis/java/src/org/apache/axis/client/Call.java
Index: Call.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- Call.java 25 Apr 2002 16:57:38 -0000 1.117
+++ Call.java 29 Apr 2002 19:41:17 -0000 1.118
@@ -1331,6 +1331,9 @@
// If we never set-up any names... then just return what was passed in
//////////////////////////////////////////////////////////////////////
+ log.debug( "getParamList number of params: " + params.length);
+ log.debug( "operation=" + operation);
+ if(operation != null) log.debug("operation.getNumParams()="
+operation.getNumParams());
if ( operation.getNumParams() == 0 ) return( params );
// Count the number of IN and INOUT params, this needs to match the
1.9 +15 -1 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.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- OperationDesc.java 15 Apr 2002 02:35:57 -0000 1.8
+++ OperationDesc.java 29 Apr 2002 19:41:17 -0000 1.9
@@ -59,6 +59,8 @@
import java.util.Iterator;
import java.lang.reflect.Method;
import java.lang.reflect.Array;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* An OperationDesc is an abstract description of an operation on a service.
@@ -68,6 +70,10 @@
* @author Glen Daniels ([EMAIL PROTECTED])
*/
public class OperationDesc {
+
+ protected static Log log =
+ LogFactory.getLog(OperationDesc.class.getName());
+
/** The service we're a part of */
private ServiceDesc parent;
@@ -150,6 +156,7 @@
}
public void setReturnType(QName returnType) {
+ log.debug("@" + Integer.toHexString(hashCode()) + "setReturnType(" +
returnType +")");
this.returnType = returnType;
}
@@ -215,6 +222,7 @@
(param.getMode() == ParameterDesc.INOUT)) {
param.setOrder(numInParams++);
}
+ log.debug("@" + Integer.toHexString(hashCode()) + " added parameter >" +
param + "@" + Integer.toHexString(param.hashCode()) + "<total parameters:"
+getNumParams());
}
public ParameterDesc getParameter(int i)
@@ -236,7 +244,13 @@
* @param parameters an ArrayList of ParameterDescs
*/
void setParameters(ArrayList parameters) {
- this.parameters = parameters;
+ // this.parameters = parameters;
+ parameters = new ArrayList(); //Keep numInParams correct.
+
+ for( java.util.ListIterator li= this.parameters.listIterator();
+ li.hasNext(); ){
+ addParameter((ParameterDesc) li.next());
+ }
}
public int getNumInParams() {
1.6 +2 -2 xml-axis/java/src/org/apache/axis/description/ParameterDesc.java
Index: ParameterDesc.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/description/ParameterDesc.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ParameterDesc.java 12 Apr 2002 22:24:48 -0000 1.5
+++ ParameterDesc.java 29 Apr 2002 19:41:17 -0000 1.6
@@ -84,7 +84,7 @@
/** The XML type of this parameter */
private QName typeQName;
/** The Java type of this parameter */
- private Class javaType;
+ private Class javaType = null;
/** The order of this parameter (-1 indicates unordered) */
private int order = -1;
@@ -106,7 +106,7 @@
public String toString() {
return "(" + typeEntry + ", " + getName() + ", "
- + (mode == IN ? "IN)" : mode == INOUT ? "INOUT)" : "OUT)");
+ + (mode == IN ? "IN)" : mode == INOUT ? "INOUT)" : "OUT)" +
"position:" + order);
} // toString
/**
1.26 +10 -1
xml-axis/java/src/org/apache/axis/encoding/DeserializationContextImpl.java
Index: DeserializationContextImpl.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializationContextImpl.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- DeserializationContextImpl.java 23 Apr 2002 03:54:25 -0000 1.25
+++ DeserializationContextImpl.java 29 Apr 2002 19:41:17 -0000 1.26
@@ -494,7 +494,16 @@
if( null != (attch= msg.getAttachments())){
try{
ret= attch.getAttachmentByReference(href);
- }catch(AxisFault e){};
+ }catch(AxisFault e){
+ java.io.StringWriter sw= new java.io.StringWriter();
+ java.io.PrintWriter pw= new java.io.PrintWriter(sw);
+ e.printStackTrace(pw);
+ pw.flush();
+ RuntimeException rte=
+ new RuntimeException(e.toString() + sw.toString());
+ pw.close();
+ throw rte;
+ }
}
}
}
1.9 +1 -1 xml-axis/java/src/org/apache/axis/encoding/DeserializerImpl.java
Index: DeserializerImpl.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializerImpl.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- DeserializerImpl.java 23 Apr 2002 03:54:25 -0000 1.8
+++ DeserializerImpl.java 29 Apr 2002 19:41:17 -0000 1.9
@@ -353,7 +353,7 @@
if (log.isDebugEnabled()) {
log.debug(JavaUtils.getMessage(
"gotForID00",
- new String[] {"" + ref, href, "" + ref.getClass()}));
+ new String[] {"" + ref, href, (ref == null ? "*null*" :
ref.getClass().toString())}));
}
if (ref == null) {