You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/02/15 07:23:27 UTC
svn commit: r153902 [6/8] - in
webservices/axis/trunk/java/dev/scratch/prototype2/src:
java/org/apache/axis/addressing/ java/org/apache/axis/addressing/miheaders/
java/org/apache/axis/addressing/om/ java/org/apache/axis/clientapi/
java/org/apache/axis/context/ java/org/apache/axis/deployment/
java/org/apache/axis/deployment/listener/
java/org/apache/axis/deployment/repository/utill/
java/org/apache/axis/description/ java/org/apache/axis/engine/
java/org/apache/axis/handlers/ java/org/apache/axis/om/
java/org/apache/axis/om/impl/llom/ java/org/apache/axis/om/impl/llom/builder/
java/org/apache/axis/om/impl/llom/factory/
java/org/apache/axis/om/impl/llom/serialize/
java/org/apache/axis/om/impl/llom/traverse/
java/org/apache/axis/phaseresolver/ java/org/apache/axis/providers/
java/org/apache/axis/receivers/ java/org/apache/axis/transport/
java/org/apache/axis/transport/http/ java/org/apache/axis/wsdl/wsdltowom/
java/org/apache/wsdl/ java/org/apache/wsdl/impl/ java/org/apache/wsdl/util/
test/org/apache/axis/ test/org/apache/axis/addressing/
test/org/apache/axis/addressing/miheaders/ test/org/apache/axis/clientapi/
test/org/apache/axis/deployment/ test/org/apache/axis/description/
test/org/apache/axis/encoding/ test/org/apache/axis/engine/
test/org/apache/axis/integration/ test/org/apache/axis/misc/
test/org/apache/axis/om/ test/org/apache/axis/om/builder/
test/org/apache/axis/om/builder/dummy/ test/org/apache/axis/om/factory/
test/org/apache/axis/om/impl/builder/
test/org/apache/axis/om/impl/seriliazer/
test/org/apache/axis/om/impl/streamwrapper/
test/org/apache/axis/om/impl/traverse/ test/org/apache/axis/testUtils/
test/org/apache/axis/transport/ test/org/apache/wsdl/
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLInterfaceImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLInterfaceImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLInterfaceImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLInterfaceImpl.java Mon Feb 14 22:22:34 2005
@@ -25,204 +25,199 @@
import java.util.List;
-
-
-
/**
* @author Chathura Herath
- *
*/
-public class WSDLInterfaceImpl extends ExtensibleComponentImpl implements WSDLInterface {
-
-
- private QName name;
-
-
- private HashMap superInterfaces = new HashMap();
-
- private List faults = new LinkedList();
-
- private HashMap operations = new HashMap();
-
-
-
- private String styleDefault;
-
-
-
-
-
-
- public HashMap getDefinedOperations(){
-
- return this.operations;
-
- }
- /**
- * Will return a map of all this <code>WSDLOperation</code>s that
- * are defined and inherited from super interfaces.
- */
- public HashMap getAllOperations(){
-
- HashMap all = (HashMap)this.operations;
-
-
- if(this.superInterfaces.size() ==0 ){
- return all;
- }else{
- Iterator superIterator = this.superInterfaces.values().iterator();
- Iterator operationIterator;
- WSDLInterface superInterface;
- WSDLOperation superInterfaceOperation;
- Iterator thisIterator = all.values().iterator();
- WSDLOperation thisOperation;
- boolean tobeAdded = false;
- while(superIterator.hasNext()){
- superInterface = (WSDLInterface)superIterator.next();
- operationIterator = superInterface.getAllOperations().values().iterator();
- while(operationIterator.hasNext()){
- superInterfaceOperation = (WSDLOperation)operationIterator.next();
- tobeAdded = true;
- while(thisIterator.hasNext()){
- thisOperation = (WSDLOperation)thisIterator.next();
-
- if(thisOperation.getName() == superInterfaceOperation.getName() && !tobeAdded){
- if(thisOperation.getTargetnemespace().equals(superInterfaceOperation.getTargetnemespace())){
- //Both are the same Operation; the one inherited and
- //the one that is already in the map(may or maynot be inherited)
- tobeAdded = false;
- }
- else{
- //same name but target namespces dont match
- //TODO Think this is an error
- throw new WSDLProcessingException("The Interface " +this.getName() +" has more than one Operation that has the same name but not the same interface ");
- }
- }
- }
- if(tobeAdded){
- //This one is not in the list already developped
- all.put(superInterfaceOperation.getName(), superInterfaceOperation);
- }
-
- }
- }
- return all;
-
- }
- }
-
- /**
- * @return
- */
- public List getFaults() {
- return faults;
- }
-
- /**
- * @return
- */
- public QName getName() {
- return name;
- }
-
- /**
- * @return
- */
- public HashMap getOperations() {
- return operations;
- }
-
- /**
- * Retruns the <code>WSDLOperation</code>
- */
- public WSDLOperation getOperation(String nCName){
- Object temp = this.operations.get(nCName);
- if(null == temp) throw new WSDLProcessingException("No Operation found with the QName with ncname/ ncname with "+nCName);
- return (WSDLOperation)temp;
- }
-
- /**
- * @return
- */
- public HashMap getSuperInterfaces() {
- return superInterfaces;
- }
-
- public WSDLInterface getSuperInterface(QName qName){
- return (WSDLInterface)this.superInterfaces.get(qName);
- }
-
- /**
- * The Targetnamespace is that of the namespace URI of the QName of
- * this component.
- * @return URI as a String if the name is set otherwise will return null.
- */
- public String getTargetnamespace() {
- if(null == this.name) return null;
-
- return this.name.getNamespaceURI();
- }
-
- /**
- * @param list
- */
- public void setFaults(List list) {
- faults = list;
- }
-
- /**
- * @param qName
- */
- public void setName(QName qName) {
- name = qName;
- }
-
- /**
- * @param list
- */
- public void setOperations(HashMap list) {
- operations = list;
- }
-
-
- /**
- * The operation is added by its ncname. If operation is null
- * it will not be added. If the Operation name is null a
- * <code>WSDLProcessingException</code> will be thrown.
- * @param nCName
- * @param operation
- */
- public void setOperation(WSDLOperation operation){
- if(null == operation) return ;
-
- if(null == operation.getName()) throw new WSDLProcessingException("The Operation name cannot be null (required)");
- this.operations.put(operation.getName(), operation);
- }
-
- /**
- * @param list
- */
- public void setSuperInterfaces(HashMap list) {
- superInterfaces = list;
- }
-
- /**
- * The Inteface will be added to the list of super interfaces keyed with
- * the QName.
- * @param interfaceComponent WSDLInterface Object
- */
- public void addSuperInterface(WSDLInterface interfaceComponent){
- this.superInterfaces.put(interfaceComponent.getName(), interfaceComponent);
- }
-
- /**
- * Will return the StyleDefault if exist , otherwise will return null
- * @return
- */
+public class WSDLInterfaceImpl extends ExtensibleComponentImpl implements WSDLInterface {
+
+
+ private QName name;
+
+
+ private HashMap superInterfaces = new HashMap();
+
+ private List faults = new LinkedList();
+
+ private HashMap operations = new HashMap();
+
+
+ private String styleDefault;
+
+
+ public HashMap getDefinedOperations() {
+
+ return this.operations;
+
+ }
+
+ /**
+ * Will return a map of all this <code>WSDLOperation</code>s that
+ * are defined and inherited from super interfaces.
+ */
+ public HashMap getAllOperations() {
+
+ HashMap all = (HashMap) this.operations;
+
+
+ if (this.superInterfaces.size() == 0) {
+ return all;
+ } else {
+ Iterator superIterator = this.superInterfaces.values().iterator();
+ Iterator operationIterator;
+ WSDLInterface superInterface;
+ WSDLOperation superInterfaceOperation;
+ Iterator thisIterator = all.values().iterator();
+ WSDLOperation thisOperation;
+ boolean tobeAdded = false;
+ while (superIterator.hasNext()) {
+ superInterface = (WSDLInterface) superIterator.next();
+ operationIterator = superInterface.getAllOperations().values().iterator();
+ while (operationIterator.hasNext()) {
+ superInterfaceOperation = (WSDLOperation) operationIterator.next();
+ tobeAdded = true;
+ while (thisIterator.hasNext()) {
+ thisOperation = (WSDLOperation) thisIterator.next();
+
+ if (thisOperation.getName() == superInterfaceOperation.getName() && !tobeAdded) {
+ if (thisOperation.getTargetnemespace().equals(superInterfaceOperation.getTargetnemespace())) {
+ //Both are the same Operation; the one inherited and
+ //the one that is already in the map(may or maynot be inherited)
+ tobeAdded = false;
+ } else {
+ //same name but target namespces dont match
+ //TODO Think this is an error
+ throw new WSDLProcessingException("The Interface " + this.getName() + " has more than one Operation that has the same name but not the same interface ");
+ }
+ }
+ }
+ if (tobeAdded) {
+ //This one is not in the list already developped
+ all.put(superInterfaceOperation.getName(), superInterfaceOperation);
+ }
+
+ }
+ }
+ return all;
+
+ }
+ }
+
+ /**
+ * @return
+ */
+ public List getFaults() {
+ return faults;
+ }
+
+ /**
+ * @return
+ */
+ public QName getName() {
+ return name;
+ }
+
+ /**
+ * @return
+ */
+ public HashMap getOperations() {
+ return operations;
+ }
+
+ /**
+ * Retruns the <code>WSDLOperation</code>
+ */
+ public WSDLOperation getOperation(String nCName) {
+ Object temp = this.operations.get(nCName);
+ if (null == temp) throw new WSDLProcessingException("No Operation found with the QName with ncname/ ncname with " + nCName);
+ return (WSDLOperation) temp;
+ }
+
+ /**
+ * @return
+ */
+ public HashMap getSuperInterfaces() {
+ return superInterfaces;
+ }
+
+ public WSDLInterface getSuperInterface(QName qName) {
+ return (WSDLInterface) this.superInterfaces.get(qName);
+ }
+
+ /**
+ * The Targetnamespace is that of the namespace URI of the QName of
+ * this component.
+ *
+ * @return URI as a String if the name is set otherwise will return null.
+ */
+ public String getTargetnamespace() {
+ if (null == this.name) return null;
+
+ return this.name.getNamespaceURI();
+ }
+
+ /**
+ * @param list
+ */
+ public void setFaults(List list) {
+ faults = list;
+ }
+
+ /**
+ * @param qName
+ */
+ public void setName(QName qName) {
+ name = qName;
+ }
+
+ /**
+ * @param list
+ */
+ public void setOperations(HashMap list) {
+ operations = list;
+ }
+
+
+ /**
+ * The operation is added by its ncname. If operation is null
+ * it will not be added. If the Operation name is null a
+ * <code>WSDLProcessingException</code> will be thrown.
+ *
+ * @param nCName
+ * @param operation
+ */
+ public void setOperation(WSDLOperation operation) {
+ if (null == operation) return;
+
+ if (null == operation.getName()) throw new WSDLProcessingException("The Operation name cannot be null (required)");
+ this.operations.put(operation.getName(), operation);
+ }
+
+ /**
+ * @param list
+ */
+ public void setSuperInterfaces(HashMap list) {
+ superInterfaces = list;
+ }
+
+ /**
+ * The Inteface will be added to the list of super interfaces keyed with
+ * the QName.
+ *
+ * @param interfaceComponent WSDLInterface Object
+ */
+ public void addSuperInterface(WSDLInterface interfaceComponent) {
+ this.superInterfaces.put(interfaceComponent.getName(), interfaceComponent);
+ }
+
+ /**
+ * Will return the StyleDefault if exist , otherwise will return null
+ *
+ * @return
+ */
public String getStyleDefault() {
return styleDefault;
}
-
+
public void setStyleDefault(String styleDefault) {
this.styleDefault = styleDefault;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLOperationImpl.java Mon Feb 14 22:22:34 2005
@@ -24,86 +24,95 @@
/**
* @author Chathura Herath
- *
*/
-public class WSDLOperationImpl extends ExtensibleComponentImpl implements WSDLOperation {
+public class WSDLOperationImpl extends ExtensibleComponentImpl implements WSDLOperation {
+
+ private QName name;
+
+ /**
+ * URI of the MEP
+ */
+ private String messageExchangePattern;
+ private MessageReference inputMessage;
+ private MessageReference outputMessage;
+ private List infaults = new LinkedList();
+ private List outfaults = new LinkedList();
+ //value of parent if not specified
+ private int style;
+
+ private boolean safety = false;
+
+
+ public List getInfaults() {
+ return infaults;
+ }
+
+ public void setInfaults(List infaults) {
+ this.infaults = infaults;
+ }
+
+ public MessageReference getInputMessage() {
+ return inputMessage;
+ }
+
+ public void setInputMessage(MessageReference inputMessage) {
+ this.inputMessage = inputMessage;
+ }
+
+ public String getMessageExchangePattern() {
+ return messageExchangePattern;
+ }
+
+ public void setMessageExchangePattern(String messageExchangePattern) {
+ this.messageExchangePattern = messageExchangePattern;
+ }
+
+ public QName getName() {
+ return name;
+ }
+
+ public void setName(QName name) {
+ this.name = name;
+ }
+
+ public List getOutfaults() {
+ return outfaults;
+ }
+
+ public void setOutfaults(List outfaults) {
+ this.outfaults = outfaults;
+ }
+
+ public MessageReference getOutputMessage() {
+ return outputMessage;
+ }
+
+ public void setOutputMessage(MessageReference outputMessage) {
+ this.outputMessage = outputMessage;
+ }
+
+ public boolean isSafe() {
+ return safety;
+ }
+
+ public void setSafety(boolean safe) {
+ this.safety = safe;
+ }
+
+ public int getStyle() {
+ return style;
+ }
+
+ public void setStyle(int style) {
+ this.style = style;
+ }
+
+ /**
+ * Will return the Namespace of the QName of this <code>WSDLOperation</code>. Will return null if not set.
+ */
+ public String getTargetnemespace() {
+ if (null != this.name) return this.name.getNamespaceURI();
+ return null;
+ }
- private QName name;
-
- /**
- * URI of the MEP
- */
- private String messageExchangePattern;
- private MessageReference inputMessage;
- private MessageReference outputMessage;
- private List infaults = new LinkedList();
- private List outfaults = new LinkedList();
- //value of parent if not specified
- private int style;
-
- private boolean safety = false;
-
-
-
-
-
-
- public List getInfaults() {
- return infaults;
- }
- public void setInfaults(List infaults) {
- this.infaults = infaults;
- }
- public MessageReference getInputMessage() {
- return inputMessage;
- }
- public void setInputMessage(MessageReference inputMessage) {
- this.inputMessage = inputMessage;
- }
- public String getMessageExchangePattern() {
- return messageExchangePattern;
- }
- public void setMessageExchangePattern(String messageExchangePattern) {
- this.messageExchangePattern = messageExchangePattern;
- }
- public QName getName() {
- return name;
- }
- public void setName(QName name) {
- this.name = name;
- }
- public List getOutfaults() {
- return outfaults;
- }
- public void setOutfaults(List outfaults) {
- this.outfaults = outfaults;
- }
- public MessageReference getOutputMessage() {
- return outputMessage;
- }
- public void setOutputMessage(MessageReference outputMessage) {
- this.outputMessage = outputMessage;
- }
-
- public boolean isSafe() {
- return safety;
- }
- public void setSafety(boolean safe) {
- this.safety = safe;
- }
- public int getStyle() {
- return style;
- }
- public void setStyle(int style) {
- this.style = style;
- }
-
- /**
- * Will return the Namespace of the QName of this <code>WSDLOperation</code>. Will return null if not set.
- */
- public String getTargetnemespace() {
- if(null != this.name) return this.name.getNamespaceURI();
- return null;
- }
-
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLProcessingException.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLProcessingException.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLProcessingException.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLProcessingException.java Mon Feb 14 22:22:34 2005
@@ -17,11 +17,10 @@
/**
* @author chathura@opensource.lk
- *
*/
public class WSDLProcessingException extends RuntimeException {
- public WSDLProcessingException(String message){
+ public WSDLProcessingException(String message) {
super(message);
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLPropertyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLPropertyImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLPropertyImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLPropertyImpl.java Mon Feb 14 22:22:34 2005
@@ -19,34 +19,36 @@
/**
* @author chathura@opensource.lk
- *
*/
public class WSDLPropertyImpl extends ComponentImpl implements WSDLProperty {
private Object constraint;
-
+
private String name;
-
+
private Object value;
-
-
-
+
public Object getConstraint() {
return constraint;
}
+
public void setConstraint(Object constraint) {
this.constraint = constraint;
}
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
+
public Object getValue() {
return value;
}
+
public void setValue(Object value) {
this.value = value;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLServiceImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLServiceImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLServiceImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLServiceImpl.java Mon Feb 14 22:22:34 2005
@@ -25,72 +25,78 @@
/**
* @author chathura@opensource.lk
- *
*/
-public class WSDLServiceImpl extends ComponentImpl implements WSDLService {
+public class WSDLServiceImpl extends ComponentImpl implements WSDLService {
/**
* The QName that identifies the Service. This namespace of the QName
* should be the target namespace defined in the Definitions component.
*/
private QName name;
-
-
+
+
/**
* The Interface that this Service is an instance of.
*/
private WSDLInterface serviceInterface;
-
+
/**
*
*/
private HashMap endpoints = new HashMap();
-
-
+
+
public HashMap getEndpoints() {
return endpoints;
}
+
public void setEndpoints(HashMap endpoints) {
this.endpoints = endpoints;
}
-
+
/**
* Will add a WSDLEndpoint object to the WOM keyed with qname;
*/
- public void setEndpoint(WSDLEndpoint endpoint){
+ public void setEndpoint(WSDLEndpoint endpoint) {
this.endpoints.put(endpoint.getName(), endpoint);
}
-
+
/**
- * Endpoint will be retrived by its qname.
- * @param qname qname of the Service
- * @return WSDLService Object or will throw an WSDLProcessingException in the case of object not found.
- */
- public WSDLService getEndpoint(QName qName){
- WSDLService temp = (WSDLService)this.endpoints.get(qName);
- if(null == temp) throw new WSDLProcessingException("Service not found for NCName "+qName);
- return temp;
- }
+ * Endpoint will be retrived by its qname.
+ *
+ * @param qname qname of the Service
+ * @return WSDLService Object or will throw an WSDLProcessingException in the case of object not found.
+ */
+ public WSDLService getEndpoint(QName qName) {
+ WSDLService temp = (WSDLService) this.endpoints.get(qName);
+ if (null == temp) throw new WSDLProcessingException("Service not found for NCName " + qName);
+ return temp;
+ }
+
public QName getName() {
return name;
}
+
public void setName(QName name) {
this.name = name;
}
+
/**
- * If the Name of the <code>WSDLService</code> is not set a
+ * If the Name of the <code>WSDLService</code> is not set a
* <code>WSDLProcessingException</code> will be thrown.
+ *
* @return Target Namespace as a <code>String</code>
*/
public String getNamespace() {
- if(null == this.name) throw new WSDLProcessingException("Target Namespace not set and the Service Name is null");
-
- return this.name.getNamespaceURI();
+ if (null == this.name) throw new WSDLProcessingException("Target Namespace not set and the Service Name is null");
+
+ return this.name.getNamespaceURI();
}
-
+
public WSDLInterface getServiceInterface() {
return serviceInterface;
}
+
public void setServiceInterface(WSDLInterface serviceInterface) {
this.serviceInterface = serviceInterface;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLTypesImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLTypesImpl.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLTypesImpl.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/impl/WSDLTypesImpl.java Mon Feb 14 22:22:34 2005
@@ -23,46 +23,49 @@
/**
* @author chathura@opensource.lk
- *
*/
public class WSDLTypesImpl extends ComponentImpl implements WSDLTypes {
-
+
private HashMap extensionElements = new HashMap();
/**
* Sets the <code>ExtensionElement</code>s as a <code>HashMap</code>
+ *
* @return
*/
public HashMap getTypes() {
return extensionElements;
}
-
+
/**
* Returns all the <code>ExtensionElement</code>s as a <code>HashMap</code>
+ *
* @param types
*/
public void setTypes(HashMap types) {
this.extensionElements = types;
}
-
+
/**
- * Adds the <code>ExtensionElement</code> to the map keyed with the <code>QName</code> *
+ * Adds the <code>ExtensionElement</code> to the map keyed with the <code>QName</code> *
+ *
* @param qName
* @param element
*/
- public void addElement(QName qName, ExtensionElement element){
-
+ public void addElement(QName qName, ExtensionElement element) {
+
this.extensionElements.put(qName, element);
}
-
+
/**
* Will return the Element with the given <code>QName</code>
* Returns null if not found.
+ *
* @param qName
* @return
*/
- public ExtensionElement getElement(QName qName){
- return (ExtensionElement)this.extensionElements.get(qName);
+ public ExtensionElement getElement(QName qName) {
+ return (ExtensionElement) this.extensionElements.get(qName);
}
-
+
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Style.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Style.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Style.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Style.java Mon Feb 14 22:22:34 2005
@@ -17,7 +17,6 @@
/**
* @author chathura@opensource.lk
- *
*/
public interface Style {
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Utils.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Utils.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/wsdl/util/Utils.java Mon Feb 14 22:22:34 2005
@@ -32,19 +32,19 @@
* @author Srinath Perera(hemapani@opensource.lk)
*/
public class Utils {
- public static Document newDocument(InputStream in) throws ParserConfigurationException, SAXException, IOException{
+ public static Document newDocument(InputStream in) throws ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
return db.parse(in);
}
-
- public static WSDLTypes buildWSDL2ComplientMessageType(Message message){
- Iterator messageTypeIterator = message.getParts().values().iterator();
- if(1 == message.getParts().size() && messageTypeIterator.hasNext()){
- Part part = (Part)messageTypeIterator.next();
- /// new WSDLTypesImpl().set
- }
- return null;
+
+ public static WSDLTypes buildWSDL2ComplientMessageType(Message message) {
+ Iterator messageTypeIterator = message.getParts().values().iterator();
+ if (1 == message.getParts().size() && messageTypeIterator.hasNext()) {
+ Part part = (Part) messageTypeIterator.next();
+ /// new WSDLTypesImpl().set
+ }
+ return null;
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/AbstractTestCase.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/AbstractTestCase.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/AbstractTestCase.java Mon Feb 14 22:22:34 2005
@@ -13,50 +13,48 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-package org.apache.axis;
-import java.io.File;
+package org.apache.axis;
import junit.framework.TestCase;
+import java.io.File;
+
/**
* Abstract base class for test cases.
*/
public abstract class AbstractTestCase
- extends TestCase
-{
- protected String testDir = "src" + File.separator + "test" + File.separator;
- protected String sampleDir = "src" + File.separator + "samples" + File.separator;
- protected String outDir = "target" + File.separator + "generated" + File.separator + "samples" + File.separator;
- protected String tempDir = "target" + File.separator + "generated" + File.separator + "temp";
- protected String testResourceDir = "src" + File.separator + "test-resources";
+ extends TestCase {
+ protected String testDir = "src" + File.separator + "test" + File.separator;
+ protected String sampleDir = "src" + File.separator + "samples" + File.separator;
+ protected String outDir = "target" + File.separator + "generated" + File.separator + "samples" + File.separator;
+ protected String tempDir = "target" + File.separator + "generated" + File.separator + "temp";
+ protected String testResourceDir = "src" + File.separator + "test-resources";
/**
- * Basedir for all file I/O. Important when running tests from
- * the reactor.
- */
- public String basedir = System.getProperty("basedir");
-
- /**
+ * Basedir for all file I/O. Important when running tests from
+ * the reactor.
+ */
+ public String basedir = System.getProperty("basedir");
+
+ /**
* @param testName
*/
- public AbstractTestCase(String testName)
- {
- super(testName);
- if(basedir == null){
- basedir = new File(".").getAbsolutePath();
- }
- testDir = new File(basedir,testDir).getAbsolutePath();
- sampleDir = new File(basedir,sampleDir).getAbsolutePath();
- outDir = new File(basedir,outDir).getAbsolutePath();
- tempDir = new File(basedir,tempDir).getAbsolutePath();
- }
-
-
- public File getTestResourceFile(String relativePath){
- return new File(testResourceDir,relativePath);
+ public AbstractTestCase(String testName) {
+ super(testName);
+ if (basedir == null) {
+ basedir = new File(".").getAbsolutePath();
+ }
+ testDir = new File(basedir, testDir).getAbsolutePath();
+ sampleDir = new File(basedir, sampleDir).getAbsolutePath();
+ outDir = new File(basedir, outDir).getAbsolutePath();
+ tempDir = new File(basedir, tempDir).getAbsolutePath();
+ }
+
+
+ public File getTestResourceFile(String relativePath) {
+ return new File(testResourceDir, relativePath);
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/AnyContentTypeTest.java Mon Feb 14 22:22:34 2005
@@ -1,28 +1,28 @@
/**
-* Copyright 2001-2004 The Apache Software Foundation.
-* <p/>
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* <p/>
-* http://www.apache.org/licenses/LICENSE-2.0
-* <p/>
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* <p/>
-* Author: Eran Chinthaka - Lanka Software Foundation
-* Date: Dec 22, 2004
-* Time: 11:32:03 AM
-*/
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * Author: Eran Chinthaka - Lanka Software Foundation
+ * Date: Dec 22, 2004
+ * Time: 11:32:03 AM
+ */
package org.apache.axis.addressing;
-import javax.xml.namespace.QName;
-
import junit.framework.TestCase;
+import javax.xml.namespace.QName;
+
public class AnyContentTypeTest extends TestCase {
private AnyContentType anyContentType;
@@ -41,16 +41,16 @@
public void testAddAndGetReferenceValue() {
System.out.println("Testing by putting more than 5 values in this. (this is initialized for 5)");
- for(int i=0; i < 10; i++){
- anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i), "value "+i*100);
+ for (int i = 0; i < 10; i++) {
+ anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/" + i, "" + i), "value " + i * 100);
}
- for(int i=0; i < 10; i++){
- String value = anyContentType.getReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i));
- assertEquals("Input value differs from what is taken out from AnyContentType", value, "value "+i*100);
+ for (int i = 0; i < 10; i++) {
+ String value = anyContentType.getReferenceValue(new QName("http://www.opensouce.lk/" + i, "" + i));
+ assertEquals("Input value differs from what is taken out from AnyContentType", value, "value " + i * 100);
}
}
-
+
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/EndpointReferenceTypeTest.java Mon Feb 14 22:22:34 2005
@@ -19,10 +19,10 @@
*/
package org.apache.axis.addressing;
-import javax.xml.namespace.QName;
-
import junit.framework.TestCase;
+import javax.xml.namespace.QName;
+
public class EndpointReferenceTypeTest extends TestCase {
@@ -65,30 +65,30 @@
public void testGetAndSetReferenceProperties() {
AnyContentType anyContentType = new AnyContentType();
- for(int i=0; i < 10; i++){
- anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i), "value "+i*100);
+ for (int i = 0; i < 10; i++) {
+ anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/" + i, "" + i), "value " + i * 100);
}
endpointReference.setReferenceProperties(anyContentType);
AnyContentType retrievedAnyContentType = endpointReference.getReferenceProperties();
- for(int i=0; i < 10; i++){
- String value = retrievedAnyContentType.getReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i));
- assertEquals("Input value differs from what is taken out from AnyContentType", value, "value "+i*100);
+ for (int i = 0; i < 10; i++) {
+ String value = retrievedAnyContentType.getReferenceValue(new QName("http://www.opensouce.lk/" + i, "" + i));
+ assertEquals("Input value differs from what is taken out from AnyContentType", value, "value " + i * 100);
}
}
public void testGetAndSetReferenceParameters() {
- AnyContentType anyContentType = new AnyContentType();
- for(int i=0; i < 10; i++){
- anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i), "value "+i*50);
+ AnyContentType anyContentType = new AnyContentType();
+ for (int i = 0; i < 10; i++) {
+ anyContentType.addReferenceValue(new QName("http://www.opensouce.lk/" + i, "" + i), "value " + i * 50);
}
endpointReference.setReferenceParameters(anyContentType);
AnyContentType retrievedAnyContentType = endpointReference.getReferenceParameters();
- for(int i=0; i < 10; i++){
- String value = retrievedAnyContentType.getReferenceValue(new QName("http://www.opensouce.lk/"+i, ""+i));
- assertEquals("Input value differs from what is taken out from AnyContentType", value, "value "+i*50);
+ for (int i = 0; i < 10; i++) {
+ String value = retrievedAnyContentType.getReferenceValue(new QName("http://www.opensouce.lk/" + i, "" + i));
+ assertEquals("Input value differs from what is taken out from AnyContentType", value, "value " + i * 50);
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/addressing/miheaders/RelatesToTest.java Mon Feb 14 22:22:34 2005
@@ -1,22 +1,22 @@
/**
-* Copyright 2001-2004 The Apache Software Foundation.
-* <p/>
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-* <p/>
-* http://www.apache.org/licenses/LICENSE-2.0
-* <p/>
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-* <p/>
-* Author: Eran Chinthaka - Lanka Software Foundation
-* Date: Dec 22, 2004
-* Time: 12:11:29 PM
-*/
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * <p/>
+ * Author: Eran Chinthaka - Lanka Software Foundation
+ * Date: Dec 22, 2004
+ * Time: 12:11:29 PM
+ */
package org.apache.axis.addressing.miheaders;
import junit.framework.TestCase;
@@ -24,7 +24,7 @@
public class RelatesToTest extends TestCase {
private RelatesTo relatesTo;
- String address = "www.someaddress.com";
+ String address = "www.someaddress.com";
String relationshipType = "Reply";
@@ -58,10 +58,10 @@
assertEquals("RelatesTo address has not been get/set properly", relatesTo.getRelationshipType(), newRelationshipType);
}
- public void testSingleArgumentConstructor(){
+ public void testSingleArgumentConstructor() {
relatesTo = new RelatesTo(address);
assertEquals("RelatesTo address has not been set properly in the constructor", relatesTo.getAddress(), address);
-
+
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceive.java Mon Feb 14 22:22:34 2005
@@ -10,12 +10,6 @@
*/
package org.apache.axis.clientapi;
-import java.io.FileReader;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-
import org.apache.axis.AbstractTestCase;
import org.apache.axis.addressing.AddressingConstants;
import org.apache.axis.addressing.EndpointReference;
@@ -30,10 +24,14 @@
import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
import org.apache.axis.providers.RawXMLProvider;
import org.apache.axis.transport.http.SimpleHTTPServer;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import java.io.FileReader;
+
public class TestSendReceive extends AbstractTestCase {
private Log log = LogFactory.getLog(getClass());
@@ -77,27 +75,24 @@
}
protected void tearDown() throws Exception {
- EngineUtils.stopServer();
+ EngineUtils.stopServer();
}
public void testSendReceive() throws Exception {
SOAPEnvelope envelope = getBasicEnvelope();
- EndpointReference targetEPR = new EndpointReference(
- AddressingConstants.WSA_TO,"http://127.0.0.1:"+EngineUtils.TESTING_PORT+"/axis/services/EchoXMLService");
+ EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO, "http://127.0.0.1:" + EngineUtils.TESTING_PORT + "/axis/services/EchoXMLService");
Call call = new Call();
call.setTo(targetEPR);
SOAPEnvelope responseEnv = call.sendReceive(envelope);
- responseEnv.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(
- System.out),true);
+ responseEnv.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out), true);
}
private SOAPEnvelope getBasicEnvelope() throws Exception {
- SOAPEnvelope envelope = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(
- new FileReader(getTestResourceFile("clientapi/SimpleSOAPEnvelope.xml")))).getSOAPEnvelope();
+ SOAPEnvelope envelope = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(getTestResourceFile("clientapi/SimpleSOAPEnvelope.xml")))).getSOAPEnvelope();
return envelope;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/clientapi/TestSendReceiveAsync.java Mon Feb 14 22:22:34 2005
@@ -6,13 +6,6 @@
*/
package org.apache.axis.clientapi;
-import java.io.FileReader;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-
import org.apache.axis.AbstractTestCase;
import org.apache.axis.addressing.AddressingConstants;
import org.apache.axis.addressing.EndpointReference;
@@ -27,15 +20,20 @@
import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
import org.apache.axis.providers.RawXMLProvider;
import org.apache.axis.transport.http.SimpleHTTPServer;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import java.io.FileReader;
+
/**
* @author Jaliya
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
+ * <p/>
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
*/
public class TestSendReceiveAsync extends AbstractTestCase {
private Log log = LogFactory.getLog(getClass());
@@ -54,7 +52,7 @@
private SimpleHTTPServer sas;
- private boolean finish=false;
+ private boolean finish = false;
/**
* @param testName
@@ -65,7 +63,7 @@
}
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception {
engineRegistry = EngineUtils.createMockRegistry(serviceName, operationName, transportName);
AxisService service = new AxisService(serviceName);
@@ -84,49 +82,49 @@
protected void tearDown() throws Exception {
- while(!finish){
+ while (!finish) {
Thread.sleep(500);
}
- EngineUtils.stopServer();
+ EngineUtils.stopServer();
}
- public void testSendReceiveAsync() throws Exception{
+ public void testSendReceiveAsync() throws Exception {
SOAPEnvelope envelope = getBasicEnvelope();
- EndpointReference targetEPR = new EndpointReference(
- AddressingConstants.WSA_TO,"http://127.0.0.1:"+EngineUtils.TESTING_PORT+"/axis/services/EchoXMLService");
+ EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO, "http://127.0.0.1:" + EngineUtils.TESTING_PORT + "/axis/services/EchoXMLService");
Call call = new Call();
call.setTo(targetEPR);
- call.setListenerTransport("http",true);
+ call.setListenerTransport("http", true);
- Callback callback = new Callback(){
- public void onComplete(AsyncResult result){
+ Callback callback = new Callback() {
+ public void onComplete(AsyncResult result) {
try {
- result.getResponseEnvelope().serialize(XMLOutputFactory.newInstance()
- .createXMLStreamWriter(System.out),true);
+ result.getResponseEnvelope().serialize(XMLOutputFactory.newInstance()
+ .createXMLStreamWriter(System.out), true);
} catch (XMLStreamException e) {
reportError(e);
- }finally{
- finish=true;
+ } finally {
+ finish = true;
}
}
- public void reportError(Exception e){
- e.printStackTrace();
+
+ public void reportError(Exception e) {
+ e.printStackTrace();
}
};
- call.sendReceiveAsync(envelope,callback);
+ call.sendReceiveAsync(envelope, callback);
}
+
private SOAPEnvelope getBasicEnvelope() throws Exception {
- SOAPEnvelope envelope = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(
- new FileReader(getTestResourceFile("clientapi/SimpleSOAPEnvelope.xml")))).getSOAPEnvelope();
+ SOAPEnvelope envelope = new StAXSOAPModelBuilder(XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(getTestResourceFile("clientapi/SimpleSOAPEnvelope.xml")))).getSOAPEnvelope();
/* File file = new File("./target/test-classes/clientapi/SimpleSOAPEnvelope.xml");
XMLStreamReader xmlStreamReader = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(file)); //put the file
@@ -134,8 +132,8 @@
OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXSOAPModelBuilder(OMFactory
.newInstance(), xmlStreamReader);
return (SOAPEnvelope) builder.getDocumentElement(); */
- return envelope;
- }
+ return envelope;
+ }
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadModuleTest.java Mon Feb 14 22:22:34 2005
@@ -1,12 +1,12 @@
package org.apache.axis.deployment;
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.description.AxisGlobal;
+
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.description.AxisGlobal;
-
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -33,10 +33,10 @@
super(testName);
}
- public void testBadModuleXML() {
+ public void testBadModuleXML() {
try {
InputStream in = new FileInputStream(getTestResourceFile("deployment/Badmodule.xml"));
- DeploymentParser parser = new DeploymentParser(in, null);
+ DeploymentParser parser = new DeploymentParser(in, null);
AxisGlobal glabl = new AxisGlobal();
parser.procesServerXML(glabl);
fail("this must failed gracefully with DeploymentException or FileNotFoundException");
@@ -45,7 +45,7 @@
} catch (DeploymentException e) {
return;
} catch (Exception e) {
- return ;
+ return;
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServerXMLTest.java Mon Feb 14 22:22:34 2005
@@ -1,12 +1,12 @@
package org.apache.axis.deployment;
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.description.AxisGlobal;
+
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.description.AxisGlobal;
-
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -33,10 +33,10 @@
super(testName);
}
- public void testBadServerXML() {
+ public void testBadServerXML() {
try {
InputStream in = new FileInputStream(getTestResourceFile("deployment/BadServer.xml"));
- DeploymentParser parser = new DeploymentParser(in, null);
+ DeploymentParser parser = new DeploymentParser(in, null);
AxisGlobal glabl = new AxisGlobal();
parser.procesServerXML(glabl);
fail("this must failed gracefully with DeploymentException or FileNotFoundException");
@@ -45,7 +45,7 @@
} catch (DeploymentException e) {
return;
} catch (Exception e) {
- return ;
+ return;
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BadServiceXMLTest.java Mon Feb 14 22:22:34 2005
@@ -1,12 +1,12 @@
package org.apache.axis.deployment;
+import org.apache.axis.AbstractTestCase;
+import org.apache.axis.description.AxisService;
+
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.description.AxisService;
-
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -33,19 +33,19 @@
super(testName);
}
- public void testBadServiceXML() {
+ public void testBadServiceXML() {
try {
InputStream in = new FileInputStream(getTestResourceFile("deployment/BadService.xml"));
- DeploymentParser parser = new DeploymentParser(in, null);
+ DeploymentParser parser = new DeploymentParser(in, null);
AxisService axisService = new AxisService();
parser.parseServiceXML(axisService);
fail("this must failed gracefully with DeploymentException or FileNotFoundException");
} catch (FileNotFoundException e) {
- return ;
+ return;
} catch (DeploymentException e) {
- return ;
+ return;
} catch (Exception e) {
- return ;
+ return;
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java Mon Feb 14 22:22:34 2005
@@ -15,8 +15,6 @@
*/
package org.apache.axis.deployment;
-import javax.xml.namespace.QName;
-
import org.apache.axis.AbstractTestCase;
import org.apache.axis.description.AxisOperation;
import org.apache.axis.description.AxisService;
@@ -24,6 +22,8 @@
import org.apache.axis.engine.EngineRegistry;
import org.apache.axis.engine.Provider;
import org.apache.axis.providers.RawXMLProvider;
+
+import javax.xml.namespace.QName;
public class BuildERWithDeploymentTest extends AbstractTestCase {
/**
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/DeploymentotalTest.java Mon Feb 14 22:22:34 2005
@@ -1,13 +1,12 @@
package org.apache.axis.deployment;
-import javax.xml.stream.XMLStreamException;
-
import junit.framework.TestCase;
-
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.EngineRegistry;
import org.apache.axis.phaseresolver.PhaseException;
+import javax.xml.stream.XMLStreamException;
+
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -22,12 +21,12 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
public class DeploymentotalTest extends TestCase {
EngineRegistry er;
- public void testparseService1() throws PhaseException ,DeploymentException, AxisFault, XMLStreamException{
- String filename = "./target/test-resources/deployment" ;
+
+ public void testparseService1() throws PhaseException, DeploymentException, AxisFault, XMLStreamException {
+ String filename = "./target/test-resources/deployment";
DeploymentEngine deploymentEngine = new DeploymentEngine(filename);
er = deploymentEngine.start();
// try {
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/TransportDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/TransportDeploymentTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/TransportDeploymentTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/deployment/TransportDeploymentTest.java Mon Feb 14 22:22:34 2005
@@ -1,14 +1,14 @@
package org.apache.axis.deployment;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
import org.apache.axis.AbstractTestCase;
import org.apache.axis.description.AxisTransport;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.EngineRegistry;
import org.apache.axis.phaseresolver.PhaseException;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
/**
* Copyright 2001-2004 The Apache Software Foundation.
* <p/>
@@ -35,8 +35,8 @@
super(testName);
}
- public void testTransports() throws AxisFault, PhaseException, DeploymentException, XMLStreamException {
- DeploymentEngine engine = new DeploymentEngine(testResourceDir+ "/deployment","server-transport.xml");
+ public void testTransports() throws AxisFault, PhaseException, DeploymentException, XMLStreamException {
+ DeploymentEngine engine = new DeploymentEngine(testResourceDir + "/deployment", "server-transport.xml");
engine.start();
EngineRegistry er = engine.getEngineRegistry();
AxisTransport transport = er.getTransport(new QName("http"));
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/MockFlow.java Mon Feb 14 22:22:34 2005
@@ -24,7 +24,7 @@
super();
for (int i = 0; i < length; i++) {
SpeakingHandler1 h1 = new SpeakingHandler1("Executing " + i + " inside " + message);
- EngineUtils.addHandler(this,h1);
+ EngineUtils.addHandler(this, h1);
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/RegistryTest.java Mon Feb 14 22:22:34 2005
@@ -15,8 +15,6 @@
*/
package org.apache.axis.description;
-import javax.xml.namespace.QName;
-
import org.apache.axis.AbstractTestCase;
import org.apache.axis.context.MessageContext;
import org.apache.axis.engine.AxisFault;
@@ -27,91 +25,95 @@
import org.apache.axis.providers.RawXMLProvider;
import org.apache.axis.testUtils.SimpleJavaProvider;
-public class RegistryTest extends AbstractTestCase{
+import javax.xml.namespace.QName;
+
+public class RegistryTest extends AbstractTestCase {
private EngineRegistry reg;
+
public RegistryTest(String testName) {
super(testName);
}
-
-
+
public void testRegistry() throws Exception {
AxisGlobal ag = new AxisGlobal();
testParameteInClude(ag);
reg = new EngineRegistryImpl(ag);
-
+
QName moduleName = new QName("module1");
AxisModule modlue = new AxisModule(moduleName);
reg.addMdoule(modlue);
-
+
QName serviceName = new QName("service");
AxisService service = new AxisService(serviceName);
- reg.addService(service);
-
- assertSame(modlue,reg.getModule(moduleName));
- assertSame(service,reg.getService(serviceName));
+ reg.addService(service);
+
+ assertSame(modlue, reg.getModule(moduleName));
+ assertSame(service, reg.getService(serviceName));
reg.removeService(serviceName);
- assertSame(ag,reg.getGlobal());
+ assertSame(ag, reg.getGlobal());
assertNull(reg.getService(serviceName));
-
+
}
- public void testHandlerMedatata(){
+
+ public void testHandlerMedatata() {
HandlerMetaData hmd = new HandlerMetaData();
testParameteInClude(hmd);
}
- public void testService(){
+ public void testService() {
AxisService service = new AxisService(new QName("Service1"));
testParameteInClude(service);
testFlowIncludeTest(service);
-
-
- }
-
- public void testModule(){
+
+
+ }
+
+ public void testModule() {
AxisModule module = new AxisModule(new QName("module1"));
testParameteInClude(module);
testFlowIncludeTest(module);
- }
+ }
- public void testOpeartion(){
+ public void testOpeartion() {
AxisOperation op = new SimpleAxisOperationImpl(new QName("op"));
testParameteInClude(op);
- }
+ }
- public void testParameteInClude(ParameterInclude parmInclude){
+ public void testParameteInClude(ParameterInclude parmInclude) {
String key = "value1";
- Parameter p = new ParameterImpl(key,"value2");
+ Parameter p = new ParameterImpl(key, "value2");
parmInclude.addParameter(p);
- assertEquals(p,parmInclude.getParameter(key));
+ assertEquals(p, parmInclude.getParameter(key));
}
-
- public void testFlowIncludeTest(FlowInclude flowInclude){
+
+ public void testFlowIncludeTest(FlowInclude flowInclude) {
Flow flow1 = new FlowImpl();
Flow flow2 = new FlowImpl();
Flow flow3 = new FlowImpl();
-
+
flowInclude.setInFlow(flow1);
flowInclude.setFaultFlow(flow2);
flowInclude.setOutFlow(flow3);
- assertSame(flow1,flowInclude.getInFlow());
- assertSame(flow2,flowInclude.getFaultFlow());
- assertSame(flow3,flowInclude.getOutFlow());
+ assertSame(flow1, flowInclude.getInFlow());
+ assertSame(flow2, flowInclude.getFaultFlow());
+ assertSame(flow3, flowInclude.getOutFlow());
}
- public void testProviders(){
+
+ public void testProviders() {
RawXMLProvider xmlprovider = new RawXMLProvider();
- QName name = new QName("Hi","testing");
+ QName name = new QName("Hi", "testing");
xmlprovider.setName(name);
- assertEquals(xmlprovider.getName(),name);
-
+ assertEquals(xmlprovider.getName(), name);
+
SimpleJavaProvider provider = new SimpleJavaProvider();
provider.setName(name);
- assertEquals(provider.getName(),name);
+ assertEquals(provider.getName(), name);
}
-
- public void testHandlers() throws AxisFault{
+
+ public void testHandlers() throws AxisFault {
Handler handler = new AbstractHandler() {
public void invoke(MessageContext msgContext) throws AxisFault {
}
@@ -122,5 +124,5 @@
handler.cleanup();
}
-
+
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler.java Mon Feb 14 22:22:34 2005
@@ -16,8 +16,6 @@
package org.apache.axis.description;
-import javax.xml.namespace.QName;
-
import org.apache.axis.context.MessageContext;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.Handler;
@@ -25,13 +23,17 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import javax.xml.namespace.QName;
+
public class SpeakingHandler extends AbstractHandler implements Handler {
private Log log = LogFactory.getLog(getClass());
private String message;
private QName name;
+
public SpeakingHandler() {
- this.message = "Hi I amtesting ";
+ this.message = "Hi I amtesting ";
}
+
public QName getName() {
return name;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingHandler1.java Mon Feb 14 22:22:34 2005
@@ -16,8 +16,6 @@
package org.apache.axis.description;
-import javax.xml.namespace.QName;
-
import org.apache.axis.context.MessageContext;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.Handler;
@@ -25,13 +23,17 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-public class SpeakingHandler1 extends AbstractHandler implements Handler {
+import javax.xml.namespace.QName;
+
+public class SpeakingHandler1 extends AbstractHandler implements Handler {
private Log log = LogFactory.getLog(getClass());
private String message;
private QName name;
+
public SpeakingHandler1(String message) {
- this.message = message;
+ this.message = message;
}
+
public QName getName() {
return name;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/description/SpeakingProvider.java Mon Feb 14 22:22:34 2005
@@ -16,8 +16,6 @@
package org.apache.axis.description;
-import java.lang.reflect.Method;
-
import org.apache.axis.context.MessageContext;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.engine.Provider;
@@ -25,10 +23,14 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import java.lang.reflect.Method;
+
public class SpeakingProvider extends AbstractProvider implements Provider {
private Log log = LogFactory.getLog(getClass());
private String message;
- public SpeakingProvider(){}
+
+ public SpeakingProvider() {
+ }
public MessageContext invoke(MessageContext msgContext) throws AxisFault {
@@ -39,24 +41,23 @@
public void revoke(MessageContext msgContext) {
log.info("I am Speaking Provider revoking :)");
}
+
/* (non-Javadoc)
* @see org.apache.axis.engine.AbstractProvider#deserializeParameters(org.apache.axis.engine.MessageContext, java.lang.reflect.Method)
*/
- public Object[] deserializeParameters(
- MessageContext msgContext,
- Method method)
- throws AxisFault {
+ public Object[] deserializeParameters(MessageContext msgContext,
+ Method method)
+ throws AxisFault {
return null;
}
public Object getTheImplementationObject(MessageContext msgContext)
- throws AxisFault {
+ throws AxisFault {
return null;
}
- protected Object makeNewServiceObject(
- MessageContext msgContext)
- throws AxisFault {
+ protected Object makeNewServiceObject(MessageContext msgContext)
+ throws AxisFault {
// TODO Auto-generated method stub
return null;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/encoding/EncodingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/encoding/EncodingTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/encoding/EncodingTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/encoding/EncodingTest.java Mon Feb 14 22:22:34 2005
@@ -15,13 +15,6 @@
*/
package org.apache.axis.encoding;
-import java.lang.reflect.Method;
-
-import javax.xml.stream.FactoryConfigurationError;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
import org.apache.axis.AbstractTestCase;
import org.apache.axis.engine.AxisFault;
import org.apache.axis.om.OMElement;
@@ -29,6 +22,12 @@
import org.apache.axis.om.OMNamespace;
import org.apache.axis.testUtils.SimpleTypeEncodingUtils;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.lang.reflect.Method;
+
public class EncodingTest extends AbstractTestCase {
@@ -40,70 +39,71 @@
super(testName);
}
- public void testDeserializingInt() throws SecurityException, NoSuchMethodException, AxisFault{
- Method method = Echo.class.getMethod("echoInt",new Class[]{int.class});
- OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my","my");
+ public void testDeserializingInt() throws SecurityException, NoSuchMethodException, AxisFault {
+ Method method = Echo.class.getMethod("echoInt", new Class[]{int.class});
+ OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my", "my");
OMFactory omfac = OMFactory.newInstance();
- OMElement omel = omfac.createOMElement("value",omNs);
+ OMElement omel = omfac.createOMElement("value", omNs);
omel.addChild(omfac.createText("1234"));
-
- deserialize(method,omel.getPullParser(false));
+
+ deserialize(method, omel.getPullParser(false));
}
- public void testDeserializingString() throws SecurityException, NoSuchMethodException, AxisFault{
- Method method = Echo.class.getMethod("echoInt",new Class[]{int.class});
- OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my","my");
+ public void testDeserializingString() throws SecurityException, NoSuchMethodException, AxisFault {
+ Method method = Echo.class.getMethod("echoInt", new Class[]{int.class});
+ OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my", "my");
OMFactory omfac = OMFactory.newInstance();
- OMElement omel = omfac.createOMElement("value",omNs);
+ OMElement omel = omfac.createOMElement("value", omNs);
omel.addChild(omfac.createText("1234"));
-
- deserialize(method,omel.getPullParser(false));
+
+ deserialize(method, omel.getPullParser(false));
}
-
-
- public void testDeserializingStringArray() throws SecurityException, NoSuchMethodException, AxisFault{
- Method method = Echo.class.getMethod("echoStringArray",new Class[]{String[].class});
- OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my","my");
+
+
+ public void testDeserializingStringArray() throws SecurityException, NoSuchMethodException, AxisFault {
+ Method method = Echo.class.getMethod("echoStringArray", new Class[]{String[].class});
+ OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my", "my");
OMFactory omfac = OMFactory.newInstance();
- OMElement omel = omfac.createOMElement("Array",omNs);
-
- for(int i = 0;i<5;i++){
- OMElement temp = omfac.createOMElement("val",omNs);
+ OMElement omel = omfac.createOMElement("Array", omNs);
+
+ for (int i = 0; i < 5; i++) {
+ OMElement temp = omfac.createOMElement("val", omNs);
temp.addChild(omfac.createText(String.valueOf(i)));
omel.addChild(temp);
}
-
- deserialize(method,omel.getPullParser(false));
+
+ deserialize(method, omel.getPullParser(false));
}
- public void testDeserializingStringArrayVal() throws SecurityException, NoSuchMethodException, AxisFault, XMLStreamException, FactoryConfigurationError{
- OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my","my");
+ public void testDeserializingStringArrayVal() throws SecurityException, NoSuchMethodException, AxisFault, XMLStreamException, FactoryConfigurationError {
+ OMNamespace omNs = OMFactory.newInstance().createOMNamespace("http://host/my", "my");
OMFactory omfac = OMFactory.newInstance();
- OMElement omel = omfac.createOMElement("Array",omNs);
-
- for(int i = 0;i<5;i++){
- OMElement temp = omfac.createOMElement("val",omNs);
+ OMElement omel = omfac.createOMElement("Array", omNs);
+
+ for (int i = 0; i < 5; i++) {
+ OMElement temp = omfac.createOMElement("val", omNs);
temp.addChild(omfac.createText(String.valueOf(i)));
omel.addChild(temp);
}
-
- omel.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out),true);
+
+ omel.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out), true);
XMLStreamReader xpp = omel.getPullParser(false);
String[] strs = SimpleTypeEncodingUtils.deserializeStringArray(xpp);
- for(int i = 0;i<strs.length;i++){
+ for (int i = 0; i < strs.length; i++) {
System.out.println(strs[i]);
}
-
+
}
- public void deserialize(Method method,XMLStreamReader xpp) throws AxisFault{
+
+ public void deserialize(Method method, XMLStreamReader xpp) throws AxisFault {
Class[] parms = method.getParameterTypes();
Object[] objs = new Object[parms.length];
for (int i = 0; i < parms.length; i++) {
if (int.class.equals(parms[i])) {
objs[i] =
- new Integer(SimpleTypeEncodingUtils.deserializeInt(xpp));
+ new Integer(SimpleTypeEncodingUtils.deserializeInt(xpp));
} else if (String.class.equals(parms[i])) {
objs[i] = SimpleTypeEncodingUtils.deserializeString(xpp);
} else if (String[].class.equals(parms[i])) {
@@ -114,13 +114,14 @@
}
}
-
-
- public class Echo{
- public int echoInt(int intVal){
+
+
+ public class Echo {
+ public int echoInt(int intVal) {
return intVal;
}
- public String[] echoStringArray(String[] in){
+
+ public String[] echoStringArray(String[] in) {
return in;
}
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/CallUnregisterdServiceTest.java Mon Feb 14 22:22:34 2005
@@ -16,7 +16,6 @@
package org.apache.axis.engine;
//todo
-import javax.xml.namespace.QName;
import org.apache.axis.AbstractTestCase;
import org.apache.axis.addressing.AddressingConstants;
@@ -24,28 +23,25 @@
import org.apache.axis.clientapi.Call;
import org.apache.axis.context.MessageContext;
import org.apache.axis.integration.UtilServer;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNamespace;
-import org.apache.axis.om.SOAPBody;
-import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.*;
import org.apache.axis.transport.http.SimpleHTTPServer;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-public class CallUnregisterdServiceTest extends AbstractTestCase{
+import javax.xml.namespace.QName;
+
+public class CallUnregisterdServiceTest extends AbstractTestCase {
private Log log = LogFactory.getLog(getClass());
- private QName serviceName = new QName("","EchoXMLService");
- private QName operationName = new QName("http://localhost/my","echoOMElement");
- private QName transportName = new QName("http://localhost/my","NullTransport");
+ private QName serviceName = new QName("", "EchoXMLService");
+ private QName operationName = new QName("http://localhost/my", "echoOMElement");
+ private QName transportName = new QName("http://localhost/my", "NullTransport");
private EngineRegistry engineRegistry;
private MessageContext mc;
private Thread thisThread;
private SimpleHTTPServer sas;
-
- public CallUnregisterdServiceTest(){
+
+ public CallUnregisterdServiceTest() {
super(CallUnregisterdServiceTest.class.getName());
}
@@ -62,21 +58,20 @@
}
- public void testEchoXMLSync() throws Exception{
- try{
+ public void testEchoXMLSync() throws Exception {
+ try {
OMFactory fac = OMFactory.newInstance();
- SOAPEnvelope reqEnv=fac.getDefaultEnvelope();
- OMNamespace omNs = fac.createOMNamespace("http://localhost/my","my");
- OMElement method = fac.createOMElement("echoOMElement",omNs) ;
- OMElement value = fac.createOMElement("myValue",omNs) ;
+ SOAPEnvelope reqEnv = fac.getDefaultEnvelope();
+ OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+ OMElement method = fac.createOMElement("echoOMElement", omNs);
+ OMElement value = fac.createOMElement("myValue", omNs);
value.setValue("Isaac Assimov, the foundation Sega");
method.addChild(value);
reqEnv.getBody().addChild(method);
Call call = new Call();
- EndpointReference targetEPR = new EndpointReference(
- AddressingConstants.WSA_TO,"http://127.0.0.1:"+EngineUtils.TESTING_PORT+"/axis/services/EchoXMLService1");
+ EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO, "http://127.0.0.1:" + EngineUtils.TESTING_PORT + "/axis/services/EchoXMLService1");
call.setTo(targetEPR);
SOAPEnvelope resEnv = call.sendReceive(reqEnv);
@@ -86,7 +81,7 @@
}
fail("The test must fail due to wrong service Name");
- }catch(AxisFault e){
+ } catch (AxisFault e) {
tearDown();
return;
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/Echo.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/Echo.java?view=diff&r1=153901&r2=153902
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/Echo.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/engine/Echo.java Mon Feb 14 22:22:34 2005
@@ -21,25 +21,26 @@
* @version $Rev: $ $Date: $
*/
-public class Echo{
- public Echo(){}
-
- public void echoVoid(){
+public class Echo {
+ public Echo() {
+ }
+
+ public void echoVoid() {
System.out.println("echo Service Called");
}
-
-
- public OMElement echoOMElement(OMElement omEle){
- omEle.setLocalName(omEle.getLocalName()+"Response");
+
+
+ public OMElement echoOMElement(OMElement omEle) {
+ omEle.setLocalName(omEle.getLocalName() + "Response");
return omEle;
}
-
- public String echoString(String in){
+
+ public String echoString(String in) {
return in;
}
-
- public int echoInt(int in){
+
+ public int echoInt(int in) {
return in;
}
-
+
}