You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/05/31 17:10:18 UTC

svn commit: r179220 - in /incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice: ServiceControl.java generator/ExtensionMaker.java jaxrpc/HeaderHandler.java jaxrpc/ServiceControlImpl.jcs utils/HolderUtils.java

Author: ekoneil
Date: Tue May 31 08:10:16 2005
New Revision: 179220

URL: http://svn.apache.org/viewcvs?rev=179220&view=rev
Log:
Code cleanup in the service control.  

BB: self
DRT: Beehive / service control pass


Modified:
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/ServiceControl.java
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/HeaderHandler.java
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/utils/HolderUtils.java

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/ServiceControl.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/ServiceControl.java?rev=179220&r1=179219&r2=179220&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/ServiceControl.java (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/ServiceControl.java Tue May 31 08:10:16 2005
@@ -15,14 +15,8 @@
  *
  * $Header:$
  */
-
 package org.apache.beehive.controls.system.webservice;
 
-import org.apache.beehive.controls.api.bean.AnnotationMemberTypes;
-import org.apache.beehive.controls.api.bean.ControlInterface;
-import org.apache.beehive.controls.api.properties.PropertySet;
-import org.w3c.dom.Element;
-
 import javax.xml.namespace.QName;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -30,19 +24,24 @@
 import java.lang.annotation.Target;
 import java.net.URL;
 
+import org.apache.beehive.controls.api.bean.AnnotationMemberTypes;
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertySet;
+import org.w3c.dom.Element;
 
 /**
- * Provides simplified access to web services. A Service control provides an interface between your application and a
- * web service, which allows your application to invoke the methods. Using a Web Service control, you can connect to any
- * web service for which a WSDL file is available. <br/><br/> You typically use a Service control by creating the
- * control from a WSDL file The target web service's operations are exposed as methods of the control. <br/><br/>
+ * <p>
+ * Provides simplified access to web services. A service control provides an interface between an application and a
+ * web service, which allows an application to invoke the service's operations. Using a web service control, you
+ * can connect to any web service for which a WSDL file is available.
+ * </p>
+ * <p>
+ * Typically, a service control is used by creating the control from a WSDL file.  Then, the target web service's
+ * operations are exposed as methods of the control.
+ * </p>
  */
 @ControlInterface (defaultBinding = "org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl")
-        public interface ServiceControl {
-
-    // ----------------------------------------------
-    // Class level annotations.
-    // ----------------------------------------------
+public interface ServiceControl {
 
     /**
      * Location URL for target service. Multiple URLs may be specified and first URL of the appropriate scheme will be
@@ -53,11 +52,10 @@
             externalConfig = true,
             optional = true,
             hasSetters = false
-            )
-            @Retention(RetentionPolicy.RUNTIME)
-            @Target({ElementType.TYPE, ElementType.FIELD})
-            // allowed on declaration
-            public @interface Location {
+    )
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target({ElementType.TYPE, ElementType.FIELD})
+    public @interface Location {
         String[] urls();
     }
 
@@ -70,29 +68,27 @@
             externalConfig = false,
             optional = true,
             hasSetters = false
-            )
-            @Retention(RetentionPolicy.RUNTIME)
-            @Target({ElementType.METHOD})
-            public @interface OperationName {
-
+    )
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target({ElementType.METHOD})
+    public @interface OperationName {
         String value();
     }
 
     /**
-     * Path to WSDL - mandatory annotation.
+     * Path to WSDL - required annotation.
      */
     @PropertySet(
             prefix = "WSDL",
             externalConfig = false,
             optional = false,
             hasSetters = false
-            )
-            @Retention(RetentionPolicy.RUNTIME)
-            @Target({ElementType.TYPE})
-            public @interface WSDL {
+    )
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target({ElementType.TYPE})
+    public @interface WSDL {
         @AnnotationMemberTypes.FilePath
         String path();
-
         String service() default "";
     }
 
@@ -110,7 +106,6 @@
      */
     public URL getEndPoint();
 
-
     /**
      * Specifies the QName for the port within the WSDL which the Service Control should use.
      *
@@ -125,7 +120,6 @@
      */
     public QName getWsdlPort();
 
-
     /**
      * Sets the username that will be sent with the next outgoing Service control method invocation. Used if the Service
      * control uses HTTP basic authentication.
@@ -135,19 +129,19 @@
     public void setUsername(String username);
 
     /**
-     * Sets the password that will be sent with the next outgoing Service control method invocation. Used if the Service
-     * control uses HTTP basic authentication.
+     * Retrieves the username string that was set by the most recent call to setUsername.
      *
-     * @param password The password to send for authentication.
+     * @return The username set by the setUsername method.
      */
-    public void setPassword(String password);
+    public String getUsername();
 
     /**
-     * Retrieves the username string that was set by the most recent call to setUsername.
+     * Sets the password that will be sent with the next outgoing Service control method invocation. Used if the Service
+     * control uses HTTP basic authentication.
      *
-     * @return The username set by the setUsername method.
+     * @param password The password to send for authentication.
      */
-    public String getUsername();
+    public void setPassword(String password);
 
     /**
      * Retrieves the password string that was set by the most recent call to the setPassword method.
@@ -188,5 +182,4 @@
      * methods.
      */
     public void reset();
-
 }

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java?rev=179220&r1=179219&r2=179220&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/generator/ExtensionMaker.java Tue May 31 08:10:16 2005
@@ -17,25 +17,22 @@
  */
 package org.apache.beehive.controls.system.webservice.generator;
 
-import java.io.*;
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.FileInputStream;
 import java.util.List;
-
 import javax.jws.WebParam;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
-import javax.xml.rpc.ServiceFactory;
-import javax.xml.rpc.encoding.TypeMapping;
 
 import org.apache.axis.wsdl.toJava.Namespaces;
 import org.apache.axis.wsdl.toJava.Utils;
 import org.apache.beehive.wsm.axis.ant.WSDLFilter;
-
 import org.apache.beehive.wsm.axis.databinding.SystemTypeLookupService;
 import org.apache.beehive.wsm.model.BeehiveWsMethodMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsParameterMetadata;
 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor;
-
 import org.apache.beehive.wsm.wsdl.WSDLParser;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
@@ -44,14 +41,10 @@
 import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
-import org.apache.commons.cli.PosixParser;
 import org.apache.xmlbeans.XmlException;
 
-
-/*******************************************************************************
- * 
- * 
- * @author Jonathan Colwell
+/**
+ *
  */
 public class ExtensionMaker {
 
@@ -210,6 +203,7 @@
        else     
        return  "org.apache.beehive.wsm.databinding.GenericHolder<" + clazz.getCanonicalName() + ">";
     }
+    
     private static Options buildOptions() {
         Options options = new Options();
         OptionBuilder.hasArg();
@@ -292,7 +286,7 @@
      * @param wsdlDirName
      * @param serviceURL
      * @param pkgName
-     * @param em
+     * @param wsdlPathAnnotation
      * @throws IOException
      * @throws Exception
      * @throws FileNotFoundException
@@ -300,10 +294,9 @@
      * @throws IllegalAccessException
      * @throws NoSuchFieldException
      */
-    private void genJCX(String wsdlDirName, String serviceURL, String pkgName,
-            String wsdlPathAnnotation) throws IOException, Exception,
-            FileNotFoundException, XmlException, IllegalAccessException,
-            NoSuchFieldException {
+    private void genJCX(String wsdlDirName, String serviceURL, String pkgName, String wsdlPathAnnotation)
+        throws IOException, Exception, FileNotFoundException, XmlException,
+               IllegalAccessException, NoSuchFieldException {
         setServiceURL(serviceURL);
         setPackageName(pkgName);
         File wsdlDir = new File(wsdlDirName);
@@ -320,7 +313,6 @@
     }
 
     /**
-     * @param serviceURL
      * @param wsdlPathAnnotation
      * @param wsdlFile
      * @throws IOException
@@ -330,7 +322,9 @@
      * @throws IllegalAccessException
      * @throws NoSuchFieldException
      */
-    private void genJCXForWSDLFile(String wsdlPathAnnotation, File wsdlFile) throws IOException, Exception, FileNotFoundException, XmlException, IllegalAccessException, NoSuchFieldException {
+    private void genJCXForWSDLFile(String wsdlPathAnnotation, File wsdlFile)
+        throws IOException, Exception, FileNotFoundException, XmlException, IllegalAccessException,
+               NoSuchFieldException {
         if (wsdlPathAnnotation != null) {
             setWSDLPath(wsdlPathAnnotation + "/" + wsdlFile.getName());
         } else {

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/HeaderHandler.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/HeaderHandler.java?rev=179220&r1=179219&r2=179220&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/HeaderHandler.java (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/HeaderHandler.java Tue May 31 08:10:16 2005
@@ -19,7 +19,6 @@
 
 import java.util.ArrayList;
 import java.util.Iterator;
-
 import javax.xml.namespace.QName;
 import javax.xml.rpc.handler.Handler;
 import javax.xml.rpc.handler.HandlerInfo;
@@ -29,7 +28,6 @@
 import javax.xml.soap.SOAPEnvelope;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.soap.SOAPPart;
 
@@ -46,8 +44,6 @@
 
     /**
      * Sign outgoing request message.
-     * 
-     * @throws SOAPException
      */
     public boolean handleRequest(MessageContext mc) {
         System.out.println("In HeaderHandler's handleRequest myOutHeaders: "

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs?rev=179220&r1=179219&r2=179220&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs Tue May 31 08:10:16 2005
@@ -17,32 +17,17 @@
  */
 package org.apache.beehive.controls.system.webservice.jaxrpc;
 
-import java.io.Serializable;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.apache.axis.constants.Use;
-import org.apache.axis.utils.Messages;
-import org.apache.axis.utils.JavaUtils.HolderException;
-import org.apache.beehive.controls.api.bean.AnnotationConstraints.AllowExternalOverride;
-import org.apache.beehive.controls.api.bean.AnnotationMemberTypes;
-import org.apache.beehive.controls.api.bean.ControlImplementation;
-import org.apache.beehive.controls.api.bean.Extensible;
-import org.apache.beehive.controls.api.context.Context;
-import org.apache.beehive.controls.api.context.ControlBeanContext;
-import org.apache.beehive.controls.api.properties.PropertySet;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.Serializable;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Type;
+import java.net.MalformedURLException;
 import java.net.URL;
-import java.rmi.RemoteException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -50,7 +35,6 @@
 
 import javax.jws.WebParam;
 import javax.jws.soap.SOAPBinding;
-import javax.servlet.ServletContext;
 import javax.xml.namespace.QName;
 import javax.xml.rpc.Call;
 import javax.xml.rpc.ParameterMode;
@@ -58,12 +42,13 @@
 import javax.xml.rpc.ServiceException;
 import javax.xml.rpc.ServiceFactory;
 import javax.xml.rpc.encoding.TypeMapping;
-import javax.xml.rpc.encoding.XMLType;
-import javax.xml.rpc.handler.Handler;
 import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.MessageContext;
 import javax.xml.rpc.holders.Holder;
 
+import org.apache.axis.constants.Use;
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Extensible;
+import org.apache.beehive.controls.api.context.Context;
 import org.apache.beehive.controls.api.context.ControlBeanContext;
 import org.apache.beehive.wsm.axis.databinding.SystemTypeLookupService;
 import org.apache.beehive.wsm.axis.registration.AxisTypeRegistrar;
@@ -73,19 +58,17 @@
 import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
 import org.apache.beehive.wsm.model.wsdl.XmlBeanWSDLProcessor;
 import org.apache.beehive.wsm.registration.TypeRegistrar;
-import org.apache.log4j.Logger;
-
 import org.apache.beehive.controls.system.webservice.ServiceControl;
 import org.apache.beehive.controls.system.webservice.utils.HolderUtils;
-
-import javax.xml.namespace.QName;
+import org.apache.log4j.Logger;
 
 import org.w3c.dom.Element;
 
 @ControlImplementation
-public class ServiceControlImpl implements ServiceControl, Extensible,
-		Serializable {
-	static Logger logger = Logger.getLogger(ServiceControlImpl.class);
+public class ServiceControlImpl
+    implements ServiceControl, Extensible, Serializable {
+
+    static Logger logger = Logger.getLogger(ServiceControlImpl.class);
 
 	@Context
 	public ControlBeanContext cbContext;
@@ -148,19 +131,9 @@
 
 		ArrayList argsList = new ArrayList();
 		Class[] methodParameterTypes = method.getParameterTypes();
-		Iterator<BeehiveWsParameterMetadata> it = wmm.getParams().iterator(); // size
-		// of
-		// the
-		// param
-		// list
-		// must
-		// be
-		// the
-		// size
-		// of
-		// the
-		// args
-		// array
+		Iterator<BeehiveWsParameterMetadata> it = wmm.getParams().iterator();
+
+        // size of the param list must be the size of the args array
 		for (int i = 0; i < methodParameterTypes.length; i++) {
 			Class javaTypeFromClass = methodParameterTypes[i];
 			BeehiveWsParameterMetadata nxtParamMetaData = it.next();
@@ -201,19 +174,8 @@
 		}
 
 		Class[] methodParameterTypes = method.getParameterTypes();
-		Iterator<BeehiveWsParameterMetadata> it = wmm.getParams().iterator(); // size
-		// of
-		// the
-		// param
-		// list
-		// must
-		// be
-		// the
-		// size
-		// of
-		// the
-		// args
-		// array
+		Iterator<BeehiveWsParameterMetadata> it = wmm.getParams().iterator();
+        // size of the param list must be the size of the args array
 		for (int i = 0; i < methodParameterTypes.length; i++) {
 			Class javaTypeFromClass = methodParameterTypes[i];
 			BeehiveWsParameterMetadata nxtParamMetaData = it.next();
@@ -252,20 +214,20 @@
 	}
 
 	private void stuffHolderValue(Holder holder, Object value)
-			throws NoSuchFieldException, IllegalAccessException {
+        throws NoSuchFieldException, IllegalAccessException {
 		HolderUtils.stuffHolderValue(holder, value);
 	}
 
 	/**
 	 * @param method
-	 * @param operationName
+	 * @param wmm
 	 * @return
 	 * @throws ServiceException
 	 * @throws NoSuchMethodException
 	 * @throws Exception
 	 */
 	private Call buildCallObject(Method method, BeehiveWsMethodMetadata wmm)
-			throws ServiceException, NoSuchMethodException, Exception {
+        throws ServiceException, Exception {
 
 		// TODO: Later cache the call objects for each method.
 
@@ -323,13 +285,11 @@
 		Type[] genericMethodParamTypes = method.getGenericParameterTypes();
 
 		if (omArgMetaDataList.size() != methodParameterTypes.length)
-			throw new RuntimeException(
-					"Object model and method definition don't match!");
+			throw new RuntimeException("Object model and method definition don't match!");
 		List argsToSend = new ArrayList<Object>();
 		for (int i = 0; i < methodParameterTypes.length; i++) {
 
-			BeehiveWsParameterMetadata nxtArgMetaData = omArgMetaDataList
-					.get(i);
+			BeehiveWsParameterMetadata nxtArgMetaData = omArgMetaDataList.get(i);
 			Class javaTypeFromClass = methodParameterTypes[i];
 
 			// sure
@@ -345,8 +305,7 @@
 				mode = ParameterMode.OUT;
 			else if (omMode == WebParam.Mode.INOUT) {
 				if (!Holder.class.isAssignableFrom(javaTypeFromClass))
-					throw new RuntimeException(
-							"Holder classes are required for the in/out parameters.");
+					throw new RuntimeException("Holder classes are required for the in/out parameters.");
 				mode = ParameterMode.INOUT;
 			} else
 				throw new RuntimeException("Invalid parameter mode: " + omMode);
@@ -357,13 +316,16 @@
 
 			if ((mode == ParameterMode.OUT || mode == ParameterMode.INOUT)
 					&& Holder.class.isAssignableFrom(javaTypeFromClass)) {
-				javaTypeFromClass = TypeRegistrar
-						.getHoldersValueClass(genericMethodParamTypes[i]);
+				javaTypeFromClass = TypeRegistrar.getHoldersValueClass(genericMethodParamTypes[i]);
 			}
-			registeredTypeQName = registrar.registerType(javaTypeFromClass,
-					nxtArgMetaData.getXmlType(), mWSTM.getSoapBinding().getStyle(), mWSTM.getSoapBinding().getUse());
 
-			if (nxtArgMetaData.isWpHeader()) {
+            registeredTypeQName =
+                registrar.registerType(javaTypeFromClass,
+                    nxtArgMetaData.getXmlType(),
+                    mWSTM.getSoapBinding().getStyle(),
+                    mWSTM.getSoapBinding().getUse());
+
+            if (nxtArgMetaData.isWpHeader()) {
 				// TODO: addParameterAsHeader is Axis specific, later abstract
 				// out Axis from this implementation
 				logger.debug("Argument: " + nxtArgMetaData.getWpName()
@@ -386,9 +348,13 @@
 			// QName xmlTypeFromWSDL = new QName(wmm.getWrTargetNamespace(),
 			// wmm.getWrName()); //wmm.getXmlReturnType();
 			Class javaTypeFromClass = method.getReturnType();
-			QName resultsRegisteredTypeQName = registrar.registerType(
-					javaTypeFromClass, wmm.getXmlReturnType(), mWSTM.getSoapBinding().getStyle(), mWSTM.getSoapBinding().getUse());
-			call.setReturnType(resultsRegisteredTypeQName);
+            QName resultsRegisteredTypeQName = registrar.registerType(
+                javaTypeFromClass,
+                wmm.getXmlReturnType(),
+                mWSTM.getSoapBinding().getStyle(),
+                mWSTM.getSoapBinding().getUse());
+
+            call.setReturnType(resultsRegisteredTypeQName);
 //			if ("rpc".equals(style)) {
 //				((org.apache.axis.client.Call) call).setReturnQName(new QName("", "return"));   // Hack, may need this for google!  TBD, verify the need for this.
 //				((org.apache.axis.client.Call) call).setReturnClass(javaTypeFromClass);   // Hack, may need this for google!  TBD, verify the need for this.
@@ -406,8 +372,8 @@
 	 * @param operationName
 	 * @throws Exception
 	 */
-	private BeehiveWsMethodMetadata findMethodInOM(Method method,
-			String operationName) throws NoSuchMethodException, Exception {
+	private BeehiveWsMethodMetadata findMethodInOM(Method method, String operationName)
+        throws NoSuchMethodException, Exception {
 
 		// the obejct model doesn't store holders, rather the underlying
 		// types, so to get the method
@@ -419,15 +385,12 @@
 		Class[] paramTypes = method.getParameterTypes();
 		for (int i = 0; i < paramTypes.length; i++) {
 			if (Holder.class.isAssignableFrom(paramTypes[i])) {
-				paramTypes[i] = TypeRegistrar
-						.getHoldersValueClass(genericParamTypes[i]);
+				paramTypes[i] = TypeRegistrar.getHoldersValueClass(genericParamTypes[i]);
 			}
 		}
-		BeehiveWsMethodMetadata wmm = mWSTM
-				.getMethod(operationName, paramTypes);
+		BeehiveWsMethodMetadata wmm = mWSTM.getMethod(operationName, paramTypes);
 		if (wmm == null) {
-			StringBuffer sb = new StringBuffer(
-					"No Jsr181MethodMetadata found for " + operationName + '(');
+			StringBuffer sb = new StringBuffer("No Jsr181MethodMetadata found for " + operationName + '(');
 			boolean first = true;
 			for (Class cls : paramTypes) {
 				if (first) {
@@ -444,13 +407,14 @@
 		return wmm;
 	}
 
-	private synchronized void initialize() throws Exception {
-		if (initialized)
+	private synchronized void initialize()
+        throws Exception {
+
+        if (initialized)
 			return;
 		XmlBeanWSDLProcessor wsdlProcessor;
 
-		ServiceControl.WSDL wsdl = (ServiceControl.WSDL) cbContext
-				.getControlPropertySet(ServiceControl.WSDL.class);
+		ServiceControl.WSDL wsdl = (ServiceControl.WSDL) cbContext.getControlPropertySet(ServiceControl.WSDL.class);
 
 		if (wsdl != null) {
 			logger.debug("read wsdl from: " + wsdl.path());
@@ -473,12 +437,13 @@
 		HandlerInfo hInfo = new HandlerInfo();
 		hInfo.setHandlerClass(HeaderHandler.class);
 
-		TypeMapping tm = service.getTypeMappingRegistry()
-				.getDefaultTypeMapping();
+		TypeMapping tm = service.getTypeMappingRegistry().getDefaultTypeMapping();
 		lookupService = new SystemTypeLookupService();
 		registrar = new AxisTypeRegistrar(
-				(org.apache.axis.encoding.TypeMapping) tm, lookupService);
-		configureEndPoint();
+			(org.apache.axis.encoding.TypeMapping) tm,
+            lookupService);
+
+        configureEndPoint();
 
 		mWSTM = wsdlProcessor.getObjectModel(lookupService);
 
@@ -492,9 +457,10 @@
 
 	private String getAlternateOperationName(Method method) {
 
-		ServiceControl.OperationName opName = cbContext.getMethodPropertySet(
-				method, ServiceControl.OperationName.class);
-		if (opName != null) {
+		ServiceControl.OperationName opName =
+            cbContext.getMethodPropertySet(method, ServiceControl.OperationName.class);
+
+        if (opName != null) {
 			return opName.value();
 		}
 		return null;
@@ -509,8 +475,8 @@
 			if (pathToWSDL.startsWith("http://") || pathToWSDL.startsWith("file:/")) {
 				url = new URL(pathToWSDL);
 				wsdlStream = url.openStream();
-			} else { // it is a local file name
-				
+			}
+            else { // it is a local file name
 				wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
 
 //				ServletContext servletContext = cbContext.getService(
@@ -547,11 +513,12 @@
 		}
 	}
 
-	private void configureEndPoint() throws Exception {
+	private void configureEndPoint()
+        throws Exception {
 
 		if (null == getEndPoint()) {
-			ServiceControl.Location location = (ServiceControl.Location) cbContext
-					.getControlPropertySet(ServiceControl.Location.class);
+			ServiceControl.Location location =
+                (ServiceControl.Location)cbContext.getControlPropertySet(ServiceControl.Location.class);
 
 			if (location != null) {
 				setEndPoint(new URL(location.urls()[0]));
@@ -569,8 +536,7 @@
 	}
 
 	/**
-	 * @param endPoint
-	 *            The endPoint to set.
+	 * @param endPoint The endPoint to set.
 	 */
 	public void setEndPoint(URL endPoint) {
 		this.endPoint = endPoint;
@@ -584,8 +550,7 @@
 	}
 
 	/**
-	 * @param password
-	 *            The password to set.
+	 * @param password The password to set.
 	 */
 	public void setPassword(String password) {
 		this.password = password;
@@ -599,8 +564,7 @@
 	}
 
 	/**
-	 * @param registrar
-	 *            The registrar to set.
+	 * @param registrar The registrar to set.
 	 */
 	public void setRegistrar(TypeRegistrar registrar) {
 		this.registrar = registrar;
@@ -614,8 +578,7 @@
 	}
 
 	/**
-	 * @param service
-	 *            The service to set.
+	 * @param service The service to set.
 	 */
 	public void setService(Service service) {
 		this.service = service;
@@ -629,8 +592,7 @@
 	}
 
 	/**
-	 * @param timeout
-	 *            The timeout to set.
+	 * @param timeout The timeout to set.
 	 */
 	public void setTimeout(int timeout) {
 		this.timeout = timeout;
@@ -644,8 +606,7 @@
 	}
 
 	/**
-	 * @param username
-	 *            The username to set.
+	 * @param username The username to set.
 	 */
 	public void setUsername(String username) {
 		this.username = username;
@@ -679,8 +640,6 @@
 	}
 
 	/*
-	 * (non-Javadoc)
-	 * 
 	 * @see org.apache.beehive.controls.system.webservice.ServiceControl#getInputHeaders()
 	 * 
 	 * If there are any input header it is stored on my thread's Handler.
@@ -690,8 +649,6 @@
 	}
 
 	/*
-	 * (non-Javadoc)
-	 * 
 	 * @see org.apache.beehive.controls.system.webservice.ServiceControl#setOutputHeaders(org.w3c.dom.Element[])
 	 */
 	public void setOutputHeaders(Element[] headers) {

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/utils/HolderUtils.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/utils/HolderUtils.java?rev=179220&r1=179219&r2=179220&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/utils/HolderUtils.java (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/utils/HolderUtils.java Tue May 31 08:10:16 2005
@@ -25,8 +25,7 @@
 
 	public static void stuffHolderValue(Holder holder, Object value)
 			throws NoSuchFieldException, IllegalAccessException {
-
-		Field valueField = holder.getClass().getField("value");
+        Field valueField = holder.getClass().getField("value");
 		Object curValueInHolder = valueField.get(holder);
 		Class classOfValueFieldInHolder;
 		if (curValueInHolder == null) {
@@ -59,8 +58,8 @@
 
 	}
 
-	private static void setFieldInObject(Field valueField, Object destObject,
-			Object value) throws IllegalArgumentException,
+	private static void setFieldInObject(Field valueField, Object destObject, Object value)
+        throws IllegalArgumentException,
 			IllegalAccessException {
 		if (valueField.getType().isPrimitive()) {
 			if (value == null)