JBossWS SVN: r7751 - stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools.
by jbossws-commits@lists.jboss.org
Author: david.boeren
Date: 2008-06-27 10:03:06 -0400 (Fri, 27 Jun 2008)
New Revision: 7751
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaWriter.java
Log:
JBAPP-921, fixed clean/build regression for TrivialServiceDocWrappedTestCase.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaWriter.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaWriter.java 2008-06-27 09:18:21 UTC (rev 7750)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaWriter.java 2008-06-27 14:03:06 UTC (rev 7751)
@@ -198,7 +198,7 @@
if (needToCreatePackageStructure(location, packageName))
newLoc = utils.createPackage(location.getPath(), packageName);
else newLoc = location;
- String classname = utils.chop(ToolsUtils.convertInvalidCharacters(filename), ".java");
+ String classname = ToolsUtils.convertInvalidCharacters(utils.chop(filename, ".java"));
File sei = utils.createPhysicalFile(newLoc, classname);
StringBuilder buffer = new StringBuilder();
utils.writeJbossHeader(buffer);
16 years, 6 months
JBossWS SVN: r7750 - stack/native/branches/jbossws-native-2.0.1.SP2_CP.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-06-27 05:18:21 -0400 (Fri, 27 Jun 2008)
New Revision: 7750
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
Log:
[JBPAPP-887] Upgrade to JBoss JAXR 1.2.0.SP1
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2008-06-27 09:16:33 UTC (rev 7749)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2008-06-27 09:18:21 UTC (rev 7750)
@@ -60,7 +60,7 @@
jboss-common-logging-log4j=2.0.2.GA
jboss-common-logging-spi=2.0.2.GA
jboss-ejb3=1.0.0.CR9-jboss4.0.5
-jboss-jaxr=1.2.0.GA
+jboss-jaxr=1.2.0.SP1
jboss-microcontainer=2.0.0.Beta3
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
16 years, 6 months
JBossWS SVN: r7749 - stack/native/branches/jbossws-native-2.0.1.SP2_CP.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-06-27 05:16:33 -0400 (Fri, 27 Jun 2008)
New Revision: 7749
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
Log:
[JBPAPP-843] Upgrade JBossXB
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2008-06-27 08:05:54 UTC (rev 7748)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2008-06-27 09:16:33 UTC (rev 7749)
@@ -35,7 +35,7 @@
jboss-remoting-jboss50=2.2.2.SP1
# JBossAS-4.2
-jboss-jbossxb-jboss42=1.0.0.SP1
+jboss-jbossxb-jboss42=1.0.0.SP3
jboss-remoting-jboss42=2.2.2.SP1
# JBossAS-4.0
16 years, 6 months
JBossWS SVN: r7748 - container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-06-27 04:05:54 -0400 (Fri, 27 Jun 2008)
New Revision: 7748
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java
Log:
[JBWS-2240] Workaround to get port-component data
Modified: container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java
===================================================================
--- container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java 2008-06-27 06:34:48 UTC (rev 7747)
+++ container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceDeployerEJB.java 2008-06-27 08:05:54 UTC (rev 7748)
@@ -27,9 +27,13 @@
import org.jboss.ejb.deployers.MergedJBossMetaDataDeployer;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.javaee.spec.PortComponent;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.j2ee.PortComponentMD;
+import org.jboss.wsf.spi.metadata.j2ee.PortComponentSpec;
import org.jboss.logging.Logger;
import java.lang.annotation.Annotation;
@@ -136,6 +140,23 @@
{
result = (T)bean.getAnnotation(annotation);
}
+
+ //[JBWS-2240] Workaround to have the port-component data available;
+ //TODO: info coming from the descriptor still need to be handled properly
+ if (PortComponentSpec.class.equals(annotation) && ejbMetaData instanceof JBossSessionBeanMetaData)
+ {
+ PortComponent pc = ((JBossSessionBeanMetaData)ejbMetaData).getPortComponent();
+ if (pc != null)
+ {
+ PortComponentMD pcMetaData = new PortComponentMD();
+ pcMetaData.setAuthMethod(pc.getAuthMethod());
+ pcMetaData.setPortComponentName(pc.getPortComponentName());
+ pcMetaData.setPortComponentURI(pc.getPortComponentURI());
+ pcMetaData.setSecureWSDLAccess(pc.getSecureWSDLAccess());
+ pcMetaData.setTransportGuarantee(pc.getTransportGuarantee());
+ result = (T)pcMetaData;
+ }
+ }
return result;
}
16 years, 6 months
JBossWS SVN: r7747 - container/jboss50/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-06-27 02:34:48 -0400 (Fri, 27 Jun 2008)
New Revision: 7747
Modified:
container/jboss50/trunk/pom.xml
Log:
Adding required jboss-as-system-jmx dependency
Modified: container/jboss50/trunk/pom.xml
===================================================================
--- container/jboss50/trunk/pom.xml 2008-06-26 22:02:04 UTC (rev 7746)
+++ container/jboss50/trunk/pom.xml 2008-06-27 06:34:48 UTC (rev 7747)
@@ -86,6 +86,11 @@
<version>${jboss.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <version>${jboss.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata</artifactId>
<version>${jboss.metadata.version}</version>
@@ -150,6 +155,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.deployers</groupId>
<artifactId>jboss-deployers-structure-spi</artifactId>
<scope>provided</scope>
16 years, 6 months
JBossWS SVN: r7746 - in stack/native/trunk/modules: core/src/main/java/org/jboss/ws/tools/client and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: david.boeren
Date: 2008-06-26 18:02:04 -0400 (Thu, 26 Jun 2008)
New Revision: 7746
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/ValidationEvent_test.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/test.wsdl
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/wstools-config.xml
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
Log:
Fix for JBPAPP-921, this time it doesn't break the tests and contains a new test case for the fix.
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java 2008-06-26 21:48:53 UTC (rev 7745)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java 2008-06-26 22:02:04 UTC (rev 7746)
@@ -198,7 +198,7 @@
if (needToCreatePackageStructure(location, packageName))
newLoc = utils.createPackage(location.getPath(), packageName);
else newLoc = location;
- String classname = utils.chop(filename, ".java");
+ String classname = utils.chop(ToolsUtils.convertInvalidCharacters(filename), ".java");
File sei = utils.createPhysicalFile(newLoc, classname);
StringBuilder buffer = new StringBuilder();
utils.writeJbossHeader(buffer);
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2008-06-26 21:48:53 UTC (rev 7745)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2008-06-26 22:02:04 UTC (rev 7746)
@@ -205,7 +205,7 @@
if (namespacePackageMap == null)
namespacePackageMap = new HashMap<String, String>();
String pkg = iter.next();
- namespacePackageMap.put(pkg, map.get(pkg));
+ namespacePackageMap.put(map.get(pkg), pkg);
}
}
@@ -326,6 +326,7 @@
JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
QName faultXMLName = intfFault.getElement();
QName faultXMLType = intfFault.getXmlType();
+
XSElementDeclaration xe = xsmodel.getElementDeclaration(faultXMLName.getLocalPart(), faultXMLName.getNamespaceURI());
XSTypeDefinition xt = xe.getTypeDefinition();
if (!xt.getAnonymous())
@@ -337,8 +338,7 @@
if (cl == null)
{
String faultTypeName = (!xt.getAnonymous()) ? faultXMLType.getLocalPart() : faultXMLName.getLocalPart();
- String packageName = getPackageName(xt.getNamespace());
- buf.append(packageName + "." + JavaUtils.capitalize(faultTypeName));
+ buf.append(seiPkgName + "." + JavaUtils.capitalize(faultTypeName));
}
else buf.append(cl.getName());
buf.append(",");
@@ -534,6 +534,7 @@
if (unwrappedElement)
{
buf.append(tempBuf);
+
// We need a wrapper class generated
generateJavaSource(wrapper, WSDLUtils.getSchemaModel(wsdl.getWsdlTypes()), containingElement);
@@ -638,12 +639,11 @@
className = className.substring(1);
className = ToolsUtils.convertInvalidCharacters(className);
className = utils.firstLetterUpperCase(className);
+ className = seiPkgName + "." + className + arraySuffix;
- String packageName = getPackageName(xt.getNamespace());
- className = packageName + "." + className + arraySuffix;
if (holder)
{
- className = holderWriter.getOrCreateHolder(className, getLocationForJavaGeneration(packageName));
+ className = holderWriter.getOrCreateHolder(className, getLocationForJavaGeneration());
}
buf.append(className);
@@ -655,7 +655,7 @@
private void createSEIFile(WSDLInterface intf, File loc) throws IOException
{
- String seiName = getServiceEndpointInterfaceName(intf);
+ String seiName = ToolsUtils.convertInvalidCharacters(getServiceEndpointInterfaceName(intf));
StringBuilder buf = new StringBuilder();
utils.writeJbossHeader(buf);
@@ -762,8 +762,7 @@
className = className.substring(1);
className = ToolsUtils.convertInvalidCharacters(className);
className = utils.firstLetterUpperCase(className);
- String packageName = getPackageName(xt.getNamespace());
- return packageName + "." + className + arraySuffix;
+ return seiPkgName + "." + className + arraySuffix;
}
if (cls.isArray())
@@ -807,9 +806,9 @@
return paramName;
}
- private File getLocationForJavaGeneration(String packageName)
+ private File getLocationForJavaGeneration()
{
- return new File(this.directoryToGenerate + "/" + packageName.replace('.', '/'));
+ return new File(this.directoryToGenerate + "/" + seiPkgName.replace(".", "/"));
}
private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement) throws IOException
@@ -819,16 +818,10 @@
private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement, boolean exception) throws IOException
{
- XSDTypeToJava xtj = new XSDTypeToJava(namespacePackageMap, generateSerializableTypes);
+ XSDTypeToJava xtj = new XSDTypeToJava(generateSerializableTypes);
+
xtj.setTypeMapping(this.typeMapping);
- String targetNS = wsdl.getTargetNamespace();
- String tgtNS = xt.getNamespace();
- String packName = getPackageName(tgtNS);
- if(!tgtNS.equals(targetNS))
- {
- File dir = utils.createPackage(this.directoryToGenerate, packName);
- }
- xtj.createJavaFile((XSComplexTypeDefinition)xt, containingElement, this.directoryToGenerate, packName, xsmodel, exception);
+ xtj.createJavaFile((XSComplexTypeDefinition)xt, containingElement, getLocationForJavaGeneration(), seiPkgName, xsmodel, exception);
}
public void setParameterStyle(String paramStyle)
@@ -836,19 +829,4 @@
this.parameterStyle = paramStyle;
}
- private String getPackageName(String targetNamespace)
- {
- //Get it from global config
- if (namespacePackageMap != null)
- {
- String pkg = namespacePackageMap.get(targetNamespace);
- if (pkg != null)
- {
- return pkg;
- }
- }
- //return NamespacePackageMapping.getJavaPackageName(targetNamespace);
- //Default behaviour will always generate all classes in the SEI package only
- return seiPkgName;
- }
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2008-06-26 21:48:53 UTC (rev 7745)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2008-06-26 22:02:04 UTC (rev 7746)
@@ -33,6 +33,7 @@
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.tools.ToolsUtils;
import org.jboss.ws.tools.interfaces.ServiceCreatorIntf;
import org.jboss.wsf.common.JavaUtils;
@@ -214,6 +215,7 @@
if (wsdl.getInterface(new QName(wsdl.getTargetNamespace(), serviceName)) != null)
serviceName = new StringBuilder(serviceName).insert(serviceName.lastIndexOf("Service"), '_').toString();
+ serviceName = ToolsUtils.convertInvalidCharacters(serviceName);
serviceName = JavaUtils.capitalize(serviceName);
StringBuilder buf = new StringBuilder();
@@ -239,13 +241,27 @@
writer.close();
}
+ public static String removeHyphens(final String component)
+ {
+ String result = component;
+ for (int i = 0; i < result.length(); i++)
+ {
+ if (result.charAt(i) == '-')
+ {
+ result = result.replace(result.charAt(i), '_');
+ }
+ }
+
+ return result;
+ }
+
private String generateServiceMethodForWSDLEndpoint(WSDLEndpoint endpt)
{
StringBuilder buf = new StringBuilder(" public ");
QName bindName = endpt.getBinding();
WSDLBinding wbind = wsdl.getBinding(bindName);
- buf.append(getReturnType(wbind)).append(" get");
+ buf.append(removeHyphens(getReturnType(wbind))).append(" get");
buf.append(endpt.getName().getLocalPart()).append("()").append(" throws ServiceException;").append(newLine(1));
return buf.toString();
}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java 2008-06-26 22:02:04 UTC (rev 7746)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.test.ws.tools.jbpapp921;
+
+import java.io.File;
+
+import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
+import org.jboss.ws.tools.WSTools;
+import org.jboss.wsf.test.JBossWSTest;
+
+public class JBPAPP921TestCase extends JBossWSTest
+{
+
+ private static final String resourceDir = "resources/tools/jbpapp921";
+ private static final String toolsDir = "tools/jbpapp921";
+
+ public void testGenerate() throws Exception
+ {
+ String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
+ new WSTools().generate(args);
+ compareSource("Models_ServiceIM_ServiceProxyService.java");
+ compareSource("ValidationEvent_test.java");
+ }
+
+ private static void compareSource(final String fileName) throws Exception
+ {
+ File expected = new File(resourceDir + "/" + fileName);
+ File generated = new File(toolsDir + "/org/jboss/test/ws/jbpapp921/" + fileName);
+
+ JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
+ sc.validate();
+ sc.validateImports();
+ }
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java 2008-06-26 22:02:04 UTC (rev 7746)
@@ -0,0 +1,19 @@
+/*
+* JBoss, the OpenSource EJB server
+* Distributable under LGPL license. See terms of license at gnu.org.
+*/
+
+//Auto Generated by jbossws - Please do not edit!!!
+
+package org.jboss.test.ws.jbpapp921;
+
+
+import javax.xml.rpc.*;
+
+
+public interface Models_ServiceIM_ServiceProxyService extends javax.xml.rpc.Service
+{
+
+ public org.jboss.test.ws.jbpapp921.ValidationEvent_test getvalidationEventPort() throws ServiceException;
+
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/ValidationEvent_test.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/ValidationEvent_test.java (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/ValidationEvent_test.java 2008-06-26 22:02:04 UTC (rev 7746)
@@ -0,0 +1,15 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Thu Jun 26 14:46:54 EDT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+package org.jboss.test.ws.jbpapp921;
+public interface ValidationEvent_test extends java.rmi.Remote
+{
+
+ public int validateClaim(java.lang.String lifecycleId, java.lang.String claim) throws java.rmi.RemoteException;
+}
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/test.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/test.wsdl (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/test.wsdl 2008-06-26 22:02:04 UTC (rev 7746)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="models_ServiceIM_ServiceProxy"
+ targetNamespace="http://org.jboss.test.ws.jbpapp921"
+ xmlns:tns="http://org.jboss.test.ws.jbpapp921"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ </types>
+ <message name="ValidationEvent_validateClaim">
+ <part name="lifecycleId" type="xsd:string" />
+ <part name="claim" type="xsd:string" />
+ </message>
+ <message name="ValidationEvent_validateClaimResponse">
+ <part name="result" type="xsd:int" />
+ </message>
+ <portType name="validationEvent-test">
+ <operation name="validateClaim"
+ parameterOrder="lifecycleId claim">
+ <input message="tns:ValidationEvent_validateClaim" />
+ <output message="tns:ValidationEvent_validateClaimResponse" />
+ </operation>
+ </portType>
+ <binding name="validationEventBinding"
+ type="tns:validationEvent-test">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="validateClaim">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal"
+ namespace="http://org.jboss.test.ws.jbpapp921" />
+ </input>
+ <output>
+ <soap:body use="literal"
+ namespace="http://org.jboss.test.ws.jbpapp921" />
+ </output>
+ </operation>
+ </binding>
+ <service name="models_ServiceIM_ServiceProxy">
+ <port name="validationEventPort"
+ binding="tns:validationEventBinding">
+ <soap:address
+ location="http://localhost:8080/BusinessProcessModeling-ejb/BusinessProcessModeling..." />
+ </port>
+ </service>
+</definitions>
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/wstools-config.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/wstools-config.xml (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbpapp921/wstools-config.xml 2008-06-26 22:02:04 UTC (rev 7746)
@@ -0,0 +1,4 @@
+<configuration>
+ <wsdl-java location="resources/tools/jbpapp921/test.wsdl">
+ </wsdl-java>
+</configuration>
\ No newline at end of file
16 years, 6 months
JBossWS SVN: r7745 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP/src: main/java/org/jboss/ws/tools/client and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: david.boeren
Date: 2008-06-26 17:48:53 -0400 (Thu, 26 Jun 2008)
New Revision: 7745
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/tools/jbpapp921/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/test-excludes-jboss422.txt
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/ValidationEvent_test.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/test.wsdl
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/wstools-config.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/WSDLToJava.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
Log:
Fix for JBPAPP-921, this time it doesn't break the tests and contains a new test case for the fix.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2008-06-26 16:39:48 UTC (rev 7744)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2008-06-26 21:48:53 UTC (rev 7745)
@@ -309,8 +309,8 @@
if (returnType == null)
returnType = "void";
- buf.append(" public " + ToolsUtils.convertInvalidCharacters(returnType) + " ");
- buf.append(ToolsUtils.convertInvalidCharacters(ToolsUtils.firstLetterLowerCase(op.getName().getLocalPart())));
+ buf.append(" public " + returnType + " ");
+ buf.append(ToolsUtils.firstLetterLowerCase(op.getName().getLocalPart()));
buf.append("(").append(paramBuffer);
buf.append(") throws ");
@@ -646,7 +646,7 @@
className = holderWriter.getOrCreateHolder(className, getLocationForJavaGeneration());
}
- buf.append(ToolsUtils.convertInvalidCharacters(className));
+ buf.append(className);
if (xt instanceof XSComplexTypeDefinition)
generateJavaSource((XSComplexTypeDefinition)xt, xsmodel, containingElement);
@@ -655,16 +655,16 @@
private void createSEIFile(WSDLInterface intf, File loc) throws IOException
{
- String seiName = getServiceEndpointInterfaceName(intf);
+ String seiName = ToolsUtils.convertInvalidCharacters(getServiceEndpointInterfaceName(intf));
StringBuilder buf = new StringBuilder();
utils.writeJbossHeader(buf);
- buf.append("package " + ToolsUtils.convertInvalidCharacters(seiPkgName) + ";" + newline);
- buf.append("public interface " + ToolsUtils.convertInvalidCharacters(seiName) + " extends java.rmi.Remote" + newline + "{" + newline);
+ buf.append("package " + seiPkgName + ";" + newline);
+ buf.append("public interface " + seiName + " extends java.rmi.Remote" + newline + "{" + newline);
appendMethods(intf, buf);
buf.append("}" + newline);
- File sei = utils.createPhysicalFile(loc, ToolsUtils.convertInvalidCharacters(seiName));
+ File sei = utils.createPhysicalFile(loc, seiName);
FileWriter writer = new FileWriter(sei);
writer.write(buf.toString());
writer.flush();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2008-06-26 16:39:48 UTC (rev 7744)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2008-06-26 21:48:53 UTC (rev 7745)
@@ -215,6 +215,7 @@
if (wsdl.getInterface(new QName(wsdl.getTargetNamespace(), serviceName)) != null)
serviceName = new StringBuilder(serviceName).insert(serviceName.lastIndexOf("Service"), '_').toString();
+ serviceName = ToolsUtils.convertInvalidCharacters(serviceName);
serviceName = JavaUtils.capitalize(serviceName);
StringBuilder buf = new StringBuilder();
@@ -240,12 +241,12 @@
writer.close();
}
- public static String convertInvalidCharacters(final String component)
+ public static String removeHyphens(final String component)
{
String result = component;
for (int i = 0; i < result.length(); i++)
{
- if (Character.isJavaIdentifierPart(result.charAt(i)) == false)
+ if (result.charAt(i) == '-')
{
result = result.replace(result.charAt(i), '_');
}
@@ -260,7 +261,7 @@
QName bindName = endpt.getBinding();
WSDLBinding wbind = wsdl.getBinding(bindName);
- buf.append(ToolsUtils.convertInvalidCharacters(getReturnType(wbind))).append(" get");
+ buf.append(removeHyphens(getReturnType(wbind))).append(" get");
buf.append(endpt.getName().getLocalPart()).append("()").append(" throws ServiceException;").append(newLine(1));
return buf.toString();
}
Added: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/tools/jbpapp921/JBPAPP921TestCase.java 2008-06-26 21:48:53 UTC (rev 7745)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.test.ws.tools.jbpapp921;
+
+import java.io.File;
+
+import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
+import org.jboss.ws.tools.WSTools;
+import org.jboss.wsf.test.JBossWSTest;
+
+public class JBPAPP921TestCase extends JBossWSTest
+{
+
+ private static final String resourceDir = "resources/tools/jbpapp921";
+ private static final String toolsDir = "tools/jbpapp921";
+
+ public void testGenerate() throws Exception
+ {
+ String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
+ new WSTools().generate(args);
+ compareSource("Models_ServiceIM_ServiceProxyService.java");
+ compareSource("ValidationEvent_test.java");
+ }
+
+ private static void compareSource(final String fileName) throws Exception
+ {
+ File expected = new File(resourceDir + "/" + fileName);
+ File generated = new File(toolsDir + "/org/jboss/test/ws/jbpapp921/" + fileName);
+
+ JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
+ sc.validate();
+ sc.validateImports();
+ }
+}
Added: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/test-excludes-jboss422.txt
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/test-excludes-jboss422.txt (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/test-excludes-jboss422.txt 2008-06-26 21:48:53 UTC (rev 7745)
@@ -0,0 +1,3 @@
+# EJB3/Injection excludes
+org/jboss/test/ws/jaxws/samples/webserviceref/**
+org/jboss/test/ws/jaxws/webserviceref/**
Added: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/Models_ServiceIM_ServiceProxyService.java 2008-06-26 21:48:53 UTC (rev 7745)
@@ -0,0 +1,19 @@
+/*
+* JBoss, the OpenSource EJB server
+* Distributable under LGPL license. See terms of license at gnu.org.
+*/
+
+//Auto Generated by jbossws - Please do not edit!!!
+
+package org.jboss.test.ws.jbpapp921;
+
+
+import javax.xml.rpc.*;
+
+
+public interface Models_ServiceIM_ServiceProxyService extends javax.xml.rpc.Service
+{
+
+ public org.jboss.test.ws.jbpapp921.ValidationEvent_test getvalidationEventPort() throws ServiceException;
+
+}
Added: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/ValidationEvent_test.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/ValidationEvent_test.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/ValidationEvent_test.java 2008-06-26 21:48:53 UTC (rev 7745)
@@ -0,0 +1,15 @@
+/*
+ * JBossWS WS-Tools Generated Source
+ *
+ * Generation Date: Thu Jun 26 14:46:54 EDT 2008
+ *
+ * This generated source code represents a derivative work of the input to
+ * the generator that produced it. Consult the input for the copyright and
+ * terms of use that apply to this source code.
+ */
+package org.jboss.test.ws.jbpapp921;
+public interface ValidationEvent_test extends java.rmi.Remote
+{
+
+ public int validateClaim(java.lang.String lifecycleId, java.lang.String claim) throws java.rmi.RemoteException;
+}
Added: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/test.wsdl
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/test.wsdl (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/test.wsdl 2008-06-26 21:48:53 UTC (rev 7745)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="models_ServiceIM_ServiceProxy"
+ targetNamespace="http://org.jboss.test.ws.jbpapp921"
+ xmlns:tns="http://org.jboss.test.ws.jbpapp921"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ </types>
+ <message name="ValidationEvent_validateClaim">
+ <part name="lifecycleId" type="xsd:string" />
+ <part name="claim" type="xsd:string" />
+ </message>
+ <message name="ValidationEvent_validateClaimResponse">
+ <part name="result" type="xsd:int" />
+ </message>
+ <portType name="validationEvent-test">
+ <operation name="validateClaim"
+ parameterOrder="lifecycleId claim">
+ <input message="tns:ValidationEvent_validateClaim" />
+ <output message="tns:ValidationEvent_validateClaimResponse" />
+ </operation>
+ </portType>
+ <binding name="validationEventBinding"
+ type="tns:validationEvent-test">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="validateClaim">
+ <soap:operation soapAction="" />
+ <input>
+ <soap:body use="literal"
+ namespace="http://org.jboss.test.ws.jbpapp921" />
+ </input>
+ <output>
+ <soap:body use="literal"
+ namespace="http://org.jboss.test.ws.jbpapp921" />
+ </output>
+ </operation>
+ </binding>
+ <service name="models_ServiceIM_ServiceProxy">
+ <port name="validationEventPort"
+ binding="tns:validationEventBinding">
+ <soap:address
+ location="http://localhost:8080/BusinessProcessModeling-ejb/BusinessProcessModeling..." />
+ </port>
+ </service>
+</definitions>
Added: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/wstools-config.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/wstools-config.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/tools/jbpapp921/wstools-config.xml 2008-06-26 21:48:53 UTC (rev 7745)
@@ -0,0 +1,4 @@
+<configuration>
+ <wsdl-java location="resources/tools/jbpapp921/test.wsdl">
+ </wsdl-java>
+</configuration>
\ No newline at end of file
16 years, 6 months
JBossWS SVN: r7744 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src: test/java/org/jboss/test/ws/jaxws/xop and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-06-26 12:39:48 -0400 (Thu, 26 Jun 2008)
New Revision: 7744
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/main/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/test/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java
Log:
[JBPAPP-929] Attachment support for JAX-WS collections.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/main/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/main/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java 2008-06-26 16:37:32 UTC (rev 7743)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/main/java/org/jboss/ws/extensions/xop/jaxws/ReflectiveAttachmentRefScanner.java 2008-06-26 16:39:48 UTC (rev 7744)
@@ -30,6 +30,8 @@
import java.awt.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.List;
@@ -82,7 +84,9 @@
Class<?> type = field.getType();
boolean exceptionToTheRule = isAttachmentDataType(type);
-
+ if (! exceptionToTheRule) {
+ type = getFieldComponentType(field);
+ }
// only non JDK types are inspected except for byte[] and java.lang.String
if( !alreadyScanned(field) && (exceptionToTheRule || !isJDKType(type)) )
{
@@ -218,6 +222,31 @@
scannedFields.clear();
}
+ /**
+ * In the case of an array T[] or a List<T> returns T, else returns the field type
+ *
+ * @param clazz
+ * @return the type of the field, if the field is an array returns the component type,
+ * if the field is declared as List<T> returns T
+ */
+ private Class<?> getFieldComponentType(Field field) {
+ Class<?> fieldType = field.getType();
+ if (fieldType.isArray()) {
+ return fieldType.getComponentType();
+ } else if (List.class.isAssignableFrom(fieldType)) {
+ if (field.getGenericType() instanceof ParameterizedType) {
+ ParameterizedType paramType = (ParameterizedType) field.getGenericType();
+ if ((paramType.getRawType() instanceof Class) && List.class.isAssignableFrom((Class<?>) paramType.getRawType())) {
+ Type[] actualTypes = paramType.getActualTypeArguments();
+ if (actualTypes.length == 1 && (actualTypes[0] instanceof Class)) {
+ return (Class<?>) actualTypes[0];
+ }
+ }
+ }
+ }
+ return fieldType;
+ }
+
private static boolean isAttachmentDataType(Class clazz) {
for(Class cl : SUPPORTED_TYPES)
{
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/test/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/test/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java 2008-06-26 16:37:32 UTC (rev 7743)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/src/test/java/org/jboss/test/ws/jaxws/xop/MimeDeclarationTestCase.java 2008-06-26 16:39:48 UTC (rev 7744)
@@ -29,8 +29,10 @@
import org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult;
import javax.xml.bind.annotation.XmlMimeType;
-import java.awt.*;
+
+import java.awt.Image;
import java.lang.reflect.Method;
+import java.util.List;
/**
* Test the ReflectiveXOPScanner.
@@ -107,6 +109,20 @@
assertFalse("MTOM should be disabled", XOPContext.isMTOMEnabled());
}
+ public void testNestedArray() throws Exception
+ {
+ AttachmentScanResult mimeType = SCANNER.scanBean(NestedArray.class);
+ assertNotNull("Unable to find xop declaration", mimeType);
+ assertEquals("text/plain", mimeType.getMimeType());
+ }
+
+ public void testNestedList() throws Exception
+ {
+ AttachmentScanResult mimeType = SCANNER.scanBean(NestedList.class);
+ assertNotNull("Unable to find xop declaration", mimeType);
+ assertEquals("text/plain", mimeType.getMimeType());
+ }
+
class FieldAnnotation
{
@XmlMimeType("text/xml")
@@ -157,4 +173,12 @@
@XmlMimeType("text/plain")
String data;
}
+
+ class NestedArray {
+ Nested[] nested;
+ }
+
+ class NestedList {
+ List<Nested> nested;
+ }
}
16 years, 6 months
JBossWS SVN: r7743 - stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-06-26 12:37:32 -0400 (Thu, 26 Jun 2008)
New Revision: 7743
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/version.properties
Log:
[JBPAPP-929] Set version.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/version.properties 2008-06-26 16:25:05 UTC (rev 7742)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/version.properties 2008-06-26 16:37:32 UTC (rev 7743)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=2.0.1.SP2_CP01
-repository.id=2.0.1.SP2_CP01
+version.id=2.0.1.SP2_CP01_JBPAPP-929
+repository.id=2.0.1.SP2_CP01_JBPAPP-929
implementation.title=JBoss Web Services - Native
implementation.url=http://www.jboss.org/products/jbossws
16 years, 6 months
JBossWS SVN: r7742 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-06-26 12:25:05 -0400 (Thu, 26 Jun 2008)
New Revision: 7742
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929/
Log:
[JBPAPP-929] Branch.
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP01_JBPAPP-929 (from rev 7741, stack/native/tags/jbossws-native-2.0.1.SP2_CP01)
16 years, 6 months