[jbossws-commits] JBossWS SVN: r3797 - in branches/jbossws-2.0/jbossws-core: ant-import-tests and 6 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Jul 4 07:33:23 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-07-04 07:33:22 -0400 (Wed, 04 Jul 2007)
New Revision: 3797

Modified:
   branches/jbossws-2.0/jbossws-core/ant-import-tests/build-testsuite.xml
   branches/jbossws-2.0/jbossws-core/build.xml
   branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
   branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/EndpointFeature.java
   branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
   branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
   branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
   branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-client-config.xml
   branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-endpoint-config.xml
   branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-client-config.xml
   branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml
   branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/IWebsvcImpl.java
   branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java
Log:
Add @EndpointConfig(configName = .NET friendly Endpoint)

Modified: branches/jbossws-2.0/jbossws-core/ant-import-tests/build-testsuite.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/ant-import-tests/build-testsuite.xml	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/ant-import-tests/build-testsuite.xml	2007-07-04 11:33:22 UTC (rev 3797)
@@ -36,8 +36,11 @@
 
     <path id="tests.extra.classpath">
       <pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
+      <pathelement location="${core.dir}/thirdparty/getopt.jar"/>
       <pathelement location="${core.dir}/thirdparty/ejb3.deployer/jboss-annotations-ejb3.jar"/>
       <pathelement location="${core.dir}/thirdparty/ejb3.deployer/jboss-ejb3.jar"/>
+      <pathelement location="${core.dir}/thirdparty/jaxws-rt.jar"/>
+      <pathelement location="${core.dir}/thirdparty/jaxws-tools.jar"/>
       <pathelement location="${core.dir}/thirdparty/jboss-remoting.jar"/>
       <pathelement location="${core.dir}/thirdparty/policy.jar"/>
       <pathelement location="${core.dir}/thirdparty/qdox.jar"/>

Modified: branches/jbossws-2.0/jbossws-core/build.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/build.xml	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/build.xml	2007-07-04 11:33:22 UTC (rev 3797)
@@ -166,10 +166,7 @@
 				<include name="ws*.sh"/>
 			</fileset>
 			<metainf dir="${core.resources.dir}/jbossws-core.jar/META-INF"/>
-			<metainf dir="${core.resources.dir}/standard-config">
-				<include name="standard-jaxrpc-client-config.xml"/>
-				<include name="standard-jaxws-client-config.xml"/>
-			</metainf>			
+			<metainf dir="${core.resources.dir}/standard-config"/>
 		</jar>
 
 		<!-- Build jbossws-core-scripts.zip -->

Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2007-07-04 11:33:22 UTC (rev 3797)
@@ -111,6 +111,7 @@
 
          ServerEndpointMetaData sepMetaData = result.sepMetaData;
          ServiceMetaData serviceMetaData = result.serviceMetaData;
+         serviceMetaData.setWsdlLocation(result.wsdlLocation);
          Class<?> seiClass = result.epClass;
 
          sepMetaData.setLinkName(linkName);
@@ -119,9 +120,7 @@
 
          // Assign the WS-Security configuration,
          WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
-         WSSecurityConfiguration securityConfiguration = wsseConfFactory.createConfiguration(
-            wsMetaData.getRootFile(), WSSecurityOMFactory.SERVER_RESOURCE_NAME
-         );
+         WSSecurityConfiguration securityConfiguration = wsseConfFactory.createConfiguration(wsMetaData.getRootFile(), WSSecurityOMFactory.SERVER_RESOURCE_NAME);
          serviceMetaData.setSecurityConfiguration(securityConfiguration);
 
          // Process an optional @SOAPBinding annotation
@@ -130,8 +129,10 @@
          // Process an optional @BindingType annotation
          processBindingType(sepMetaData, seiClass);
 
+         // process config
+         processEndpointConfig(udi, sepClass, linkName, sepMetaData);
+
          // Process web methods
-         if(result.wsdlLocation!=null) serviceMetaData.setWsdlLocation(result.wsdlLocation);
          processWebMethods(sepMetaData, seiClass);
 
          // Init the transport guarantee
@@ -140,7 +141,7 @@
          // Initialize types
          createJAXBContext(sepMetaData);
          populateXmlTypes(sepMetaData);
