User: jung
Date: 00/12/22 07:49:44
Modified: src/org/zoap/soap/meta/string RequestType.java
ResponseType.java
Log:
repackaged thread pooling. Coherent environment. Exception extensions.
Revision Changes Path
1.3 +68 -64 zoap/src/org/zoap/soap/meta/string/RequestType.java
Index: RequestType.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/org/zoap/soap/meta/string/RequestType.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RequestType.java 2000/12/04 12:36:18 1.2
+++ RequestType.java 2000/12/22 15:49:43 1.3
@@ -1,5 +1,5 @@
/*
- * $Id: RequestType.java,v 1.2 2000/12/04 12:36:18 jung Exp $
+ * $Id: RequestType.java,v 1.3 2000/12/22 15:49:43 jung Exp $
* Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
* D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
@@ -59,7 +59,6 @@
import org.zoap.xml.Appearance;
import org.zoap.xml.AppearanceException;
-import de.infor.ce.util.ObjectFactory;
import java.util.Map;
import java.util.HashMap;
@@ -79,97 +78,96 @@
public class RequestType extends ComplexType {
- /** the method associated to this request */
- Method associatedMethod;
+ /** the method associated to this request */
+ Method associatedMethod;
- /** the schemas where the argument elements are located */
- Schema[] argumentSchemas;
+ /** the schemas where the argument elements are located */
+ Schema[] argumentSchemas;
- /** the elementnames of the arguments */
- String[] argumentNames;
+ /** the elementnames of the arguments */
+ String[] argumentNames;
- /** public constructor is responsible for initialising the meta-data */
- public RequestType() {
+ /** public constructor is responsible for initialising the meta-data */
+ public RequestType() {
- if(Environment.DEBUG_SOAP && Environment.DEBUG_SOAP_META)
- Environment.out.println(toString()+"()\n");
+ if (Environment.DEBUG_SOAP && Environment.DEBUG_SOAP_META)
+ Environment.out.println(toString() + "()\n");
- setAssociatedClass(MethodRequest.class);
- }
+ setAssociatedClass(MethodRequest.class);
+ }
- public void setArgumentSchemas(Schema[] argumentSchemas) {
- this.argumentSchemas=argumentSchemas;
- }
+ public void setArgumentSchemas(Schema[] argumentSchemas) {
+ this.argumentSchemas = argumentSchemas;
+ }
- public void setArgumentNames(String[] argumentNames) {
- this.argumentNames=argumentNames;
- }
+ public void setArgumentNames(String[] argumentNames) {
+ this.argumentNames = argumentNames;
+ }
- public Method getAssociatedMethod() {
- return associatedMethod;
- }
+ public Method getAssociatedMethod() {
+ return associatedMethod;
+ }
- public void setAssociatedMethod(Method method) {
- associatedMethod=method;
- }
+ public void setAssociatedMethod(Method method) {
+ associatedMethod = method;
+ }
- /**
- * we have to overwrite the isCompatibleTo thing? This is a case where one
- * Java class is mapped to several XML elements/types. Hmmm, I dont think
- * its really used ... but lets try
- */
+ /**
+ * we have to overwrite the isCompatibleTo thing? This is a case where one
+ * Java class is mapped to several XML elements/types. Hmmm, I dont think its
really used ... but lets try
+ */
- public boolean isCompatibleTo(Object object, Class clazz) {
+ public boolean isCompatibleTo(Object object, Class clazz) {
- if(object instanceof MethodRequest &&
- (associatedMethod.equals(((MethodRequest) object).getMethod())))
- return true;
+ if (object instanceof MethodRequest &&
+ (associatedMethod.equals(((MethodRequest)object).getMethod())))
+ return true;
- return false;
- }
+ return false;
+ }
- /**
- * this is to produce the arguments inside this request directly from
- * the string-based request structure
- */
+ /** this is to produce the arguments inside this request directly from the
string-based request structure */
- public String getVerboseElements(Object target) throws TypeException {
- try{
- MethodRequest methodRequest=(MethodRequest) target;
- String result="";
+ public String getVerboseElements(Object target) throws TypeException {
+ try {
+ MethodRequest methodRequest = (MethodRequest)target;
+ String result = "";
- for(int count=0;count<methodRequest.getArguments().length;count++)
- result+=Environment.replaceTag((String)
methodRequest.getArguments()[count],
- argumentNames[count],argumentSchemas[count]);
+ for (int count = 0; count <
methodRequest.getArguments().length; count++)
+ result +=
Environment.replaceTag((String)methodRequest.getArguments() [count],
+ argumentNames[count], argumentSchemas[count]);
- return result;
- } catch(NullPointerException e) {
- throw new TypeException();
- } catch(ClassCastException e) {
- throw new TypeException();
- }
- }
+ return result;
+ } catch (NullPointerException e) {
+ throw new TypeException();
+ } catch (ClassCastException e) {
+ throw new TypeException();
+ }
+ }
- /** setting the content establishes the method inside the request structure */
+ /** setting the content establishes the method inside the request structure */
- public Object setContent(Object object, String body,String verboseElements,Map
references,Map nameSpaces) {
+ public Object setContent(Object object, String body, String verboseElements,
Map references, Map nameSpaces) {
- if(object instanceof MethodRequest) {
- MethodRequest request=(MethodRequest) object;
+ if (object instanceof MethodRequest) {
+ MethodRequest request = (MethodRequest)object;
- request.setMethod(associatedMethod);
+ request.setMethod(associatedMethod);
- request.setArguments(Environment.seperateTags(verboseElements));
- }
+
request.setArguments(Environment.seperateTags(verboseElements));
+ }
- return object;
- }
+ return object;
+ }
}
/*
* $Log: RequestType.java,v $
+ * Revision 1.3 2000/12/22 15:49:43 jung
+ * repackaged thread pooling. Coherent environment. Exception extensions.
+ *
* Revision 1.2 2000/12/04 12:36:18 jung
* adopted to latest jboss container,
*
1.3 +59 -52 zoap/src/org/zoap/soap/meta/string/ResponseType.java
Index: ResponseType.java
===================================================================
RCS file: /products/cvs/ejboss/zoap/src/org/zoap/soap/meta/string/ResponseType.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ResponseType.java 2000/12/04 12:36:18 1.2
+++ ResponseType.java 2000/12/22 15:49:43 1.3
@@ -1,5 +1,5 @@
/*
- * $Id: ResponseType.java,v 1.2 2000/12/04 12:36:18 jung Exp $
+ * $Id: ResponseType.java,v 1.3 2000/12/22 15:49:43 jung Exp $
* Copyright 2000 (C) infor:business solutions AG, Hauerstrasse 12,
* D-66299 Friedrichsthal, Germany. All Rights Reserved.
*
@@ -56,7 +56,6 @@
import org.zoap.xml.Appearance;
import org.zoap.xml.AppearanceException;
-import de.infor.ce.util.ObjectFactory;
import java.util.Map;
import java.util.HashMap;
@@ -76,79 +75,81 @@
public class ResponseType extends ComplexType {
- /** the real method that this response comes from */
- Method associatedMethod;
+ /** the real method that this response comes from */
+ Method associatedMethod;
- /** the schema that the return element is defined in*/
- Schema returnSchema;
+ /** the schema that the return element is defined in */
+ Schema returnSchema;
- /** the name of the return schema*/
- String returnName;
+ /** the name of the return schema */
+ String returnName;
- /** public constructor is empty */
- public ResponseType() {
+ /** public constructor is empty */
+ public ResponseType() {
- if(Environment.DEBUG_SOAP && Environment.DEBUG_SOAP_META)
- Environment.out.print(toString()+"()\n");
+ if (Environment.DEBUG_SOAP && Environment.DEBUG_SOAP_META)
+ Environment.out.print(toString() + "()\n");
- setAssociatedClass(MethodResponse.class);
- }
+ setAssociatedClass(MethodResponse.class);
+ }
- public void setReturnName(String returnName) {
- this.returnName=returnName;
- }
+ public void setReturnName(String returnName) {
+ this.returnName = returnName;
+ }
- public void setReturnSchema(Schema returnSchema) {
- this.returnSchema=returnSchema;
- }
+ public void setReturnSchema(Schema returnSchema) {
+ this.returnSchema = returnSchema;
+ }
- public Method getAssociatedMethod() {
- return associatedMethod;
- }
+ public Method getAssociatedMethod() {
+ return associatedMethod;
+ }
- public void setAssociatedMethod(Method method) {
- associatedMethod=method;
- }
+ public void setAssociatedMethod(Method method) {
+ associatedMethod = method;
+ }
- /**
- * we have to overwrite the isCompatibleTo thing? This is a case where one
- * Java class is mapped to several XML elements/types. Hmmm, I dont think
- * its really used ... but lets try
- */
+ /**
+ * we have to overwrite the isCompatibleTo thing? This is a case where one
+ * Java class is mapped to several XML elements/types. Hmmm, I dont think its
really used ... but lets try
+ */
- public boolean isCompatibleTo(Object object, Class clazz) {
+ public boolean isCompatibleTo(Object object, Class clazz) {
- if(object instanceof MethodResponse &&
- (associatedMethod.equals(((MethodResponse) object).getMethod())))
- return true;
+ if (object instanceof MethodResponse &&
+ (associatedMethod.equals(((MethodResponse)object).getMethod())))
+ return true;
- return false;
- }
+ return false;
+ }
- public String getVerboseElements(Object object) {
- if(object instanceof MethodResponse) {
- return Environment.replaceTag((String) ((MethodResponse)
object).getValue(),returnName,
- returnSchema);
- } else
- return null;
- }
+ public String getVerboseElements(Object object) {
+ if (object instanceof MethodResponse) {
+ return
Environment.replaceTag((String)((MethodResponse)object).getValue(), returnName,
+ returnSchema);
+ } else
+ return null;
+ }
- /** setting the content establishes the method inside the request structure */
+ /** setting the content establishes the method inside the request structure */
- public Object setContent(Object object, String body, String verboseElements,Map
references,Map nameSpaces) {
+ public Object setContent(Object object, String body, String verboseElements,
Map references, Map nameSpaces) {
- if(object instanceof MethodResponse) {
- ((MethodResponse) object).setMethod(associatedMethod);
- ((MethodResponse) object).setValue(verboseElements);
- }
+ if (object instanceof MethodResponse) {
+ ((MethodResponse)object).setMethod(associatedMethod);
+ ((MethodResponse)object).setValue(verboseElements);
+ }
- return object;
- }
+ return object;
+ }
}
/*
* $Log: ResponseType.java,v $
+ * Revision 1.3 2000/12/22 15:49:43 jung
+ * repackaged thread pooling. Coherent environment. Exception extensions.
+ *
* Revision 1.2 2000/12/04 12:36:18 jung
* adopted to latest jboss container,
*