-         
+
          //Process an optional @PolicyAttachment annotation
          if (sepClass.isAnnotationPresent(PolicyAttachment.class))
          {
@@ -162,9 +163,6 @@
          JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
          serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
 
-         // process config
-         processEndpointConfig(udi, sepClass, linkName, sepMetaData);
-
          // Note, that @WebContext needs to be defined on the endpoint not the SEI
          processWebContext(udi, sepClass, linkName, sepMetaData);
 
@@ -215,38 +213,38 @@
    private void processWSDDContribution(ServerEndpointMetaData sepMetaData)
    {
       WebservicesMetaData webservices = WebservicesFactory.loadFromVFSRoot(sepMetaData.getRootFile());
-      if(webservices!=null)
+      if (webservices != null)
       {
-         for(WebserviceDescriptionMetaData wsDesc : webservices.getWebserviceDescriptions())
+         for (WebserviceDescriptionMetaData wsDesc : webservices.getWebserviceDescriptions())
          {
-            for(PortComponentMetaData portComp : wsDesc.getPortComponents())
+            for (PortComponentMetaData portComp : wsDesc.getPortComponents())
             {
                // We match portComp's by SEI first and portQName second
                // In the first case the portComp may override the portQName that derives from the annotation
                String portCompSEI = portComp.getServiceEndpointInterface();
                boolean doesMatch = portCompSEI != null ? portCompSEI.equals(sepMetaData.getServiceEndpointInterfaceName()) : false;
-               if(!doesMatch)
+               if (!doesMatch)
                {
                   doesMatch = portComp.getWsdlPort().equals(sepMetaData.getPortName());
                }
 
-               if(doesMatch)
+               if (doesMatch)
                {
 
                   log.debug("Processing 'webservices.xml' contributions on EndpointMetaData");
 
                   // PortQName overrides
-                  if(portComp.getWsdlPort()!=null)
+                  if (portComp.getWsdlPort() != null)
                   {
                      log.debug("Override EndpointMetaData portName " + sepMetaData.getPortName() + " with " + portComp.getWsdlPort());
                      sepMetaData.setPortName(portComp.getWsdlPort());
-                  }                 
+                  }
 
                   // HandlerChain contributions
                   UnifiedHandlerChainsMetaData chainWrapper = portComp.getHandlerChains();
-                  if(chainWrapper!=null)
+                  if (chainWrapper != null)
                   {
-                     for(UnifiedHandlerChainMetaData handlerChain : chainWrapper.getHandlerChains())
+                     for (UnifiedHandlerChainMetaData handlerChain : chainWrapper.getHandlerChains())
                      {
                         for (UnifiedHandlerMetaData uhmd : handlerChain.getHandlers())
                         {
@@ -258,14 +256,14 @@
                   }
 
                   // MTOM settings
-                  if(portComp.isEnableMtom())
+                  if (portComp.isEnableMtom())
                   {
                      log.debug("Enabling MTOM");
 
                      String bindingId = sepMetaData.getBindingId();
-                     if(bindingId.equals(Constants.SOAP11HTTP_BINDING))
+                     if (bindingId.equals(Constants.SOAP11HTTP_BINDING))
                         sepMetaData.setBindingId(Constants.SOAP11HTTP_MTOM_BINDING);
-                     else if(bindingId.equals(Constants.SOAP12HTTP_BINDING))
+                     else if (bindingId.equals(Constants.SOAP12HTTP_BINDING))
                         sepMetaData.setBindingId(Constants.SOAP12HTTP_MTOM_BINDING);
 
                   }
@@ -369,8 +367,8 @@
          }
          else
          {
-               WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
-               writeWsdl(serviceMetaData,wsdlDefinitions,epMetaData);
+            WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
+            writeWsdl(serviceMetaData, wsdlDefinitions, epMetaData);
          }
       }
       catch (RuntimeException rte)
@@ -382,12 +380,11 @@
          throw new WSException("Cannot write generated wsdl", e);
       }
    }
-   
-   
+
    private void writeWsdl(ServiceMetaData serviceMetaData, WSDLDefinitions wsdlDefinitions, EndpointMetaData epMetaData) throws IOException
    {
       // The RI uses upper case, and the TCK expects it, so we just mimic this even though we don't really have to
-      String wsdlName =  ToolsUtils.firstLetterUpperCase(serviceMetaData.getServiceName().getLocalPart());
+      String wsdlName = ToolsUtils.firstLetterUpperCase(serviceMetaData.getServiceName().getLocalPart());
       // Ensure that types are only in the interface qname
       wsdlDefinitions.getWsdlTypes().setNamespace(epMetaData.getPortTypeName().getNamespaceURI());
 
@@ -400,14 +397,15 @@
       }
       else
       {
-         dir =  IOUtils.createTempDirectory();
+         dir = IOUtils.createTempDirectory();
          wsdlFile = File.createTempFile(wsdlName, ".wsdl", dir);
          wsdlFile.deleteOnExit();
       }
 
       message(wsdlFile.getName());
       Writer writer = IOUtils.getCharsetFileWriter(wsdlFile, Constants.DEFAULT_XML_CHARSET);
-      new WSDLWriter(wsdlDefinitions).write(writer, Constants.DEFAULT_XML_CHARSET, new WSDLWriterResolver() {
+      new WSDLWriter(wsdlDefinitions).write(writer, Constants.DEFAULT_XML_CHARSET, new WSDLWriterResolver()
+      {
          public WSDLWriterResolver resolve(String suggestedFile) throws IOException
          {
             File file;

Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/EndpointFeature.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/EndpointFeature.java	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/EndpointFeature.java	2007-07-04 11:33:22 UTC (rev 3797)
@@ -21,21 +21,24 @@
  */
 package org.jboss.ws.metadata.config;
 
+// $Id: $
+
 /**
  * @author Heiko.Braun at jboss.org
- * @version $Id$
+ * @author Thomas.Diesler at jboss.org
  * @since 14.12.2006
  */
-public class EndpointFeature {
+public interface EndpointFeature
+{
+   /** Enable MTOM per endpoint */
+   final static String MTOM = "http://org.jboss.ws/mtom";
 
-   /**
-    * Enable MTOM per endpoint.
-    */
-   public final static String MTOM = "http://org.jboss.ws/mtom";
-
-   /**
+   /** 
     * Validate the XML stream upon dispatch.
     * Introduces an additional parsing overhead and could be disabled.
     */
-   public final static String VALIDATE_DISPATCH = "http://org.jboss.ws/dispatch/validate";
+   final static String VALIDATE_DISPATCH = "http://org.jboss.ws/dispatch/validate";
+
+   /** Generates message part names 'parameters' in WSDL for document/literal/wapped */
+   final static String BINDING_WSDL_DOTNET = "http://org.jboss.ws/binding/wsdl/dotnet";
 }

Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java	2007-07-04 11:33:22 UTC (rev 3797)
@@ -23,6 +23,23 @@
 
 // $Id$
 
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Observable;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.Service.Mode;
+
 import org.jboss.logging.Logger;
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
@@ -34,26 +51,22 @@
 import org.jboss.ws.core.jaxrpc.binding.SOAPArrayDeserializerFactory;
 import org.jboss.ws.core.jaxrpc.binding.SOAPArraySerializerFactory;
 import org.jboss.ws.core.jaxws.JAXBContextCache;
-import org.jboss.ws.core.jaxws.JAXBContextFactory;
 import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
 import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
 import org.jboss.ws.core.jaxws.client.DispatchBinding;
 import org.jboss.ws.core.soap.Style;
 import org.jboss.ws.core.soap.Use;
 import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.ws.metadata.config.*;
+import org.jboss.ws.metadata.config.CommonConfig;
+import org.jboss.ws.metadata.config.Configurable;
+import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.ws.metadata.config.EndpointFeature;
+import org.jboss.ws.metadata.config.JBossWSConfigFactory;
+import org.jboss.wsf.spi.binding.BindingCustomization;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
 import org.jboss.wsf.spi.utils.JavaUtils;
-import org.jboss.wsf.spi.binding.BindingCustomization;
 
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.ws.Service.Mode;
-import java.lang.reflect.Method;
-import java.util.*;
-
 /**
  * A Service component describes a set of endpoints.
  *
@@ -315,7 +328,8 @@
       return type;
    }
 
-   public List<BindingCustomization> getBindingCustomizations() {
+   public List<BindingCustomization> getBindingCustomizations()
+   {
       return bindingCustomization;
    }
 
@@ -646,14 +660,23 @@
 
    public String getConfigFile()
    {
-      return this.configFile;
+      return configFile;
    }
 
    public String getConfigName()
    {
-      return this.configName;
+      return configName;
    }
 
+   public CommonConfig getConfig()
+   {
+      // Make sure we have a configuration
+      if (config == null)
+         initEndpointConfig();
+
+      return config;
+   }
+
    public void setConfigName(String configName)
    {
       setConfigNameInternal(configName, null);
@@ -676,8 +699,7 @@
       {
          this.configName = configName;
 
-         if (log.isDebugEnabled())
-            log.debug("Reconfiguration forced, new config is '" + configName + "'");
+         log.debug("Reconfiguration forced, new config is '" + configName + "'");
          initEndpointConfig();
          configObservable.doNotify(configName);
       }
@@ -685,8 +707,7 @@
 
    public void initEndpointConfig()
    {
-      if (log.isDebugEnabled())
-         log.debug("Create new config [name=" + getConfigName() + ",file=" + getConfigFile() + "]");
+      log.debug("Create new config [name=" + getConfigName() + ",file=" + getConfigFile() + "]");
       JBossWSConfigFactory factory = JBossWSConfigFactory.newInstance();
       config = factory.getConfig(getRootFile(), getConfigName(), getConfigFile());
 
@@ -695,8 +716,7 @@
 
    private void reconfigHandlerMetaData()
    {
-      if (log.isDebugEnabled())
-         log.debug("Configure EndpointMetaData");
+      log.debug("Configure EndpointMetaData");
 
       List<HandlerMetaData> sepHandlers = getHandlerMetaData(HandlerType.ENDPOINT);
       clearHandlers();
@@ -708,12 +728,9 @@
       addHandlers(sepHandlers);
       addHandlers(postHandlers);
 
-      if (log.isDebugEnabled())
-         log.debug("Added " + preHandlers.size() + " PRE handlers");
-      if (log.isDebugEnabled())
-         log.debug("Added " + sepHandlers.size() + " ENDPOINT handlers");
-      if (log.isDebugEnabled())
-         log.debug("Added " + postHandlers.size() + " POST handlers");
+      log.debug("Added " + preHandlers.size() + " PRE handlers");
+      log.debug("Added " + sepHandlers.size() + " ENDPOINT handlers");
+      log.debug("Added " + postHandlers.size() + " POST handlers");
    }
 
    public List<Class> getRegisteredTypes()
@@ -742,9 +759,13 @@
 
       boolean match;
       if (seiName != null && portName != null)
+      {
          match = getServiceEndpointInterfaceName().equals(seiName) && getPortName().equals(portName);
-      else match = getServiceEndpointInterfaceName().equals(seiName) || getPortName().equals(portName);
-
+      }
+      else
+      {
+         match = getServiceEndpointInterfaceName().equals(seiName) || getPortName().equals(portName);
+      }
       return match;
    }
 }

Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java	2007-07-04 11:33:22 UTC (rev 3797)
@@ -42,6 +42,7 @@
 import org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult;
 import org.jboss.ws.extensions.xop.jaxws.ReflectiveAttachmentRefScanner;
 import org.jboss.ws.metadata.acessor.ReflectiveMethodAccessor;
+import org.jboss.ws.metadata.config.EndpointFeature;
 import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
 import org.jboss.wsf.spi.utils.JavaUtils;
 
@@ -434,10 +435,13 @@
    public String getPartName()
    {
       // [JBWS-771] Use part names that are friendly to .NET
-      if (opMetaData.isDocumentWrapped() && inHeader == false)
-         return "parameters";
-      else
-         return partName;
+      String auxPartName = partName;
+      if (opMetaData.getEndpointMetaData().getConfig().hasFeature(EndpointFeature.BINDING_WSDL_DOTNET))
+      {
+         if (opMetaData.isDocumentWrapped() && inHeader == false)
+            auxPartName = "parameters";
+      }
+      return auxPartName;
    }
 
    public void setPartName(String partName)

Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java	2007-07-04 11:33:22 UTC (rev 3797)
@@ -1,33 +1,34 @@
 /*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.jboss.ws.tools.metadata;
 
 // $Id$
 
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.metadata.config.ConfigurationProvider;
 import org.jboss.ws.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.metadata.umdm.ServiceMetaData;
 
-import javax.xml.namespace.QName;
-
 /**
  *  Tools Endpoint Metadata
  *  @author <mailto:Anil.Saldhana at jboss.org>Anil Saldhana
@@ -40,5 +41,7 @@
    public ToolsEndpointMetaData(ServiceMetaData service, QName portName, QName portTypeName)
    {
       super(service, portName, portTypeName, Type.JAXRPC);
+      super.configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
+      super.configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
    }
 }
\ No newline at end of file

Modified: branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-client-config.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-client-config.xml	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-client-config.xml	2007-07-04 11:33:22 UTC (rev 3797)
@@ -3,18 +3,18 @@
 <!-- $Id$ -->
 
 <jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
-               xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
+  xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
   
   <client-config>
     <config-name>Standard Client</config-name>
   </client-config>
   
-   <client-config>
-      <config-name>Standard MTOM client</config-name>
-      <feature>http://org.jboss.ws/mtom</feature>   
-   </client-config>
-
-   <client-config>
+  <client-config>
+    <config-name>Standard MTOM client</config-name>
+    <feature>http://org.jboss.ws/mtom</feature>
+  </client-config>
+  
+  <client-config>
     <config-name>Standard WSAddressing Client</config-name>
     <post-handler-chain>
       <handler-chain-name>WSAddressing Handlers</handler-chain-name>

Modified: branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-endpoint-config.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-endpoint-config.xml	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxrpc-endpoint-config.xml	2007-07-04 11:33:22 UTC (rev 3797)
@@ -2,20 +2,19 @@
 
 <!-- $Id$ -->
 
-<jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0"
-               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
+<jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
   xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
   
   <endpoint-config>
     <config-name>Standard Endpoint</config-name>
   </endpoint-config>
   
-   <endpoint-config>
-      <config-name>Standard MTOM Endpoint</config-name>
-      <feature>http://org.jboss.ws/mtom</feature>
-   </endpoint-config>
-
-   <endpoint-config>
+  <endpoint-config>
+    <config-name>Standard MTOM Endpoint</config-name>
+    <feature>http://org.jboss.ws/mtom</feature>
+  </endpoint-config>
+  
+  <endpoint-config>
     <config-name>Standard WSAddressing Endpoint</config-name>
     <pre-handler-chain>
       <handler-chain-name>WSAddressing Handlers</handler-chain-name>

Modified: branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-client-config.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-client-config.xml	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-client-config.xml	2007-07-04 11:33:22 UTC (rev 3797)
@@ -3,46 +3,46 @@
 <!-- $Id$ -->
 
 <jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
-              xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
-
-   <client-config>
-      <config-name>Standard Client</config-name>
-      <feature>http://org.jboss.ws/dispatch/validate</feature>
-      <property>
-         <property-name>http://org.jboss.ws/http#chunksize</property-name>
-         <property-value>2048</property-value>
-      </property>
-   </client-config>
-
-   <client-config>
-      <config-name>HTTP 1.0 Client</config-name>
-      <feature>http://org.jboss.ws/dispatch/validate</feature>      
-   </client-config>
-
-   <client-config>
-      <config-name>Standard WSAddressing Client</config-name>
-      <post-handler-chains>
-         <javaee:handler-chain>
-            <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
-            <javaee:handler>
-               <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
-               <javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
-            </javaee:handler>
-         </javaee:handler-chain>
-      </post-handler-chains>
-   </client-config>
-
-   <client-config>
-      <config-name>Standard WSSecurity Client</config-name>
-      <post-handler-chains>
-         <javaee:handler-chain>
-            <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
-            <javaee:handler>
-               <javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
-               <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
-            </javaee:handler>
-         </javaee:handler-chain>
-      </post-handler-chains>
-   </client-config>
-
+  xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+  
+  <client-config>
+    <config-name>Standard Client</config-name>
+    <feature>http://org.jboss.ws/dispatch/validate</feature>
+    <property>
+      <property-name>http://org.jboss.ws/http#chunksize</property-name>
+      <property-value>2048</property-value>
+    </property>
+  </client-config>
+  
+  <client-config>
+    <config-name>HTTP 1.0 Client</config-name>
+    <feature>http://org.jboss.ws/dispatch/validate</feature>
+  </client-config>
+  
+  <client-config>
+    <config-name>Standard WSAddressing Client</config-name>
+    <post-handler-chains>
+      <javaee:handler-chain>
+        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+        <javaee:handler>
+          <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+          <javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler</javaee:handler-class>
+        </javaee:handler>
+      </javaee:handler-chain>
+    </post-handler-chains>
+  </client-config>
+  
+  <client-config>
+    <config-name>Standard WSSecurity Client</config-name>
+    <post-handler-chains>
+      <javaee:handler-chain>
+        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+        <javaee:handler>
+          <javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
+          <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
+        </javaee:handler>
+      </javaee:handler-chain>
+    </post-handler-chains>
+  </client-config>
+  
 </jaxws-config>

Modified: branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/main/resources/standard-config/standard-jaxws-endpoint-config.xml	2007-07-04 11:33:22 UTC (rev 3797)
@@ -3,36 +3,45 @@
 <!-- $Id$ -->
 
 <jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
-              xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
-
-   <endpoint-config>
-      <config-name>Standard Endpoint</config-name>
-   </endpoint-config>
-
-   <endpoint-config>
-      <config-name>Standard WSAddressing Endpoint</config-name>
-      <post-handler-chains>
-         <javaee:handler-chain>
-            <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
-            <javaee:handler>
-               <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
-               <javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</javaee:handler-class>
-            </javaee:handler>
-         </javaee:handler-chain>
-      </post-handler-chains>
-   </endpoint-config>
-
-   <endpoint-config>
-      <config-name>Standard WSSecurity Endpoint</config-name>
-      <post-handler-chains>
-         <javaee:handler-chain>
-            <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
-            <javaee:handler>
-               <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
-               <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</javaee:handler-class>
-            </javaee:handler>
-         </javaee:handler-chain>
-      </post-handler-chains>
-   </endpoint-config>
-
+  xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+  
+  <endpoint-config>
+    <config-name>Standard Endpoint</config-name>
+  </endpoint-config>
+  
+  <!--
+    Generates message part names 'parameters' in WSDL for document/literal/wapped.
+    See: [JBWS-771] Use part names that are friendly to .NET
+  -->
+  <endpoint-config>
+    <config-name>.NET friendly Endpoint</config-name>
+    <feature>http://org.jboss.ws/binding/wsdl/dotnet</feature>
+  </endpoint-config>
+  
+  <endpoint-config>
+    <config-name>Standard WSAddressing Endpoint</config-name>
+    <post-handler-chains>
+      <javaee:handler-chain>
+        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+        <javaee:handler>
+          <javaee:handler-name>WSAddressing Handler</javaee:handler-name>
+          <javaee:handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</javaee:handler-class>
+        </javaee:handler>
+      </javaee:handler-chain>
+    </post-handler-chains>
+  </endpoint-config>
+  
+  <endpoint-config>
+    <config-name>Standard WSSecurity Endpoint</config-name>
+    <post-handler-chains>
+      <javaee:handler-chain>
+        <javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
+        <javaee:handler>
+          <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
+          <javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerServer</javaee:handler-class>
+        </javaee:handler>
+      </javaee:handler-chain>
+    </post-handler-chains>
+  </endpoint-config>
+  
 </jaxws-config>

Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/IWebsvcImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/IWebsvcImpl.java	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/IWebsvcImpl.java	2007-07-04 11:33:22 UTC (rev 3797)
@@ -25,16 +25,19 @@
 import javax.jws.WebParam;
 import javax.jws.WebService;
 
+import org.jboss.ws.annotation.EndpointConfig;
+
 @Stateless
 @WebService(endpointInterface = "org.jboss.test.ws.jaxws.jbws771.IWebsvc", serviceName = "JBWS771Service")
+ at EndpointConfig(configName = ".NET friendly Endpoint")
 public class IWebsvcImpl implements IWebsvc
 {
    public String submit(@WebParam(name = "foo") String foo)
    {
       return "submit-" + foo;
    }
-   
-   public String cancel(@WebParam(name = "foo") String foo, @WebParam(name = "bar", header=true) String bar)
+
+   public String cancel(@WebParam(name = "foo") String foo, @WebParam(name = "bar", header = true) String bar)
    {
       return "cancel-" + foo + bar;
    }

Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java	2007-07-04 09:09:03 UTC (rev 3796)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws771/JBWS771TestCase.java	2007-07-04 11:33:22 UTC (rev 3797)
@@ -42,6 +42,7 @@
 
 import org.jboss.wsf.spi.test.JBossWSTest;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import org.jboss.wsf.spi.tools.cmd.WSConsume;
 
 /**
  * [JBWS-771] Use part names that are friendly to .NET
@@ -85,7 +86,6 @@
       assertEquals("cancel-foobar", result);
    }
    
-   // [JBWS-771] Use part names that are friendly to .NET
    public void testMessagePartNames() throws Exception
    {
       Definition wsdl = getWSDLDefinition(wsdlURL.toExternalForm());
@@ -136,6 +136,12 @@
       assertTrue("Found soap:header", foundHeader);
    }
    
+   public void testWSConsume() throws Exception
+   {
+      System.out.println("[JBWS-1724] wsconsume cannot use part names that are friendly to .NET");
+      //WSConsume.main(new String[]{"--output=tests/wsconsume", wsdlURL.toExternalForm()});
+   }
+   
    private Definition getWSDLDefinition(String wsdlLocation) throws Exception
    {
       WSDLFactory wsdlFactory = WSDLFactory.newInstance();




More information about the jbossws-commits mailing list