JBossWS SVN: r16136 - in stack/native/branches/jbossws-native-4.0.x: modules/core/src/main/resources/META-INF/services and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 05:14:26 -0400 (Tue, 10 Apr 2012)
New Revision: 16136
Removed:
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory
stack/native/branches/jbossws-native-4.0.x/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider
stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory
stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
Log:
[JBPAPP-8667] Merged revisions 16078 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16078 | ropalka | 2012-04-02 14:03:54 +0200 (Mon, 02 Apr 2012) | 1 line
[JBWS-3474] trim down jbossws-common-tools dependencies
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16065,16073-16077
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16065,16073-16078
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory 2012-04-10 09:07:27 UTC (rev 16135)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ConsumerFactory 2012-04-10 09:14:26 UTC (rev 16136)
@@ -1 +0,0 @@
-org.jboss.ws.tools.jaxws.impl.SunRIConsumerFactoryImpl
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory 2012-04-10 09:07:27 UTC (rev 16135)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/META-INF/services/org.jboss.ws.api.tools.ProviderFactory 2012-04-10 09:14:26 UTC (rev 16136)
@@ -1 +0,0 @@
-org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider 2012-04-10 09:07:27 UTC (rev 16135)
+++ stack/native/branches/jbossws-native-4.0.x/modules/endorsed/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider 2012-04-10 09:14:26 UTC (rev 16136)
@@ -1 +0,0 @@
-org.jboss.ws.core.jaxws.spi.ProviderImpl
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-10 09:07:27 UTC (rev 16135)
+++ stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-10 09:14:26 UTC (rev 16136)
@@ -95,11 +95,6 @@
<include name="**/jbossws-common.jar"/>
</fileset>
</copy>
- <copy todir="@{targetdir}/org/jboss/ws/tools/common/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/jbossws-common-tools.jar"/>
- </fileset>
- </copy>
<copy todir="@{targetdir}/org/jboss/ws/spi/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-spi.jar"/>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory 2012-04-10 09:07:27 UTC (rev 16135)
+++ stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.ws.api.addressing.MAPBuilderFactory 2012-04-10 09:14:26 UTC (rev 16136)
@@ -1 +0,0 @@
-org.jboss.ws.extensions.addressing.map.NativeMAPBuilderFactory
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator 2012-04-10 09:07:27 UTC (rev 16135)
+++ stack/native/branches/jbossws-native-4.0.x/modules/services/src/main/resources/META-INF/services/org.jboss.wsf.spi.DeploymentAspectManagerLocator 2012-04-10 09:14:26 UTC (rev 16136)
@@ -1 +0,0 @@
-org.jboss.ws.common.DeploymentAspectManagerLocatorImpl
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 09:07:27 UTC (rev 16135)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 09:14:26 UTC (rev 16136)
@@ -48,10 +48,6 @@
</dependency>
<dependency>
<groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-common-tools</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.ws</groupId>
<artifactId>jbossws-shared-testsuite</artifactId>
</dependency>
<dependency>
12 years, 1 month
JBossWS SVN: r16135 - in stack/native/branches/jbossws-native-4.0.x: modules/core/src/main/java/org/jboss/ws/core/binding and 23 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 05:07:27 -0400 (Tue, 10 Apr 2012)
New Revision: 16135
Removed:
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/server/netty/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/Configuration.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HeaderUtil.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HolderWriter.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaKeywords.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/NamespacePackageMapping.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/RPCSignature.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/ToolsUtils.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSTools.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSToolsConstants.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WebservicesXMLCreatorImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XMLNameUtil.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDToJava.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/ant/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/client/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/config/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/exceptions/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/factories/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReturnTypeUnwrapper.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/SecurityActions.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WebservicesXMLCreator.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/jaxws/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/mapping/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/metadata/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wstools.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/jbossxb/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/wsdl11/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/common/jbossxb/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/common/wsdl11/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxrpc/samples/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/tools/
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
Log:
[JBPAPP-8668] Merged revisions 16073,16077 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16073 | ropalka | 2012-03-30 15:38:48 +0200 (Fri, 30 Mar 2012) | 1 line
[JBWS-3474] removing tools, their tests & jaxws tests
.......
r16077 | ropalka | 2012-04-02 13:30:27 +0200 (Mon, 02 Apr 2012) | 1 line
[JBWS-3474] trim down jbossws-api dependencies
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16065
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16065,16073-16077
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.core.binding;
-
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-
-/**
- * A Deserializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class ComplexTypeDeserializer extends DeserializerSupport
-{
-
- protected BindingCustomization getBindingCustomization()
- {
- BindingCustomization bindingCustomization = null;
- EndpointMetaData epMetaData = MessageContextAssociation.peekMessageContext().getEndpointMetaData();
- if(epMetaData instanceof ServerEndpointMetaData)
- {
- bindingCustomization = ((ServerEndpointMetaData)epMetaData).getEndpoint().getAttachment(BindingCustomization.class);
- }
- return bindingCustomization;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.core.binding;
-
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-
-/**
- * A Serializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class ComplexTypeSerializer extends SerializerSupport
-{
- protected BindingCustomization getBindingCustomization()
- {
- BindingCustomization bindingCustomization = null;
- EndpointMetaData epMetaData = MessageContextAssociation.peekMessageContext().getEndpointMetaData();
- if(epMetaData instanceof ServerEndpointMetaData)
- {
- bindingCustomization = ((ServerEndpointMetaData)epMetaData).getEndpoint().getAttachment(BindingCustomization.class);
- }
- return bindingCustomization;
- }
-}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -29,7 +29,7 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.ComplexTypeDeserializer;
+import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
@@ -43,7 +43,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JBossXBDeserializer extends ComplexTypeDeserializer
+public class JBossXBDeserializer extends DeserializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JBossXBDeserializer.class);
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -25,18 +25,16 @@
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.ComplexTypeSerializer;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshaller;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.soap.XMLFragment;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.util.xml.BufferedStreamResult;
import org.w3c.dom.NamedNodeMap;
@@ -47,7 +45,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JBossXBSerializer extends ComplexTypeSerializer
+public class JBossXBSerializer extends SerializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JBossXBSerializer.class);
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/CustomizableJAXBContextFactory.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -21,9 +21,6 @@
*/
package org.jboss.ws.core.jaxws;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.util.Collection;
import java.util.ResourceBundle;
@@ -32,15 +29,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.EndpointAssociation;
import com.sun.xml.bind.api.JAXBRIContext;
import com.sun.xml.bind.api.TypeReference;
-import com.sun.xml.bind.v2.model.annotation.RuntimeAnnotationReader;
/**
* The default factory checks if a {@link JAXBBindingCustomization} exists
@@ -73,14 +65,9 @@
{
try
{
- BindingCustomization bcust = getCustomization();
+ JAXBContext jaxbCtx = JAXBContext.newInstance(clazzes);
+ jaxbCtx = createContext(clazzes);
- JAXBContext jaxbCtx;
- if (null == bcust)
- jaxbCtx = JAXBContext.newInstance(clazzes);
- else
- jaxbCtx = createContext(clazzes, bcust);
-
incrementContextCount();
return jaxbCtx;
}
@@ -90,73 +77,12 @@
}
}
- public JAXBContext createContext(final Class[] clazzes, final BindingCustomization bcust) throws WSException
+ public JAXBRIContext createContext(Class[] classes, Collection<TypeReference> refs, String defaultNS, boolean c14n)
{
- JAXBContext jaxbCtx = null;
try
{
- jaxbCtx = AccessController.doPrivileged(new PrivilegedExceptionAction<JAXBContext>() {
- public JAXBContext run() throws PrivilegedActionException
- {
- try
- {
- return JAXBContext.newInstance(clazzes, bcust);
- }
- catch (JAXBException e)
- {
- throw new PrivilegedActionException(e);
- }
- }
- });
+ JAXBRIContext jaxbCtx = JAXBRIContext.newInstance(classes, refs, null, defaultNS, c14n, null);
incrementContextCount();
- }
- catch (Exception e)
- {
- if (bcust != null && bcust.get("com.sun.xml.bind.defaultNamespaceRemap") != null)
- {
- String dns = (String) bcust.get("com.sun.xml.bind.defaultNamespaceRemap");
- bcust.remove("com.sun.xml.bind.defaultNamespaceRemap");
- bcust.put("com.sun.xml.internal.bind.defaultNamespaceRemap", dns);
- try
- {
- jaxbCtx = AccessController.doPrivileged(new PrivilegedExceptionAction<JAXBContext>() {
- public JAXBContext run() throws PrivilegedActionException
- {
- try
- {
- return JAXBContext.newInstance(clazzes, bcust);
- }
- catch (JAXBException e)
- {
- throw new PrivilegedActionException(e);
- }
- }
- });
- incrementContextCount();
- }
- catch (Exception ex)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_JAXBCONTEXT"), ex);
- }
- }
- else
- {
- throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_JAXBCONTEXT"), e);
- }
- }
- return jaxbCtx;
- }
-
- public JAXBRIContext createContext(Class[] classes, Collection<TypeReference> refs, String defaultNS, boolean c14n, BindingCustomization bcust)
- {
- try
- {
- RuntimeAnnotationReader anReader = null;
- if (bcust != null)
- anReader = (RuntimeAnnotationReader)bcust.get(JAXBRIContext.ANNOTATION_READER);
-
- JAXBRIContext jaxbCtx = JAXBRIContext.newInstance(classes, refs, null, defaultNS, c14n, anReader);
- incrementContextCount();
return jaxbCtx;
}
catch (JAXBException e)
@@ -164,10 +90,4 @@
throw new WSException(BundleUtils.getMessage(bundle, "FAILED_TO_CREATE_JAXBCONTEXT"), e);
}
}
-
- private BindingCustomization getCustomization()
- {
- Endpoint ep = EndpointAssociation.getEndpoint();
- return ep != null ? ep.getAttachment(BindingCustomization.class) : null;
- }
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -26,7 +26,6 @@
import javax.xml.bind.JAXBContext;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.util.ServiceLoader;
import com.sun.xml.bind.api.JAXBRIContext;
@@ -44,14 +43,11 @@
private static ThreadLocal<Integer> threadContextCount = new ThreadLocal<Integer>();
- public abstract JAXBContext createContext(Class[] clazzes, BindingCustomization bindingCustomization) throws WSException;
-
public abstract JAXBContext createContext(Class[] clazzes) throws WSException;
public abstract JAXBContext createContext(Class clazz) throws WSException;
- public abstract JAXBRIContext createContext(Class[] classes, Collection<TypeReference> typeReferences, String defaultNamespaceRemap, boolean c14nSupport,
- BindingCustomization bindingCustomization);
+ public abstract JAXBRIContext createContext(Class[] classes, Collection<TypeReference> typeReferences, String defaultNamespaceRemap, boolean c14nSupport);
protected void incrementContextCount()
{
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -21,28 +21,20 @@
*/
package org.jboss.ws.core.jaxws;
-import java.lang.reflect.Method;
-
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.ComplexTypeDeserializer;
+import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.TypeMappingImpl;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
/**
* A Deserializer that can handle complex types by delegating to JAXB.
@@ -50,7 +42,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JAXBDeserializer extends ComplexTypeDeserializer
+public class JAXBDeserializer extends DeserializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JAXBDeserializer.class);
@@ -109,32 +101,7 @@
JAXBContext context = cache.get(types);
if(null==context)
{
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- String defaultNS = epMetaData.getPortTypeName().getNamespaceURI();
- BindingCustomization bindingCustomization = getBindingCustomization();
- for (Class<?> clz : types)
- {
- if (clz.getName().endsWith("ObjectFactory"))
- {
- for (Method meth : clz.getMethods())
- {
- XmlElementDecl elementDecl = meth.getAnnotation(XmlElementDecl.class);
- if (elementDecl != null && XmlElementDecl.GLOBAL.class.equals(elementDecl.scope())
- && elementDecl.namespace() != null && elementDecl.namespace().length() > 0)
- {
- defaultNS = null;
- }
- }
- }
- }
- if (defaultNS != null)
- {
- if (bindingCustomization == null)
- bindingCustomization = new JAXBBindingCustomization();
- bindingCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNS);
- }
- context = JAXBContextFactory.newInstance().createContext(types, bindingCustomization);
+ context = JAXBContextFactory.newInstance().createContext(types);
cache.add(types, context);
}
return context;
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -21,29 +21,22 @@
*/
package org.jboss.ws.core.jaxws;
-import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
-import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.BindingException;
-import org.jboss.ws.core.binding.ComplexTypeSerializer;
import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.util.xml.BufferedStreamResult;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
import org.w3c.dom.NamedNodeMap;
/**
@@ -52,7 +45,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JAXBSerializer extends ComplexTypeSerializer
+public class JAXBSerializer extends SerializerSupport
{
// provide logging
private static final Logger log = Logger.getLogger(JAXBSerializer.class);
@@ -123,32 +116,7 @@
JAXBContext context = cache.get(types);
if(null == context)
{
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- String defaultNS = epMetaData.getPortTypeName().getNamespaceURI();
- BindingCustomization bindingCustomization = getBindingCustomization();
- for (Class<?> clz : types)
- {
- if (clz.getName().endsWith("ObjectFactory"))
- {
- for (Method meth : clz.getMethods())
- {
- XmlElementDecl elementDecl = meth.getAnnotation(XmlElementDecl.class);
- if (elementDecl != null && XmlElementDecl.GLOBAL.class.equals(elementDecl.scope())
- && elementDecl.namespace() != null && elementDecl.namespace().length() > 0)
- {
- defaultNS = null;
- }
- }
- }
- }
- if (defaultNS != null)
- {
- if (bindingCustomization == null)
- bindingCustomization = new JAXBBindingCustomization();
- bindingCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNS);
- }
- context = JAXBContextFactory.newInstance().createContext(types, bindingCustomization);
+ context = JAXBContextFactory.newInstance().createContext(types);
cache.add(types, context);
}
return context;
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -35,7 +35,6 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.handler.MessageContext;
@@ -59,10 +58,9 @@
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -72,13 +70,13 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Jul-2006
*/
-public class ClientImpl extends CommonClient implements BindingProvider, FeatureAwareEndpointMetaData
+public class ClientImpl extends CommonClient implements BindingProvider
{
private static final ResourceBundle bundle = BundleUtils.getBundle(ClientImpl.class);
private static Logger log = Logger.getLogger(ClientImpl.class);
// the associated endpoint meta data
- private final FeatureAwareClientEndpointMetaDataAdapter epMetaData;
+ private final ClientEndpointMetaData epMetaData;
private EndpointConfigMetaData epConfigMetaData;
// Keep a handle on the resolver so that updateConfig calls may revisit the associated chains
@@ -92,7 +90,7 @@
super(epMetaData);
setTargetEndpointAddress(epMetaData.getEndpointAddress());
- this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
+ this.epMetaData = (ClientEndpointMetaData)epMetaData;
this.epConfigMetaData = epMetaData.getEndpointConfigMetaData();
if (handlerResolver instanceof HandlerResolverImpl)
@@ -455,20 +453,4 @@
return Boolean.TRUE.equals(bool);
}
- //////////////////////////////////////////
- // FeatureAwareEndpointMetaData support //
- //////////////////////////////////////////
-
- @Override
- public <T extends WebServiceFeature> T getFeature(Class<T> key)
- {
- return this.epMetaData.getFeature(key);
- }
-
- @Override
- public void setFeature(WebServiceFeature feature)
- {
- this.epMetaData.setFeature(feature);
- }
-
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -51,7 +51,6 @@
import org.jboss.ws.common.JavaUtils;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
/**
@@ -94,7 +93,6 @@
this.executor = executor;
this.stubMethods = new ArrayList(Arrays.asList(BindingProvider.class.getMethods()));
this.stubMethods.addAll(Arrays.asList(StubExt.class.getMethods()));
- this.stubMethods.addAll(Arrays.asList(FeatureAwareEndpointMetaData.class.getMethods()));
this.objectMethods = Arrays.asList(Object.class.getMethods());
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -47,7 +47,6 @@
import javax.xml.ws.Response;
import javax.xml.ws.Service.Mode;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.PortInfo;
@@ -75,8 +74,6 @@
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.w3c.dom.Node;
@@ -89,7 +86,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2006
*/
-public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider, EndpointMetadataProvider, FeatureAwareEndpointMetaData
+public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider, EndpointMetadataProvider
{
private static final ResourceBundle bundle = BundleUtils.getBundle(DispatchImpl.class);
// provide logging
@@ -97,7 +94,7 @@
private BindingProvider bindingProvider;
private HandlerResolverImpl handlerResolver;
- private FeatureAwareClientEndpointMetaDataAdapter epMetaData;
+ private EndpointMetaData epMetaData;
private JAXBContext jaxbContext;
private ExecutorService executor;
private String securityConfig;
@@ -109,7 +106,7 @@
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData, Class<T> type, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
+ this.epMetaData = epMetaData;
this.executor = executor;
this.type = type;
this.mode = mode;
@@ -119,7 +116,7 @@
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData, JAXBContext jbc, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = (FeatureAwareClientEndpointMetaDataAdapter)epMetaData;
+ this.epMetaData = epMetaData;
this.executor = executor;
this.type = Object.class;
this.jaxbContext = jbc;
@@ -158,11 +155,6 @@
handlerResolver.initHandlerChain(ecmd, HandlerType.PRE, true);
handlerResolver.initHandlerChain(ecmd, HandlerType.ENDPOINT, true);
handlerResolver.initHandlerChain(ecmd, HandlerType.POST, true);
-
- PortInfo portInfo = epMetaData.getPortInfo();
- this.appendHandlers(HandlerType.PRE, portInfo, binding);
- this.appendHandlers(HandlerType.ENDPOINT, portInfo, binding);
- this.appendHandlers(HandlerType.POST, portInfo, binding);
}
retObj = invokeInternalSOAP(obj);
@@ -644,21 +636,4 @@
{
return epMetaData;
}
-
- //////////////////////////////////////////
- // FeatureAwareEndpointMetaData support //
- //////////////////////////////////////////
-
- @Override
- public <T extends WebServiceFeature> T getFeature(Class<T> key)
- {
- return this.epMetaData.getFeature(key);
- }
-
- @Override
- public void setFeature(WebServiceFeature feature)
- {
- this.epMetaData.setFeature(feature);
- }
-
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -39,8 +39,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.handler.GenericHandler;
-import org.jboss.ws.api.handler.GenericSOAPHandler;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.injection.InjectionHelper;
import org.jboss.ws.metadata.umdm.EndpointConfigMetaData;
@@ -156,21 +154,12 @@
private void addHandler(ClassLoader classLoader, HandlerType type, HandlerMetaData handlerMetaData)
{
HandlerMetaDataJAXWS jaxwsMetaData = (HandlerMetaDataJAXWS)handlerMetaData;
- String handlerName = jaxwsMetaData.getHandlerName();
String className = jaxwsMetaData.getHandlerClassName();
- Set<QName> soapHeaders = jaxwsMetaData.getSoapHeaders();
try
{
// Load the handler class using the deployments top level CL
Handler<?> handler = getInstance(classLoader, className);
-
- if (handler instanceof GenericHandler)
- ((GenericHandler)handler).setHandlerName(handlerName);
-
- if (handler instanceof GenericSOAPHandler)
- ((GenericSOAPHandler<?>)handler).setHeaders(soapHeaders);
-
addHandler(jaxwsMetaData, handler, type);
}
catch (RuntimeException rte)
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -22,7 +22,6 @@
package org.jboss.ws.core.jaxws.spi;
import java.net.URI;
-import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -34,7 +33,6 @@
import javax.xml.ws.Binding;
import javax.xml.ws.Endpoint;
import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.WebServicePermission;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
@@ -42,14 +40,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.core.jaxws.spi.http.HttpContext;
-import org.jboss.ws.core.jaxws.spi.http.HttpServer;
-import org.jboss.ws.core.jaxws.spi.http.NettyHttpServerFactory;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.w3c.dom.Element;
/**
@@ -70,9 +61,7 @@
private List<Source> metadata;
private BindingProviderImpl bindingProvider;
private Map<String, Object> properties = new HashMap<String, Object>();
- private HttpContext serverContext;
private boolean isPublished;
- private boolean isDestroyed;
private URI address;
private Deployment dep;
@@ -109,25 +98,7 @@
@Override
public void publish(final String addr)
{
- log.debug("publish: " + addr);
-
- try
- {
- this.address = new URI(addr);
- }
- catch (URISyntaxException e)
- {
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_ADDRESS", addr));
- }
-
- // Check with the security manager
- this.checkPublishEndpointPermission();
-
- // Get HTTP server
- final HttpServer httpServer = NettyHttpServerFactory.getHttpServer();
- final HttpContext context = httpServer.createContext(this.getContextRoot());
-
- this.publish(context);
+ throw new UnsupportedOperationException();
}
/**
@@ -140,76 +111,12 @@
@Override
public void publish(Object context)
{
- if (context == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "NULL_CONTEXT"));
-
- if (log.isDebugEnabled())
- log.debug("publishing endpoint " + this + " to " + context);
-
- if (isDestroyed)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "ENDPOINT_ALREADY_DESTROYED"));
-
- // Check with the security manager
- checkPublishEndpointPermission();
-
- if (context instanceof HttpContext)
- {
- this.serverContext = (HttpContext)context;
- if (this.address == null)
- {
- this.address = getAddressFromConfigAndContext(serverContext); // TODO: is it necessary?
- }
- HttpServer httpServer = this.serverContext.getHttpServer();
- httpServer.publish(this.serverContext, this);
- this.isPublished = true;
- }
- else
- {
- throw new UnsupportedOperationException(BundleUtils.getMessage(bundle, "CANNOT_HANDLE_CONTEXTS", context));
- }
+ throw new UnsupportedOperationException();
}
- private static URI getAddressFromConfigAndContext(HttpContext context)
- {
- try
- {
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
- return new URI("http://" + hostAndPort + context.getContextRoot());
- }
- catch (URISyntaxException e)
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle, "ERROR_GETTING_ENDPOINT_ADDRESS"), e);
- }
- }
-
@Override
public void stop()
{
- log.debug("stop");
-
- if (serverContext == null || isPublished == false)
- log.error(BundleUtils.getMessage(bundle, "ENDPOINT_NOT_PUBLISHED"));
-
- try
- {
- if (serverContext != null)
- {
- HttpServer httpServer = serverContext.getHttpServer();
- httpServer.destroy(serverContext, this);
- }
- }
- catch (Exception ex)
- {
- log.error(BundleUtils.getMessage(bundle, "CANNOT_STOP_ENDPOINT"), ex);
- }
-
- isPublished = false;
- isDestroyed = true;
}
@Override
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -56,7 +56,6 @@
import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
-import org.jboss.ws.core.jaxws.client.DispatchImpl;
import org.jboss.ws.core.jaxws.client.serviceref.NativeServiceObjectFactoryJAXWS;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
import org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
@@ -64,8 +63,6 @@
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.metadata.umdm.FeatureAwareClientEndpointMetaDataAdapter;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -266,21 +263,13 @@
@Override
public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode mode)
{
- ExecutorService executor = (ExecutorService)getExecutor();
- EndpointMetaData epMetaData = getEndpointMetaData(portName);
- FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
-
- return new DispatchImpl(executor, clientMetaDataAdapter, type, mode);
+ throw new UnsupportedOperationException();
}
@Override
public Dispatch<Object> createDispatch(QName portName, JAXBContext jbc, Mode mode)
{
- ExecutorService executor = (ExecutorService)getExecutor();
- EndpointMetaData epMetaData = getEndpointMetaData(portName);
- FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
-
- return new DispatchImpl(executor, clientMetaDataAdapter, jbc, mode);
+ throw new UnsupportedOperationException();
}
private EndpointMetaData getEndpointMetaData(QName portName)
@@ -376,8 +365,7 @@
try
{
ExecutorService executor = (ExecutorService)getExecutor();
- FeatureAwareClientEndpointMetaDataAdapter clientMetaDataAdapter = new FeatureAwareClientEndpointMetaDataAdapter((ClientEndpointMetaData)epMetaData);
- ClientProxy handler = new ClientProxy(executor, new ClientImpl(clientMetaDataAdapter, handlerResolver));
+ ClientProxy handler = new ClientProxy(executor, new ClientImpl(epMetaData, handlerResolver));
ClassLoader cl = epMetaData.getClassLoader();
try
{
@@ -392,7 +380,7 @@
T proxy;
try
{
- proxy = (T)Proxy.newProxyInstance(cl, new Class[] { seiClass, BindingProvider.class, StubExt.class, FeatureAwareEndpointMetaData.class }, handler);
+ proxy = (T)Proxy.newProxyInstance(cl, new Class[] { seiClass, BindingProvider.class, StubExt.class }, handler);
}
catch (RuntimeException rte)
{
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -34,7 +34,6 @@
import javax.xml.ws.RespectBindingFeature;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.annotation.EndpointConfig;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.ResourceLoaderAdapter;
@@ -258,7 +257,6 @@
processSOAPBinding(epMetaData, wsClass);
// process config, this will as well setup the handler
- processEndpointConfig(epMetaData, wsClass);
epMetaData.initEndpointConfig();
// Process @WebMethod
@@ -283,18 +281,4 @@
if (log.isDebugEnabled())
log.debug("END: rebuildMetaData\n" + epMetaData.getServiceMetaData());
}
-
- /**
- * Process config contribution through service endpoint interfaces
- * @param epMetaData
- * @param wsClass - the service endpoint interface
- */
- private void processEndpointConfig(EndpointMetaData epMetaData, Class<?> wsClass)
- {
- if (wsClass.isAnnotationPresent(EndpointConfig.class))
- {
- EndpointConfig anConfig = wsClass.getAnnotation(EndpointConfig.class);
- epMetaData.setConfigName(anConfig.configName(), anConfig.configFile());
- }
- }
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -57,7 +57,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
@@ -74,7 +73,6 @@
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.TypeMappingMetaData;
import org.jboss.ws.metadata.umdm.TypesMetaData;
import org.jboss.ws.metadata.umdm.WrappedParameter;
@@ -87,7 +85,6 @@
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
import org.jboss.ws.metadata.wsdl.WSDLMIMEPart;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaDataParser;
@@ -886,16 +883,7 @@
JAXBContextFactory factory = JAXBContextFactory.newInstance();
- // JAXBIntros may mofiy the WSDL being generated
- // only true for server side invocation, tooling (WSProvide) doesnt support this
- BindingCustomization bindingCustomization = null;
- if (epMetaData instanceof ServerEndpointMetaData)
- {
- Endpoint endpoint = ((ServerEndpointMetaData)epMetaData).getEndpoint();
- bindingCustomization = endpoint != null ? endpoint.getAttachment(BindingCustomization.class) : null;
- }
-
- jaxbCtx = factory.createContext(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false, bindingCustomization);
+ jaxbCtx = factory.createContext(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false);
}
catch (WSException ex)
{
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -142,9 +142,6 @@
// process config
processEndpointConfig(dep, sepMetaData, sepClass, linkName);
- // Set the endpoint address
- processWebContext(dep, sepClass, linkName, sepMetaData);
-
// Init the endpoint address
initEndpointAddress(dep, sepMetaData);
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -21,17 +21,10 @@
*/
package org.jboss.ws.metadata.builder.jaxws;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseDeployment;
-
-import java.util.ResourceBundle;
-
import javax.jws.WebService;
import javax.xml.ws.RespectBindingFeature;
import javax.xml.ws.WebServiceProvider;
-import org.jboss.ws.api.annotation.EndpointConfig;
-import org.jboss.ws.api.annotation.WebContext;
-import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -56,7 +49,6 @@
*/
public abstract class JAXWSServerMetaDataBuilder extends JAXWSMetaDataBuilder
{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXWSServerMetaDataBuilder.class);
static void setupProviderOrWebService(ArchiveDeployment dep, UnifiedMetaData umd, Class<?> beanClass, String beanName) throws Exception
{
if (beanClass.isAnnotationPresent(WebService.class))
@@ -76,16 +68,6 @@
String configName = null;
String configFile = null;
- EndpointConfig anEndpointConfig = wsClass.getAnnotation(EndpointConfig.class);
- if (anEndpointConfig != null)
- {
- if (anEndpointConfig.configName().length() > 0)
- configName = anEndpointConfig.configName();
-
- if (anEndpointConfig.configFile().length() > 0)
- configFile = anEndpointConfig.configFile();
- }
-
JSEArchiveMetaData jseMetaData = dep.getAttachment(JSEArchiveMetaData.class);
if (jseMetaData != null)
{
@@ -108,78 +90,6 @@
sepMetaData.setConfigName(configName, configFile);
}
- protected void processWebContext(Deployment dep, Class<?> wsClass, String linkName, ServerEndpointMetaData sepMetaData)
- {
- WebContext anWebContext = wsClass.getAnnotation(WebContext.class);
-
- if (anWebContext == null)
- return;
-
- boolean isJSEEndpoint = isJaxwsJseDeployment(dep);
-
- // context-root
- if (anWebContext.contextRoot().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "CONTEXTROOT_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String contextRoot = anWebContext.contextRoot();
- if (contextRoot.startsWith("/") == false)
- contextRoot = "/" + contextRoot;
-
- sepMetaData.setContextRoot(contextRoot);
- }
- }
-
- // url-pattern
- if (anWebContext.urlPattern().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "URLPATTERN_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String urlPattern = anWebContext.urlPattern();
- sepMetaData.setURLPattern(urlPattern);
- }
- }
-
- // auth-method
- if (anWebContext.authMethod().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "AUTHMETHOD_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String authMethod = anWebContext.authMethod();
- sepMetaData.setAuthMethod(authMethod);
- }
- }
-
- // transport-guarantee
- if (anWebContext.transportGuarantee().length() > 0)
- {
- if (isJSEEndpoint)
- {
- log.warn(BundleUtils.getMessage(bundle, "TRANSPORTGUARANTEE_IS_ONLY_VALID_ON_EJB_ENDPOINTS"));
- }
- else
- {
- String transportGuarantee = anWebContext.transportGuarantee();
- sepMetaData.setTransportGuarantee(transportGuarantee);
- }
- }
-
- // secure wsdl access
- sepMetaData.setSecureWSDLAccess(anWebContext.secureWSDLAccess());
- }
-
/**
* With JAX-WS the use of webservices.xml is optional since the annotations can be used
* to specify most of the information specified in this deployment descriptor file.
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -21,10 +21,8 @@
*/
package org.jboss.ws.metadata.builder.jaxws;
-import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
-import java.io.Writer;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -40,7 +38,6 @@
import org.jboss.ws.WSException;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.IOUtils;
import org.jboss.ws.metadata.builder.MetaDataBuilder;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
@@ -52,11 +49,6 @@
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.tools.ToolsUtils;
-import org.jboss.ws.tools.wsdl.JAXBWSDLGenerator;
-import org.jboss.ws.tools.wsdl.WSDLGenerator;
-import org.jboss.ws.tools.wsdl.WSDLWriter;
-import org.jboss.ws.tools.wsdl.WSDLWriterResolver;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -75,10 +67,6 @@
public class JAXWSWebServiceMetaDataBuilder extends JAXWSServerMetaDataBuilder
{
private static final ResourceBundle bundle = BundleUtils.getBundle(JAXWSWebServiceMetaDataBuilder.class);
- private boolean generateWsdl = true;
- private boolean extension;
- private boolean toolMode = false;
- private File wsdlDirectory = null;
private PrintStream messageStream = null;
private static class EndpointResult
@@ -89,16 +77,6 @@
private URL wsdlLocation;
}
- public void setGenerateWsdl(boolean generateWsdl)
- {
- this.generateWsdl = generateWsdl;
- }
-
- public void setExtension(boolean extension)
- {
- this.extension = extension;
- }
-
public ServerEndpointMetaData buildWebServiceMetaData(Deployment dep, UnifiedMetaData wsMetaData, Class<?> sepClass, String linkName)
{
try
@@ -130,10 +108,7 @@
// process config
processEndpointConfig(dep, sepMetaData, sepClass, linkName);
- if (!toolMode)
- {
- setupOperationsFromWSDL(serviceMetaData, sepMetaData);
- }
+ setupOperationsFromWSDL(serviceMetaData, sepMetaData);
// Process web methods
processWebMethods(sepMetaData, seiClass);
@@ -147,23 +122,12 @@
createJAXBContext(sepMetaData);
populateXmlTypes(sepMetaData);
- // The server must always generate WSDL
- if (generateWsdl || !toolMode)
- generateWSDL(seiClass, serviceMetaData, sepMetaData);
-
- // No need to process endpoint items if we are in tool mode
- if (toolMode)
- return sepMetaData;
-
// Sanity check: read the generated WSDL and initialize the schema model
// Note, this should no longer be needed, look into removing it
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
- // Note, that @WebContext needs to be defined on the endpoint not the SEI
- processWebContext(dep, sepClass, linkName, sepMetaData);
-
// setup handler chain from config
sepMetaData.initEndpointConfig();
@@ -344,91 +308,12 @@
return result;
}
- private void generateWSDL(Class wsClass, ServiceMetaData serviceMetaData, EndpointMetaData epMetaData)
- {
- final URL wsdlLocation = serviceMetaData.getWsdlLocation();
-
- if (wsdlLocation == null)
- {
- try
- {
- WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
- generator.setExtension(extension);
-
- WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
- writeWsdl(serviceMetaData, wsdlDefinitions, epMetaData);
- }
- catch (IOException e)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "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());
- // Ensure that types are only in the interface qname
- wsdlDefinitions.getWsdlTypes().setNamespace(epMetaData.getPortTypeName().getNamespaceURI());
-
- final File dir, wsdlFile;
-
- if (wsdlDirectory != null)
- {
- dir = wsdlDirectory;
- wsdlFile = new File(dir, wsdlName + ".wsdl");
- }
- else
- {
- 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() {
- public WSDLWriterResolver resolve(String suggestedFile) throws IOException
- {
- File file;
- if (wsdlDirectory != null)
- {
- file = new File(dir, suggestedFile + ".wsdl");
- }
- else
- {
- file = File.createTempFile(suggestedFile, ".wsdl", dir);
- file.deleteOnExit();
- }
- actualFile = file.getName();
- message(actualFile);
- charset = Constants.DEFAULT_XML_CHARSET;
- writer = IOUtils.getCharsetFileWriter(file, Constants.DEFAULT_XML_CHARSET);
- return this;
- }
- });
- writer.close();
-
- serviceMetaData.setWsdlLocation(wsdlFile.toURL());
- }
-
private void message(String msg)
{
if (messageStream != null)
messageStream.println(msg);
}
- public void setToolMode(boolean toolMode)
- {
- this.toolMode = toolMode;
- }
-
- public void setWsdlDirectory(File wsdlDirectory)
- {
- this.wsdlDirectory = wsdlDirectory;
- }
-
public void setMessageStream(PrintStream messageStream)
{
this.messageStream = messageStream;
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -27,7 +27,6 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -41,7 +40,6 @@
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.xml.bind.JAXBContext;
-import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import javax.xml.ws.Service.Mode;
@@ -49,8 +47,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.ws.api.binding.JAXBBindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.JavaUtils;
@@ -149,8 +145,6 @@
private JAXBContextCache jaxbCache = new JAXBContextCache();
- private List<BindingCustomization> bindingCustomization = new ArrayList<BindingCustomization>();
-
EndpointMetaData()
{
}
@@ -334,11 +328,6 @@
return type;
}
- public Collection<BindingCustomization> getBindingCustomizations()
- {
- return bindingCustomization;
- }
-
public String getAuthMethod()
{
return authMethod;
@@ -680,37 +669,10 @@
if ("true".equalsIgnoreCase(System.getProperty(Constants.EAGER_INITIALIZE_JAXB_CONTEXT_CACHE)))
{
log.debug("Initializing JAXBContext cache...");
- BindingCustomization bindingCustomization = null;
- if (this instanceof ServerEndpointMetaData)
- {
- bindingCustomization = ((ServerEndpointMetaData)this).getEndpoint().getAttachment(BindingCustomization.class);
- }
try
{
Class[] classes = getRegisteredTypes().toArray(new Class[0]);
- String defaultNS = portTypeName.getNamespaceURI();
- for (Class<?> clz : classes)
- {
- if (clz.getName().endsWith("ObjectFactory"))
- {
- for (Method method : clz.getMethods())
- {
- XmlElementDecl elementDecl = method.getAnnotation(XmlElementDecl.class);
- if (elementDecl != null && XmlElementDecl.GLOBAL.class.equals(elementDecl.scope())
- && elementDecl.namespace() != null && elementDecl.namespace().length() > 0)
- {
- defaultNS = null;
- }
- }
- }
- }
- if (defaultNS != null)
- {
- if (bindingCustomization == null)
- bindingCustomization = new JAXBBindingCustomization();
- bindingCustomization.put("com.sun.xml.bind.defaultNamespaceRemap", defaultNS);
- }
- JAXBContext context = JAXBContextFactory.newInstance().createContext(classes, bindingCustomization);
+ JAXBContext context = JAXBContextFactory.newInstance().createContext(classes);
jaxbCache.add(classes, context);
}
catch (Exception e)
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,482 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.metadata.umdm;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.namespace.QName;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.Service.Mode;
-import javax.xml.ws.handler.PortInfo;
-
-import org.jboss.ws.core.jaxws.JAXBContextCache;
-import org.jboss.ws.core.soap.Style;
-import org.jboss.ws.core.soap.Use;
-import org.jboss.ws.metadata.config.Configurable;
-import org.jboss.ws.api.binding.BindingCustomization;
-import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
-import org.jboss.wsf.spi.metadata.config.CommonConfig;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-
-/**
- * Feature aware client endpoint meta data adapter.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class FeatureAwareClientEndpointMetaDataAdapter extends ClientEndpointMetaData implements FeatureAwareEndpointMetaData
-{
-
- private final ClientEndpointMetaData delegee;
- private final Set<WebServiceFeature> features = new HashSet<WebServiceFeature>();
-
- public FeatureAwareClientEndpointMetaDataAdapter(final ClientEndpointMetaData delegee)
- {
- this.delegee = delegee;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public <T extends WebServiceFeature> T getFeature(Class<T> key)
- {
- for (WebServiceFeature feature : this.features)
- {
- if (key == feature.getClass())
- {
- return (T)feature;
- }
- }
-
- return this.delegee.getFeature(key);
- }
-
- @Override
- public void setFeature(WebServiceFeature feature)
- {
- this.features.add(feature);
- }
-
- @Override
- public FeatureSet getFeatures()
- {
- final FeatureSet retVal = this.delegee.getFeatures();
-
- for (WebServiceFeature feature : this.features)
- {
- retVal.addFeature(feature);
- }
-
- return retVal;
- }
-
- @Override
- public void addFeature(WebServiceFeature feature)
- {
- this.setFeature(feature);
- }
-
- @Override
- public <T extends WebServiceFeature> boolean isFeatureEnabled(final Class<T> key)
- {
- final T feature = this.getFeature(key);
-
- return (feature != null ? feature.isEnabled() : false);
- }
-
- // ********************************************
- // just delegate to non feature related methods
- // ********************************************
-
- @Override
- public EndpointConfigMetaData createEndpointConfigMetaData(String configName, String configFile)
- {
- return this.delegee.createEndpointConfigMetaData(configName, configFile);
- }
-
- @Override
- public String getEndpointAddress()
- {
- return this.delegee.getEndpointAddress();
- }
-
- @Override
- public PortInfo getPortInfo()
- {
- return this.delegee.getPortInfo();
- }
-
- @Override
- public void setEndpointAddress(String endpointAddress)
- {
- this.delegee.setEndpointAddress(endpointAddress);
- }
-
- @Override
- public String toString()
- {
- return this.delegee.toString();
- }
-
- @Override
- public void addHandler(HandlerMetaData handler)
- {
- this.delegee.addHandler(handler);
- }
-
- @Override
- public void addHandlers(List<HandlerMetaData> configHandlers)
- {
- this.delegee.addHandlers(configHandlers);
- }
-
- @Override
- public void addOperation(OperationMetaData opMetaData)
- {
- this.delegee.addOperation(opMetaData);
- }
-
- @Override
- public void clearHandlers()
- {
- this.delegee.clearHandlers();
- }
-
- @Override
- public void clearOperations()
- {
- this.delegee.clearOperations();
- }
-
- @Override
- public void configure(Configurable configurable)
- {
- this.delegee.configure(configurable);
- }
-
- @Override
- public void eagerInitialize()
- {
- this.delegee.eagerInitialize();
- }
-
- @Override
- public String getAuthMethod()
- {
- return this.delegee.getAuthMethod();
- }
-
- @Override
- public Collection<BindingCustomization> getBindingCustomizations()
- {
- return this.delegee.getBindingCustomizations();
- }
-
- @Override
- public String getBindingId()
- {
- return this.delegee.getBindingId();
- }
-
- @Override
- public ClassLoader getClassLoader()
- {
- return this.delegee.getClassLoader();
- }
-
- @Override
- public CommonConfig getConfig()
- {
- return this.delegee.getConfig();
- }
-
- @Override
- public String getConfigFile()
- {
- return this.delegee.getConfigFile();
- }
-
- @Override
- public String getConfigName()
- {
- return this.delegee.getConfigName();
- }
-
- @Override
- public Use getEncodingStyle()
- {
- return this.delegee.getEncodingStyle();
- }
-
- @Override
- public EndpointConfigMetaData getEndpointConfigMetaData()
- {
- return this.delegee.getEndpointConfigMetaData();
- }
-
- @Override
- public List<HandlerMetaData> getHandlerMetaData(HandlerType type)
- {
- return this.delegee.getHandlerMetaData(type);
- }
-
- @Override
- public JAXBContextCache getJaxbCache()
- {
- return this.delegee.getJaxbCache();
- }
-
- @Override
- public OperationMetaData getOperation(QName xmlName)
- {
- return this.delegee.getOperation(xmlName);
- }
-
- @Override
- public OperationMetaData getOperation(Method method)
- {
- return this.delegee.getOperation(method);
- }
-
- @Override
- public List<OperationMetaData> getOperations()
- {
- return this.delegee.getOperations();
- }
-
- @Override
- public ParameterStyle getParameterStyle()
- {
- return this.delegee.getParameterStyle();
- }
-
- @Override
- public QName getPortName()
- {
- return this.delegee.getPortName();
- }
-
- @Override
- public QName getPortTypeName()
- {
- return this.delegee.getPortTypeName();
- }
-
- @Override
- public Properties getProperties()
- {
- return this.delegee.getProperties();
- }
-
- @Override
- public List<Class> getRegisteredTypes()
- {
- return this.delegee.getRegisteredTypes();
- }
-
- @Override
- public UnifiedVirtualFile getRootFile()
- {
- return this.delegee.getRootFile();
- }
-
- @Override
- public Class getServiceEndpointInterface()
- {
- return this.delegee.getServiceEndpointInterface();
- }
-
- @Override
- public String getServiceEndpointInterfaceName()
- {
- return this.delegee.getServiceEndpointInterfaceName();
- }
-
- @Override
- public ServiceMetaData getServiceMetaData()
- {
- return this.delegee.getServiceMetaData();
- }
-
- @Override
- public Mode getServiceMode()
- {
- return this.delegee.getServiceMode();
- }
-
- @Override
- public List<UnifiedPortComponentRefMetaData> getServiceRefContrib()
- {
- return this.delegee.getServiceRefContrib();
- }
-
- @Override
- public Style getStyle()
- {
- return this.delegee.getStyle();
- }
-
- @Override
- public Type getType()
- {
- return this.delegee.getType();
- }
-
- @Override
- public void initEndpointConfig()
- {
- this.delegee.initEndpointConfig();
- }
-
- @Override
- public boolean isHandlersInitialized()
- {
- return this.delegee.isHandlersInitialized();
- }
-
- @Override
- public boolean matches(UnifiedPortComponentRefMetaData pcRef)
- {
- return this.delegee.matches(pcRef);
- }
-
- @Override
- public void registerConfigObserver(Configurable observer)
- {
- this.delegee.registerConfigObserver(observer);
- }
-
- @Override
- public void setAuthMethod(String authMethod)
- {
- this.delegee.setAuthMethod(authMethod);
- }
-
- @Override
- public void setBindingId(String bindingId)
- {
- this.delegee.setBindingId(bindingId);
- }
-
- @Override
- public void setConfigName(String configName)
- {
- this.delegee.setConfigName(configName);
- }
-
- @Override
- public void setConfigName(String configName, String configFile)
- {
- this.delegee.setConfigName(configName, configFile);
- }
-
- @Override
- public void setEncodingStyle(Use value)
- {
- this.delegee.setEncodingStyle(value);
- }
-
- @Override
- public void setHandlersInitialized(boolean flag)
- {
- this.delegee.setHandlersInitialized(flag);
- }
-
- @Override
- public void setParameterStyle(ParameterStyle value)
- {
- this.delegee.setParameterStyle(value);
- }
-
- @Override
- public void setPortName(QName portName)
- {
- this.delegee.setPortName(portName);
- }
-
- @Override
- public void setProperties(Properties properties)
- {
- this.delegee.setProperties(properties);
- }
-
- @Override
- public void setServiceEndpointInterfaceName(String seiName)
- {
- this.delegee.setServiceEndpointInterfaceName(seiName);
- }
-
- @Override
- public void setServiceMode(Mode serviceMode)
- {
- this.delegee.setServiceMode(serviceMode);
- }
-
- @Override
- public void setStyle(Style value)
- {
- this.delegee.setStyle(value);
- }
-
- @Override
- public void validate()
- {
- this.delegee.validate();
- }
-
- @Override
- public void addExtension(MetaDataExtension ext)
- {
- this.delegee.addExtension(ext);
- }
-
- @Override
- public MetaDataExtension getExtension(String namespace)
- {
- return this.delegee.getExtension(namespace);
- }
-
- @Override
- public Map<String, MetaDataExtension> getExtensions()
- {
- return this.delegee.getExtensions();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- return this.delegee.equals(obj);
- }
-
- @Override
- public int hashCode()
- {
- return this.delegee.hashCode();
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareEndpointMetaData.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.metadata.umdm;
-
-import javax.xml.ws.WebServiceFeature;
-
-/**
- * Wrapper over endpoint meta data to enable feature overriding.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public interface FeatureAwareEndpointMetaData
-{
- void setFeature(WebServiceFeature feature);
- <T extends WebServiceFeature> T getFeature(Class<T> key);
-}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -21,16 +21,12 @@
*/
package org.jboss.ws.metadata.umdm;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
import java.util.ResourceBundle;
import javax.management.ObjectName;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -200,21 +196,6 @@
endpoint.setAddress(endpointAddress);
}
- /**
- * Will be set through a deployment aspect
- * @return List<BindingCustomization> of available customizations
- */
- public Collection<BindingCustomization> getBindingCustomizations()
- {
- List<BindingCustomization> list = new ArrayList<BindingCustomization>();
- for (Object att : endpoint.getAttachments())
- {
- if (att instanceof BindingCustomization)
- list.add((BindingCustomization)att);
- }
- return list;
- }
-
public String toString()
{
StringBuilder buffer = new StringBuilder("\nServerEndpointMetaData:");
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/Configuration.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/Configuration.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/Configuration.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,190 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-/**
- * Configuration driving jbossws
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Aug 11, 2005
- */
-public class Configuration
-{
- private JavaToWSDLConfig j2wc;
- private WSDLToJavaConfig w2jc;
- private GlobalConfig globalConfig;
-
- public Configuration()
- {
- }
-
- public JavaToWSDLConfig getJavaToWSDLConfig(boolean createNew)
- {
- if (createNew && j2wc == null)
- j2wc = new JavaToWSDLConfig();
- return j2wc;
- }
-
- public WSDLToJavaConfig getWSDLToJavaConfig(boolean createNew)
- {
- if (createNew && w2jc == null)
- w2jc = new WSDLToJavaConfig();
- return w2jc;
- }
-
- /**
- * @return Returns the globalConfig.
- */
- public GlobalConfig getGlobalConfig(boolean createNew)
- {
- if (createNew && globalConfig == null)
- globalConfig = new GlobalConfig();
- return globalConfig;
- }
-
- public void setGlobalConfig(GlobalConfig globalConfig)
- {
- this.globalConfig = globalConfig;
- }
-
- public void setJavaToWSDLConfig(JavaToWSDLConfig j2wc2)
- {
- this.j2wc = j2wc2;
- }
-
- public void setWSDLToJavaConfig(WSDLToJavaConfig wsdl2jc)
- {
- w2jc = wsdl2jc;
- }
-
- /**
- * Configuration for JavaToWSDL
- */
- public class JavaToWSDLConfig
- {
- // Is a jaxrpc-mapping file needed?
- public boolean mappingFileNeeded;
- // Name of the jaxrpc-mapping file
- public String mappingFileName;
- // Need webservices.xml file?
- public boolean wsxmlFileNeeded;
- // Target Namespace
- public String targetNamespace;
- // Type Namespace
- public String typeNamespace;
- // Service Name
- public String serviceName;
- // Endpoint Name
- public String endpointName;
- // Style of WSDL. {"rpc","doc"}
- public String wsdlStyle = "document";
- // Parameter style {"wrapped", "bare"}
- public String parameterStyle = "wrapped";
- // WSDL Version {"1.1","2.0"}
- public String wsdlVersion = "1.1";
- // Should Schema be included in the wsdl
- public boolean includeSchemaInWSDL = true;
- public boolean restrictSchemaToTargetNS;
- public String servletLink;
- public String ejbLink;
- public boolean wsxmlFileAppend;
-
- public Map<String, List<OperationConfig>> operations = new HashMap<String, List<OperationConfig>>();
-
- public OperationConfig createOperationConfig()
- {
- return new OperationConfig();
- }
-
- /**Configuration at the operation level*/
- /*public OperationConfig opConfig;
-
- public OperationConfig getOperationConfig(boolean createNew)
- {
- if(j2wc.opConfig == null)
- j2wc.opConfig = new OperationConfig();
- return j2wc.opConfig;
- }*/
- }
-
- /**
- * Configuration for WSDL To Java
- */
- public class WSDLToJavaConfig
- {
- public String wsdlLocation;
- // Parameter style {"wrapped", "bare"}
- public String parameterStyle = "wrapped";
- // Should generated types be Serializable?
- public boolean serializableTypes;
- // Is a jaxrpc-mapping file needed?
- public boolean mappingFileNeeded;
- // Name of the jaxrpc-mapping file
- public String mappingFileName;
- // Need webservices.xml file?
- public boolean wsxmlFileNeeded;
- public String servletLink;
- public String ejbLink;
- }
-
- /**
- * Global Configuration
- */
- public class GlobalConfig
- {
- public String nscollide = "Array";
- public Map<String, String> packageNamespaceMap = new HashMap<String, String>();
- }
-
- /**
- * Configuration at the operation/method level
- */
- public class OperationConfig
- {
- public String name;
- public boolean isOneWay = false;
- public List<ParameterConfig> params = new ArrayList<ParameterConfig>();
- public QName returnXmlName;
-
- public ParameterConfig createParameterConfig()
- {
- return new ParameterConfig();
- }
- }
-
- /**
- * A ParameterConfig.
- */
- public class ParameterConfig
- {
- public String javaType;
- public QName xmlName;
- public String mode;
- public boolean header;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HeaderUtil.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HeaderUtil.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HeaderUtil.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.metadata.wsdl.WSDLBindingMessageReference;
-import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.metadata.wsdl.WSDLSOAPHeader;
-
-/**
- * Collection of static methods required for processing
- * bound headers in WSDL to Java so they can be re-used for
- * the JAX-RPC generation.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 29 May 2007
- */
-public class HeaderUtil
-{
-
- public static WSDLBindingOperation getWSDLBindingOperation(final WSDLDefinitions wsdl, final WSDLInterfaceOperation operation)
- {
- WSDLBindingOperation bindingOperation = null;
-
- WSDLInterface wsdlInterface = operation.getWsdlInterface();
- QName operationName = operation.getName();
-
- WSDLBinding binding = wsdl.getBindingByInterfaceName(wsdlInterface.getName());
- bindingOperation = binding.getOperationByRef(operationName);
-
- return bindingOperation;
- }
-
- public static WSDLSOAPHeader[] getSignatureHeaders(final WSDLBindingMessageReference[] refs)
- {
- ArrayList<WSDLSOAPHeader> headers = new ArrayList<WSDLSOAPHeader>();
-
- if (refs != null)
- {
- for (WSDLBindingMessageReference current : refs)
- {
- for (WSDLSOAPHeader header : current.getSoapHeaders())
- {
- headers.add(header);
- }
- }
- }
-
- return headers.toArray(new WSDLSOAPHeader[headers.size()]);
- }
-
- public static boolean containsMatchingPart(WSDLSOAPHeader[] headers, WSDLSOAPHeader header)
- {
- for (WSDLSOAPHeader current : headers)
- {
- if (current.getPartName().equals(header.getPartName()))
- {
- if (current.getElement().equals(header.getElement()))
- {
- return true;
- }
- }
- }
-
- return false;
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HolderWriter.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HolderWriter.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/HolderWriter.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.File;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.HashMap;
-
-import javax.xml.rpc.holders.Holder;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-
-/**
- * Utility class to write JAX-RPC holders.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 11 Apr 2007
- */
-public class HolderWriter
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(HolderWriter.class);
-
- private static final WSDLUtils utils = WSDLUtils.getInstance();
-
- private static final String newline = "\n";
-
- /**
- * HashMap of the holders already generated so they do not need to be
- * generated again.
- */
- private HashMap<String, String> createdHolders = new HashMap<String, String>();
-
- String getOrCreateHolder(final String type, final File pkgLoc)
- {
-
- String fullHolderName = createdHolders.get(type);
- if (fullHolderName == null)
- {
- StringBuilder buf = new StringBuilder();
- fullHolderName = writeHolder(type, buf);
-
- createdHolders.put(type, fullHolderName);
-
- String holderName = fullHolderName.substring(fullHolderName.lastIndexOf('.') + 1);
-
- try
- {
- File sei = utils.createPhysicalFile(pkgLoc, holderName);
- FileWriter writer = new FileWriter(sei);
- writer.write(buf.toString());
- writer.flush();
- writer.close();
- }
- catch (IOException e)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_CREATE_JAX_RPC_HOLDER"), e);
- }
- }
-
- return fullHolderName;
- }
-
- private String writeHolder(final String type, final StringBuilder buf)
- {
- String pkg = type.substring(0, type.lastIndexOf('.'));
- String typeName = type.substring(type.lastIndexOf('.') + 1);
- String holderName = typeName + "Holder";
-
- utils.writeJbossHeader(buf);
- buf.append(newline);
- buf.append("package ").append(pkg).append(";").append(newline);
-
- buf.append(newline);
- buf.append("public class ").append(holderName).append(" implements ").append(Holder.class.getName());
- buf.append(newline).append("{").append(newline);
-
- // Add the public member variable.
- buf.append(newline);
- buf.append(" public ").append(type).append(" value;");
- buf.append(newline);
-
- // Add the default constructor.
- buf.append(newline);
- buf.append(" ").append("public ").append(holderName).append("()").append(newline);
- buf.append(" {").append(newline);
- buf.append(" this.value = new ").append(type).append("();").append(newline);
- buf.append(" }").append(newline);
-
- // Add the second constructor.
- buf.append(newline);
- buf.append(" ").append("public ").append(holderName).append("(final ").append(type).append(" value)").append(newline);
- buf.append(" {").append(newline);
- buf.append(" this.value = value;").append(newline);
- buf.append(" }").append(newline);
- buf.append(newline);
-
- buf.append("}").append(newline);
- return pkg + "." + holderName;
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaKeywords.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaKeywords.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaKeywords.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Singleton to check if a specified work is a restricted keyword.
- *
- * This list also includes the boolean literals and the null literal.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 5 Mar 2007
- */
-public class JavaKeywords
-{
-
- private static final JavaKeywords keywords = new JavaKeywords();
-
- private final String[] keywordsArray = { "abstract", "assert", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "default", "do",
- "double", "else", "enum", "extends", "final", "finally", "float", "for", "if", "goto", "implements", "import", "instanceof", "int", "interface", "long",
- "native", "new", "package", "private", "protected", "public", "return", "short", "static", "strictfp", "super", "switch", "synchronized", "this", "throw",
- "throws", "transient", "try", "void", "volatile", "while" };
-
- private final String[] restrictedLiteralsArray = { "true", "false", "null" };
-
- private final Set<String> restrictedKeywords;
-
- private JavaKeywords()
- {
- int keywordsSize = keywordsArray.length + restrictedLiteralsArray.length;
- keywordsSize = (int)((double)keywordsSize / 0.75) + 1;
-
- restrictedKeywords = new HashSet<String>(keywordsSize);
- addAll(restrictedKeywords, keywordsArray);
- addAll(restrictedKeywords, restrictedLiteralsArray);
- }
-
- private void addAll(final Set<String> set, final String[] data)
- {
- for (String current : data)
- {
- set.add(current);
- }
- }
-
- /**
- * The internal method to check if the keyword is a restricted
- * keyword.
- *
- * @param name
- * @return
- */
- private boolean internalIsRestrictedKeyword(final String name)
- {
- return restrictedKeywords.contains(name);
- }
-
- /**
- * Check is the passed in name is a reserved Java keyword.
- *
- * @param name
- * @return
- */
- public static boolean isJavaKeyword(final String name)
- {
- return keywords.internalIsRestrictedKeyword(name);
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,364 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.StringWriter;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.rpc.encoding.TypeMapping;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.DOMUtils;
-import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.core.soap.Style;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.tools.Configuration.OperationConfig;
-import org.jboss.ws.tools.metadata.ToolsUnifiedMetaDataBuilder;
-import org.jboss.ws.tools.wsdl.WSDLWriter;
-import org.w3c.dom.Element;
-
-/**
- * Generates a WSDL for a service endpoint.
- *
- * <BR/> This is the main entry point for all Java To WSDL needs.
- * <BR/> Features that can be set are derived from org.jboss.ws.tools.WSToolsConstants
- * <p/>
- * Notable ones are:<br/>
- * @see org.jboss.ws.tools.WSToolsConstants.WSTOOLS_FEATURE_RESTRICT_TO_TARGET_NS
- * @see org.jboss.ws.tools.WSToolsConstants.WSTOOLS_FEATURE_INCLUDE_SCHEMA_IN_WSDL
- * @see org.jboss.ws.tools.WSToolsConstants.WSTOOLS_FEATURE_USE_ANNOTATIONS
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 24-Jul-2005
- */
-public class JavaToWSDL
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JavaToWSDL.class);
- // provide logging
- private static final Logger log = Logger.getLogger(JavaToWSDL.class);
-
- // The required wsdl namespace URI
- private String wsdlNamespace;
- // The target namespace
- private String targetNamespace;
- //The type namespace (it can be different from the target namespace)
- private String typeNamespace;
- // The service name
- private String serviceName;
- // The portType name
- private String portTypeName;
-
- private Style style;
-
- private ParameterStyle parameterStyle;
-
- // Features as represented by Constants
- private Map<String, Boolean> features = new HashMap<String, Boolean>();
-
- // A Map of package/namespace mapping that needs to be passed onto types generator
- private Map<String,String> packageNamespaceMap = new HashMap<String, String>();
-
- private TypeMapping typeMapping = null;
-
- private JavaWsdlMapping javaWsdlMapping = null;
-
- private UnifiedMetaData umd = null;
-
- private boolean qualifiedElements = false;
-
- private Map<String, List<OperationConfig>> operationMap = null;
-
- /** Contruct a java to wsdl generator for a given wsdl version.
- * <p/>
- * WSDL-1.1 namespace URI: http://schemas.xmlsoap.org/wsdl/<br/>
- * WSDL-2.0 namespace URI: http://www.w3.org/2003/11/wsdl
- *
- * @param namespace wsdl namespace URI
- */
- public JavaToWSDL(String namespace)
- {
- if (Constants.NS_WSDL11.equals(namespace) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "UNSUPPORTED_WSDL_VERSION", namespace));
-
- this.wsdlNamespace = namespace;
- }
-
- /**
- * Add a feature to this subsystem
- * @see org.jboss.ws.tools.WSToolsConstants
- * @param name
- * @param value
- */
- public void addFeature(String name, boolean value)
- {
- features.put(name, new Boolean(value));
- }
-
- /**
- * Return a feature if set
- * @see org.jboss.ws.tools.WSToolsConstants
- * @param name
- * @return boolean value representing the feature, if not
- * @throws IllegalStateException Feature unrecognized
- */
- public boolean getFeature(String name)
- {
- Boolean val = features.get(name);
- if (val == null)
- throw new WSException(BundleUtils.getMessage(bundle, "FEATURE_VALUE_NOT_AVAILABLE", name));
-
- return val.booleanValue();
- }
-
- /** Get the immutable wsdl namespace URI
- */
- public String getWsdlNamespace()
- {
- return wsdlNamespace;
- }
-
- /** Get the wsdl target namespace
- */
- public String getTargetNamespace()
- {
- return targetNamespace;
- }
-
- /** Set the wsdl target namespace
- */
- public void setTargetNamespace(String targetNamespace)
- {
- this.targetNamespace = targetNamespace;
- }
-
- /** Get the type Namespace */
- public String getTypeNamespace()
- {
- return typeNamespace;
- }
-
- /** Set the Type Namespace */
- public void setTypeNamespace(String typeNamespace)
- {
- this.typeNamespace = typeNamespace;
- }
-
- /** Get the wsdl service name
- */
- public String getServiceName()
- {
- return serviceName;
- }
-
- /** Set the wsdl service name
- */
- public void setServiceName(String serviceName)
- {
- this.serviceName = serviceName;
- }
-
- /** Get the wsdl service endpoint name
- */
- public String getPortTypeName()
- {
- return portTypeName;
- }
-
- /** Set the wsdl service PortType Name
- */
- public void setPortTypeName(String endpointName)
- {
- this.portTypeName = endpointName;
- }
-
- /**
- * During the WSDL generation process, a typeMapping will be
- * created that maps xml types -> java types
- *
- * @return typeMapping
- * @exception IllegalStateException If typeMapping has not been generated
- */
- public TypeMapping getTypeMapping()
- {
- if(typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_GENERATED"));
- return typeMapping;
- }
-
- public Style getStyle()
- {
- return style;
- }
-
- public void setStyle(Style style)
- {
- this.style = style;
- }
-
- public ParameterStyle getParameterStyle()
- {
- return parameterStyle;
- }
-
- public void setParameterStyle(ParameterStyle parameterStyle)
- {
- this.parameterStyle = parameterStyle;
- }
-
- /**
- * Users can customize a java package->xml namespace map
- * that will be used in the Java to WSDL process.
- * <br/>The package representing the endpoint will always be mapped
- * to the target namespace, irrespective of an attempt to
- * customize that in the map. If you desire to change that, then
- * think about changing just the type namespace as the types are
- * generated using the typenamespace.
- *
- * @param map The Map
- */
- public void setPackageNamespaceMap(Map<String,String> map)
- {
- //Lets convert the namespace->package map to package->namespace map
- Set<String> keys = map.keySet();
- Iterator<String> iter = keys.iterator();
- while (iter != null && iter.hasNext())
- {
- String pkg = iter.next();
- packageNamespaceMap.put(map.get(pkg), pkg);
- }
- }
-
- public void setOperationMap(Map<String, List<OperationConfig>> operationMap)
- {
- this.operationMap = operationMap;
- }
-
- /**
- * Clients of Tools can build a UnifiedMetaData externally
- * and pass it to the Java To WSDL subsystem [Optional]
- *
- * @param um
- */
- public void setUnifiedMetaData(UnifiedMetaData um)
- {
- this.umd = um;
- }
-
- public UnifiedMetaData getUnifiedMetaData()
- {
- return umd;
- }
-
- public void setUmd(UnifiedMetaData umd)
- {
- this.umd = umd;
- }
-
- public boolean isQualifiedElements()
- {
- return qualifiedElements;
- }
-
- public void setQualifiedElements(boolean qualifiedElements)
- {
- this.qualifiedElements = qualifiedElements;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- /** Generate the common WSDL definition for a given endpoint
- */
- public WSDLDefinitions generate(Class endpoint)
- {
- if(log.isDebugEnabled()) log.debug("generate [endpoint=" + endpoint.getName() + ",tnsURI=" + targetNamespace + ",service=" + serviceName
- + ",portType=" + portTypeName + "]");
-
- if( umd == null)
- {
- umd = new ToolsUnifiedMetaDataBuilder(endpoint, targetNamespace,
- typeNamespace, serviceName, style, parameterStyle, operationMap).getUnifiedMetaData();
- }
-
- if (typeNamespace != null)
- packageNamespaceMap.put(endpoint.getPackage().getName(), typeNamespace);
-
- WSDLDefinitions wsdlDefinitions = null;
- try
- {
- if (Constants.NS_WSDL11.equals(wsdlNamespace))
- {
- JavaToWSDL11 javaWSDL11 = new JavaToWSDL11();
- javaWSDL11.addFeatures(features);
- javaWSDL11.setPackageNamespaceMap(packageNamespaceMap);
- javaWSDL11.addFeatures(features);
- if( umd != null )
- javaWSDL11.setUnifiedMetaData(umd);
- javaWSDL11.setQualifiedElements(qualifiedElements);
-
- wsdlDefinitions = javaWSDL11.generate(endpoint);
- typeMapping = javaWSDL11.getTypeMapping();
- javaWsdlMapping = javaWSDL11.getJavaWsdlMapping();
- }
- if (wsdlDefinitions == null)
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_GENERATE_WSDL_DEFINITIONS"));
-
- // Debug the generated wsdl
- StringWriter sw = new StringWriter();
- new WSDLWriter(wsdlDefinitions).write(sw, Constants.DEFAULT_XML_CHARSET);
- if(log.isDebugEnabled()) log.debug("Generated WSDL:\n" + sw.toString());
-
- // Debug the generated mapping file
- String jaxrpcMappingStr = null;
- if (javaWsdlMapping != null)
- {
- Element root = DOMUtils.parse(javaWsdlMapping.serialize());
- jaxrpcMappingStr = DOMWriter.printNode(root, true);
- }
- if(log.isDebugEnabled()) log.debug("Generated Mapping:\n" + jaxrpcMappingStr);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- log.error(BundleUtils.getMessage(bundle, "CANNOT_GENERATE_WSDL"), e);
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_GENERATE_WSDL_FROM", endpoint));
- }
- return wsdlDefinitions;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,220 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import javax.xml.rpc.encoding.TypeMapping;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.tools.helpers.JavaToWSDLHelper;
-
-/**
- * Java To WSDL11 Converter
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jul 24, 2005
- */
-
-public class JavaToWSDL11
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JavaToWSDL11.class);
- // provide logging
- private static final Logger log = Logger.getLogger(JavaToWSDL11.class);
-
- // The required wsdl namespace URI
- private final String wsdlNamespace = Constants.NS_WSDL11;
-
- /** Features as represented by Constants*/
- private HashMap<String, Boolean> features = new HashMap<String, Boolean>();
-
- // A Map of package/namespace mapping that needs to be passed onto types generator
- private Map<String, String> packageNamespaceMap = null;
-
- private TypeMapping typeMapping = null;
-
- private JavaWsdlMapping javaWsdlMapping = null;
-
- private UnifiedMetaData umd = null;
-
- private boolean qualifiedElements = false;
-
- /**
- * Default Constructor
- */
- public JavaToWSDL11()
- {
- if(log.isDebugEnabled()) log.debug("Creating JavaToWSDL11 instance");
- }
-
- /**
- * Add a feature to this subsystem
- * @see org.jboss.ws.tools.WSToolsConstants
- * @param name
- * @param value
- */
- public void addFeature(String name, boolean value)
- {
- features.put(name, new Boolean(value));
- }
-
- /**
- * Append features
- * @see org.jboss.ws.tools.WSToolsConstants
- * @param map
- */
- public void addFeatures(Map<String, Boolean> map)
- {
- features.putAll(map);
- }
-
- /**
- * Return a feature if set
- * @see org.jboss.ws.tools.WSToolsConstants
- * @param name
- * @return boolean value representing the feature, if not
- * @throws IllegalStateException Feature unrecognized
- */
- public boolean getFeature(String name)
- {
- Boolean val = features.get(name);
- if (val != null)
- return val.booleanValue();
- throw new WSException(BundleUtils.getMessage(bundle, "FEATURE_UNRECOGNIZED"));
- }
-
- /**
- * A customized Package->Namespace map
- *
- * @param map
- */
- public void setPackageNamespaceMap(Map<String, String> map)
- {
- packageNamespaceMap = map;
- }
-
- /**
- * During the WSDL generation process, a typeMapping will be
- * created that maps xml types -> java types
- *
- * @return typeMapping
- * @exception IllegalStateException If typeMapping has not been generated
- */
- public TypeMapping getTypeMapping()
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_GENERATED"));
- return typeMapping;
- }
-
- /**
- * Clients of Tools can build a UnifiedMetaData externally
- * and pass it to the Java To WSDL subsystem [Optional]
- *
- * @param um
- */
- public void setUnifiedMetaData(UnifiedMetaData um)
- {
- this.umd = um;
- }
-
- /**
- * Generate the common WSDL definition for a given endpoint
- */
- public WSDLDefinitions generate(Class endpoint)
- {
- WSDLDefinitions wsdl = null;
-
- if (umd != null)
- {
- JavaToWSDLHelper helper = new JavaToWSDLHelper();
- try
- {
- helper.setPackageNamespaceMap(packageNamespaceMap);
- wsdl = handleJavaToWSDLGeneration(helper, endpoint.getName());
-
- typeMapping = helper.getTypeMapping();
- }
- catch (IOException e)
- {
- log.error(BundleUtils.getMessage(bundle, "ERROR_DURING_GENERATION"), e);
- }
- }
-
- // This is somewhat of a hack
- if (qualifiedElements)
- {
- JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- if (schemaModel != null)
- schemaModel.setQualifiedElements(true);
- }
-
- return wsdl;
- }
-
- public boolean isQualifiedElements()
- {
- return qualifiedElements;
- }
-
- public void setQualifiedElements(boolean qualifiedElements)
- {
- this.qualifiedElements = qualifiedElements;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- //PRIVATE METHODS
- private WSDLDefinitions handleJavaToWSDLGeneration(JavaToWSDLHelper helper, String endpointName) throws IOException
- {
- WSDLDefinitions wsdl = null;
- if (umd == null)
- throw new WSException(BundleUtils.getMessage(bundle, "UNIFIED_META_DATA_MODEL_IS_NULL"));
-
- for (ServiceMetaData service : umd.getServices())
- {
- EndpointMetaData epMetaData = service.getEndpointByServiceEndpointInterface(endpointName);
- if (epMetaData != null)
- {
- wsdl = helper.generate(service);
- break;
- }
- }
- javaWsdlMapping = helper.getJavaWsdlMapping();
- return wsdl;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,229 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-
-/**
- * Generates a WSDL-2.0 from a Service Endpoint Interface
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 10-Oct-2004
- */
-public class JavaToWSDL20
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JavaToWSDL20.class);
- // provide logging
- private static final Logger log = Logger.getLogger(JavaToWSDL20.class);
-
- // The required wsdl namespace URI
- private final String wsdlNamespace = Constants.NS_WSDL11;
- // The target namespace
- private String targetNamespace;
- //The type namespace (it can be different from the target namespace)
- private String typeNamespace;
- // The service name
- private String serviceName;
-
- /** Name of the PortType*/
- private String portTypeName;
-
- /** Features as represented by Constants*/
- private HashMap<String,Boolean> features = new HashMap<String,Boolean>();
-
- // A Map of package/namespace mapping that needs to be passed onto types generator
- private Map<String,String> packageNamespaceMap = null;
-
- /**
- * CTR in the simplest form
- * @param sei Class that represents the SEI
- * @param targetNS Target Namespace
- * @param typeNS Type Namespace
- */
- /*public JavaToWSDL20(Class sei, String targetNS, String typeNS )
- {
- super(sei,targetNS, typeNS);
- this.wsdlNamespace = Constants.NS_WSDL20;
- }*/
-
- /**
- * Default Constructor
- */
- public JavaToWSDL20()
- {
- if(log.isDebugEnabled()) log.debug("Creating JavaToWSDL20 instance");
- }
-
- /**
- * Add a feature to this subsystem
- * @param name
- * @param value
- */
- public void addFeature(String name, boolean value)
- {
- features.put(name,new Boolean(value));
- }
-
- /**
- * Append features
- * @param map
- */
- public void addFeatures(Map<String,Boolean> map)
- {
- features.putAll(map);
- }
-
- /**
- * Return a feature if set
- * @param name
- * @return boolean value representing the feature, if not
- * @throws IllegalStateException Feature unrecognized
- */
- public boolean getFeature(String name)
- {
- Boolean val = features.get(name);
- if(val != null) return val.booleanValue();
- throw new WSException(BundleUtils.getMessage(bundle, "FEATURE_UNRECOGNIZED"));
- }
-
- /**
- * @return Returns the endpointName.
- */
- public String getPortTypeName()
- {
- return portTypeName;
- }
-
-
-
- /**
- * @param endpointName The endpointName to set.
- */
- public void setPortTypeName(String endpointName)
- {
- this.portTypeName = endpointName;
- }
-
- /**
- * A customized Package->Namespace map
- *
- * @param map
- */
- public void setPackageNamespaceMap(Map<String,String> map)
- {
- packageNamespaceMap = map;
- }
-
-
-
- /**
- * @return Returns the serviceName.
- */
- public String getServiceName()
- {
- return serviceName;
- }
-
-
- /**
- * @param serviceName The serviceName to set.
- */
- public void setServiceName(String serviceName)
- {
- this.serviceName = serviceName;
- }
-
-
- /**
- * @return Returns the targetNamespace.
- */
- public String getTargetNamespace()
- {
- return targetNamespace;
- }
-
-
- /**
- * @param targetNamespace The targetNamespace to set.
- */
- public void setTargetNamespace(String targetNamespace)
- {
- this.targetNamespace = targetNamespace;
- }
-
- /**
- * Get the TypeNamespace
- *
- * @return
- */
- public String getTypeNamespace()
- {
- return typeNamespace;
- }
-
- /**
- *
- * Set the TypeNamespace
- * @param typeNamespace
- */
- public void setTypeNamespace(String typeNamespace)
- {
- this.typeNamespace = typeNamespace;
- }
-
- /**
- * Generate the common WSDL definition for a given endpoint
- */
- public WSDLDefinitions generate(Class endpoint)
- {
-// WSDLDefinitions wsdl = new WSDLDefinitions();
-// wsdl.setWsdlNamespace(this.wsdlNamespace);
-// //Delegate the generation of WSDL to a Helper class
-// JavaToWSDLHelper helper = new JavaToWSDLHelper(wsdl,this.wsdlNamespace,this.targetNamespace);
-// if(typeNamespace == null ) typeNamespace = targetNamespace;
-// helper.setTypeNamespace(typeNamespace);
-// JavaToXSDIntf jxsd = new JavaToXSD(null);
-// if(packageNamespaceMap != null)
-// jxsd.setPackageNamespaceMap(packageNamespaceMap);
-// jxsd.addFeatures(features);
-// helper.setJavaToXSD(jxsd);
-// helper.setEndpoint(endpoint);
-// helper.appendDefinitions();
-// //TODO: Revisit when wsdl 2.0 support is provided
-// /*helper.generateTypesForXSD();
-// helper.generateInterfaces(portTypeName);
-// helper.generateBindings();
-// helper.generateServices(this.serviceName); */
-// return wsdl;
-
- return null;
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/JavaWriter.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,401 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.tools.XSDTypeToJava.VAR;
-
-/**
- * Handles writing of Java source files (XSD-> Java)
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since May 6, 2005
- */
-public class JavaWriter
-{
- private String newline = "\n";
-
- protected WSDLUtils utils = WSDLUtils.getInstance();
-
- public JavaWriter()
- {
- }
-
- /**
- * Creates a Java Class that represents a Simple Type restricted by enumeration
- * @param fname
- * @param lst List of enumerated values (we support Strings only)
- * @param loc Location where the file has to be created
- * @param pkgname Package Name
- * @throws IOException
- */
-
- public void createJavaFileForEnumeratedValues(String fname, StringList lst, File loc, String pkgname, XSSimpleTypeDefinition type) throws IOException
- {
- List importList = new ArrayList();
- importList.add("java.util.Map");
- importList.add("java.util.HashMap");
- File sei = utils.createPhysicalFile(loc, fname);
- StringBuilder buf = utils.createClassBasicStructure(pkgname, fname, type, importList, null);
-
- buf.append("private java.lang.String value;" + newline);
- buf.append("private static Map valueMap = new HashMap();" + newline);
-
- //For now, we will support Strings only
- int lenOfArr = lst != null ? lst.getLength() : 0;
- for (int i = 0; i < lenOfArr; i++)
- {
- String str = lst.item(i);
- buf.append("public static final String _" + str + "String = \"" + str + "\";" + newline);
- }
-
- for (int i = 0; i < lenOfArr; i++)
- {
- String str = lst.item(i);
- buf.append("public static final java.lang.String _" + str + " = new java.lang.String(_" + str + "String);");
- buf.append(newline);
- }
-
- for (int i = 0; i < lenOfArr; i++)
- {
- String str = lst.item(i);
- buf.append("public static final " + fname + " " + str + " = new " + fname + "(_" + str + ");");
- buf.append(newline);
- }
-
- //Create CTR
- buf.append(newline + newline + "protected " + fname + "(java.lang.String value) { " + newline);
-
- buf.append("this.value = value;valueMap.put(this.toString(), this); " + newline + "}");
-
- buf.append(newline + newline);
-
- //Create getValue method
- buf.append(newline + " public java.lang.String getValue() {" + newline + " return value;" + newline + "}");
-
- buf.append(newline + newline);
-
- //Create fromValue method
- buf.append(newline + "public static " + fname + " fromValue(java.lang.String value)" + newline);
-
- buf.append(" throws java.lang.IllegalStateException {" + newline);
-
- for (int i = 0; i < lenOfArr; i++)
- {
- String str = lst.item(i);
- if (i > 0)
- buf.append("else ");
-
- buf.append("if (" + str + ".value.equals(value)) {" + newline);
-
- buf.append("return " + str + ";" + newline);
-
- buf.append("}" + newline);
- }
-
- buf.append(" throw new IllegalArgumentException();" + newline + "}" + newline + newline);
-
- //End- fromValue method
- //create- fromString method
-
- buf.append(newline + "public static " + fname + " fromString(String value)" + newline);
-
- buf.append(" throws java.lang.IllegalStateException {" + newline);
-
- buf.append(fname + " ret = (" + fname + ")valueMap.get(value);" + newline);
-
- buf.append("if (ret != null) {" + newline + " return ret;" + newline + " }" + newline + newline);
-
- for (int i = 0; i < lenOfArr; i++)
- {
- String str = lst.item(i);
- if (i > 0)
- buf.append("else ");
- buf.append("if (value.equals(_" + str + "String)) {" + newline);
- buf.append("return " + str + ";" + newline + "}");
- }
-
- buf.append(newline + " throw new IllegalArgumentException();" + newline + "}" + newline + newline);
-
- //End- fromString method
- //create - toString method
-
- buf.append(newline + " public String toString() {" + newline + " return value.toString();" + newline + "}" + newline);
-
- //End - toString method
-
- //create -readResolve method
-
- buf.append(newline + "private Object readResolve()" + newline + " throws java.io.ObjectStreamException {" + newline
- + " return fromValue(getValue());" + newline + " } " + newline);
- //End - readResolve method
-
- //create - equals method
-
- buf.append(newline + "private boolean equals(Object obj){" + newline + " if (!(obj instanceof " + fname + ")) {" + newline + " return false;"
- + newline + " } " + newline);
- buf.append("return ((" + fname + ")obj).value.equals(value);" + newline + "}" + newline);
- //End - equals method
-
- //create - hashCode method
-
- buf.append(newline + " public int hashCode() { " + newline + " return value.hashCode(); " + newline + " }" + newline);
- //End - hashCode method
- buf.append("}" + newline); //end of class
-
- FileWriter writer = new FileWriter(sei);
- writer.write(buf.toString());
- writer.flush();
- writer.close();
- }
-
- /**
- * A simple utility method that just creates a Java source file
- *
- * @param location Location where the Java source file needs to be written
- * @param filename File Name of the Java source
- * @param packageName
- * @param vars
- * @param importList List of strings that represent imports
- * @param baseTypeName Name of base class
- * @param isExceptionType Exception types need special treatment
- * @param typeNameToBaseVARList Needed if we are dealing with an exception type
- * @throws IOException
- */
- public void createJavaFile(File location, String filename, String packageName, List<VAR> vars, List<String> importList, String baseTypeName,
- boolean isExceptionType, boolean isSerializable, Map<String, List> typeNameToBaseVARList) throws IOException
- {
- File newLoc = null;
- if (needToCreatePackageStructure(location, packageName))
- newLoc = utils.createPackage(location.getPath(), packageName);
- else newLoc = location;
- String classname = ToolsUtils.convertInvalidCharacters(utils.chop(filename, ".java"));
- File sei = utils.createPhysicalFile(newLoc, classname);
- StringBuilder buffer = new StringBuilder();
- utils.writeJbossHeader(buffer);
-
- //Create the package Name
- buffer.append(newline).append("package ").append(packageName).append(";");
-
- if (importList != null)
- {
- for (String imp : importList)
- {
- buffer.append(newline).append("import ").append(imp).append(";");
- }
- }
- buffer.append(newline).append(newline);
- buffer.append(newline).append("public class ").append(classname).append(newline);
- if (baseTypeName != null && baseTypeName.length() > 0)
- buffer.append(" extends ").append(baseTypeName);
- if (isSerializable)
- buffer.append(" implements java.io.Serializable");
- buffer.append("{").append(newline);
- createVariables(buffer, vars, isExceptionType);
- createCTR(buffer, classname, vars, isExceptionType, typeNameToBaseVARList);
- buffer.append(newline);
- createAccessors(buffer, vars, isExceptionType);
- buffer.append("}").append(newline);
- //Create a FileWriter
- FileWriter writer = new FileWriter(sei);
- writer.write(buffer.toString());
- writer.flush();
- writer.close();
- }
-
- //PRIVATE METHODS
- private void createCTR(StringBuilder buf, String cname, List vars, boolean isExceptionType, Map<String, List> typeNameToBaseVARList)
- {
- if (vars.size() > 0 && isExceptionType == false)
- {
- buf.append("public " + cname + "(){}"); //Empty CTR
- buf.append(newline);
- buf.append(newline);
- }
-
- StringBuilder ctrvarbuf = new StringBuilder();
- StringBuilder ctrintbuf = new StringBuilder();
-
- boolean calledSuper = false;
- if (isExceptionType)
- {
- List<VAR> baseList = typeNameToBaseVARList.get(cname);
- int baseLen = baseList != null ? baseList.size() : 0;
- String arrStr = "[]";
-
- if (baseLen > 0)
- {
- calledSuper = true;
- ctrintbuf.append("super(");
- for (int i = 0; i < baseLen; i++)
- {
-
- if (i > 0)
- {
- ctrvarbuf.append(", ");
- ctrintbuf.append(", ");
- }
- VAR v = baseList.get(i);
- ctrvarbuf.append(v.getVartype());
- if (v.isArrayType)
- ctrvarbuf.append(arrStr);
-
- ctrvarbuf.append(" ").append(v.getVarname());
- ctrintbuf.append(v.getVarname());
- }
- ctrintbuf.append(");").append(newline);
- }
- }
- Iterator iter = vars.iterator();
- int index = 0;
- while (iter.hasNext())
- {
- if (index++ > 0 || calledSuper)
- {
- ctrvarbuf.append(", ");
- }
- VAR v = (VAR)iter.next();
- String name = v.getVarname();
- if (JavaKeywords.isJavaKeyword(name))
- {
- name = "_" + name;
- }
-
- String type = v.getVartype();
- boolean isArr = v.isArrayType();
- ctrvarbuf.append(type);
- if (isArr)
- ctrvarbuf.append("[]");
- ctrvarbuf.append(" " + name);
- if (isExceptionType && calledSuper == false && index == 1 && v.getVartype().equals("java.lang.String"))
- {
- ctrintbuf.append("super(").append(v.getVarname()).append(");").append(newline);
- calledSuper = true;
- }
-
- ctrintbuf.append("this." + name + "=" + name + ";");
- ctrintbuf.append(newline);
- }
- buf.append("public " + cname + "(" + ctrvarbuf.toString() + "){");
- buf.append(newline);
- buf.append(ctrintbuf.toString());
- buf.append("}");
- }
-
- private void createAccessors(StringBuilder buf, List vars, boolean isExceptionType)
- {
- Iterator iter = vars.iterator();
- while (iter.hasNext())
- {
- VAR v = (VAR)iter.next();
- String name = v.getVarname();
- String internalName = name;
- if (JavaKeywords.isJavaKeyword(internalName))
- {
- internalName = "_" + internalName;
- }
-
- String type = v.getVartype();
- boolean isArr = v.isArrayType();
- //Add getter/setter also
- buf.append("public " + type);
- if (isArr)
- buf.append("[] ");
- String str = " get";
- //boolean case
- if (type.equals("boolean"))
- str = " is";
- buf.append(str + utils.getMixedCase(name) + "() { return " + internalName + " ;}");
- buf.append(newline);
- buf.append(newline);
- if (isExceptionType == false)
- writeSetter(buf, name, internalName, type, isArr);
- buf.append(newline);
- buf.append(newline);
- }
- }
-
- private List createVariables(StringBuilder buf, List vars, boolean isExceptionType)
- {
- if (vars == null)
- return vars;
- Iterator iter = vars.iterator();
- while (iter.hasNext())
- {
- VAR v = (VAR)iter.next();
- String name = v.getVarname();
- // JBWS-1170 Convert characters which are illegal in Java identifiers
- name = ToolsUtils.convertInvalidCharacters(name);
-
- if (JavaKeywords.isJavaKeyword(name))
- {
- name = "_" + name;
- }
-
- String type = v.getVartype();
- boolean isArr = v.isArrayType();
- buf.append(newline);
- if (isExceptionType)
- buf.append("private " + type);
- else buf.append("protected " + type);
- if (isArr)
- buf.append("[] ");
- buf.append(" " + name).append(";").append(newline);
- }
- return vars;
- }
-
- private boolean needToCreatePackageStructure(File location, String packageName)
- {
- packageName = packageName.replace('.', '/');
- try
- {
- String externalForm = location.toURL().toExternalForm();
- return externalForm.indexOf(packageName) < 0;
- }
- catch (MalformedURLException e)
- {
- // ignore
- return false;
- }
- }
-
- private void writeSetter(StringBuilder buf, String name, String internalName, String type, boolean isArr)
- {
- buf.append("public void ");
- buf.append("set" + utils.getMixedCase(name) + "(" + type);
- if (isArr)
- buf.append("[]");
-
- buf.append(" " + internalName + "){ this." + internalName + "=" + internalName + "; }");
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/NamespacePackageMapping.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/NamespacePackageMapping.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/NamespacePackageMapping.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,237 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.util.HashSet;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import org.jboss.ws.api.util.BundleUtils;
-
-/**
- * Utility class for mapping an XML namespace to a Java package.
- *
- * This mapping is performed according to the algorith defined in section D.5.1
- * of the JAXB 2.0 specification.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 18-Jul-2006
- */
-public class NamespacePackageMapping
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(NamespacePackageMapping.class);
-
- private static final NamespacePackageMapping npm = new NamespacePackageMapping();
-
- /*
- * The JAXB specification says to use the list of country codes as defined in ISO-3166 1981 to identify the top
- * level domains.
- *
- * The recommendations in the Java Language Specification for selecting unique package names is based around
- * choosing package names using the domain name of your organisation.
- *
- * Not all countries use the country code listed in ISO-3166 as their top level domain. As an example 'The United
- * Kingdom of Great Britain and Northern Ireland' uses .uk as the top level domain, however ISO-3166 lists the
- * country code as gb.
- *
- * For this reason I have used the list of country codes available from here: -
- *
- * http://www.iana.org/cctld/cctld-whois.htm
- */
- private final String[] countryCodesArray = { "ac", "ad", "ae", "af", "ag", "ai", "al", "am", "an", "ao", "aq", "ar", "as", "at", "au", "aw", "az", "ax", "ba", "bb",
- "bd", "be", "bf", "bg", "bh", "bi", "bj", "bm", "bn", "bo", "br", "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl",
- "cm", "cn", "co", "cr", "cs", "cu", "cv", "cx", "cy", "cz", "de", "dj", "dk", "dm", "do", "dz", "ec", "ee", "eg", "eh", "er", "es", "et", "eu", "fi", "fj",
- "fk", "fm", "fo", "fr", "ga", "gb", "gd", "ge", "gf", "gg", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", "hk", "hm", "hn",
- "hr", "ht", "hu", "id", "ie", "il", "im", "in", "io", "iq", "ir", "is", "it", "je", "jm", "jo", "jp", "ke", "kg", "kh", "ki", "km", "kn", "kp", "kr", "kw",
- "ky", "kz", "la", "lb", "lc", "li", "lk", "lr", "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "mg", "mh", "mk", "ml", "mm", "mn", "mo", "mp", "mq", "mr",
- "ms", "mt", "mu", "mv", "mw", "mx", "my", "mz", "na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", "nu", "nz", "om", "pa", "pe", "pf", "pg", "ph",
- "pk", "pl", "pm", "pn", "pr", "ps", "pt", "pw", "py", "qa", "re", "ro", "ru", "rw", "sa", "sb", "sc", "sd", "se", "sg", "sh", "si", "sj", "sk", "sl", "sm",
- "sn", "so", "sr", "st", "sv", "sy", "sz", "tc", "td", "tf", "tg", "th", "tj", "tk", "tl", "tm", "tn", "to", "tp", "tr", "tt", "tv", "tw", "tz", "ua", "ug",
- "uk", "um", "us", "uy", "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu", "wf", "ws", "ye", "yt", "yu", "za", "zm", "zw" };
-
- private final String[] topLevelDomainsArray = { "com", "gov", "net", "org", "edu" };
-
- private final Set<String> topLevelDomains;
-
- /**
- * Convert an XML namespace to a Java package using the algorithm defined in section
- * D.5.1 of the JAXB specification.
- *
- * @param targetNS
- * @return
- */
- public static String getJavaPackageName(final String targetNS)
- {
- return npm.convertNamespaceToPackage(targetNS);
- }
-
- private NamespacePackageMapping()
- {
- int topLevelSize = countryCodesArray.length + topLevelDomainsArray.length;
- topLevelSize = (int)((double)topLevelSize / 0.75) + 1;
-
- topLevelDomains = new HashSet<String>(topLevelSize);
- addAll(topLevelDomains, countryCodesArray);
- addAll(topLevelDomains, topLevelDomainsArray);
- }
-
- private void addAll(final Set<String> set, final String[] data)
- {
- for (String current : data)
- {
- set.add(current);
- }
- }
-
- private String convertNamespaceToPackage(final String targetNS)
- {
- String workingNS = targetNS;
-
- boolean schemeIsURN = workingNS.startsWith("urn:");
-
- if (workingNS.startsWith("http://"))
- {
- workingNS = workingNS.substring(7);
- }
- else if (workingNS.startsWith("https://"))
- {
- workingNS = workingNS.substring(8);
- }
- else if (workingNS.startsWith("urn:"))
- {
- workingNS = workingNS.substring(4);
- }
- else
- {
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "TARGETNS_SHOULD_START_WITH"));
- }
-
- // Test for an ending .?? .??? or .html
- boolean hasExtension = workingNS.matches("^.*\\/.*\\.((.{2,3})|(html))$");
- if (hasExtension)
- {
- workingNS = workingNS.substring(0, workingNS.lastIndexOf("."));
- }
-
- String[] tokens = workingNS.split("[\\/\\:]+");
-
- if (schemeIsURN)
- {
- tokens[0] = tokens[0].replace('-', '.');
- }
-
- String[] packagePrefix = convertDomainToPackage(tokens[0]);
- String[] temp = tokens;
-
- tokens = new String[packagePrefix.length + temp.length - 1];
- System.arraycopy(packagePrefix, 0, tokens, 0, packagePrefix.length);
- System.arraycopy(temp, 1, tokens, packagePrefix.length, temp.length - 1);
-
- StringBuilder packageName = new StringBuilder();
-
- for (int i = 0; i < tokens.length; i++)
- {
- String current = tokens[i];
- current = current.toLowerCase();
- current = convertReserved(current);
- current = convertStart(current);
- current = ToolsUtils.convertInvalidCharacters(current);
-
- packageName.append(current);
- if (i < tokens.length - 1)
- {
- packageName.append(".");
- }
- }
-
- return packageName.toString();
- }
-
- /**
- * Check if the passed in component is a reserved keyword,
- * if it is append and underscore and return.
- */
- private String convertReserved(final String component)
- {
- String result = component;
- if (JavaKeywords.isJavaKeyword(result))
- {
- result = result + "_";
- }
-
- return result;
- }
-
- /**
- * Check if the first character of the component is a valid character to
- * start an identifier, if it is not prefix it with an underscore and return.
- */
- private String convertStart(final String component)
- {
- String result = component;
-
- if (Character.isJavaIdentifierStart(result.charAt(0)) == false)
- {
- result = "_" + result;
- }
-
- return result;
- }
-
- /**
- * Given a domain name split it into the corresponding parts, and convert
- * into the order suitable for creating a package name.
- *
- * The transposition is only performed if the last element is a top level domain
- * ("com", "gov", "net", "org", "edu" or a country code used as a top level domain).
- */
- private String[] convertDomainToPackage(final String domain)
- {
- String[] parts = domain.split("\\.");
-
- String[] packge;
-
- if (topLevelDomains.contains(parts[parts.length - 1]))
- {
- if (parts[0].equals("www"))
- {
- packge = new String[parts.length - 1];
- }
- else
- {
- packge = new String[parts.length];
- }
-
- for (int i = 0; i < packge.length; i++)
- {
- packge[i] = parts[parts.length - i - 1];
- }
- }
- else
- {
- packge = parts;
- }
-
- return packge;
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/RPCSignature.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/RPCSignature.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/RPCSignature.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,101 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-
-public class RPCSignature
-{
- private Collection<WSDLRPCPart> parameters = new ArrayList<WSDLRPCPart>();
- private WSDLRPCPart returnParameter;
-
- public Collection<WSDLRPCPart> parameters()
- {
- return parameters;
- }
-
- public WSDLRPCPart returnParameter()
- {
- return returnParameter;
- }
-
- public RPCSignature(WSDLInterfaceOperation operation)
- {
- WSDLInterfaceOperationInput input = WSDLUtils.getWsdl11Input(operation);
- WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(operation);
- for (WSDLRPCSignatureItem item : operation.getRpcSignatureItems())
- {
- if (item.getDirection() == Direction.RETURN)
- {
- if (output != null)
- returnParameter = output.getChildPart(item.getName());
- continue;
- }
-
- WSDLRPCPart part = null;
- if (input != null)
- part = input.getChildPart(item.getName());
- if (output != null && part == null)
- part = output.getChildPart(item.getName());
-
- if (part != null)
- parameters.add(part);
- }
-
- for (WSDLRPCPart part : input.getChildParts())
- {
- if (operation.getRpcSignatureitem(part.getName()) == null)
- parameters.add(part);
- }
-
- if (output != null)
- {
- for (WSDLRPCPart part : output.getChildParts())
- {
- if (operation.getRpcSignatureitem(part.getName()) == null)
- {
- // Filter in-outs
- if (input.getChildPart(part.getName()) != null)
- continue;
-
- if (returnParameter == null)
- {
- returnParameter = part;
- }
- else
- {
- parameters.add(part);
- }
- }
- }
- }
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/ToolsUtils.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,513 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.beans.BeanInfo;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.URI;
-import java.rmi.Remote;
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.holders.ByteArrayHolder;
-import javax.xml.rpc.holders.Holder;
-
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.jaxrpc.binding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.binding.SimpleSerializerFactory;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.JavaUtils;
-
-/**
- * Util class for the JBossWS Tools project
- * Contains important methods that deal with JAXB 1, JAXB2
- * and JAXWS 2.0 specs
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jun 25, 2005
- */
-public class ToolsUtils
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ToolsUtils.class);
-
- /**
- * Maintains a static reference to the TypeMapping just for
- * the standard type mappings
- */
- private static LiteralTypeMapping mapping = new LiteralTypeMapping();
-
- //Hide the constructor - this is a class with static methods
- private ToolsUtils()
- {
- throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_INSTANTIATE_TOOLSUTILS"));
- }
-
- /**
- * Checks whether the class extends java.rmi.Remote
- *
- * @param paramType
- */
- public static void checkParameterType( Class paramType)
- {
- if (Remote.class.isAssignableFrom(paramType))
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "METHOD_PARAM_SHOULDN_NOT_EXTEND_REMOTE"));
- }
-
- /**
- * Ensure that the first alphabet is uppercase
- * @param fname
- * @return String that has first character upper case
- */
- public static String firstLetterUpperCase(String fname)
- {
- if (fname == null || fname.length() == 0)
- throw new WSException(BundleUtils.getMessage(bundle, "STRING_PASSED_IS_NULL"));
- //Ensure that the first character is uppercase
- if (Character.isLowerCase(fname.charAt(0)))
- {
- char[] chars = fname.toCharArray();
- char f = Character.toUpperCase(chars[0]);
- chars[0] = f;
- fname = new String(chars);
- }
- return fname;
- }
-
- /**
- * Ensure that the first alphabet is lowercase
- * @param fname
- * @return String that has first character lower case
- */
- public static String firstLetterLowerCase(String fname)
- {
- if (fname == null || fname.length() == 0)
- throw new WSException(BundleUtils.getMessage(bundle, "STRING_PASSED_IS_NULL"));
- //Ensure that the first character is lowercase
- if (Character.isUpperCase(fname.charAt(0)))
- {
- char[] chars = fname.toCharArray();
- char f = Character.toLowerCase(chars[0]);
- chars[0] = f;
- fname = new String(chars);
- }
- return fname;
- }
-
- /**
- * Returns a Java Identifier from a XML Name
- * as specified by both JAXB 1 and JAXB 2 specs.
- * Used for deriving class names, method names etc
- * @param xmlName XML Name
- * @return Legal Java Identifier
- */
- public static String getJavaIdentifier(String xmlName)
- {
- if(xmlName == null || xmlName.length() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "XMLNAME_IS_NULL"));
- xmlName = xmlName.trim(); //Get rid of whitespaces
-
- //Remove leading and trailing punctuation marks
- xmlName = trimPunctuationMarks( xmlName);
-
- if(xmlName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "XMLNAME_IS_NULL"));
-
- //Get rid of characters that are not legal characters
- int lenStr = xmlName.length();
- char[] mainArr = new char[lenStr];
- int j = 0;
- for(int i = 0; i < lenStr;i++)
- {
- char ch = xmlName.charAt(i);
- if(Character.isJavaIdentifierPart(ch))
- {
- mainArr[j] = ch;
- j++;
- }
- }
-
- //Copy into a new array
- char[] secArr = new char[j];
- for(int x = 0; x < j ; x++)
- {
- secArr[x] = mainArr[x];
- }
-
- return new String(secArr);
- }
-
- /**
- * Get valid Java Method name as per JAXB 1 and JAXB2.0 spec
- * @param xmlName XML Name
- * @param setter is this method for which the name is sought, a setter?
- * @return Valid Java method name
- */
- public static String getJavaMethodName( String xmlName, boolean setter)
- {
- xmlName = getJavaIdentifier(xmlName);
- xmlName = firstLetterUpperCase(xmlName);
- String lcase = xmlName.toLowerCase();
- if( setter && !lcase.startsWith("set"))
- {
- xmlName = "set" + xmlName;
- }
- else
- if(!setter && !lcase.startsWith("get"))
- {
- xmlName = "get" + xmlName;
- }
- return firstLetterLowerCase(xmlName);
- }
-
-
- /**
- * Get a valid Java class name as per JAXB 1 and JAXB2.0 spec
- * @param xmlName XML Name
- * @return Valid class name
- */
- public static String getValidClassName( String xmlName)
- {
- xmlName = getJavaIdentifier(xmlName);
- //Ensure the first character is uppercase
- return firstLetterUpperCase(xmlName);
- }
-
- /**
- * Given a Java Class, return the xmlType
- *
- * @param javaClass
- * @param ns
- * @return
- */
- public static QName getXMLType(Class javaClass, String ns)
- {
- WSDLUtils utils = WSDLUtils.getInstance();
- QName xmlType = null;
- if(void.class == javaClass)
- return null;
-
- /**
- * Special boundary condition: When the javaClass is ByteArrayHolder,
- * the xmlType should be xsd:base64Binary, but because of our algorithm,
- * it will become xsd:byte - so need to bypass this.
- */
- if(ByteArrayHolder.class == javaClass)
- {
- return Constants.TYPE_LITERAL_BASE64BINARY;
- }
-
- if(Holder.class.isAssignableFrom(javaClass))
- javaClass = utils.getJavaTypeForHolder(javaClass);
- xmlType = SchemaUtils.getInstance().getToolsOverrideInTypeMapping(javaClass);
- if(xmlType != null)
- return xmlType;
-
- // Byte[] should always be mapped to an array of bytes
- // String[] should always be mapped to an array of strings
- if (javaClass != Byte[].class && javaClass != String[].class)
- {
- xmlType = mapping.getXMLType(javaClass,false);
- if(xmlType != null)
- return xmlType;
- }
- //Else create a QName
- String typeName = utils.getJustClassName(javaClass);;
- if(javaClass.isArray())
- {
- int dim = utils.getArrayDimension(javaClass);
- Class cls = javaClass;
- while(cls.isArray())
- {
- cls = cls.getComponentType();
- }
- typeName = WSDLUtils.getInstance().getJustClassName(cls);
- while(dim-- > 0)
- typeName += ".Array";
- }
-
- return new QName(ns, typeName);
-
- /*SchemaCreatorIntf sc = new SchemaTypeCreator();
- sc.setRestrictToTargetNamespace(restrictNS);
- //For basic types, the following algorithm will return the simple types
- JBossXSTypeDefinition xt = sc.generateTypeWithoutRegistration(null, javaClass,ns);
- return new QName(xt.getNamespace(), xt.getName());*/
- }
-
- /**
- * Get the XML Type for an attachment mime type
- * (will be xsd:hexbinary)
- *
- * @param mimetype
- * @return
- */
- public static QName getXMLTypeForAttachmentType( String mimetype)
- {
- return Constants.TYPE_LITERAL_HEXBINARY;
- }
-
-
- /**
- * Returns whether a character is a punctuation
- * @param c
- * @return true:if punctuation, false - otherwise
- */
- public static boolean isPunctuation(char c)
- {
- boolean ret = true;
- //Idea is if it is not a letter, a digit, a white space, it is a punct
- if(Character.isDigit(c)) ret = false;
- else
- if(Character.isLetter(c)) ret = false;
- else
- if(Character.isISOControl(c)) ret = false;
- else
- if(Character.isWhitespace(c)) ret = false;
- return ret;
- }
-
- /**
- * Checks whether a class is a legal jaxrpc value type
- * as defined by jaxrpc 1.l specification
- *
- * @param cls
- * @return
- */
- public static boolean isJaxrpcValueType(Class cls)
- {
- boolean result = true;
- if(isJaxrpcRegularType(cls))
- return false;
- boolean defaultCTR = false;
-
- //Does it define a default constructor?
- Constructor[] cons = cls.getDeclaredConstructors();
- for (int i=0; i<cons.length; i++)
- {
- Class[] paramTypes = cons[i].getParameterTypes();
- if(paramTypes == null || paramTypes.length == 0)
- {
- defaultCTR = true;
- break;
- }
- }
- if(defaultCTR == false)
- return false;
-
- //Does the class extend Remote?
- if(Remote.class.isAssignableFrom(cls))
- return false;
-
- //Check the public fields are Jaxprc types
- Field[] fieldArr = cls.getDeclaredFields();
- int length = Array.getLength(fieldArr);
- for(int i = 0 ; i < length ; i++)
- {
- if(!isJaxrpcPermittedType(fieldArr[i].getType()) )
- return false;
- }
- return result;
- }
-
-
- /**
- * Basic check whether the passed argument: class
- * contain properties
- *
- * @param cls
- * @return
- */
- public static boolean isJavaBean(Class cls)
- {
- boolean result = false;
- if(isJaxrpcRegularType(cls))
- return false;
- try
- {
- BeanInfo bi = Introspector.getBeanInfo(cls);
- PropertyDescriptor[] pds = bi.getPropertyDescriptors();
- if(pds != null && pds.length > 0)
- result = true;
- }
- catch (java.beans.IntrospectionException e)
- {
- }
- return result;
- }
-
- public static int getNumberOfParticles(Class javaBean)
- {
- if(isJavaBean(javaBean) == false)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_JAVABEAN_ARGUMENT"));
-
- //Get number of public fields
- Field[] pubFields = javaBean.getFields();
- int pub = pubFields != null ? pubFields.length : 0;
-
- int props = 0;
- //Get number of properties via bean introspection
- try
- {
- BeanInfo bi = Introspector.getBeanInfo(javaBean);
- PropertyDescriptor[] pds = bi.getPropertyDescriptors();
- props = pds != null ? Array.getLength(pds) : 0;
- int len = 0;
- for(int i = 0; i < props ; i++)
- {
- PropertyDescriptor pd = pds[i];
- Method readMethod = pd.getReadMethod();
- if("getClass".equals(readMethod.getName()))
- continue;
- len++;
- }
- props = len;
- }
- catch (java.beans.IntrospectionException e)
- {
- }
-
- return pub + props;
- }
-
- /**
- * Determines whether a Java Class can be unwrapped
- *
- * @param javaType
- * @param isReturnType Does the javaType represent a return type
- * of a method?
- * @return
- */
- public static boolean canUnWrap(Class javaType, boolean isReturnType)
- {
- boolean bool = false;
-
- if(isReturnType)
- {
- bool = ( ToolsUtils.isJavaBean(javaType)
- && ToolsUtils.getNumberOfParticles(javaType) == 1 );
- }
- else
- bool = ToolsUtils.isJaxrpcValueType(javaType);
-
- return bool;
- }
-
- /**
- * Checks whether the class type that is passed as argument is
- * a legal Jaxrpc type as defined by jaxrpc 1.1 spec
- *
- * @param type
- * @return
- */
- public static boolean isJaxrpcPermittedType(Class type)
- {
- if(isJaxrpcRegularType(type) == false)
- return isJaxrpcValueType(type);
- else
- return true;
- }
-
- /**
- * Checks whether the class type that is passed as argument is
- * a legal Jaxrpc type (and not a Value Type) as defined by jaxrpc 1.1 spec
- *
- * @param type
- * @return
- */
- public static boolean isJaxrpcRegularType(Class type)
- {
- boolean result = false;
- //Check if it is a primitive type
- if(JavaUtils.isPrimitive(type))
- return true;
- //Check if it is an array of primitive types
- Class wrapperType = JavaUtils.getWrapperType(type);
- if( wrapperType != null && wrapperType != type )
- return true;
- //Check if it is a wrapper type or array
- Class primType = JavaUtils.getPrimitiveType(type);
- if( primType != null && primType != type)
- return true;
- //Check standard jaxrpc 1.1 classes
- if(String.class == type || Date.class == type || Calendar.class == type ||
- BigInteger.class == type || BigDecimal.class == type || QName.class == type ||
- URI.class == type)
- return true;
- return result;
- }
-
- public synchronized static void registerJavaType(LiteralTypeMapping typeMapping,
- Class clazz, QName xmlType)
- {
- if(typeMapping.isRegistered(clazz,xmlType) == false )
- typeMapping.register(clazz,xmlType, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- }
-
- /**
- * Check all of the characters in the component and for any that are not valid
- * in Java identifiers replace with an underscore.
- */
- public static String convertInvalidCharacters(final String component)
- {
- String result = component;
- for (int i = 0; i < result.length(); i++)
- {
- if (Character.isJavaIdentifierPart(result.charAt(i)) == false)
- {
- result = result.replace(result.charAt(i), '_');
- }
- }
-
- return result;
- }
-
- //Private methods
- private static String trimPunctuationMarks( String str)
- {
- if(str == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "STR_IS_NULL"));
- //Check if the first character is permissible
- if(Character.isJavaIdentifierStart(str.charAt(0)) == false)
- str = str.substring(1);
- else
- //Check if the first character is a punctuation
- if(isPunctuation(str.charAt( 0 )) )
- str = str.substring(1);
- int len = str.length();
- //Check if the last character is a punctuation
- if(isPunctuation(str.charAt( len -1 )) )
- str = str.substring(0,len-1);
- return str;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,858 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSModelGroup;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTerm;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.JavaUtils;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLException;
-import org.jboss.ws.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.tools.helpers.ReturnTypeUnwrapper;
-import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
-import org.w3c.dom.Element;
-
-/**
- * Class that acts as the front door to all wsdl2java needs<br>
- *
- * <br>Note: (Web Services Layer)<br>
- * Method to generate Java SEI is as follows<br>
- * <br>{@link #generateSEI(URL wsdlFile, File dir, boolean annotate) generateSEI}
- * <br>
- * <br> Please also have a look at the features that can be passed via {@link #setFeature(String name, boolean value) setFeature}
- * <br>
- * <br>Features are:
- * <br>@see org.jboss.ws.common.Constants.USE_ANNOTATIONS : Should the generated Java Types use annotations
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Dec 28, 2004
- */
-public class WSDLToJava implements WSDLToJavaIntf
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLToJava.class);
- private String newline = "\n";
-
- protected LiteralTypeMapping typeMapping = null;
-
- protected WSDLDefinitions wsdl = null;
-
- /**
- * Singleton class that handle many utility functions
- */
- protected WSDLUtils utils = WSDLUtils.getInstance();
-
- //Feature Set
- protected boolean annotate = false;
-
- protected Map<String, String> namespacePackageMap = null;
- protected boolean generateSerializableTypes = false;
-
- protected HolderWriter holderWriter = new HolderWriter();
-
- private String seiPkgName = "";
-
- private String directoryToGenerate = "";
-
- private String style;
- private String parameterStyle;
-
- public WSDLToJava()
- {
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDLToJavaIntf#convertWSDL2Java(java.net.URL)
- */
- public WSDLDefinitions convertWSDL2Java(URL wsdlfileurl) throws WSDLException
- {
- checkTypeMapping();
- WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- wsdl = wsdlFactory.parse(wsdlfileurl);
-
- return wsdl;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDLToJavaIntf#getFeature(java.lang.String)
- */
- public boolean getFeature(String name)
- {
- if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "name"));
-
- if (name.equalsIgnoreCase(WSToolsConstants.WSTOOLS_FEATURE_USE_ANNOTATIONS))
- return annotate;
-
- throw new WSException(BundleUtils.getMessage(bundle, "FEATURE_NOT_RECOGNIZED", name ));
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDLToJavaIntf#setFeature(java.lang.String, boolean)
- */
- public void setFeature(String name, boolean value)
- {
- if (name == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "ILLEGAL_NULL_ARGUMENT", "name"));
-
- if (name.equalsIgnoreCase(WSToolsConstants.WSTOOLS_FEATURE_USE_ANNOTATIONS))
- annotate = value;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDLToJavaIntf#generateSEI(java.net.URL, java.io.File, boolean)
- */
- public void generateSEI(URL wsdlFile, File dir, boolean annotate) throws IOException
- {
- checkTypeMapping();
- WSDLDefinitions wsdl = convertWSDL2Java(wsdlFile);
- this.annotate = annotate;
- this.directoryToGenerate = dir.getAbsolutePath();
- generateSEI(wsdl, dir);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDLToJavaIntf#generateSEI(org.jboss.ws.metadata.wsdl.WSDLDefinitions, java.io.File)
- */
- public void generateSEI(WSDLDefinitions wsdl, File dir) throws IOException
- {
- checkTypeMapping();
- this.directoryToGenerate = dir.getAbsolutePath();
- this.wsdl = wsdl;
- style = utils.getWSDLStyle(wsdl);
-
- //TODO: Handle annotations flag, as per JAX-WS 2.0 Spec.
- //Given the WSDL Object Tree, generate the SEI
- //Also take in the location where the SEI should be written
- // String typeNS = wsdl.getNamespaceURI(WSDLConstants.PREFIX_TNS);
- String targetNS = wsdl.getTargetNamespace();
- //Check if there is an user override
- String packageName = namespacePackageMap != null ? namespacePackageMap.get(targetNS) : null;
- if (packageName == null || packageName.length() == 0)
- packageName = NamespacePackageMapping.getJavaPackageName(targetNS);
-
- this.seiPkgName = packageName;
-
- File dirloc = utils.createPackage(dir.getAbsolutePath(), packageName);
- createSEI(dirloc, wsdl);
- }
-
- public Map<String, String> getNamespacePackageMap()
- {
- return namespacePackageMap;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.ws.tools.WSDLToJavaIntf#setPackageNamespaceMap(java.util.Map)
- */
- public void setNamespacePackageMap(Map<String, String> map)
- {
- //Lets convert the package->namespace map to namespace->package map
- Set<String> keys = map.keySet();
- Iterator<String> iter = keys.iterator();
- while (iter != null && iter.hasNext())
- {
- if (namespacePackageMap == null)
- namespacePackageMap = new HashMap<String, String>();
- String pkg = iter.next();
- namespacePackageMap.put(pkg, map.get(pkg));
- }
- }
-
- public boolean isGenerateSerializableTypes()
- {
- return generateSerializableTypes;
- }
-
- public void setGenerateSerializableTypes(boolean generateSerializableTypes)
- {
- this.generateSerializableTypes = generateSerializableTypes;
- }
-
- public void setTypeMapping(LiteralTypeMapping tm)
- {
- this.typeMapping = tm;
- }
-
- private class WrappedArray
- {
- public QName xmlType;
- public XSTypeDefinition xt;
- public String suffix;
- public boolean nillable;
-
- public WrappedArray(XSTypeDefinition xt)
- {
- this.xt = xt;
- }
-
- public boolean unwrap()
- {
- if (!Constants.DOCUMENT_LITERAL.equals(style))
- {
- XSElementDeclaration unwrapped = SchemaUtils.unwrapArrayType(xt);
- StringBuilder builder = new StringBuilder();
- while (unwrapped != null)
- {
- xt = unwrapped.getTypeDefinition();
- nillable = unwrapped.getNillable();
- builder.append("[]");
- unwrapped = SchemaUtils.unwrapArrayType(xt);
- }
- if (builder.length() > 0)
- {
- xmlType = new QName(xt.getNamespace(), xt.getName());
- suffix = builder.toString();
- return true;
- }
- }
-
- return false;
- }
- }
-
- //***************************************************************************
- // PRIVATE METHODS
- //***************************************************************************
-
- private boolean isDocument()
- {
- return Constants.DOCUMENT_LITERAL.equals(style);
- }
-
- private boolean isWrapped()
- {
- return "wrapped".equals(parameterStyle) && Constants.DOCUMENT_LITERAL.equals(style);
- }
-
- private void appendMethods(WSDLInterface intf, StringBuilder buf) throws IOException
- {
- buf.append(newline);
- String itfname = intf.getName().getLocalPart();
- WSDLInterfaceOperation[] ops = intf.getOperations();
- if (ops == null || ops.length == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INTERFACE_NO_OPERATIONS", itfname ));
- int len = ops != null ? ops.length : 0;
-
- for (int i = 0; i < len; i++)
- {
- WSDLInterfaceOperation op = ops[i];
-
- WSDLBindingOperation bindingOperation = HeaderUtil.getWSDLBindingOperation(wsdl, op);
-
- //TODO: Take care of multiple outputs
- String returnType = null;
-
- StringBuilder paramBuffer = new StringBuilder();
-
- WSDLInterfaceOperationInput input = WSDLUtils.getWsdl11Input(op);
- WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(op);
- if (isDocument())
- {
- returnType = appendDocParameters(paramBuffer, input, output, bindingOperation);
- }
- else
- {
- returnType = appendRpcParameters(paramBuffer, op, output, bindingOperation);
- }
-
- if (returnType == null)
- returnType = "void";
-
- buf.append(" public " + returnType + " ");
- buf.append(ToolsUtils.firstLetterLowerCase(op.getName().getLocalPart()));
- buf.append("(").append(paramBuffer);
-
- buf.append(") throws ");
- //Generate the Exception Types
- WSDLInterfaceOperationOutfault[] outfaults = op.getOutfaults();
- for (int k = 0; k < outfaults.length; k++)
- {
- WSDLInterfaceOperationOutfault fault = outfaults[k];
- QName faultName = fault.getRef();
-
- //Get the main fault from the wsdlInterface
- WSDLInterfaceFault intfFault = fault.getWsdlInterfaceOperation().getWsdlInterface().getFault(faultName);
- 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())
- xt = xsmodel.getTypeDefinition(xt.getName(), xt.getNamespace());
- if (xt instanceof XSComplexTypeDefinition)
- generateJavaSource((XSComplexTypeDefinition)xt, xsmodel, faultXMLName.getLocalPart(), true);
-
- Class cl = getJavaType(faultXMLType, false);
- if (cl == null)
- {
- String faultTypeName = (!xt.getAnonymous()) ? faultXMLType.getLocalPart() : faultXMLName.getLocalPart();
- String packageName = getPackageName(xt.getNamespace());
- buf.append(packageName + "." + JavaUtils.capitalize(faultTypeName));
- }
- else buf.append(cl.getName());
- buf.append(",");
- }
- buf.append(" java.rmi.RemoteException");
- buf.append(";");
- buf.append(newline);
- }
- }
-
- private String appendRpcParameters(StringBuilder paramBuffer, WSDLInterfaceOperation op, WSDLInterfaceOperationOutput output, WSDLBindingOperation bindingOperation)
- throws IOException
- {
- String returnType = null;
- boolean first = true;
-
- RPCSignature signature = new RPCSignature(op);
- for (WSDLRPCPart part : signature.parameters())
- {
-
- if (first)
- first = false;
- else paramBuffer.append(", ");
-
- QName xmlName = new QName(part.getName());
- QName xmlType = part.getType();
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- boolean holder = output != null && output.getChildPart(part.getName()) != null;
- generateParameter(paramBuffer, xmlName.getLocalPart(), xmlType, xsmodel, xt, false, true, holder);
- paramBuffer.append(" ").append(getMethodParam(xmlName.getLocalPart()));
- }
-
- if (signature.returnParameter() != null)
- {
- QName xmlName = new QName(signature.returnParameter().getName());
- QName xmlType = signature.returnParameter().getType();
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
- returnType = getReturnType(xmlName, xmlType, xt);
- }
-
- if (bindingOperation != null)
- {
- appendHeaderParameters(paramBuffer, bindingOperation);
- }
-
- return returnType;
- }
-
- private String appendDocParameters(StringBuilder paramBuffer, WSDLInterfaceOperationInput input, WSDLInterfaceOperationOutput output,
- WSDLBindingOperation bindingOperation) throws IOException
- {
- String returnType = null;
- boolean holder = false;
- if (input != null && input.getElement() != null)
- {
- QName xmlName = input.getElement();
- holder = output != null && xmlName.equals(output.getElement());
-
- appendParameters(paramBuffer, input, output, xmlName.getLocalPart());
- }
-
- if (!holder && output != null && output.getElement() != null)
- {
- QName xmlName = output.getElement();
- QName xmlType = output.getXMLType();
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- returnType = getReturnType(xmlName, xmlType, xt);
- }
-
- if (bindingOperation != null)
- {
- appendHeaderParameters(paramBuffer, bindingOperation);
- }
-
- return returnType;
- }
-
- private void appendHeaderParameters(StringBuilder buf, WSDLBindingOperation bindingOperation) throws IOException
- {
- WSDLSOAPHeader[] inputHeaders = HeaderUtil.getSignatureHeaders(bindingOperation.getInputs());
- WSDLSOAPHeader[] outputHeaders = HeaderUtil.getSignatureHeaders(bindingOperation.getOutputs());
-
- // Process Inputs First
- for (WSDLSOAPHeader currentInput : inputHeaders)
- {
- boolean holder = HeaderUtil.containsMatchingPart(outputHeaders, currentInput);
- appendHeaderParameter(buf, currentInput, holder);
- }
-
- for (WSDLSOAPHeader currentOutput : outputHeaders)
- {
- boolean input = HeaderUtil.containsMatchingPart(inputHeaders, currentOutput);
-
- if (input == true)
- continue;
-
- appendHeaderParameter(buf, currentOutput, true);
- }
- }
-
- private void appendHeaderParameter(StringBuilder buf, WSDLSOAPHeader header, boolean holder) throws IOException
- {
- QName elementName = header.getElement();
-
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- XSElementDeclaration xe = xsmodel.getElementDeclaration(elementName.getLocalPart(), elementName.getNamespaceURI());
- XSTypeDefinition xt = xe.getTypeDefinition();
- WSDLTypes wsdlTypes = wsdl.getWsdlTypes();
- QName xmlType = wsdlTypes.getXMLType(header.getElement());
-
- // Replace the xt with the real type from the schema.
- xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- if (buf.length() > 0)
- {
- buf.append(", ");
- }
-
- generateParameter(buf, xe.getName(), xmlType, xsmodel, xt, false, true, holder);
- buf.append(" ").append(header.getPartName());
- }
-
- private void appendParameters(StringBuilder buf, WSDLInterfaceOperationInput in, WSDLInterfaceOperationOutput output, String containingElement) throws IOException
- {
-
- QName xmlType = in.getXMLType();
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- boolean wrapped = isWrapped();
-
- if (wrapped)
- {
- int inputs = in.getWsdlOperation().getInputs().length;
- if (inputs > 1)
- throw new WSException(BundleUtils.getMessage(bundle, "JAXRPC_CAN_NOT_UNWRAP_MUTLIPLE_INPUTS", inputs));
-
- String operationName = in.getWsdlOperation().getName().getLocalPart();
- String elementName = in.getElement().getLocalPart();
-
- if (elementName.equals(operationName) == false)
- throw new WSException(BundleUtils.getMessage(bundle,"WRAPPER_ELEMENT_MUST_MATCH"));
-
- wrapped = unwrapElementParameters(buf, containingElement, xt);
- }
-
- if (wrapped == false)
- {
- QName xmlName = in.getElement();
- boolean holder = output != null && xmlName.equals(output.getElement());
- generateParameter(buf, containingElement, xmlType, xsmodel, xt, false, true, holder);
- buf.append(" ").append(getMethodParam(containingElement));
- }
-
- }
-
- private boolean unwrapElementParameters(StringBuilder buf, String containingElement, XSTypeDefinition xt) throws IOException
- {
- // If at any point parameter unwrapping can not happen return false so we drop back to not unwrapping.
-
- if (xt instanceof XSComplexTypeDefinition == false)
- return false;
-
- StringBuilder tempBuf = new StringBuilder();
- XSComplexTypeDefinition wrapper = (XSComplexTypeDefinition)xt;
-
- boolean hasAttributes = wrapper.getAttributeUses().getLength() > 0;
- if (hasAttributes)
- throw new WSException(BundleUtils.getMessage(bundle, "COMPLEX_TYPE_CONTAINS_ATTRIBUTES"));
-
- boolean unwrappedElement = false;
-
- XSParticle particle = wrapper.getParticle();
- if (particle == null)
- {
- unwrappedElement = true;
- }
- else
- {
- XSTerm term = particle.getTerm();
- if (term instanceof XSModelGroup)
- {
- unwrappedElement = unwrapGroup(tempBuf, containingElement, (XSModelGroup)term);
- }
- }
-
- if (unwrappedElement)
- {
- buf.append(tempBuf);
- // We need a wrapper class generated
- generateJavaSource(wrapper, WSDLUtils.getSchemaModel(wsdl.getWsdlTypes()), containingElement);
-
- return true;
- }
-
- return false;
- }
-
- public boolean unwrapGroup(StringBuilder buf, String containingElement, XSModelGroup group) throws IOException
- {
- if (group.getCompositor() != XSModelGroup.COMPOSITOR_SEQUENCE)
- return false;
-
- XSObjectList particles = group.getParticles();
- for (int i = 0; i < particles.getLength(); i++)
- {
- XSParticle particle = (XSParticle)particles.item(i);
- XSTerm term = particle.getTerm();
- if (term instanceof XSModelGroup)
- {
- if (unwrapGroup(buf, containingElement, (XSModelGroup)term) == false)
- return false;
- }
- else if (term instanceof XSElementDeclaration)
- {
- if (buf.length() > 0)
- buf.append(", ");
-
- XSElementDeclaration element = (XSElementDeclaration)term;
- XSTypeDefinition type = element.getTypeDefinition();
- String tempContainingElement = containingElement + ToolsUtils.firstLetterUpperCase(element.getName());
-
- QName xmlType = null;
- if (type.getAnonymous() == false)
- xmlType = new QName(type.getNamespace(), type.getName());
-
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- boolean array = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
- boolean primitive = !(element.getNillable() || (particle.getMinOccurs() == 0 && particle.getMaxOccurs() == 1));
- generateParameter(buf, tempContainingElement, xmlType, xsmodel, type, array, primitive, false);
-
- String paramName;
- if (type.getAnonymous())
- {
- paramName = containingElement;
- }
- else
- {
- paramName = element.getName();
- }
-
- buf.append(" ").append(getMethodParam(paramName));
- }
- }
-
- // If we reach here we must have successfully unwrapped the parameters.
- return true;
- }
-
- private void generateParameter(StringBuilder buf, String containingElement, QName xmlType, JBossXSModel xsmodel, XSTypeDefinition xt, boolean array,
- boolean primitive, boolean holder) throws IOException
- {
- WrappedArray wrappedArray = new WrappedArray(xt);
- String arraySuffix = (array) ? "[]" : "";
- if (wrappedArray.unwrap())
- {
- xt = wrappedArray.xt;
- xmlType = wrappedArray.xmlType;
- primitive = !wrappedArray.nillable;
- arraySuffix = wrappedArray.suffix;
- }
-
- if (xt instanceof XSSimpleTypeDefinition)
- xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
-
- Class cl = null;
-
- if (xmlType != null)
- cl = getJavaType(xmlType, primitive);
-
- if (cl != null)
- {
- if (holder)
- cl = utils.getHolder(cl);
-
- buf.append(JavaUtils.getSourceName(cl) + arraySuffix);
- }
- else
- {
- String className;
- if (xt == null || xt.getAnonymous())
- {
- className = containingElement;
- }
- else
- {
- className = xmlType.getLocalPart();
- }
-
- if (className.charAt(0) == '>')
- className = className.substring(1);
- className = ToolsUtils.convertInvalidCharacters(className);
- className = utils.firstLetterUpperCase(className);
-
- String packageName = getPackageName(xt.getNamespace());
- className = packageName + "." + className + arraySuffix;
- if (holder)
- {
- className = holderWriter.getOrCreateHolder(className, getLocationForJavaGeneration(packageName));
- }
-
- buf.append(className);
-
- if (xt instanceof XSComplexTypeDefinition)
- generateJavaSource((XSComplexTypeDefinition)xt, xsmodel, containingElement);
- }
- }
-
- private void createSEIFile(WSDLInterface intf, File loc) throws IOException
- {
- String seiName = getServiceEndpointInterfaceName(intf);
-
- StringBuilder buf = new StringBuilder();
- utils.writeJbossHeader(buf);
- 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, seiName);
- FileWriter writer = new FileWriter(sei);
- writer.write(buf.toString());
- writer.flush();
- writer.close();
- }
-
- public String getServiceEndpointInterfaceName(WSDLInterface wsdlInterface)
- {
- String seiName = utils.chopPortType(wsdlInterface.getName().getLocalPart());
-
- //Check if the portType name conflicts with a service name
- if (wsdl.getService(seiName) != null)
- seiName += "_PortType";
-
- seiName = JavaUtils.capitalize(seiName);
- seiName = ToolsUtils.convertInvalidCharacters(seiName);
-
- return seiName;
- }
-
- private void createSEI(File loc, WSDLDefinitions wsdl) throws IOException
- {
- WSDLInterface[] intarr = wsdl.getInterfaces();
- if (intarr == null || intarr.length == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INTERFACES_CANNOT_BE_ZERO"));
- int len = intarr.length;
- for (int i = 0; i < len; i++)
- {
- WSDLInterface intf = intarr[i];
- createSEIFile(intf, loc);
- }
- }
-
- private String getReturnType(QName xmlName, QName xmlType, XSTypeDefinition xt) throws IOException
- {
- String containingElement = xmlName.getLocalPart();
- String arraySuffix = "";
- boolean primitive = true;
-
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdl.getWsdlTypes());
- xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- ReturnTypeUnwrapper unwrapper = new ReturnTypeUnwrapper(xmlType, xsmodel, isWrapped());
- if (unwrapper.unwrap())
- {
- // Need to generate wrapper class as well.
- if (xt instanceof XSComplexTypeDefinition)
- generateJavaSource((XSComplexTypeDefinition)xt, xsmodel, containingElement);
-
- if (unwrapper.unwrappedElement != null)
- {
- XSElementDeclaration element = unwrapper.unwrappedElement;
- xt = element.getTypeDefinition();
- primitive = unwrapper.primitive;
-
- if (unwrapper.xmlType != null)
- xmlType = unwrapper.xmlType;
-
- containingElement = containingElement + ToolsUtils.firstLetterUpperCase(unwrapper.unwrappedElement.getName());
-
- if (unwrapper.array)
- arraySuffix = "[]";
- }
- }
-
- WrappedArray wrappedArray = new WrappedArray(xt);
- if (wrappedArray.unwrap())
- {
- xt = wrappedArray.xt;
- xmlType = wrappedArray.xmlType;
- primitive = !wrappedArray.nillable;
- arraySuffix = wrappedArray.suffix;
- }
-
- if (xt instanceof XSSimpleTypeDefinition)
- xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
-
- Class cls = getJavaType(xmlType, primitive);
-
- if (xt instanceof XSComplexTypeDefinition)
- generateJavaSource((XSComplexTypeDefinition)xt, xsmodel, containingElement);
-
- if (cls == null)
- {
- String className;
- if (xt.getAnonymous() == true)
- {
- className = containingElement;
- }
- else
- {
- className = xmlType.getLocalPart();
- }
-
- if (className.charAt(0) == '>')
- className = className.substring(1);
- className = ToolsUtils.convertInvalidCharacters(className);
- className = utils.firstLetterUpperCase(className);
- String packageName = getPackageName(xt.getNamespace());
- return packageName + "." + className + arraySuffix;
- }
-
- if (cls.isArray())
- return JavaUtils.getSourceName(cls);
- return cls.getName() + arraySuffix;
- }
-
- private void checkTypeMapping()
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_SET"));
- }
-
- private Class getJavaType(QName qname, boolean primitive)
- {
- Class cls = typeMapping.getJavaType(qname, primitive);
- /**
- * Special case - when qname=xsd:anyType && cls == Element
- * then cls has to be javax.xml.soap.SOAPElement
- */
- if (qname.getNamespaceURI().equals(Constants.NS_SCHEMA_XSD) && "anyType".equals(qname.getLocalPart()) && cls == Element.class)
- cls = SOAPElement.class;
- return cls;
- }
-
- /**
- * Make sure the first character is lower case and if the
- * parameter is a reserved word prefix it with '_'.
- *
- * @param containingElement
- * @return
- */
- private String getMethodParam(String name)
- {
- String paramName = ToolsUtils.firstLetterLowerCase(name);
- if (JavaKeywords.isJavaKeyword(paramName))
- {
- paramName = "_" + paramName;
- }
-
- return paramName;
- }
-
- private File getLocationForJavaGeneration(String packageName)
- {
- return new File(this.directoryToGenerate + "/" + packageName.replace('.', '/'));
- }
-
- private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement) throws IOException
- {
- generateJavaSource(xt, xsmodel, containingElement, false);
- }
-
- private void generateJavaSource(XSComplexTypeDefinition xt, JBossXSModel xsmodel, String containingElement, boolean exception) throws IOException
- {
- XSDTypeToJava xtj = new XSDTypeToJava(namespacePackageMap, 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);
- }
-
- public void setParameterStyle(String paramStyle)
- {
- 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;
- }
-}
-
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSTools.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSTools.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSTools.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,168 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ResourceBundle;
-import java.util.StringTokenizer;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.tools.config.ToolsSchemaConfigReader;
-import org.jboss.ws.tools.helpers.ToolsHelper;
-
-/**
- * Main Class for WSTools
- *
- * @author Anil.Saldhana(a)jboss.org
- * @author Thomas.Diesler(a)jboss.org
- * @since 19-Aug-2005
- */
-public class WSTools
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSTools.class);
- private static Logger log = Logger.getLogger(WSTools.class);
-
- /**
- * Entry point for the command line scripts.
- * Just passes the arguments to
- * @see generate(String)
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException
- {
- WSTools tools = new WSTools();
- boolean success = false;
- try
- {
- success = tools.generate(args);
- } catch (Throwable e)
- {
- e.printStackTrace( new PrintWriter(System.err) );
- }
-
- if(success)
- System.exit(0);
- else
- System.exit(1);
- }
-
- /**
- * Entry point for the programmatic use
- */
- public boolean generate(String configLocation, String outputDir) throws IOException
- {
- ToolsSchemaConfigReader configReader = new ToolsSchemaConfigReader();
- Configuration config = configReader.readConfig(configLocation);
-
- return process(config, outputDir);
- }
-
- /**
- * Entry point for the programmatic use
- */
- public boolean generate(String[] args) throws IOException
- {
- String configLocation = null;
- String outputDir = null;
- if(args.length==0)
- {
- usage();
- }
-
- for (int i = 0; i < args.length; i++)
- {
- String arg = args[i];
-
- if ("-config".equals(arg))
- {
- configLocation = args[i + 1];
- i++;
- }
-
- else if ("-dest".equals(arg))
- {
- outputDir = args[i + 1];
- i++;
- }
-
- else if ("-classpath".equals(arg) || "-cp".equals(arg))
- {
- StringTokenizer st = new StringTokenizer(args[i + 1], File.pathSeparator);
-
- int tokens = st.countTokens();
- URL[] urls = new URL[tokens];
- for (int j = 0; j < tokens; j++)
- {
- String token = st.nextToken();
- urls[j] = new File(token).toURL();
- }
-
- ClassLoader ctxLoader = SecurityActions.getContextClassLoader();
- URLClassLoader urlLoader = new URLClassLoader(urls, ctxLoader);
- SecurityActions.setContextClassLoader(urlLoader);
- i++;
- }
- else
- {
- usage();
- }
- }
-
- return generate(configLocation, outputDir);
- }
-
- private void usage()
- {
- System.out.println("Usage: wstools (-classpath|-cp) <classpath> -config <config> [-dest <destination path>]");
- System.exit(1);
- }
-
- private boolean process(Configuration config, String outputDir) throws IOException
- {
- if (config == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CONFIGURATION_IS_NULL"));
-
- if (outputDir == null)
- outputDir = ".";
-
- ToolsHelper helper = new ToolsHelper();
- if (config.getJavaToWSDLConfig(false) != null)
- {
- helper.handleJavaToWSDLGeneration(config, outputDir);
- }
- else if (config.getWSDLToJavaConfig(false) != null)
- {
- helper.handleWSDLToJavaGeneration(config, outputDir);
- }
- else
- {
- throw new IOException(BundleUtils.getMessage(bundle, "CONFIGURATION_ERROR"));
- }
- return true;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSToolsConstants.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSToolsConstants.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WSToolsConstants.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import org.jboss.ws.common.Constants;
-
-
-/**
- * A collection of constants relevant to JBossWS Tools
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 01-Aug-2005
- */
-public interface WSToolsConstants extends Constants
-{
- String BASE = "http://www.jboss.org/wstools/";
-
- /** Tools Constants */
- /**
- * Option used to inform the tools subsytems that all the xml types that are generated
- * should be generated under the xml target namespace, irrespective of the java packages
- * from where the Java types come
- */
- static final String WSTOOLS_FEATURE_RESTRICT_TO_TARGET_NS = BASE + "restrict_types_to_TargetNamespace";
-
- /**
- * Should the schema definitions be included in the wsdl file or they should be generated
- * in different files.
- */
- static final String WSTOOLS_FEATURE_INCLUDE_SCHEMA_IN_WSDL = BASE + "include_schema_in_WSDL";
-
- /**
- * Flag to tools that the generated Java Artifacts can contain Java Annotations
- */
- static final String WSTOOLS_FEATURE_USE_ANNOTATIONS = BASE + "Use_Annotations";
-
- /**
- * Constant - Not a feature
- */
- static final String WSTOOLS_CONSTANT_MAPPING_SERVICE_PREFIX = "serviceNS";
-
- /**
- * Constant - Not a feature
- */
- static final String WSTOOLS_CONSTANT_MAPPING_WSDL_MESSAGE_NS = "wsdlMsgNS";
-
- /**
- * Constant - Not a feature
- */
- static final String WSTOOLS_CONSTANT_MAPPING_IN_OUT_HOLDER_PARAM_MODE = "INOUT";
-
- /**
- * Constant - Not a feature
- */
- static final String WSTOOLS_CONSTANT_MAPPING_OUT_HOLDER_PARAM_MODE = "OUT";
-
- /**
- * Constant - Not a feature
- */
- static final String WSTOOLS_CONSTANT_MAPPING_IN_PARAM_MODE = "IN";
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WebservicesXMLCreatorImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WebservicesXMLCreatorImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/WebservicesXMLCreatorImpl.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,205 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ResourceBundle;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.DOMUtils;
-import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.tools.interfaces.WebservicesXMLCreator;
-import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.w3c.dom.Element;
-
-/**
- * Creates the webservices.xml deployment descriptor
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jun 20, 2005
- */
-public class WebservicesXMLCreatorImpl implements WebservicesXMLCreator
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WebservicesXMLCreatorImpl.class);
- // provide logging
- protected static final Logger log = Logger.getLogger(WebservicesXMLCreatorImpl.class);
- protected String targetNamespace = null;
-
- protected String seiName = null;
-
- protected String portName = null;
-
- protected String serviceName = null;
-
- protected String servletLink = null;
-
- protected String ejbLink = null;
-
- protected String wsdlFile = null;
- protected String mappingFile = null;
-
- protected boolean append = false;
-
- public WebservicesXMLCreatorImpl()
- {
- }
-
- public void setTargetNamespace(String targetNamespace)
- {
- this.targetNamespace = targetNamespace;
- }
-
- public void setSeiName(String seiName)
- {
- this.seiName = seiName;
- }
-
- public void setPortName(String portName)
- {
- this.portName = portName;
- }
-
- public void setServiceName(String serviceName)
- {
- this.serviceName = serviceName;
- }
-
- public void setEjbLink(String ejbLink)
- {
- this.ejbLink = ejbLink;
- }
-
- public void setServletLink(String servletLink)
- {
- this.servletLink = servletLink;
- }
-
- public void setMappingFile(String mappingFile)
- {
- this.mappingFile = mappingFile;
- }
-
- public void setWsdlFile(String wsdlFile)
- {
- this.wsdlFile = wsdlFile;
- }
-
- public void setAppend(boolean append)
- {
- this.append = append;
- }
-
- public void generateWSXMLDescriptor(File wsXmlFile) throws IOException
- {
- WebservicesMetaData webservices = constructWSMetaData();
-
- // handle append flag
- if (append && wsXmlFile.exists())
- {
- WebservicesMetaData existingWebservices;
-
- // parse existing webservices descriptor
- InputStream wsXmlStream = new FileInputStream(wsXmlFile);
- try
- {
- existingWebservices = WebservicesFactory.parse(wsXmlStream, wsXmlFile.toURI().toURL());
- }
- catch (Exception e)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_UNMARSHAL_DESCRIPTOR", wsXmlFile), e);
- }
- finally
- {
- wsXmlStream.close();
- }
-
- // append generated webservice-descriptions to existing descriptor
- for (WebserviceDescriptionMetaData webserviceDescription : webservices.getWebserviceDescriptions())
- existingWebservices.addWebserviceDescription(webserviceDescription);
-
- webservices = existingWebservices;
- }
-
- // (re-)write generated webservices descriptor to file
- Element root = DOMUtils.parse(webservices.serialize());
- FileWriter fwriter = new FileWriter(wsXmlFile);
- new DOMWriter(fwriter).setPrettyprint(true).print(root);
- fwriter.close();
- }
-
- //PRIVATE METHODS
-
- private WebservicesMetaData constructWSMetaData()
- {
- WebservicesMetaData wm = new WebservicesMetaData();
- WebserviceDescriptionMetaData wsdm = new WebserviceDescriptionMetaData(wm);
- populateWebserviceDescriptionMetaData(wsdm);
- wm.addWebserviceDescription(wsdm);
- return wm;
- }
-
- private void populateWebserviceDescriptionMetaData(WebserviceDescriptionMetaData wsdm)
- {
- checkEssentials();
- wsdm.setWebserviceDescriptionName(this.serviceName);
- wsdm.setWsdlFile(this.wsdlFile);
- wsdm.setJaxrpcMappingFile(this.mappingFile);
- PortComponentMetaData pm1 = new PortComponentMetaData(wsdm);
- pm1.setPortComponentName(portName);
- pm1.setWsdlPort(new QName(this.targetNamespace, portName, "portNS"));
- pm1.setServiceEndpointInterface(seiName);
- if (this.servletLink != null && this.servletLink.length() > 0)
- pm1.setServletLink(this.servletLink);
- else pm1.setEjbLink(this.ejbLink);
- wsdm.addPortComponent(pm1);
- }
-
- private void checkEssentials()
- {
- if (serviceName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "SERVICENAME_IS_NULL"));
- if (wsdlFile == null)
- throw new WSException(BundleUtils.getMessage(bundle, "WSDLFILE_IS_NULL"));
- if (mappingFile == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MAPPINGFILE_IS_NULL"));
- if (targetNamespace == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TARGETNAMESPACE_IS_NULL"));
- if (portName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "PORTNAME_IS_NULL"));
- if (seiName == null)
- throw new WSException(BundleUtils.getMessage(bundle, "SEINAME_IS_NULL"));
- if (servletLink == null && ejbLink == null)
- throw new WSException(BundleUtils.getMessage(bundle, "EITHER_SERVLETLINK_OR_EJBLINK_SHOULD_NOT_BE_NULL"));
- if (servletLink != null && ejbLink != null)
- throw new WSException(BundleUtils.getMessage(bundle, "ONE_OF_SERVLETLINK_OR_EJBLINK_SHOULD_BE_NULL"));
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XMLNameUtil.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XMLNameUtil.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XMLNameUtil.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import javax.xml.namespace.QName;
-
-/**
- * Translates XML names to Java and back
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public class XMLNameUtil
-{
-
- /**
- * Translate a Java name to an XML name.
- * [TODO]
- */
- public static String toXMLName(String javaName)
- {
- return javaName;
- }
-
- /**
- * Translate an XML name to a Java name.
- * [TODO]
- */
- public static String toJavaName(QName xmlName)
- {
- return xmlName.getLocalPart();
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDToJava.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDToJava.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDToJava.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,164 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSLoader;
-import org.apache.xerces.xs.XSModel;
-import org.apache.xerces.xs.XSNamedMap;
-import org.apache.xerces.xs.XSObject;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.tools.interfaces.XSDToJavaIntf;
-
-/**
- * Generates Java Types given a schema file
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since May 11, 2005
- */
-
-public class XSDToJava implements XSDToJavaIntf
-{
- /**
- * Singleton class that handle many utility functions
- */
- protected WSDLUtils utils = WSDLUtils.getInstance();
-
- /**
- * Utility class that converts a XSD Type into a Java class
- */
- protected final XSDTypeToJava xsdJava = new XSDTypeToJava(null, false);
-
-
- /*
- * @see org.jboss.ws.tools.interfaces.JavaToXSDIntf#generateSEI(java.lang.String, java.io.File, java.lang.String, boolean)
- */
- public void generateJavaSource(String schemaFile, File dirloc, String packageName,
- boolean createPackageDir)
- throws IOException
- {
- XSLoader xsloader = SchemaUtils.getInstance().getXSLoader();
- XSModel xsmodel = xsloader.loadURI(schemaFile);
- generateJavaSource(xsmodel, dirloc, packageName, createPackageDir);
- }
-
-
- /*
- * @see org.jboss.ws.tools.interfaces.JavaToXSDIntf#generateSEI(org.apache.xerces.xs.XSModel, java.io.File, java.lang.String, boolean)
- */
- public void generateJavaSource(XSModel xsmodel, File dirloc, String packageName,
- boolean createPackageDir)
- throws IOException
- {
- if (createPackageDir)
- {
- utils.createPackage(dirloc.getAbsolutePath(), packageName);
- }
- generateJavaSource(xsmodel, dirloc, packageName);
- }
-
- /*
- * @see org.jboss.ws.tools.interfaces.JavaToXSDIntf#generateSEI(org.apache.xerces.xs.XSModel, java.io.File, java.lang.String)
- */
- public void generateJavaSource(XSModel xsmodel, File dirloc, String packageName)
- throws IOException
- {
- //Now that we have the schema, lets build the types for the schema
- XSNamedMap xsnamedmap = xsmodel.getComponents(XSConstants.TYPE_DEFINITION);
- int len = xsnamedmap != null ? xsnamedmap.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSObject type = xsnamedmap.item(i);
- if (type instanceof XSComplexTypeDefinition)
- {
- XSComplexTypeDefinition ctype = (XSComplexTypeDefinition)type;
- //Ignore xsd:anyType
- String nsuri = type.getNamespace();
- String tname = type.getName();
- if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
- xsdJava.createJavaFile(ctype, dirloc.getPath(), packageName, xsmodel);
- }
- else if (type instanceof XSSimpleTypeDefinition)
- {
- XSSimpleTypeDefinition stype = (XSSimpleTypeDefinition)type;
- //Ignore xsd:anyType
- String nsuri = type.getNamespace();
- String tname = type.getName();
- if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
- xsdJava.createJavaFile(stype, dirloc.getPath(), packageName, xsmodel);
- }
- }
-
- //Consider Global Element Declarations that may have anonymous complex types
- xsnamedmap = xsmodel.getComponents(XSConstants.ELEMENT_DECLARATION);
- len = xsnamedmap != null ? xsnamedmap.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSElementDeclaration elm = (XSElementDeclaration)xsnamedmap.item(i);
- String elmname = elm.getName();
- XSTypeDefinition elmtype = elm.getTypeDefinition();
- if (elmtype != null && elmtype instanceof XSComplexTypeDefinition)
- {
- XSComplexTypeDefinition ctype = (XSComplexTypeDefinition)elmtype;
- String nsuri = elmtype.getNamespace();
- String tname = elmtype.getName();
- if (tname != null) continue; //Consider only anon complex types
-
- createJavaFile(ctype, dirloc, packageName, xsmodel, elmname);
- }
- }
- }
-
- /**
- * Set the type mapping to be used in the generation
- *
- * @param tm
- */
- public void setTypeMapping(LiteralTypeMapping tm)
- {
- xsdJava.setTypeMapping(tm);
- }
-
- private void createJavaFile(XSComplexTypeDefinition type, File loc,
- String pkgname, XSModel schema, String outerElementName)
- throws IOException
- {
- String str = "Method should be used for anon complex types only";
- if (type.getName() != null)
- throw new IllegalArgumentException(str);
- xsdJava.createJavaFile(type,outerElementName,loc.getPath(),pkgname,schema, false);
- }
-
-}
-
-
-
-
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,815 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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;
-
-import java.beans.Introspector;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSAttributeDeclaration;
-import org.apache.xerces.xs.XSAttributeUse;
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSModel;
-import org.apache.xerces.xs.XSModelGroup;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTerm;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.apache.xerces.xs.XSWildcard;
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.JavaUtils;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
-
-/** Class that converts a XSD Type into Java class
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @author mageshbk(a)jboss.com
- * @since Apr 4, 2005
- */
-public class XSDTypeToJava
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(XSDTypeToJava.class);
- protected LiteralTypeMapping typeMapping = null;
- protected WSDLUtils utils = WSDLUtils.getInstance();
- protected SchemaUtils schemautils = SchemaUtils.getInstance();
- protected WSDLUtils wsdlUtils = WSDLUtils.getInstance();
-
- protected JavaWriter jwriter = new JavaWriter();
-
- //Additional variables
- protected String containingElement = "";
- protected String fname = "";
- protected String loc = null;
- protected String pkgname = "";
-
- private Set<String> generatedFiles = new HashSet<String>();
-
- protected Map<String, String> namespacePackageMap = null;
- protected boolean serializableTypes;
-
- /**
- * List that is used for exception inheritance case wherein the variables
- * obtained from the base class go into the generated constructor alone and
- * not as accessors
- */
- private Map<String, List> typeNameToBaseVARList = new HashMap<String, List>();
-
- public XSDTypeToJava(Map<String, String> map, boolean serializableTypes)
- {
- this.namespacePackageMap = map;
- this.serializableTypes = serializableTypes;
- }
-
- public void createJavaFile(XSComplexTypeDefinition type, String loc, String pkgname, XSModel schema) throws IOException
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_SET"));
- this.fname = type.getName();
- if (fname == null)
- throw new WSException(BundleUtils.getMessage(bundle, "FILE_NAME_IS_NULL"));
- this.loc = loc;
- this.pkgname = pkgname;
-
- createJavaFile(type, schema, false);
- }
-
- public void createJavaFile(XSComplexTypeDefinition type, String containingElement, String loc, String pkgname, XSModel schema, boolean isExceptionType)
- throws IOException
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_SET"));
- this.fname = type.getName();
- this.containingElement = containingElement;
- if (fname == null)
- fname = containingElement;
- this.loc = loc;
- this.pkgname = pkgname;
-
- createJavaFile(type, schema, isExceptionType);
- }
-
- public void createJavaFile(XSSimpleTypeDefinition type, String loc, String pkgname, XSModel schema) throws IOException
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_SET"));
- this.fname = type.getName();
- this.loc = loc;
- this.pkgname = pkgname;
-
- createJavaFile(type, schema);
- }
-
- public void createJavaFile(XSComplexTypeDefinition type, XSModel schema, boolean isExceptionType) throws IOException
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_SET"));
- XSTypeDefinition baseType = type.getBaseType();
- // Ensure the characters in the name are valid
- fname = ToolsUtils.convertInvalidCharacters(fname);
- //Ensure that the first character is uppercase
- fname = utils.firstLetterUpperCase(fname);
- List vars = new ArrayList();
-
- String baseName = getBaseTypeName(type);
- if (baseName != null && baseType != null && !generatedFiles.contains(baseName))
- {
- if (baseType instanceof XSComplexTypeDefinition)
- {
- generatedFiles.add(baseName);
- String pushName = fname;
- fname = baseName;
- this.createJavaFile((XSComplexTypeDefinition)baseType, schema, isExceptionType);
- fname = pushName;
- }
- }
-
- vars = this.getVARList(type, schema, isExceptionType);
-
- if (baseName == null && isExceptionType)
- {
- baseName = "Exception";
- }
- else if (baseName != null)
- {
- baseName = getPackageName(baseType.getNamespace()) + "." + baseName;
- }
- String packageName = getPackageName(type.getNamespace());
- jwriter.createJavaFile(getLocationForJavaGeneration(packageName), fname, packageName, vars, null, baseName, isExceptionType, serializableTypes,
- typeNameToBaseVARList);
- }
-
- public void createJavaFile(XSSimpleTypeDefinition xsSimple, XSModel schema) throws IOException
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_SET"));
- XSTypeDefinition baseType = xsSimple.getBaseType();
-
- short variety = xsSimple.getVariety();
- if (XSSimpleTypeDefinition.VARIETY_ATOMIC == variety)
- {
- //If the simple type has an enumerated list, then just use its type
- StringList slist = xsSimple.getLexicalEnumeration();
- if (slist != null && slist.getLength() > 0)
- {
- //Enumerated List
- String packageName = getPackageName(xsSimple.getNamespace());
- jwriter.createJavaFileForEnumeratedValues(fname, slist, getLocationForJavaGeneration(packageName), packageName, xsSimple);
- }
- else
- {
- if (Constants.NS_SCHEMA_XSD.equals(xsSimple.getNamespace()))
- return;
- //TODO: Take care of other cases
- return;
- }
- }
- }
-
- public List<VAR> getVARList(XSComplexTypeDefinition type, XSModel schema, boolean isExceptionType) throws IOException
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_HAS_NOT_BEEN_SET"));
- XSTypeDefinition baseType = type.getBaseType();
- List vars = new ArrayList();
-
- vars = handleAttributes(type, vars);
- //TODO:Handle xsd:group
-
- short contentType = type.getContentType();
-
- //simplecontenttype
- if (XSComplexTypeDefinition.CONTENTTYPE_SIMPLE == contentType)
- {
- short der = type.getDerivationMethod();
-
- if (XSConstants.DERIVATION_EXTENSION == der)
- {
- XSSimpleTypeDefinition xssimple = type.getSimpleType();
- QName q = new QName(xssimple.getNamespace(), xssimple.getName());
- QName qn = schemautils.patchXSDQName(q);
- Class javaType = typeMapping.getJavaType(qn);
- String jtype = null;
- if (javaType.isArray())
- {
- jtype = JavaUtils.getSourceName(javaType);
- }
- else
- {
- jtype = javaType.getName();
- }
- VAR v = new VAR("_value", jtype, false);
- vars.add(v);
- }
- }
- else if (XSComplexTypeDefinition.CONTENTTYPE_EMPTY == contentType)
- {
- short der = type.getDerivationMethod();
-
- if (XSConstants.DERIVATION_RESTRICTION == der)
- {
- vars.addAll(createVARsforXSParticle(type, schema));
- }
- }
- else if (XSComplexTypeDefinition.CONTENTTYPE_ELEMENT == contentType)
- { //Element Only content type
- if (!utils.isBaseTypeIgnorable(baseType, type))
- {
- short der = type.getDerivationMethod();
-
- if (XSConstants.DERIVATION_NONE == der)
- {
- handleContentTypeElementsWithDerivationNone(type, schema, isExceptionType, vars, type.getParticle());
- }
- if (XSConstants.DERIVATION_EXTENSION == der)
- {
- handleContentTypeElementsWithDerivationExtension(type, schema, isExceptionType, vars, type.getParticle());
- }
- else if (XSConstants.DERIVATION_RESTRICTION == der)
- {
- handleContentTypeElementsWithDerivationRestriction(type, schema, vars, type.getParticle());
- }
- }
- else
- {
- //Base Type is ignorable
- vars.addAll(createVARsforXSParticle(type, schema));
- }
- }
-
- return vars;
-
- }
-
- public void setPackageName(String packageName)
- {
- this.pkgname = packageName;
- }
-
- public void setTypeMapping(LiteralTypeMapping tm)
- {
- this.typeMapping = tm;
- }
-
- public Map<String, String> getNamespacePackageMap()
- {
- return namespacePackageMap;
- }
-
- public void setNamespacePackageMap(Map<String, String> map)
- {
- this.namespacePackageMap = map;
- }
-
- //PRIVATE METHODS
-
- private void handleContentTypeElementsWithDerivationRestriction(XSComplexTypeDefinition type, XSModel schema, List vars, XSParticle xsparticle) throws IOException
- {
- if (xsparticle != null)
- {
- XSTerm xsterm = xsparticle.getTerm();
- if (xsterm instanceof XSModelGroup)
- {
- XSModelGroup xsm = (XSModelGroup)xsterm;
- XSObjectList xparts = xsm.getParticles();
- //Ignore the first item - that will be a modelgroup for basetype
- XSParticle xspar = (XSParticle)xparts.item(1);
- XSTerm xterm = xspar.getTerm();
- if (xterm instanceof XSElementDeclaration)
- {
- vars.addAll(createVARforXSElementDeclaration(xterm, schemautils.isArrayType(xspar), schema, type));
- }
- else if (xterm instanceof XSModelGroup)
- {
- XSModelGroup xsmodelgrp = (XSModelGroup)xterm;
- vars.addAll(createVARsforXSModelGroup(xsmodelgrp, schema, type));
- }
- }
- }
- }
-
- private void handleContentTypeElementsWithDerivationExtension(XSComplexTypeDefinition type, XSModel schema, boolean isExceptionType, List vars, XSParticle xsparticle)
- throws IOException
- {
- if (xsparticle != null)
- {
- XSTerm xsterm = xsparticle.getTerm();
- if (xsterm instanceof XSModelGroup)
- {
- XSModelGroup xsm = (XSModelGroup)xsterm;
- XSObjectList xparts = xsm.getParticles();
-
- int length = xparts.getLength();
-
- XSTypeDefinition baseType = type.getBaseType();
-
- if (baseType instanceof XSComplexTypeDefinition && ((XSComplexTypeDefinition)baseType).getContentType() != XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
- {
- XSTerm baseTerm = ((XSComplexTypeDefinition)baseType).getParticle().getTerm();
- if (isExceptionType && baseTerm instanceof XSModelGroup)
- {
- typeNameToBaseVARList.put(type.getName(), createVARsforXSModelGroup((XSModelGroup)baseTerm, schema, type));
- }
-
- // HACK - The only way to know what elements are local to the subclass, and not inherited, is to compare to the base class
- // THIS TIES US TO XERCES
- if (baseType instanceof XSComplexTypeDefinition == false || ((XSComplexTypeDefinition)baseType).getParticle().getTerm() == xsterm)
- return;
- }
-
- XSParticle xspar;
-
- if (baseType instanceof XSComplexTypeDefinition && ((XSComplexTypeDefinition)baseType).getContentType() == XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
- {
- // If the base type is empty there will not have been a particle to ignore.
- xspar = xsparticle;
- }
- else
- {
- xspar = (XSParticle)xparts.item(length - 1);
- }
-
- XSTerm xsparTerm = xspar.getTerm();
- if (xsparTerm instanceof XSModelGroup)
- {
- XSModelGroup xsmodelgrp = (XSModelGroup)xspar.getTerm();
- vars.addAll(createVARsforXSModelGroup(xsmodelgrp, schema, type));
- }
- else if (xsparTerm instanceof XSElementDeclaration)
- vars.addAll(createVARforXSElementDeclaration(xsparTerm, schemautils.isArrayType(xspar), schema, type));
-
- }
- }
- }
-
- private void handleContentTypeElementsWithDerivationNone(XSComplexTypeDefinition type, XSModel schema, boolean isExceptionType, List vars, XSParticle xsparticle)
- throws IOException
- {
- if (xsparticle != null)
- {
- XSTerm xsterm = xsparticle.getTerm();
- if (xsterm instanceof XSModelGroup)
- {
- XSModelGroup xsm = (XSModelGroup)xsterm;
- XSObjectList xparts = xsm.getParticles();
- int len = xparts != null ? xparts.getLength() : 0;
- int diff = len - 0;
-
- for (int i = 0; i < len; i++)
- {
- if (isExceptionType && type.getBaseType() != null)
- {
- List<VAR> baseList = new ArrayList<VAR>();
-
- //The first few xsterms are modelgroups for base class
- for (int j = 0; j < diff - 1; j++)
- {
- XSParticle xspar = (XSParticle)xparts.item(j);
- XSTerm xsparTerm = xspar.getTerm();
- if (xsparTerm instanceof XSModelGroup)
- {
- XSModelGroup xsmodelgrp = (XSModelGroup)xspar.getTerm();
- baseList.addAll(createVARsforXSModelGroup(xsmodelgrp, schema, type));
- }
-
- }
- if (baseList.size() > 0)
- this.typeNameToBaseVARList.put(type.getName(), baseList);
- //Now take the modelgroup for the type in question
- XSParticle xspar = (XSParticle)xparts.item(len - 1);
- XSTerm xsparTerm = xspar.getTerm();
- if (xsparTerm instanceof XSModelGroup)
- {
- XSModelGroup xsmodelgrp = (XSModelGroup)xspar.getTerm();
- vars.addAll(createVARsforXSModelGroup(xsmodelgrp, schema, type));
- }
- break;
- }
- XSParticle xspar = (XSParticle)xparts.item(i);
- XSTerm xsparTerm = xspar.getTerm();
- if (xsparTerm instanceof XSModelGroup)
- {
- XSModelGroup xsmodelgrp = (XSModelGroup)xspar.getTerm();
- vars.addAll(createVARsforXSModelGroup(xsmodelgrp, schema, type));
- }
- else if (xsparTerm instanceof XSElementDeclaration)
- vars.addAll(createVARforXSElementDeclaration(xsparTerm, schemautils.isArrayType(xspar), schema, type));
- }
- }
- else if (xsterm instanceof XSElementDeclaration)
- {
- vars.addAll(createVARforXSElementDeclaration(xsterm, schemautils.isArrayType(xsparticle), schema, type));
- }
- else throw new WSException(BundleUtils.getMessage(bundle, "UNHANDLED_TYPE"));
- }
-
- }
-
- private List handleAttributes(XSComplexTypeDefinition type, List vars)
- {
- XSObjectList xsobjlist = type.getAttributeUses();
- if (xsobjlist != null)
- {
- int len = xsobjlist.getLength();
- for (int i = 0; i < len; i++)
- {
- XSAttributeUse obj = (XSAttributeUse)xsobjlist.item(i);
- XSAttributeDeclaration att = obj.getAttrDeclaration();
- XSSimpleTypeDefinition xstype = att.getTypeDefinition();
- QName qn = SchemaUtils.handleSimpleType(xstype);
- boolean primitive = obj.getRequired();
- VAR v = createVAR(qn, att.getName(), getPackageName(xstype.getNamespace()), primitive);
- if (vars == null)
- vars = new ArrayList();
- vars.add(v);
- }
- }
- return vars;
- }
-
- private List createVARsforXSParticle(XSComplexTypeDefinition type, XSModel schema) throws IOException
- {
- List<VAR> list = new ArrayList<VAR>();
- XSParticle xsparticle = type.getParticle();
-
- if (xsparticle != null)
- {
- short xsptype = xsparticle.getType();
- XSTerm xsterm = xsparticle.getTerm();
- if (xsptype == XSConstants.ELEMENT_DECLARATION)
- {
-
- }
- else if (xsterm instanceof XSModelGroup)
- {
- XSModelGroup xsm = (XSModelGroup)xsterm;
- XSObjectList xparts = xsm.getParticles();
- list.addAll(createVARsForElements(xparts, schema, type));
- }
- }
- return list;
- }
-
- private List<VAR> createVARsforXSModelGroup(XSModelGroup xsm, XSModel schema, XSComplexTypeDefinition origType) throws IOException
- {
- List<VAR> vars = new ArrayList<VAR>();
- short compositor = xsm.getCompositor();
-
- if (XSModelGroup.COMPOSITOR_SEQUENCE == compositor)
- {
- XSObjectList xsobjlist = xsm.getParticles();
- int len = xsobjlist.getLength();
-
- for (int i = 0; i < len; i++)
- {
- XSParticle xsparticle = (XSParticle)xsobjlist.item(i);
- XSTerm term = xsparticle.getTerm();
-
- if (term instanceof XSElementDeclaration)
- {
- vars.addAll(createVARforXSElementDeclaration(term, schemautils.isArrayType(xsparticle), schema, origType));
- }
- else if (term instanceof XSModelGroup)
- {
- vars.addAll(createVARsforXSModelGroup((XSModelGroup)term, schema, origType));
- }
- }
- }
-
- return vars;
- }
-
- private VAR createVAR(QName qn, String varstr, String pkgname, boolean primitive)
- {
- String clname = "";
- Class cls = typeMapping.getJavaType(qn);
- VAR v = null;
- if (cls != null)
- {
- clname = cls.getName();
- if (primitive)
- {
- String primName = utils.getPrimitive(clname);
- if (primName != null)
- clname = primName;
- }
-
- }
- else
- {
- if (qn != null)
- {
- if (!Constants.NS_SCHEMA_XSD.equals(qn.getNamespaceURI()))
- clname = pkgname + ".";
- clname += qn.getLocalPart();
- }
- }
- v = new VAR(varstr, clname, false);
- return v;
- }
-
- private List createVARsForElements(XSObjectList xsobjlist, XSModel schema, XSComplexTypeDefinition origType) throws IOException
- {
- List<VAR> list = new ArrayList<VAR>();
- int len = xsobjlist.getLength();
- for (int i = 0; i < len; i++)
- {
- XSParticle xsparticle = (XSParticle)xsobjlist.item(i);
- XSTerm xsterm = xsparticle.getTerm();
-
- list.addAll(createVARforXSElementDeclaration(xsterm, schemautils.isArrayType(xsparticle), schema, origType));
- continue;
- }
-
- return list;
- }
-
- private List createVARforXSElementDeclaration(XSTerm xsterm, boolean arrayType, XSModel schema, XSComplexTypeDefinition origType) throws IOException
- {
- List<VAR> vars = new ArrayList<VAR>();
- // Handle xsd:any elements
- if (xsterm instanceof XSWildcard)
- {
- VAR v = new VAR("_any", "javax.xml.soap.SOAPElement", arrayType);
- vars.add(v);
- return vars;
- }
-
- // Handle xsd:group
- if (xsterm instanceof XSModelGroup)
- {
- vars.addAll(createVARsforXSModelGroup((XSModelGroup)xsterm, schema, origType));
- return vars;
- }
-
- XSElementDeclaration elem = (XSElementDeclaration)xsterm;
-
- // TODO: Check if the element contains any anon complex type
- // TODO: If yes, create class that is ComplexTypeName+ElementName
- // TODO: ItemsItem If the elem contains anon simpletype
- // TODO: No need to create seperate Java class
-
- String tname = elem.getName();
- XSTypeDefinition xstypedef = elem.getTypeDefinition();
-
- String xstypename = xstypedef.getName();
- // Check if it is a composite type
- if (xstypename != null && xstypedef.getName().equals(origType.getName()) && xstypedef.getNamespace().equals(origType.getNamespace()))
- {
- // it is a composite type
- QName qn = new QName(origType.getNamespace(), origType.getName());
- VAR vr = createVAR(qn, elem, (XSComplexTypeDefinition)xstypedef, tname, getPackageName(origType.getNamespace()), arrayType);
- vars.add(vr);
- return vars;
- }
- else
-
- if (xstypename == null && xstypedef instanceof XSComplexTypeDefinition)
- {
- XSComplexTypeDefinition xsc = (XSComplexTypeDefinition)xstypedef;
- String subname = utils.firstLetterUpperCase(tname);
- // Save the fname in a temp var
- String tempfname = this.fname;
- // it will be an anonymous type
- if (containingElement == null || containingElement.length() == 0)
- containingElement = origType.getName();
-
- String anonName;
- if (elem.getScope() == XSConstants.SCOPE_GLOBAL)
- {
- anonName = subname;
- }
- else
- {
- anonName = containingElement + subname;
- }
-
- anonName = utils.firstLetterUpperCase(anonName);
- this.fname = anonName;
-
- if (!generatedFiles.contains(this.fname))
- {
- generatedFiles.add(this.fname);
- this.createJavaFile((XSComplexTypeDefinition)xstypedef, schema, false);
- }
-
- // Restore the fname
- this.fname = tempfname;
- // Bypass rest of processing
- QName anonqn = new QName(anonName);
- VAR vr = createVAR(anonqn, elem, xsc, tname, getPackageName(xsc.getNamespace()), arrayType);
- vars.add(vr);
- return vars;
- }
- else
- {
- String temp = this.fname;
- // Unwrap any array wrappers
- if (SchemaUtils.isWrapperArrayType(xstypedef))
- {
- XSComplexTypeDefinition complex = (XSComplexTypeDefinition)xstypedef;
- XSModelGroup group = (XSModelGroup)complex.getParticle().getTerm();
- XSElementDeclaration element = (XSElementDeclaration)((XSParticle)group.getParticles().item(0)).getTerm();
- xstypedef = element.getTypeDefinition();
- xstypename = xstypedef.getName();
- arrayType = true;
- }
-
- QName qn = null;
- if (xstypedef instanceof XSSimpleTypeDefinition)
- {
- qn = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xstypedef);
- }
- else
- {
- qn = new QName(xstypedef.getNamespace(), xstypename);
- }
-
- if (xstypename != null && xstypedef instanceof XSComplexTypeDefinition)
- {
- this.fname = ToolsUtils.convertInvalidCharacters(utils.firstLetterUpperCase(xstypename));
- if (!generatedFiles.contains(this.fname))
- {
- generatedFiles.add(this.fname);
- this.createJavaFile((XSComplexTypeDefinition)xstypedef, schema, false);
- }
- this.fname = temp;
- }
-
- VAR v = createVAR(qn, elem, xstypedef, tname, getPackageName(xstypedef.getNamespace()), arrayType);
- vars.add(v);
- }
- return vars;
- }
-
- private VAR createVAR(QName qn, XSElementDeclaration elem, XSTypeDefinition t, String varstr, String pkgname, boolean arrayType)
- {
- if (t instanceof XSSimpleTypeDefinition)
- {
- QName tempqn = schemautils.handleSimpleType((XSSimpleTypeDefinition)t);
- if (tempqn != null)
- qn = tempqn;
- }
- String qualifiedClassName = "";
- Class cls = typeMapping.getJavaType(qn);
- VAR v = null;
- if (cls != null)
- {
- qualifiedClassName = JavaUtils.getSourceName(cls);
- String primitive = utils.getPrimitive(qualifiedClassName);
- if ((!elem.getNillable()) && primitive != null)
- qualifiedClassName = primitive;
- }
- else
- {
- QName typename = null;
-
- if (t.getName() == null)
- typename = qn;
- else typename = new QName(t.getName());
- if (typename != null)
- {
- String nsuri = typename.getNamespaceURI();
- if (!nsuri.equals(Constants.NS_SCHEMA_XSD))
- qualifiedClassName = pkgname + ".";
- String className = wsdlUtils.firstLetterUpperCase(ToolsUtils.convertInvalidCharacters(typename.getLocalPart()));
- qualifiedClassName += className;
- }
- else if (qn != null)
- qualifiedClassName = qn.getLocalPart();
- }
-
- v = new VAR(Introspector.decapitalize(varstr), qualifiedClassName, arrayType);
- return v;
- }
-
- private String getBaseTypeName(XSComplexTypeDefinition type)
- {
- String baseName = null;
- XSTypeDefinition baseType = null;
- if (type instanceof XSComplexTypeDefinition)
- {
- XSComplexTypeDefinition t = (XSComplexTypeDefinition)type;
-
- baseType = t.getBaseType();
- //Check baseType is xsd:anyType
- if (baseType != null)
- {
- if (baseType.getNamespace() == Constants.NS_SCHEMA_XSD && baseType.getName().equals("anyType"))
- baseType = null; //Ignore this baseType
- }
- if (XSComplexTypeDefinition.CONTENTTYPE_SIMPLE == t.getContentType())
- {
- baseType = null; //ComplexType has a simplecontent
- }
- }
-
- if (baseName == null && baseType != null)
- baseName = ToolsUtils.firstLetterUpperCase(baseType.getName());
-
- return baseName;
- }
-
- /**
- * Inner Class that just stores a custom object called VAR
- * that is used in creating of the Java class
- */
- public static class VAR
- {
- String varname;
- String vartype;
- boolean isArrayType = false;
-
- public VAR(String varname, String vartype, boolean arrayType)
- {
- this.varname = varname;
- this.vartype = vartype;
- isArrayType = arrayType;
- }
-
- public String getVarname()
- {
- return varname;
- }
-
- public void setVarname(String varname)
- {
- this.varname = varname;
- }
-
- public String getVartype()
- {
- return vartype;
- }
-
- public void setVartype(String vartype)
- {
- this.vartype = vartype;
- }
-
- public boolean isArrayType()
- {
- return isArrayType;
- }
-
- public void setArrayType(boolean arrayType)
- {
- isArrayType = arrayType;
- }
- }
-
- private File getLocationForJavaGeneration(String packageName)
- {
- File locdir = new File(this.loc);
- locdir = wsdlUtils.createPackage(locdir.getAbsolutePath(), packageName);
- return locdir;
- }
-
- private String getPackageName(String targetNamespace)
- {
- //Get it from global config
- if (namespacePackageMap != null)
- {
- String pkg = namespacePackageMap.get(targetNamespace);
- if (pkg != null)
- {
- return pkg;
- }
- }
- return this.pkgname;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,485 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.helpers;
-
-import java.io.IOException;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.TypeMapping;
-import javax.xml.rpc.holders.Holder;
-
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.soap.Style;
-import org.jboss.ws.metadata.jaxrpcmapping.ExceptionMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.PortMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.ServiceInterfaceMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.WsdlMessageMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.WsdlReturnValueMapping;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FaultMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.WrappedParameter;
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.jboss.ws.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.XSModelTypes;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.metadata.wsdl.xmlschema.WSSchemaUtils;
-import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.tools.JavaToXSD;
-import org.jboss.ws.tools.interfaces.JavaToXSDIntf;
-import org.jboss.ws.tools.interfaces.SchemaCreatorIntf;
-import org.jboss.ws.tools.wsdl.WSDLGenerator;
-import org.jboss.ws.common.JavaUtils;
-
-/**
- * Java To WSDL Helper which uses UnifiedMetaData
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Oct 7, 2005
- */
-public class JavaToWSDLHelper extends WSDLGenerator
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JavaToWSDLHelper.class);
- private JavaToXSDIntf javaToXSD = new JavaToXSD();
- private JavaWsdlMapping javaWsdlMapping = new JavaWsdlMapping();
- private Map<QName, JavaXmlTypeMapping> mappedTypes = new HashMap<QName, JavaXmlTypeMapping>();
- private Set<String> mappedPackages = new HashSet<String>();
- private Set<String> mappedExceptions = new HashSet<String>();
-
- protected void processTypes()
- {
- // All type processing is done in processService()
- wsdl.setWsdlTypes(new XSModelTypes());
- }
-
- @Override
- protected void processOperation(WSDLInterface wsdlInterface, WSDLBinding wsdlBinding, OperationMetaData operation)
- {
- super.processOperation(wsdlInterface, wsdlBinding, operation);
-
- try
- {
- //Generate Types for the individual parameters, faults and return value
- for (ParameterMetaData paramMetaData : operation.getParameters())
- {
- generateTypesForXSD(paramMetaData);
- }
-
- for (FaultMetaData faultMetaData : operation.getFaults())
- {
- generateTypesForXSD(faultMetaData);
- }
-
- ParameterMetaData returnMetaData = operation.getReturnParameter();
- if (returnMetaData != null)
- {
- generateTypesForXSD(returnMetaData);
- }
- }
- catch (IOException io)
- {
- throw new WSException(io);
- }
- }
-
- public void generateTypesForXSD(ParameterMetaData pmd) throws IOException
- {
- //Types always deals with TypeNamespace
- QName xmlType = pmd.getXmlType();
- if(xmlType.getNamespaceURI().equals(Constants.NS_SCHEMA_XSD) == false)
- generateType(xmlType, pmd.getJavaType(), buildElementNameMap(pmd));
-
- if (pmd.getOperationMetaData().getStyle() == Style.DOCUMENT || pmd.isInHeader())
- generateElement(pmd.getXmlName(), xmlType);
-
- //Attachment type
- if(pmd.isSwA())
- wsdl.registerNamespaceURI(Constants.NS_SWA_MIME, "mime");
- }
-
- private Map<String, QName> buildElementNameMap(ParameterMetaData pmd)
- {
- List<WrappedParameter> wrappedParameters = pmd.getWrappedParameters();
-
- if (wrappedParameters == null)
- return null;
-
- Map<String, QName> map = new LinkedHashMap<String, QName>(wrappedParameters.size());
-
- for (WrappedParameter param : wrappedParameters)
- map.put(param.getVariable(), param.getName());
-
- return map;
- }
-
- public void generateTypesForXSD(FaultMetaData fmd) throws IOException
- {
- //Types always deals with TypeNamespace
- SchemaCreatorIntf sc = javaToXSD.getSchemaCreator();
- //Look at the features
- QName xmlType = fmd.getXmlType();
- if(xmlType.getNamespaceURI().equals(Constants.NS_SCHEMA_XSD) == false)
- generateType(xmlType ,fmd.getJavaType(), null);
- }
-
- public void processEndpoint(WSDLService service, EndpointMetaData endpoint)
- {
- super.processEndpoint(service, endpoint);
-
- // build JAX-RPC mapping info
- buildServiceMapping(endpoint);
- }
-
- /*
- * Currently we only handle 1 endpoint on 1 service, this is the way everything
- * else is handled anyway.
- */
- private void buildServiceMapping(EndpointMetaData endpoint)
- {
- QName origQName = endpoint.getServiceMetaData().getServiceName();
- String serviceInterfaceName = endpoint.getServiceEndpointInterface().getPackage().getName() + "." + origQName.getLocalPart();
- QName serviceQName = new QName(origQName.getNamespaceURI(), origQName.getLocalPart(), "serviceNS");
-
- ServiceInterfaceMapping serviceMapping = new ServiceInterfaceMapping(javaWsdlMapping);
- serviceMapping.setServiceInterface(serviceInterfaceName);
- serviceMapping.setWsdlServiceName(serviceQName);
-
- String endpointName = endpoint.getPortName().getLocalPart();
- PortMapping portMapping = new PortMapping(serviceMapping);
- portMapping.setJavaPortName(endpointName);
- portMapping.setPortName(endpointName);
- serviceMapping.addPortMapping(portMapping);
-
- javaWsdlMapping.addServiceInterfaceMappings(serviceMapping);
-
- String interfaceName = endpoint.getPortTypeName().getLocalPart();
- ServiceEndpointInterfaceMapping seiMapping = new ServiceEndpointInterfaceMapping(javaWsdlMapping);
- seiMapping.setServiceEndpointInterface(endpoint.getServiceEndpointInterfaceName());
- seiMapping.setWsdlPortType(new QName(wsdl.getTargetNamespace(), interfaceName, "portTypeNS"));
- seiMapping.setWsdlBinding(new QName(wsdl.getTargetNamespace(), interfaceName + "Binding", "bindingNS"));
- for (OperationMetaData operation : endpoint.getOperations())
- {
- ServiceEndpointMethodMapping methodMapping = new ServiceEndpointMethodMapping(seiMapping);
- methodMapping.setJavaMethodName(operation.getJavaName());
- methodMapping.setWsdlOperation(operation.getQName().getLocalPart());
- boolean isWrapped = operation.isDocumentWrapped();
- methodMapping.setWrappedElement(isWrapped);
- int i = 0;
- for (ParameterMetaData param : operation.getParameters())
- {
- if (isWrapped && param.isInHeader() == false)
- {
- List<WrappedParameter> wrappedParameters = param.getWrappedParameters();
- for (WrappedParameter wrapped : wrappedParameters)
- {
- String type = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), endpoint.getClassLoader());
- String name = wrapped.getName().getLocalPart();
-
- buildParamMapping(methodMapping, interfaceName, operation, name, type, "IN", false, i++);
- }
- }
- else
- {
- String name = param.getXmlName().getLocalPart();
- String type = JavaUtils.convertJVMNameToSourceName(param.getJavaTypeName(), endpoint.getClassLoader());
- buildParamMapping(methodMapping, interfaceName, operation, name, type, param.getMode().toString(), param.isInHeader(), i++);
- }
- }
-
- ParameterMetaData returnParam = operation.getReturnParameter();
- if (returnParam != null && ((! isWrapped) || (! returnParam.getWrappedParameters().isEmpty())))
- {
- String name, type;
- if (isWrapped)
- {
- WrappedParameter wrappedParameter = returnParam.getWrappedParameters().get(0);
- name = wrappedParameter.getName().getLocalPart();
- type = wrappedParameter.getType();
- }
- else
- {
- name = returnParam.getXmlName().getLocalPart();
- type = returnParam.getJavaTypeName();
- }
-
- type = JavaUtils.convertJVMNameToSourceName(type, endpoint.getClassLoader());
-
- buildReturnParamMapping(methodMapping, interfaceName, operation, name, type);
- }
- seiMapping.addServiceEndpointMethodMapping(methodMapping);
-
- for(FaultMetaData fmd : operation.getFaults())
- {
- String ns = getNamespace(fmd.getJavaType(), fmd.getXmlType().getNamespaceURI());
- QName newXmlType = new QName(ns, fmd.getXmlType().getLocalPart());
- JavaXmlTypeMapping typeMapping = mappedTypes.get(newXmlType);
- if (typeMapping == null)
- continue;
-
- String javaTypeName = fmd.getJavaTypeName();
- if (mappedExceptions.contains(javaTypeName))
- continue;
-
- mappedExceptions.add(javaTypeName);
-
- ExceptionMapping mapping = new ExceptionMapping(javaWsdlMapping);
-
- mapping.setExceptionType(javaTypeName);
- QName name = new QName(wsdl.getTargetNamespace(), fmd.getXmlName().getLocalPart());
- mapping.setWsdlMessage(name);
-
- // Variable mappings generated from SchemaTypesCreater have their order preserved
- for (VariableMapping variableMapping : typeMapping.getVariableMappings())
- mapping.addConstructorParameter(variableMapping.getXmlElementName());
-
- javaWsdlMapping.addExceptionMappings(mapping);
- }
- }
-
- javaWsdlMapping.addServiceEndpointInterfaceMappings(seiMapping);
-
- // Add package mapping for SEI
- String name = endpoint.getServiceEndpointInterface().getPackage().getName();
- String namespace = getNamespace(name);
- if (namespace == null)
- namespace = WSDLUtils.getInstance().getTypeNamespace(name);
- addPackageMapping(name, namespace);
- }
-
- private void buildParamMapping(ServiceEndpointMethodMapping methodMapping, String interfaceName, OperationMetaData operation,
- String name, String type, String mode, boolean header, int position)
- {
- MethodParamPartsMapping paramMapping = new MethodParamPartsMapping(methodMapping);
- paramMapping.setParamPosition(position);
- paramMapping.setParamType(type);
-
- WsdlMessageMapping messageMapping = new WsdlMessageMapping(paramMapping);
- messageMapping.setWsdlMessagePartName(name);
- String messageName = interfaceName + "_" + operation.getQName().getLocalPart();
- if ("OUT".equals(mode))
- messageName += "Response";
- QName messageQName = new QName(wsdl.getTargetNamespace(), messageName, "wsdlMsgNS");
-
- messageMapping.setWsdlMessage(messageQName);
- messageMapping.setParameterMode(mode);
- messageMapping.setSoapHeader(header);
- paramMapping.setWsdlMessageMapping(messageMapping);
- methodMapping.addMethodParamPartsMapping(paramMapping);
- }
-
- private void buildReturnParamMapping(ServiceEndpointMethodMapping methodMapping, String interfaceName, OperationMetaData operation, String name, String type)
- {
- WsdlReturnValueMapping returnMapping = new WsdlReturnValueMapping(methodMapping);
- returnMapping.setMethodReturnValue(type);
- returnMapping.setWsdlMessagePartName(name);
- String messageName = interfaceName + "_" + operation.getQName().getLocalPart() + "Response";
- QName messageQName = new QName(wsdl.getTargetNamespace(), messageName, "wsdlMsgNS");
- returnMapping.setWsdlMessage(messageQName);
- methodMapping.setWsdlReturnValueMapping(returnMapping);
- }
-
- /**
- * During the WSDL generation process, a typeMapping will be
- * created that maps xml types -> java types
- *
- * @return typeMapping
- */
- public TypeMapping getTypeMapping()
- {
- return this.javaToXSD.getSchemaCreator().getTypeMapping();
- }
-
- /**
- * A customized Package->Namespace map
- *
- * @param map
- */
- public void setPackageNamespaceMap(Map<String,String> map)
- {
- this.packageNamespaceMap = map;
- this.javaToXSD.setPackageNamespaceMap(map);
- }
-
- public void setJavaToXSD(JavaToXSDIntf jxsd)
- {
- this.javaToXSD = jxsd;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- //************************************************************************
- //
- //**************************PRIVATE METHODS*****************************
- //
- //************************************************************************
-
- protected void generateType(QName xmlType, Class javaType, Map<String, QName> elementNames) throws IOException
- {
- if(Holder.class.isAssignableFrom(javaType))
- javaType = WSDLUtils.getInstance().getJavaTypeForHolder(javaType);
- JBossXSModel xsModel = javaToXSD.generateForSingleType(xmlType, javaType, elementNames);
- String namespace = getNamespace(javaType, xmlType.getNamespaceURI());
- // Now that the schema object graph is built,
- // ask JavaToXSD to provide a list of xsmodels to be plugged
- // into WSDLTypes
- if (xsModel == null)
- throw new WSException(BundleUtils.getMessage(bundle, "IS_NULL", "xsModel"));
-
- WSDLTypes wsdlTypes = wsdl.getWsdlTypes();
- WSDLUtils.addSchemaModel(wsdlTypes, namespace, xsModel);
- wsdl.registerNamespaceURI(namespace, null);
-
- //Also get any custom namespaces
- SchemaCreatorIntf schemaCreator = javaToXSD.getSchemaCreator();
- mergeJavaWsdlMapping(schemaCreator.getJavaWsdlMapping());
-
- //Register the global config namespaces
- /*Map<String, String> nsmap = schemaCreator.getPackageNamespaceMap();
- Set keys = nsmap != null ? nsmap.keySet() : null;
- Iterator iter = (keys != null && !keys.isEmpty()) ? keys.iterator() : null;
- while (iter != null && iter.hasNext())
- {
- String pkg = (String)iter.next();
- String ns = nsmap.get(pkg);
- if (ns != null)
- wsdl.registerNamespaceURI(ns, null);
- }*/
- //Register the custom generated namespaces
- Map<String, String> nsmap = schemaCreator.getCustomNamespaceMap();
- Set keys = nsmap != null ? nsmap.keySet() : null;
- Iterator iter = (keys != null && !keys.isEmpty()) ? keys.iterator() : null;
- while (iter != null && iter.hasNext())
- {
- String prefix = (String)iter.next();
- String ns = nsmap.get(prefix);
- if (ns != null)
- wsdl.registerNamespaceURI(ns, null);
- }
- }
-
- private void mergeJavaWsdlMapping(JavaWsdlMapping source)
- {
- // For now we just merge types and packages
- for (PackageMapping packageMapping : source.getPackageMappings())
- {
- String name = packageMapping.getPackageType();
- String namespaceURI = getNamespace(name, packageMapping.getNamespaceURI());
-
- addPackageMapping(name, namespaceURI);
- }
-
- for (JavaXmlTypeMapping type : source.getJavaXmlTypeMappings())
- {
- QName name = type.getRootTypeQName();
- if (name == null)
- name = type.getAnonymousTypeQName();
-
- //override namespace from globalconfig
- String pkgName = getJustPackageName(type.getJavaType());
- String ns = getNamespace(pkgName, name.getNamespaceURI());
- name = new QName(ns, name.getLocalPart(), name.getPrefix());
-
- if (mappedTypes.containsKey(name))
- continue;
-
- addPackageMapping(pkgName, ns);
- mappedTypes.put(name, type);
-
- JavaXmlTypeMapping typeCopy = new JavaXmlTypeMapping(javaWsdlMapping);
- typeCopy.setQNameScope(type.getQnameScope());
- typeCopy.setAnonymousTypeQName(type.getAnonymousTypeQName());
- typeCopy.setJavaType(type.getJavaType());
- typeCopy.setRootTypeQName(name);
- for (VariableMapping variable : type.getVariableMappings())
- {
- VariableMapping variableCopy = new VariableMapping(typeCopy);
- variableCopy.setDataMember(variable.isDataMember());
- variableCopy.setJavaVariableName(variable.getJavaVariableName());
- variableCopy.setXmlAttributeName(variable.getXmlAttributeName());
- variableCopy.setXmlElementName(variable.getXmlElementName());
- variableCopy.setXmlWildcard(variable.getXmlWildcard());
-
- typeCopy.addVariableMapping(variableCopy);
- }
-
- javaWsdlMapping.addJavaXmlTypeMappings(typeCopy);
- }
- }
-
- private void addPackageMapping(String name, String namespaceURI)
- {
- if (mappedPackages.contains(name))
- return;
-
- mappedPackages.add(name);
- PackageMapping copy = new PackageMapping(javaWsdlMapping);
- copy.setPackageType(name);
-
- copy.setNamespaceURI(namespaceURI);
- javaWsdlMapping.addPackageMapping(copy);
- }
-
- protected void generateElement(QName xmlName, QName xmlType)
- {
- WSDLTypes types = wsdl.getWsdlTypes();
- String namespaceURI = xmlType.getNamespaceURI();
- JBossXSModel schemaModel = WSDLUtils.getSchemaModel(types);
-
- XSTypeDefinition type;
- if (Constants.NS_SCHEMA_XSD.equals(namespaceURI))
- type = SchemaUtils.getInstance().getSchemaBasicType(xmlType.getLocalPart());
- else
- type = schemaModel.getTypeDefinition(xmlType.getLocalPart(), namespaceURI);
-
- WSSchemaUtils utils = WSSchemaUtils.getInstance(schemaModel.getNamespaceRegistry(), null);
- JBossXSElementDeclaration element =
- utils.createGlobalXSElementDeclaration(xmlName.getLocalPart(), type, xmlName.getNamespaceURI());
- schemaModel.addXSElementDeclaration(element);
-
- wsdl.registerNamespaceURI(xmlName.getNamespaceURI(), null);
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,1011 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.helpers;
-
-import java.beans.Introspector;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-
-import org.apache.xerces.xs.XSAttributeDeclaration;
-import org.apache.xerces.xs.XSAttributeUse;
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSModelGroup;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTerm;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.ExceptionMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.PortMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.ServiceInterfaceMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.WsdlMessageMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.WsdlReturnValueMapping;
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceMessageReference;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.metadata.wsdl.WSDLProperty;
-import org.jboss.ws.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.jboss.ws.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.tools.HeaderUtil;
-import org.jboss.ws.tools.NamespacePackageMapping;
-import org.jboss.ws.tools.RPCSignature;
-import org.jboss.ws.tools.ToolsUtils;
-import org.jboss.ws.tools.WSToolsConstants;
-import org.jboss.ws.tools.mapping.MappingFileGenerator;
-import org.jboss.ws.common.JavaUtils;
-import org.w3c.dom.Element;
-
-/**
- * Helper class for MappingFileGenerator (only client of this class)
- * @see MappingFileGenerator
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Sep 18, 2005
- */
-public class MappingFileGeneratorHelper
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(MappingFileGeneratorHelper.class);
- // provide logging
- private static final Logger log = Logger.getLogger(MappingFileGeneratorHelper.class);
- private WSDLDefinitions wsdlDefinitions = null;
- private String typeNamespace;
- private String serviceName = null;
- private String packageName = null;
- private Map<String, String> namespacePackageMap = new HashMap<String, String>();
- private Set<String> registeredTypes = new HashSet<String>();
- private Set<String> registeredExceptions = new HashSet<String>();
-
- private LiteralTypeMapping typeMapping = null;
- private String wsdlStyle;
-
- private WSDLUtils utils = WSDLUtils.getInstance();
-
- private String parameterStyle;
-
- public MappingFileGeneratorHelper(WSDLDefinitions wsdl, String sname, Map<String, String> map, Class seiClass, LiteralTypeMapping ltm, String paramStyle)
- {
- this.wsdlDefinitions = wsdl;
- this.serviceName = sname;
- String targetNS = wsdl.getTargetNamespace();
- packageName = NamespacePackageMapping.getJavaPackageName(targetNS);
- this.namespacePackageMap = map;
- this.typeMapping = ltm;
-
- this.wsdlStyle = utils.getWSDLStyle(wsdl);
- this.parameterStyle = paramStyle;
- checkEssentials();
- }
-
- /**
- * Returns the type namespace that was discovered during generation.
- */
- public String getTypeNamespace()
- {
- return typeNamespace;
- }
-
- public PackageMapping constructPackageMapping(JavaWsdlMapping jwm, String packageType, String ns)
- {
- PackageMapping pk = new PackageMapping(jwm);
- pk.setPackageType(packageType);
- pk.setNamespaceURI(ns);
- return pk;
- }
-
- public ServiceInterfaceMapping constructServiceInterfaceMapping(JavaWsdlMapping jwm, WSDLService ser)
- {
- serviceName = ser.getName().getLocalPart();
- String javaServiceName = serviceName;
- //Check if the serviceName conflicts with a portType or interface name
- if (wsdlDefinitions.getInterface(new QName(wsdlDefinitions.getTargetNamespace(), serviceName)) != null)
- javaServiceName += "_Service";
-
- if (this.serviceName == null || serviceName.length() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "IS_NULL", "serviceName"));
-
- String targetNS = wsdlDefinitions.getTargetNamespace();
- String prefix = WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_SERVICE_PREFIX;
- ServiceInterfaceMapping sim = new ServiceInterfaceMapping(jwm);
- String className = ToolsUtils.firstLetterUpperCase(javaServiceName);
- sim.setServiceInterface(getPackageName(targetNS) + "." + className);
- sim.setWsdlServiceName(new QName(targetNS, serviceName, prefix));
-
- WSDLEndpoint[] endpoints = ser.getEndpoints();
- int lenendpoints = 0;
- if (endpoints != null)
- lenendpoints = endpoints.length;
- for (int j = 0; j < lenendpoints; j++)
- {
- WSDLEndpoint endpt = endpoints[j];
- String portname = endpt.getName().getLocalPart();
- //port mapping
- PortMapping pm = new PortMapping(sim);
- pm.setPortName(portname);
- pm.setJavaPortName(portname);
- sim.addPortMapping(pm);
- }
- return sim;
- }
-
- public void constructServiceEndpointInterfaceMapping(JavaWsdlMapping jwm, WSDLService ser)
- {
- serviceName = ser.getName().getLocalPart();
- if (this.serviceName == null || serviceName.length() == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "IS_NULL", "serviceName"));
-
- String targetNS = wsdlDefinitions.getTargetNamespace();
-
- WSDLEndpoint[] endpoints = ser.getEndpoints();
- int lenendpoints = 0;
- if (endpoints != null)
- lenendpoints = endpoints.length;
- for (int j = 0; j < lenendpoints; j++)
- {
- WSDLEndpoint endpt = endpoints[j];
- QName binding = endpt.getBinding();
- WSDLBinding wsdlbind = wsdlDefinitions.getBinding(binding);
- String bindName = wsdlbind.getName().getLocalPart();
- QName portTypeName = wsdlbind.getInterfaceName();
- WSDLInterface wsdlintf = wsdlDefinitions.getInterface(portTypeName);
- String portName = wsdlintf.getName().getLocalPart();
- String javaPortName = utils.chopPortType(portName);
- if (wsdlDefinitions.getService(javaPortName) != null)
- javaPortName += "_PortType";
- javaPortName = ToolsUtils.convertInvalidCharacters(javaPortName);
-
- ServiceEndpointInterfaceMapping seim = new ServiceEndpointInterfaceMapping(jwm);
- String className = ToolsUtils.firstLetterUpperCase(javaPortName);
- seim.setServiceEndpointInterface(getPackageName(targetNS) + "." + className);
- seim.setWsdlPortType(new QName(targetNS, portName, "portTypeNS"));
- seim.setWsdlBinding(new QName(targetNS, bindName, "bindingNS"));
- constructServiceEndpointMethodMapping(seim, wsdlintf);
-
- jwm.addServiceEndpointInterfaceMappings(seim);
- }
- }
-
- public void constructServiceEndpointMethodMapping(ServiceEndpointInterfaceMapping seim, WSDLInterface intf)
- {
- WSDLInterfaceOperation[] wioparr = intf.getOperations();
- int len = 0;
- if (wioparr != null)
- len = wioparr.length;
- for (int j = 0; j < len; j++)
- {
- WSDLInterfaceOperation wiop = wioparr[j];
- String opname = wiop.getName().getLocalPart();
- ServiceEndpointMethodMapping semm = new ServiceEndpointMethodMapping(seim);
- semm.setJavaMethodName(ToolsUtils.firstLetterLowerCase(opname));
- semm.setWsdlOperation(opname);
- semm.setWrappedElement(isWrapped());
-
- WSDLBindingOperation bindingOperation = HeaderUtil.getWSDLBindingOperation(wsdlDefinitions, wiop);
-
- if (isDocStyle())
- {
- constructDOCParameters(semm, wiop, bindingOperation);
- }
- else
- {
- constructRPCParameters(semm, wiop, bindingOperation);
- }
-
- seim.addServiceEndpointMethodMapping(semm);
- }
- }
-
- private void constructDOCParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
- {
- WSDLInterfaceOperationInput win = WSDLUtils.getWsdl11Input(wiop);
- WSDLInterfaceOperationOutput output = WSDLUtils.getWsdl11Output(wiop);
-
- JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
- MethodParamPartsMapping mpin = null;
-
- boolean holder = false;
-
- if (win != null)
- {
- QName xmlName = win.getElement();
- QName xmlType = win.getXMLType();
- String partName = win.getPartName();
- String wsdlMessageName = win.getMessageName().getLocalPart();
- XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- boolean wrapped = isWrapped();
-
- if (wrapped)
- {
- wrapped = unwrapRequest(semm, wsdlMessageName, xmlName.getLocalPart(), xt);
- }
-
- if (wrapped == false)
- {
- if (xt instanceof XSSimpleTypeDefinition)
- xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
- String paramMode = "IN";
- holder = output != null && xmlName.equals(output.getElement());
- if (holder == true)
- {
- paramMode = "INOUT";
- }
-
- mpin = getMethodParamPartsMapping(semm, xmlName, xmlType, 0, wsdlMessageName, paramMode, partName, false, true);
- semm.addMethodParamPartsMapping(mpin);
- }
- }
-
- if (holder == false && output != null)
- {
- QName xmlName = output.getElement();
- QName xmlType = output.getXMLType();
- boolean primitive = true;
-
- String targetNS = wsdlDefinitions.getTargetNamespace();
- QName messageName = new QName(targetNS, output.getMessageName().getLocalPart(), WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_WSDL_MESSAGE_NS);
-
- String partName = output.getPartName();
- String containingElement = xmlName.getLocalPart();
- boolean array = false;
- XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- ReturnTypeUnwrapper unwrapper = new ReturnTypeUnwrapper(xmlType, schemaModel, isWrapped());
- if (unwrapper.unwrap())
- {
- if (unwrapper.unwrappedElement != null)
- {
- XSElementDeclaration element = unwrapper.unwrappedElement;
- xt = element.getTypeDefinition();
- primitive = unwrapper.primitive;
- partName = element.getName();
- containingElement = containingElement + ToolsUtils.firstLetterUpperCase(unwrapper.unwrappedElement.getName());
- array = unwrapper.array;
- if (xt.getAnonymous())
- {
- xmlType = new QName(containingElement);
- }
- else if (unwrapper.xmlType != null)
- {
- xmlType = unwrapper.xmlType;
- }
- }
- }
-
- //Check it is a holder.
- if (wiop.getInputByPartName(xmlName.getLocalPart()) == null)
- {
- String nameSpace = null;
- if (xt != null)
- {
- nameSpace = xt.getNamespace();
- }
- if (xt instanceof XSSimpleTypeDefinition)
- xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
-
- String javaType = getJavaTypeAsString(xmlName, xmlType, nameSpace, array, primitive);
-
- if ((isDocStyle() == false && "void".equals(javaType)) == false)
- {
- WsdlReturnValueMapping wrvm = new WsdlReturnValueMapping(semm);
- wrvm.setMethodReturnValue(javaType);
- wrvm.setWsdlMessage(messageName);
- wrvm.setWsdlMessagePartName(partName);
- semm.setWsdlReturnValueMapping(wrvm);
- }
- }
- }
-
- if (bindingOperation != null)
- {
- constructHeaderParameters(semm, wiop, bindingOperation);
- }
- }
-
- private void constructHeaderParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
- {
- WSDLSOAPHeader[] inputHeaders = HeaderUtil.getSignatureHeaders(bindingOperation.getInputs());
- WSDLSOAPHeader[] outputHeaders = HeaderUtil.getSignatureHeaders(bindingOperation.getOutputs());
-
- String wsdlMessageName = bindingOperation.getWsdlBinding().getInterface().getName().getLocalPart();
- int paramPosition = 1;
-
- for (WSDLSOAPHeader currentInput : inputHeaders)
- {
- boolean inOutput = HeaderUtil.containsMatchingPart(outputHeaders, currentInput);
- String mode = getMode(true, inOutput);
-
- constructHeaderParameter(semm, currentInput, paramPosition++, wsdlMessageName, mode);
- }
-
- for (WSDLSOAPHeader currentOutput : outputHeaders)
- {
- boolean inInput = HeaderUtil.containsMatchingPart(inputHeaders, currentOutput);
-
- if (inInput == true)
- continue;
-
- constructHeaderParameter(semm, currentOutput, paramPosition++, wsdlMessageName, "OUT");
- }
- }
-
- private void constructHeaderParameter(ServiceEndpointMethodMapping semm, WSDLSOAPHeader header, int paramPosition, String wsdlMessageName, String mode)
- {
- QName elementName = header.getElement();
-
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
- XSElementDeclaration xe = xsmodel.getElementDeclaration(elementName.getLocalPart(), elementName.getNamespaceURI());
- XSTypeDefinition xt = xe.getTypeDefinition();
- WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
- QName xmlType = wsdlTypes.getXMLType(header.getElement());
-
- // Replace the xt with the real type from the schema.
- xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
- if (xt instanceof XSSimpleTypeDefinition)
- xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
- String partName = header.getPartName();
-
- MethodParamPartsMapping mpin = getMethodParamPartsMapping(semm, elementName, xmlType, paramPosition, wsdlMessageName, mode, partName, false, true);
- semm.addMethodParamPartsMapping(mpin);
- }
-
- private String getMode(final boolean input, final boolean output)
- {
- if (input == true & output == true)
- {
- return "INOUT";
- }
- else if (input == true)
- {
- return "IN";
- }
- else if (output == true)
- {
- return "OUT";
- }
-
- return "";
- }
-
- private String getMode(WSDLInterfaceOperation op, String name)
- {
- WSDLInterfaceOperationInput in = WSDLUtils.getWsdl11Input(op);
- WSDLInterfaceOperationOutput out = WSDLUtils.getWsdl11Output(op);
-
- boolean i = false, o = false;
- if (in != null && in.getChildPart(name) != null)
- i = true;
- if (out != null && out.getChildPart(name) != null)
- o = true;
-
- if (i && o)
- return "INOUT";
-
- if (o)
- return "OUT";
-
- return "IN";
- }
-
- private void constructRPCParameters(ServiceEndpointMethodMapping semm, WSDLInterfaceOperation wiop, WSDLBindingOperation bindingOperation)
- {
- WSDLInterfaceOperationInput win = WSDLUtils.getWsdl11Input(wiop);
- if (win == null)
- throw new WSException(BundleUtils.getMessage(bundle, "RPC_ENDPOINTS_REQUIRE_INPUT_MESSAGE"));
- String wsdlMessageName = win.getMessageName().getLocalPart();
- JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
-
- RPCSignature signature = new RPCSignature(wiop);
- int i = 0;
- for (WSDLRPCPart part : signature.parameters())
- {
- String partName = part.getName();
- QName xmlName = new QName(partName);
- QName xmlType = part.getType();
-
- XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
- if (xt instanceof XSSimpleTypeDefinition)
- xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
-
- MethodParamPartsMapping mpin = getMethodParamPartsMapping(semm, xmlName, xmlType, i++, wsdlMessageName, getMode(wiop, part.getName()), partName, false, true);
-
- semm.addMethodParamPartsMapping(mpin);
- }
-
- WSDLRPCPart returnParameter = signature.returnParameter();
- if (returnParameter != null)
- {
- String partName = returnParameter.getName();
- QName xmlName = new QName(partName);
- QName xmlType = returnParameter.getType();
-
- XSTypeDefinition xt = schemaModel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
- String nameSpace = null;
- if (xt != null)
- {
- nameSpace = xt.getNamespace();
- }
- if (xt instanceof XSSimpleTypeDefinition)
- {
- xmlType = SchemaUtils.handleSimpleType((XSSimpleTypeDefinition)xt);
- }
-
- WsdlReturnValueMapping wrvm = new WsdlReturnValueMapping(semm);
- wrvm.setMethodReturnValue(getJavaTypeAsString(xmlName, xmlType, nameSpace, false, true));
- QName messageName = WSDLUtils.getWsdl11Output(wiop).getMessageName();
-
- wrvm.setWsdlMessage(new QName(messageName.getNamespaceURI(), messageName.getLocalPart(), WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_WSDL_MESSAGE_NS));
- wrvm.setWsdlMessagePartName(partName);
- semm.setWsdlReturnValueMapping(wrvm);
- }
-
- if (bindingOperation != null)
- {
- constructHeaderParameters(semm, wiop, bindingOperation);
- }
- }
-
- public void constructJavaXmlTypeMapping(JavaWsdlMapping jwm)
- {
- WSDLInterface[] intfArr = wsdlDefinitions.getInterfaces();
- int len = intfArr != null ? intfArr.length : 0;
- for (int i = 0; i < len; i++)
- {
- WSDLInterface wi = intfArr[i];
- WSDLInterfaceOperation[] ops = wi.getOperations();
- int lenOps = ops.length;
- for (int j = 0; j < lenOps; j++)
- {
- WSDLInterfaceOperation op = ops[j];
- for (WSDLInterfaceOperationInput input : op.getInputs())
- {
- if (isDocStyle())
- {
- XSTypeDefinition xt = getXSType(input);
- // Don't unwrap the actual parameter.
- addJavaXMLTypeMap(xt, input.getElement().getLocalPart(), "", "", jwm, false);
- }
- else
- {
- for (WSDLRPCPart part : input.getChildParts())
- addJavaXMLTypeMap(getXSType(part.getType()), input.getElement().getLocalPart(), "", "", jwm, true);
- }
- }
-
- for (WSDLInterfaceOperationOutput output : op.getOutputs())
- {
- if (isDocStyle())
- {
- XSTypeDefinition xt = getXSType(output);
- // Don't unwrap the response type.
- addJavaXMLTypeMap(xt, output.getElement().getLocalPart(), "", "", jwm, false);
- }
- else
- {
- for (WSDLRPCPart part : output.getChildParts())
- addJavaXMLTypeMap(getXSType(part.getType()), output.getElement().getLocalPart(), "", "", jwm, true);
- }
- }
-
- for (WSDLInterfaceFault fault : wi.getFaults())
- {
- QName xmlType = fault.getXmlType();
- QName xmlName = fault.getElement();
-
- WSDLTypes types = wsdlDefinitions.getWsdlTypes();
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(types);
- XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
- addJavaXMLTypeMap(xt, xmlName.getLocalPart(), "", "", jwm, true);
-
- String exceptionType = getJavaTypeAsString(null, xmlType, xt.getNamespace(), false, true);
-
- if (registeredExceptions.contains(exceptionType) == false)
- {
- registeredExceptions.add(exceptionType);
- ExceptionMapping exceptionMapping = new ExceptionMapping(jwm);
- exceptionMapping.setExceptionType(exceptionType);
- exceptionMapping.setWsdlMessage(fault.getName());
- jwm.addExceptionMappings(exceptionMapping);
- }
- }
-
- WSDLBindingOperation bindingOperation = HeaderUtil.getWSDLBindingOperation(wsdlDefinitions, op);
- if (bindingOperation != null)
- {
- constructHeaderJavaXmlTypeMapping(jwm, HeaderUtil.getSignatureHeaders(bindingOperation.getInputs()));
- constructHeaderJavaXmlTypeMapping(jwm, HeaderUtil.getSignatureHeaders(bindingOperation.getOutputs()));
- }
-
- }//end for
- }
- }
-
- public void constructHeaderJavaXmlTypeMapping(JavaWsdlMapping jwm, WSDLSOAPHeader[] headers)
- {
- for (WSDLSOAPHeader current : headers)
- {
- QName elementName = current.getElement();
-
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
- XSElementDeclaration xe = xsmodel.getElementDeclaration(elementName.getLocalPart(), elementName.getNamespaceURI());
- XSTypeDefinition xt = xe.getTypeDefinition();
-
- addJavaXMLTypeMap(xt, elementName.getLocalPart(), "", "", jwm, true);
- }
- }
-
- private boolean unwrapRequest(ServiceEndpointMethodMapping methodMapping, String messageName, String containingElement, XSTypeDefinition xt)
- {
- if (xt instanceof XSComplexTypeDefinition == false)
- throw new WSException(BundleUtils.getMessage(bundle, "TRIED_TO_UNWRAP"));
-
- List<MethodParamPartsMapping> partsMappings = new ArrayList<MethodParamPartsMapping>();
-
- XSComplexTypeDefinition wrapper = (XSComplexTypeDefinition)xt;
-
- if (wrapper.getAttributeUses().getLength() > 0)
- return false;
-
- boolean unwrappedElement = false;
-
- XSParticle particle = wrapper.getParticle();
- if (particle == null)
- {
- return true;
- }
- else
- {
- XSTerm term = particle.getTerm();
- if (term instanceof XSModelGroup)
- {
- unwrappedElement = unwrapGroup(partsMappings, methodMapping, messageName, containingElement, (XSModelGroup)term);
- }
- }
-
- if (unwrappedElement)
- {
- addMethodParamPartsMappings(partsMappings, methodMapping);
-
- return true;
- }
-
- return false;
- }
-
- private void addMethodParamPartsMappings(List<MethodParamPartsMapping> partsMappings, ServiceEndpointMethodMapping methodMapping)
- {
- for (MethodParamPartsMapping current : partsMappings)
- {
- methodMapping.addMethodParamPartsMapping(current);
- }
- }
-
- private boolean unwrapGroup(List<MethodParamPartsMapping> partsMappings, ServiceEndpointMethodMapping methodMapping, String messageName, String containingElement,
- XSModelGroup group)
- {
- if (group.getCompositor() != XSModelGroup.COMPOSITOR_SEQUENCE)
- return false;
-
- XSObjectList particles = group.getParticles();
- for (int i = 0; i < particles.getLength(); i++)
- {
- XSParticle particle = (XSParticle)particles.item(i);
- XSTerm term = particle.getTerm();
- if (term instanceof XSModelGroup)
- {
- if (unwrapGroup(partsMappings, methodMapping, messageName, containingElement, (XSModelGroup)term) == false)
- return false;
- }
- else if (term instanceof XSElementDeclaration)
- {
- XSElementDeclaration element = (XSElementDeclaration)term;
- XSTypeDefinition type = element.getTypeDefinition();
-
- QName xmlName = new QName(element.getNamespace(), element.getName());
- QName xmlType;
- if (type.getAnonymous())
- {
- String tempName = ToolsUtils.firstLetterUpperCase(containingElement) + ToolsUtils.firstLetterUpperCase(element.getName());
- xmlType = new QName(type.getNamespace(), tempName);
- }
- else
- {
- xmlType = new QName(type.getNamespace(), type.getName());
- }
-
- boolean array = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
- boolean primitive = !(element.getNillable() || (particle.getMinOccurs() == 0 && particle.getMaxOccurs() == 1));
-
- MethodParamPartsMapping part = getMethodParamPartsMapping(methodMapping, xmlName, xmlType, partsMappings.size(), messageName, "IN", xmlName.getLocalPart(),
- array, primitive);
- partsMappings.add(part);
- }
- }
-
- // If we reach here we must have successfully unwrapped the parameters.
- return true;
- }
-
- private void checkEssentials()
- {
- if (typeMapping == null)
- throw new WSException(BundleUtils.getMessage(bundle, "TYPEMAPPING_IS_NULL"));
- }
-
- private XSTypeDefinition getXSType(WSDLInterfaceMessageReference part)
- {
- //Check if there are any custom properties
- WSDLInterfaceOperation op = part.getWsdlOperation();
- String zeroarg1 = null;
- String zeroarg2 = null;
- WSDLProperty prop1 = op.getProperty(Constants.WSDL_PROPERTY_ZERO_ARGS);
- if (prop1 != null)
- zeroarg1 = prop1.getValue();
- if (zeroarg1 != null && zeroarg2 != null && zeroarg1.equals(zeroarg2) == false)
- return null;
- if (zeroarg1 != null && "true".equals(zeroarg1))
- return null;
-
- QName xmlType = part.getXMLType();
-
- WSDLTypes types = wsdlDefinitions.getWsdlTypes();
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(types);
- return xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
- }
-
- private XSTypeDefinition getXSType(QName xmlType)
- {
- WSDLTypes types = wsdlDefinitions.getWsdlTypes();
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(types);
- return xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
- }
-
- private void addJavaXMLTypeMap(XSTypeDefinition xt, String name, String containingElement, String containingType, JavaWsdlMapping jwm, boolean skipWrapperArray)
- {
- JavaXmlTypeMapping jxtm = null;
-
- if (xt instanceof XSComplexTypeDefinition)
- {
- XSModelGroup xm = null;
- XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xt;
- XSTypeDefinition baseType = xc.getBaseType();
- short der = xc.getDerivationMethod();
- String typeQName = "";
-
- if ((baseType != null) && !utils.isBaseTypeIgnorable(baseType, xc))
- {
- addJavaXMLTypeMap(baseType, baseType.getName(), "", "", jwm, skipWrapperArray); //Recurse for base types
- }
-
- // handleContentTypeElementsWithDerivationNone
- if (xc.getContentType() != XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
- {
- XSParticle xp = xc.getParticle();
- if (xp != null)
- {
- XSTerm xterm = xp.getTerm();
- if (xterm instanceof XSModelGroup)
- xm = (XSModelGroup)xterm;
- }
- }
-
- if ((skipWrapperArray && SchemaUtils.isWrapperArrayType(xt)) == false)
- {
- jxtm = new JavaXmlTypeMapping(jwm);
- String javaType;
- String localName = xt.getName();
-
- // Anonymous
- if (localName == null)
- {
- String tempName = containingElement + ToolsUtils.firstLetterUpperCase(name);
- javaType = getJavaTypeAsString(null, new QName(tempName), xt.getNamespace(), false, true);
- StringBuilder temp = new StringBuilder();
- if (containingType != null && containingType.length() > 0)
- temp.append(containingType);
- temp.append(">").append(name);
- localName = temp.toString();
- jxtm.setAnonymousTypeQName(new QName(xt.getNamespace(), localName, "typeNS"));
- typeQName = localName;
- }
- else
- {
- javaType = getJavaTypeAsString(null, new QName(localName), xt.getNamespace(), false, true);
- jxtm.setRootTypeQName(new QName(xt.getNamespace(), xt.getName(), "typeNS"));
- typeQName = xc.getName();
- }
-
- if (typeNamespace == null)
- {
- typeNamespace = xt.getNamespace();
- }
-
- if (registeredTypes.contains(javaType))
- return;
-
- jxtm.setJavaType(javaType);
- jxtm.setQNameScope("complexType");
-
- registeredTypes.add(javaType);
- jwm.addJavaXmlTypeMappings(jxtm);
- // addJavaXMLTypeMapping(jwm, jxtm
-
- if (xm != null)
- {
- addVariableMappingMap(xm, jxtm, javaType);
- }
-
- // Add simple content if it exists
- XSSimpleTypeDefinition simple = xc.getSimpleType();
- if (simple != null)
- {
- addJavaXMLTypeMap(simple, xc.getName(), "", "", jwm, skipWrapperArray);
- }
-
- // Add attributes
- XSObjectList attributeUses = ((XSComplexTypeDefinition)xc).getAttributeUses();
- if (attributeUses != null)
- addAttributeMappings(attributeUses, jxtm);
- }
-
- if (xm != null)
- {
- String container = containingElement;
- if (container == null || container.length() == 0)
- {
- container = name;
- }
-
- addGroup(xm, container, typeQName, jwm);
- }
- }
-
- // Add enum simpleType support
- }
-
- private void addVariableMappingMap(XSModelGroup xm, JavaXmlTypeMapping jxtm, String javaType)
- {
- XSObjectList xo = xm.getParticles();
- int len = xo != null ? xo.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSTerm xsterm = ((XSParticle)xo.item(i)).getTerm();
- if (xsterm instanceof XSModelGroup)
- {
- addVariableMappingMap((XSModelGroup)xsterm, jxtm, javaType);
- }
- else if (xsterm instanceof XSElementDeclaration)
- {
- XSElementDeclaration xe = (XSElementDeclaration)xsterm;
- VariableMapping vm = new VariableMapping(jxtm);
- String name = xe.getName();
-
- // JBWS-1170 Convert characters which are illegal in Java identifiers
- vm.setJavaVariableName(ToolsUtils.convertInvalidCharacters(Introspector.decapitalize(name)));
- vm.setXmlElementName(name);
- jxtm.addVariableMapping(vm);
- }
- }
- }
-
- private void addAttributeMappings(XSObjectList attributes, JavaXmlTypeMapping jxtm)
- {
- for (int i = 0; i < attributes.getLength(); i++)
- {
- XSAttributeUse obj = (XSAttributeUse)attributes.item(i);
- XSAttributeDeclaration att = obj.getAttrDeclaration();
- XSSimpleTypeDefinition simple = att.getTypeDefinition();
- addJavaXMLTypeMap(simple, "none", "", "", jxtm.getJavaWsdlMapping(), true);
- VariableMapping vm = new VariableMapping(jxtm);
- String name = att.getName();
- vm.setXmlAttributeName(name);
- // JBWS-1170 Convert characters which are illegal in Java identifiers
- vm.setJavaVariableName(ToolsUtils.convertInvalidCharacters(Introspector.decapitalize(name)));
- jxtm.addVariableMapping(vm);
- }
- }
-
- private void addGroup(XSModelGroup xm, String containingElement, String containingType, JavaWsdlMapping jwm)
- {
- XSObjectList xo = xm.getParticles();
- int len = xo != null ? xo.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSTerm xsterm = ((XSParticle)xo.item(i)).getTerm();
- if (xsterm instanceof XSModelGroup)
- {
- addGroup((XSModelGroup)xsterm, containingElement, containingType, jwm);
- }
- else if (xsterm instanceof XSElementDeclaration)
- {
- XSElementDeclaration xe = (XSElementDeclaration)xsterm;
- XSTypeDefinition typeDefinition = xe.getTypeDefinition();
- String tempContainingElement = "";
- String tempContainingType = "";
- if (xe.getScope() != XSConstants.SCOPE_GLOBAL)
- {
- tempContainingElement = containingElement;
- tempContainingType = containingType;
- }
-
- addJavaXMLTypeMap(typeDefinition, xe.getName(), tempContainingElement, tempContainingType, jwm, !isWrapped());
- }
- }
- }
-
- private String getJavaTypeAsString(QName xmlName, QName xmlType, String targetNS, boolean array, boolean primitive)
- {
- String jtype = null;
-
- String arraySuffix = (array) ? "[]" : "";
- if (!isDocStyle())
- {
- JBossXSModel xsmodel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
- XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- XSElementDeclaration unwrapped = SchemaUtils.unwrapArrayType(xt);
- StringBuilder builder = new StringBuilder();
-
- while (unwrapped != null)
- {
- xt = unwrapped.getTypeDefinition();
- primitive = !unwrapped.getNillable();
- builder.append("[]");
- unwrapped = SchemaUtils.unwrapArrayType(xt);
- }
- if (builder.length() > 0)
- {
- xmlType = new QName(xt.getNamespace(), xt.getName());
- arraySuffix = builder.toString();
- }
- }
-
- //First try to get it from the typeMapping
- Class javaType = typeMapping.getJavaType(xmlType, primitive);
- /**
- * Special case - when qname=xsd:anyType && javaType == Element
- * then cls has to be javax.xml.soap.SOAPElement
- */
- if (xmlType.getNamespaceURI().equals(Constants.NS_SCHEMA_XSD) && "anyType".equals(xmlType.getLocalPart()) && javaType == Element.class)
- javaType = SOAPElement.class;
- javaType = this.makeCustomDecisions(javaType, xmlType);
-
- if (javaType == null)
- {
- if (log.isDebugEnabled())
- {
- log.debug("Typemapping lookup failed for " + xmlName);
- log.debug("Falling back to identifier generation");
- }
- String className = xmlType.getLocalPart();
- if (className.charAt(0) == '>')
- className = className.substring(1);
- className = ToolsUtils.convertInvalidCharacters(className);
- jtype = getPackageName(targetNS) + "." + utils.firstLetterUpperCase(className);
- }
- else
- {
- //Handle arrays
- if (javaType.isArray())
- {
- jtype = JavaUtils.getSourceName(javaType);
- }
- else
- jtype = javaType.getName();
- }
-
- return jtype + arraySuffix;
- }
-
- private boolean isDocStyle()
- {
- return Constants.DOCUMENT_LITERAL.equals(wsdlStyle);
- }
-
- /**
- * Any custom decisions that need to be made will be done here
- *
- * @param javaType
- * @param xmlName
- * @param xmlType
- */
- private Class makeCustomDecisions(Class javaType, QName xmlType)
- {
- if (javaType != null && xmlType != null)
- {
- if (Byte[].class == javaType && Constants.NS_SCHEMA_XSD.equals(xmlType.getNamespaceURI()) && "base64Binary".equals(xmlType.getLocalPart()))
- javaType = byte[].class;
- }
- return javaType;
- }
-
- private boolean isWrapped()
- {
- return "wrapped".equals(parameterStyle) && Constants.DOCUMENT_LITERAL.equals(wsdlStyle);
- }
-
- private MethodParamPartsMapping getMethodParamPartsMapping(ServiceEndpointMethodMapping semm, QName xmlName, QName xmlType, int paramPosition,
- String wsdlMessageName, String paramMode, String wsdlMessagePartName, boolean array, boolean primitive)
- {
- String targetNS = wsdlDefinitions.getTargetNamespace();
- MethodParamPartsMapping mppm = new MethodParamPartsMapping(semm);
- mppm.setParamPosition(paramPosition);
- String javaType = getJavaTypeAsString(xmlName, xmlType, xmlType.getNamespaceURI(), array, primitive);
- mppm.setParamType(javaType);
-
- //WSDL Message Mapping
- WsdlMessageMapping wmm = new WsdlMessageMapping(mppm);
- wmm.setParameterMode(paramMode);
- String wsdlNS = WSToolsConstants.WSTOOLS_CONSTANT_MAPPING_WSDL_MESSAGE_NS;
- wmm.setWsdlMessage(new QName(targetNS, wsdlMessageName, wsdlNS));
- wmm.setWsdlMessagePartName(wsdlMessagePartName);
- mppm.setWsdlMessageMapping(wmm);
- return mppm;
- }
-
- private String getPackageName(String targetNamespace)
- {
- //Get it from global config
- if (namespacePackageMap != null)
- {
- String pkg = namespacePackageMap.get(targetNamespace);
- if (pkg != null)
- {
- return pkg;
- }
- }
- //Default behaviour will always generate all classes in the SEI package only
- return packageName;
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.helpers;
-
-import java.io.FileInputStream;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-
-import org.jboss.ws.common.DOMUtils;
-import org.jboss.ws.common.DOMWriter;
-import org.w3c.dom.Element;
-
-
-/**
- * @author Heiko Braun <heiko.braun(a)jboss.com>
- * @since Sep 27, 2006
- */
-public class ReformatXML {
- private static final ResourceBundle bundle = BundleUtils.getBundle(ReformatXML.class);
-
- public static void main(String[] args) throws Exception
- {
- if(args.length == 0)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "SPECIFY_A_FILENAME"));
-
- ReformatXML formatter = new ReformatXML();
- try
- {
- FileInputStream in = new FileInputStream(args[0]);
- System.out.println( formatter.reformat(in));
- }
- catch (FileNotFoundException e)
- {
- System.err.println("Failed to read from file " + args[0] +": "+e.getMessage());
- }
- }
-
- public String reformat(InputStream in) throws Exception
- {
- Element root = DOMUtils.parse(in);
- return DOMWriter.printNode(root, true);
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReturnTypeUnwrapper.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReturnTypeUnwrapper.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ReturnTypeUnwrapper.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.helpers;
-
-import javax.xml.namespace.QName;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSModelGroup;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSTerm;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.WSException;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-
-/**
- * A helper class to unwrap a return type is possible.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 10 Dec 2006
- */
-public class ReturnTypeUnwrapper
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ReturnTypeUnwrapper.class);
-
- public JBossXSModel xsmodel;
- public QName xmlType;
- public XSElementDeclaration unwrappedElement;
- public boolean array = false;
- public boolean primitive = false;
- private boolean wrapped;
-
- public ReturnTypeUnwrapper(QName xmlType, JBossXSModel xsmodel, boolean wrapped)
- {
- this.xmlType = xmlType;
- this.xsmodel = xsmodel;
- this.wrapped = wrapped;
- }
-
- public boolean unwrap()
- {
- if (wrapped == false)
- return false;
-
- XSTypeDefinition xt = xsmodel.getTypeDefinition(xmlType.getLocalPart(), xmlType.getNamespaceURI());
-
- if (xt instanceof XSComplexTypeDefinition == false)
- throw new WSException(BundleUtils.getMessage(bundle, "UNWRAP_NON_COMPLEX_TYPE"));
-
- XSComplexTypeDefinition wrapper = (XSComplexTypeDefinition)xt;
-
- boolean hasAttributes = wrapper.getAttributeUses().getLength() > 0;
- if (hasAttributes)
- throw new WSException(BundleUtils.getMessage(bundle, "CAN_NOT_UNWRAP"));
-
- boolean unwrapped = false;
-
- XSParticle particle = wrapper.getParticle();
- if (particle != null)
- {
- XSTerm term = particle.getTerm();
-
- if (term instanceof XSModelGroup == false)
- throw new WSException(BundleUtils.getMessage(bundle, "EXPECTED_MODEL_GROUP"));
-
- XSModelGroup group = (XSModelGroup)term;
-
- unwrapped = unwrapModelGroup(group);
- }
-
- return unwrapped;
- }
-
- private boolean unwrapModelGroup(XSModelGroup group)
- {
- XSObjectList particles = group.getParticles();
- if (particles.getLength() == 1)
- {
- XSParticle particle = (XSParticle)particles.item(0);
- boolean array = particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1;
- XSTerm term = particle.getTerm();
-
- if (term instanceof XSModelGroup)
- {
- return unwrapModelGroup((XSModelGroup)term);
- }
- else if (term instanceof XSElementDeclaration)
- {
- unwrappedElement = (XSElementDeclaration)term;
- XSTypeDefinition type = unwrappedElement.getTypeDefinition();
- if (type.getAnonymous() == false)
- xmlType = new QName(unwrappedElement.getTypeDefinition().getNamespace(), unwrappedElement.getTypeDefinition().getName());
-
- this.array = array;
- primitive = !(unwrappedElement.getNillable() || (particle.getMinOccurs() == 0 && particle.getMaxOccurs() == 1));
- }
-
- }
- else
- {
- throw new WSException(BundleUtils.getMessage(bundle, "UNABLE_TO_UNWRAP_MODEL"));
- }
-
- return unwrappedElement != null;
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/SecurityActions.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/SecurityActions.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/SecurityActions.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,111 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.helpers;
-
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-
-/**
- * Security actions for this package
- *
- * @author alessio.soldano(a)jboss.com
- * @since 19-Jun-2009
- *
- */
-class SecurityActions
-{
- /**
- * Get context classloader.
- *
- * @return the current context classloader
- */
- static ClassLoader getContextClassLoader()
- {
- SecurityManager sm = System.getSecurityManager();
- if (sm == null)
- {
- return Thread.currentThread().getContextClassLoader();
- }
- else
- {
- return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
- public ClassLoader run()
- {
- return Thread.currentThread().getContextClassLoader();
- }
- });
- }
- }
-
- static URL getResource(final ClassLoader cl, final String filename)
- {
- SecurityManager sm = System.getSecurityManager();
- if (sm == null)
- {
- return cl.getResource(filename);
- }
- else
- {
- return AccessController.doPrivileged(new PrivilegedAction<URL>() {
- public URL run()
- {
- return cl.getResource(filename);
- }
- });
- }
- }
-
- /**
- * Load a class using the provided classloader
- *
- * @param name
- * @return
- * @throws PrivilegedActionException
- */
- static Class<?> loadClass(final ClassLoader cl, final String name) throws PrivilegedActionException, ClassNotFoundException
- {
- SecurityManager sm = System.getSecurityManager();
- if (sm == null)
- {
- return cl.loadClass(name);
- }
- else
- {
- return AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
- public Class<?> run() throws PrivilegedActionException
- {
- try
- {
- return cl.loadClass(name);
- }
- catch (Exception e)
- {
- throw new PrivilegedActionException(e);
- }
- }
- });
- }
- }
-}
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,423 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.helpers;
-
-import java.io.File;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-import java.io.IOException;
-import java.io.Writer;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.soap.Style;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.metadata.umdm.WrappedParameter;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.jboss.ws.tools.Configuration;
-import org.jboss.ws.tools.JavaToWSDL;
-import org.jboss.ws.tools.JavaWriter;
-import org.jboss.ws.tools.NamespacePackageMapping;
-import org.jboss.ws.tools.WSDLToJava;
-import org.jboss.ws.tools.WebservicesXMLCreatorImpl;
-import org.jboss.ws.tools.Configuration.GlobalConfig;
-import org.jboss.ws.tools.Configuration.JavaToWSDLConfig;
-import org.jboss.ws.tools.Configuration.WSDLToJavaConfig;
-import org.jboss.ws.tools.XSDTypeToJava.VAR;
-import org.jboss.ws.tools.client.ServiceCreator;
-import org.jboss.ws.tools.interfaces.WebservicesXMLCreator;
-import org.jboss.ws.tools.mapping.MappingFileGenerator;
-import org.jboss.ws.tools.wsdl.WSDLWriter;
-import org.jboss.ws.common.DOMUtils;
-import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.common.IOUtils;
-import org.jboss.ws.common.JavaUtils;
-
-/**
- * Helper class used by the cmd line tool "jbossws"
- * and ant task "wstools"
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Aug 19, 2005
- */
-public class ToolsHelper
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ToolsHelper.class);
- private static Logger log = Logger.getLogger(ToolsHelper.class);
-
- /**
- * Java To WSDL Generation [Serverside Generation]
- *
- * @param config
- * @param outDir
- * @throws IOException
- */
- public void handleJavaToWSDLGeneration(Configuration config, String outDir) throws IOException
- {
- JavaToWSDLConfig j2wc = config.getJavaToWSDLConfig(false);
- JavaToWSDL jwsdl = new JavaToWSDL(Constants.NS_WSDL11);
- jwsdl.setServiceName(j2wc.serviceName);
- jwsdl.setTargetNamespace(j2wc.targetNamespace);
- jwsdl.setTypeNamespace(j2wc.typeNamespace);
- jwsdl.setOperationMap(j2wc.operations);
-
- if ("document".equals(j2wc.wsdlStyle))
- jwsdl.setStyle(Style.DOCUMENT);
- else if ("rpc".equals(j2wc.wsdlStyle))
- jwsdl.setStyle(Style.RPC);
- else throw new WSException(BundleUtils.getMessage(bundle, "UNRECOGNIZED_STYLE", j2wc.wsdlStyle));
-
- if ("wrapped".equals(j2wc.parameterStyle))
- jwsdl.setParameterStyle(ParameterStyle.WRAPPED);
- else if ("bare".equals(j2wc.parameterStyle))
- jwsdl.setParameterStyle(ParameterStyle.BARE);
- else throw new WSException(BundleUtils.getMessage(bundle, "UNRECOGNIZED_PARAMETER_STYLE", j2wc.parameterStyle));
-
- Class endpointClass = loadClass(j2wc.endpointName);
-
- if (endpointClass == null)
- throw new WSException(BundleUtils.getMessage(bundle, "ENDPOINT_CANNOT_BE_LOADED", j2wc.endpointName ));
-
- //Take care of passing global config details
- GlobalConfig gcfg = config.getGlobalConfig(false);
- if (gcfg != null)
- {
- if (gcfg.packageNamespaceMap != null)
- jwsdl.setPackageNamespaceMap(gcfg.packageNamespaceMap);
- }
- WSDLDefinitions wsdl = jwsdl.generate(endpointClass);
- //Create the WSDL Directory
- createDir(outDir + "/wsdl");
- String wsdlPath = outDir + "/wsdl/" + j2wc.serviceName + ".wsdl";
- //Generate the WSDL
- Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath), Constants.DEFAULT_XML_CHARSET);
- new WSDLWriter(wsdl).write(fw, Constants.DEFAULT_XML_CHARSET);
- fw.close();
-
- //Generate the Mapping File
- if (j2wc.mappingFileNeeded)
- {
- UnifiedMetaData unifiedMetaData = jwsdl.getUnifiedMetaData();
- JavaWsdlMapping mapping = jwsdl.getJavaWsdlMapping();
-
- createWrapperTypes(j2wc, outDir, unifiedMetaData, mapping, endpointClass);
- Writer writer = IOUtils.getCharsetFileWriter(new File(outDir + "/" + j2wc.mappingFileName), Constants.DEFAULT_XML_CHARSET);
- writer.write(Constants.XML_HEADER);
- writer.write(DOMWriter.printNode(DOMUtils.parse(mapping.serialize()), true));
- writer.close();
- }
-
- //Generate the webservices.xml file
- if (j2wc.wsxmlFileNeeded)
- {
- WebservicesXMLCreator wscr = new WebservicesXMLCreatorImpl();
- wscr.setTargetNamespace(j2wc.targetNamespace);
- //wscr.setLocation(new File(outDir).toURL());
- wscr.setSeiName(j2wc.endpointName);
- wscr.setServiceName(j2wc.serviceName);
- //Get the portname from wsdl definitions
- WSDLService wsdlService = wsdl.getService(j2wc.serviceName);
- String portName = wsdlService.getEndpoints()[0].getName().getLocalPart();
- //wscr.setPortName(j2wc.serviceName + "Port");
- wscr.setPortName(portName);
- //wscr.setMappingFileName(j2wc.mappingFileName);
- if (j2wc.servletLink != null)
- {
- wscr.setMappingFile("WEB-INF/" + j2wc.mappingFileName);
- wscr.setWsdlFile("WEB-INF/wsdl/" + j2wc.serviceName + ".wsdl");
- wscr.setServletLink(j2wc.servletLink);
- }
- else
- {
- wscr.setMappingFile("META-INF/" + j2wc.mappingFileName);
- wscr.setWsdlFile("META-INF/wsdl/" + j2wc.serviceName + ".wsdl");
- wscr.setEjbLink(j2wc.ejbLink);
- }
- wscr.setAppend(j2wc.wsxmlFileAppend);
- wscr.generateWSXMLDescriptor(new File(outDir + "/webservices.xml"));
- }
- }
-
- private void createWrapperTypes(JavaToWSDLConfig j2wc, String outDir, UnifiedMetaData wsMetaData, JavaWsdlMapping mapping, Class endpointClass) throws IOException
- {
- Map<QName, JavaXmlTypeMapping> index = indexMappingTypes(mapping);
-
- EndpointMetaData epMetaData = null;
- for (ServiceMetaData service : wsMetaData.getServices())
- {
- epMetaData = service.getEndpointByServiceEndpointInterface(j2wc.endpointName);
- if (epMetaData != null)
- break;
- }
-
- if (epMetaData == null)
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_FIND_ENDPOINT_IN_METADATA", j2wc.endpointName));
-
- String packageName = endpointClass.getPackage().getName();
- ClassLoader classLoader = wsMetaData.getClassLoader();
-
- for (OperationMetaData opMetaData : epMetaData.getOperations())
- {
- if (opMetaData.isDocumentWrapped())
- {
- for (ParameterMetaData parameter : opMetaData.getParameters())
- {
- String name = endpointClass.getSimpleName() + "_" + opMetaData.getQName().getLocalPart() + "_RequestStruct";
- createWrapperType(parameter, name, packageName, index, classLoader, outDir);
- }
-
- ParameterMetaData returnParameter = opMetaData.getReturnParameter();
- if (returnParameter != null)
- {
- String name = endpointClass.getSimpleName() + "_" + opMetaData.getQName().getLocalPart() + "_ResponseStruct";
- createWrapperType(returnParameter, name, packageName, index, classLoader, outDir);
- }
- }
- }
- }
-
- private void createWrapperType(ParameterMetaData parameter, String name, String packageName, Map<QName, JavaXmlTypeMapping> mappingIndex, ClassLoader classLoader,
- String outDir) throws IOException
- {
- List<WrappedParameter> wrappedParameters = parameter.getWrappedParameters();
-
- if (wrappedParameters == null)
- return;
-
- List<VAR> vars = new ArrayList<VAR>();
- for (WrappedParameter wrapped : wrappedParameters)
- {
- String typeName = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), classLoader);
- vars.add(new VAR(wrapped.getVariable(), typeName, false));
- }
-
- JavaWriter writer = new JavaWriter();
- writer.createJavaFile(new File(outDir), name + ".java", packageName, vars, null, null, false, false, null);
-
- JavaXmlTypeMapping type = mappingIndex.get(parameter.getXmlType());
- if (type == null)
- throw new WSException(BundleUtils.getMessage(bundle, "MISSING_A_WRAPPER_TYPE", parameter.getXmlType()));
-
- type.setJavaType(packageName + "." + name);
- }
-
- private Map<QName, JavaXmlTypeMapping> indexMappingTypes(JavaWsdlMapping mapping)
- {
- Map<QName, JavaXmlTypeMapping> index = new HashMap<QName, JavaXmlTypeMapping>();
- for (JavaXmlTypeMapping type : mapping.getJavaXmlTypeMappings())
- {
- QName qname = type.getRootTypeQName();
- if (qname == null)
- continue;
-
- index.put(qname, type);
- }
-
- return index;
- }
-
- /**
- * Client Side Generation [WSDL To Java]
- *
- * @param config
- * @param outDir
- */
- public void handleWSDLToJavaGeneration(Configuration config, String outDir)
- {
- WSDLToJavaConfig w2jc = config.getWSDLToJavaConfig(false);
- GlobalConfig glc = config.getGlobalConfig(false);
-
- WSDLToJava wsdlToJava = new WSDLToJava();
- wsdlToJava.setTypeMapping(new LiteralTypeMapping());
- wsdlToJava.setGenerateSerializableTypes(w2jc.serializableTypes);
-
- WSDLDefinitions wsdl = null;
- try
- {
- URL wsdlURL = null;
- try
- {
- wsdlURL = new URL(w2jc.wsdlLocation);
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
-
- if (wsdlURL == null)
- {
- File wsdlFile = new File(w2jc.wsdlLocation);
- if (wsdlFile.exists())
- {
- wsdlURL = wsdlFile.toURL();
- }
- }
-
- if (wsdlURL == null)
- {
- ClassLoader ctxLoader = SecurityActions.getContextClassLoader();
- wsdlURL = SecurityActions.getResource(ctxLoader, w2jc.wsdlLocation);
- }
-
- if (wsdlURL == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_LOAD_WSDL", w2jc.wsdlLocation));
-
- wsdl = wsdlToJava.convertWSDL2Java(wsdlURL);
- if (glc != null)
- wsdlToJava.setNamespacePackageMap(glc.packageNamespaceMap);
-
- wsdlToJava.setParameterStyle(w2jc.parameterStyle);
- wsdlToJava.generateSEI(wsdl, new File(outDir));
-
- //Generate the Service File
- this.generateServiceFile(getPackageName(wsdl, glc), wsdl, outDir);
-
- //Generate the Mapping File
- if (w2jc.mappingFileNeeded)
- {
- MappingFileGenerator mgf = new MappingFileGenerator(wsdl, new LiteralTypeMapping());
- if (glc != null && glc.packageNamespaceMap != null)
- mgf.setNamespacePackageMap(glc.packageNamespaceMap);
- mgf.setServiceName(wsdl.getServices()[0].getName().getLocalPart());
- mgf.setParameterStyle(w2jc.parameterStyle);
-
- JavaWsdlMapping jwm = mgf.generate();
- Writer writer = IOUtils.getCharsetFileWriter(new File(outDir + "/" + w2jc.mappingFileName), Constants.DEFAULT_XML_CHARSET);
- writer.write(Constants.XML_HEADER);
- writer.write(DOMWriter.printNode(DOMUtils.parse(jwm.serialize()), true));
- writer.close();
- }
-
- //Generate the webservices.xml file
- if (w2jc.wsxmlFileNeeded)
- {
- String seiName = "mypackage.MyServiceEndpointInterface";
- String serviceName = "MyServiceName";
-
- if (wsdl.getServices().length == 1)
- serviceName = wsdl.getServices()[0].getName().getLocalPart();
-
- if (wsdl.getInterfaces().length == 1)
- {
- String seiPackage = getPackageName(wsdl, glc);
- seiName = seiPackage + "." + wsdlToJava.getServiceEndpointInterfaceName(wsdl.getInterfaces()[0]);
- }
-
- WebservicesXMLCreator wscr = new WebservicesXMLCreatorImpl();
- wscr.setTargetNamespace(wsdl.getTargetNamespace());
- wscr.setSeiName(seiName);
- wscr.setServiceName(serviceName);
- WSDLService wsdlService = wsdl.getService(serviceName);
- String portName = wsdlService.getEndpoints()[0].getName().getLocalPart();
- wscr.setPortName(portName);
-
- String wsdlShortName = wsdlURL.getPath();
- wsdlShortName = wsdlShortName.substring(wsdlShortName.lastIndexOf("/"));
-
- if (w2jc.servletLink != null)
- {
- wscr.setMappingFile("WEB-INF/" + w2jc.mappingFileName);
- wscr.setWsdlFile("WEB-INF/wsdl" + wsdlShortName);
- wscr.setServletLink(w2jc.servletLink);
- }
- else
- {
- wscr.setMappingFile("META-INF/" + w2jc.mappingFileName);
- wscr.setWsdlFile("META-INF/wsdl" + wsdlShortName);
- wscr.setEjbLink(w2jc.ejbLink);
- }
- wscr.generateWSXMLDescriptor(new File(outDir + "/webservices.xml"));
- }
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException(ex);
- }
- }
-
- //PRIVATE METHODS
- private Class loadClass(String cls)
- {
- Class clazz = null;
- try
- {
- clazz = SecurityActions.loadClass(SecurityActions.getContextClassLoader(), cls);
- }
- catch (Exception e)
- {
- log.error(BundleUtils.getMessage(bundle, "CANNOT_LOAD_ENDPOINT", e.getLocalizedMessage()));
- }
- return clazz;
- }
-
- private void generateServiceFile(String packageName, WSDLDefinitions wsdl, String location) throws IOException
- {
- ServiceCreator sc = new ServiceCreator();
- sc.setPackageName(packageName);
- sc.setDirLocation(new File(location));
- sc.setWsdl(wsdl);
- sc.createServiceDescriptor();
- }
-
- private String getPackageName(WSDLDefinitions wsdl, GlobalConfig glc)
- {
- String targetNamespace = wsdl.getTargetNamespace();
- //Get it from global config if it is overriden
- if (glc != null && glc.packageNamespaceMap != null)
- {
- String pkg = glc.packageNamespaceMap.get(targetNamespace);
- if (pkg != null)
- {
- return pkg;
- }
- }
- return NamespacePackageMapping.getJavaPackageName(targetNamespace);
- }
-
- private void createDir(String path)
- {
- File file = new File(path);
- if (file.exists() == false)
- file.mkdirs();
- }
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.interfaces;
-
-import java.io.IOException;
-
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-
-/**
- * Defines the contract for creation of java.xml.rpc.Service Interface
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jul 23, 2005
- */
-
-public interface ServiceCreatorIntf
-{
- /**
- * @return Returns the packageName.
- */
- public String getPackageName();
-
- /**
- * @param packageName The packageName to set.
- */
- public void setPackageName(String packageName);
-
- /**
- * @return the WSDL Definitions
- */
- public WSDLDefinitions getWsdl();
-
- /**
- * Set the WSDL Definitions
- *
- * @param wsdl
- */
- public void setWsdl(WSDLDefinitions wsdl);
-
- /**
- * Create the Service Interface for the endpoint
- * @throws IOException
- *
- */
- public void createServiceDescriptor() throws IOException;
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,104 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.interfaces;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Map;
-
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLException;
-
-/**
- * Defines the contract for WSDL To Java Converters
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jul 23, 2005
- */
-
-public interface WSDLToJavaIntf
-{
-
- /**
- * Provide a WSDLFile and get back the WSDL20 Object Graph
- * @param wsdlfileurl
- * @return
- * @throws org.jboss.ws.metadata.wsdl.WSDLException
- */
- public WSDLDefinitions convertWSDL2Java(URL wsdlfileurl)
- throws WSDLException;
-
- /**
- * Get the features
- * <br>
- * <br>Features are:
- * <br>USE_ANNOTATIONS : Should the generated Java Types use annotations
- * @throws IllegalStateException feature unrecognized
- */
- public boolean getFeature(String name);
-
- /**
- * Set one or more features of the WSDLToJava tool
- * <br>
- * <br>Features are:
- * <br>USE_ANNOTATIONS : Should the generated Java Types use annotations
- * @param name
- * @param value
- */
- public void setFeature(String name, boolean value);
-
- /**
- * Method for use by the Web Services Layer
- * @param wsdlFile URL to the WSDL file
- * @param dir Directory where the generated files should be stored
- * @param annotate Is JAX-WS 2.0 compliance needed ie. annotations needed?
- * @throws IOException
- */
- public void generateSEI(URL wsdlFile, File dir, boolean annotate)
- throws IOException;
-
- /**
- * Generate the SEI
- * @param wsdl The WSDL20Definitions (root of the object tree)
- * @param dir The directory where the SEI files will be written
- * @throws IOException
- * @throws Exception
- */
- public void generateSEI(WSDLDefinitions wsdl, File dir) throws IOException;
-
- /**
- * Global configuration from user that defines a map of package->Namespace
- *
- * @param map
- */
- public void setNamespacePackageMap(Map<String,String> map);
-
- /**
- * The client can provide a type mapping
- * @param typeMapping
- */
- public void setTypeMapping(LiteralTypeMapping typeMapping);
-
- public void setParameterStyle(String paramStyle);
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WebservicesXMLCreator.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WebservicesXMLCreator.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/WebservicesXMLCreator.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.interfaces;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * Defines the contract for webservices.xml creating agents
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jul 23, 2005
- */
-
-public interface WebservicesXMLCreator
-{
-
- /**
- * Generate the webservices.xml file
- * @throws IOException
- */
- public void generateWSXMLDescriptor(File file) throws IOException;
-
- /**
- * @param targetNamespace The targetNamespace to set.
- */
- public void setTargetNamespace(String targetNamespace);
-
- /**
- * @param seiName The seiName to set.
- */
- public void setSeiName(String seiName);
-
- /**
- * @param portName The portName to set.
- */
- public void setPortName(String portName);
-
- /**
- * @param serviceName The serviceName to set.
- */
- public void setServiceName(String serviceName);
-
- /**
- * @param ejbLink The ejbLink to set.
- */
- public void setEjbLink(String ejbLink);
-
- /**
- * @param servletLink The servletLink to set.
- */
- public void setServletLink(String servletLink);
-
- /**
- * @param mappingFileEntry The mapping file entry
- */
- public void setMappingFile(String mappingFileEntry);
-
- /**
- *
- * @param wsdlFileEntry The wsdl-file entry
- */
- public void setWsdlFile(String wsdlFileEntry);
-
- /**
- *
- * @param append add ws descriptions to existing webservices.xml file, if any
- */
- public void setAppend(boolean append);
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.interfaces;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.xerces.xs.XSModel;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-
-/**
- * Defines the contract for all Schema Types to Java Types converters
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jul 20, 2005
- */
-
-public interface XSDToJavaIntf
-{
- /**
- * Generate the Java Types given the XSD Schema file
- * @param schemaFile String representing FQN of a schema file
- * @param dirloc location to place the generated java source files
- * @param packageName package name for the types
- * @param createPackageDir Should the package structure be created
- * @throws IOException
- */
- public void generateJavaSource(
- String schemaFile,
- File dirloc,
- String packageName,
- boolean createPackageDir) throws IOException;
-
- /**
- * Generate the Java Types given the XSD Schema object graph
- * @param xsmodel xml schema object graph based on Xerces Schema API
- * @param dirloc location to place the generated java source files
- * @param packageName package name for the types
- * @param createPackageDir Should the package structure be created
- * @throws IOException
- */
- public void generateJavaSource(
- XSModel xsmodel,
- File dirloc,
- String packageName,
- boolean createPackageDir) throws IOException;
-
- /**
- * Generate the Java Types given the XSD Schema object graph
- * @param xsmodel xml schema object graph based on Xerces Schema API
- * @param dirloc location to place the generated java source files
- * @param packageName package name for the types
- * @throws IOException
- */
- public void generateJavaSource(XSModel xsmodel, File dirloc, String packageName)
- throws IOException;
-
- /**
- * Set the type mapping to be used in the generation
- *
- * @param tm
- */
- public void setTypeMapping(LiteralTypeMapping tm);
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,152 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.wsdl;
-
-import java.io.IOException;
-import java.util.ResourceBundle;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.dom.DOMResult;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.metadata.wsdl.DOMTypes;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-
-/**
- * JAXBWSDLGenerator provides a JAXB based WSDLGenerator.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- */
-public class JAXBWSDLGenerator extends WSDLGenerator
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(JAXBWSDLGenerator.class);
- private JAXBRIContext ctx;
-
- public JAXBWSDLGenerator(JAXBRIContext ctx)
- {
- super();
- this.ctx = ctx;
- }
-
- /**
- * Delegate schema generation to JAXB RI
- */
- protected void processTypes()
- {
- // Register namespaces
- for (String ns : ctx.getKnownNamespaceURIs())
- if (ns.length() > 0)
- wsdl.registerNamespaceURI(ns, null);
-
- try
- {
- DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- Document doc = builder.newDocument();
- DOMTypes types = new DOMTypes(doc);
- final Element element = types.getElement();
- final Element throwAway = doc.createElement("throw-away");
-
- ctx.generateSchema(new SchemaOutputResolver() {
- @Override
- public Result createOutput(String namespace, String file) throws IOException
- {
- // JBWS-1295, getKnownNamespaceURIs is not accurate
- if (namespace != null && namespace.length() > 0 && wsdl.getPrefix(namespace) == null)
- wsdl.registerNamespaceURI(namespace, null);
-
- // JAXB creates an empty namespace due to type references, ignore it
- DOMResult result = null;
- if (namespace == null || namespace.length() == 0)
- {
- result = new DOMResult(throwAway);
- result.setSystemId("remove-me");
- }
- else
- {
- result = new DOMResult(element);
- result.setSystemId("replace-me");
- }
-
- return result;
- }
- });
-
- // Until we stop inlining schema, we will need to filter schemaLocations since JAXB requires them
- removeSchemaLocations(element);
-
- wsdl.setWsdlTypes(types);
- }
- catch (Exception exception)
- {
- throw new WSException(BundleUtils.getMessage(bundle, "COULD_NOT_GENERATE_SCHEMA", exception.getMessage()), exception);
- }
- }
-
- private void removeSchemaLocations(Element element)
- {
- for (Element child = getFirstChildElement(element); child != null; child = getNextSiblingElement(child))
- {
- if ("import".equals(child.getLocalName()) && Constants.NS_SCHEMA_XSD.equals(child.getNamespaceURI())
- && "replace-me".equals(child.getAttribute("schemaLocation")))
- {
- child.removeAttribute("schemaLocation");
- }
- else if ("import".equals(child.getLocalName()) && Constants.NS_SCHEMA_XSD.equals(child.getNamespaceURI())
- && "remove-me".equals(child.getAttribute("schemaLocation")))
- {
- element.removeChild(child);
- }
- else
- {
- removeSchemaLocations(child);
- }
- }
- }
-
- public static Element getFirstChildElement(Node node)
- {
- Node child = node.getFirstChild();
- while (child != null && child.getNodeType() != Node.ELEMENT_NODE)
- child = child.getNextSibling();
-
- return (Element)child;
- }
-
- public static Element getNextSiblingElement(Element element)
- {
- Node sibling = element.getNextSibling();
- while (sibling != null && sibling.getNodeType() != Node.ELEMENT_NODE)
- sibling = sibling.getNextSibling();
-
- return (Element)sibling;
- }
-
-}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.wsdl;
-
-import java.net.URL;
-import java.util.ResourceBundle;
-import org.jboss.ws.api.util.BundleUtils;
-
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.wsdl.extensions.ExtensionRegistry;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.xml.sax.EntityResolver;
-
-/**
- * A factory that creates a WSDL-1.1 <code>Definition</code> from an URL.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class WSDL11DefinitionFactory
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDL11DefinitionFactory.class);
- // provide logging
- private static Logger log = Logger.getLogger(WSDL11DefinitionFactory.class);
-
- // This feature is set by default in wsdl4j, it means the object structore contains the imported arguments
- public static final String FEATURE_IMPORT_DOCUMENTS = "javax.wsdl.importDocuments";
- // Set this feature for additional debugging output
- public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
-
- // The WSDLReader that is used by this factory
- private WSDLReader wsdlReader;
-
- // Hide constructor
- private WSDL11DefinitionFactory() throws WSDLException
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- wsdlReader = wsdlFactory.newWSDLReader();
- // Allow unknown extensions (jaxws/jaxb binding elements)
- wsdlReader.setExtensionRegistry(new ExtensionRegistry());
- wsdlReader.setFeature(WSDL11DefinitionFactory.FEATURE_VERBOSE, false);
- }
-
- /** Create a new instance of a wsdl factory */
- public static WSDL11DefinitionFactory newInstance() throws WSDLException
- {
- return new WSDL11DefinitionFactory();
- }
-
- /** Set a feature on the underlying reader */
- public void setFeature(String name, boolean value) throws IllegalArgumentException
- {
- wsdlReader.setFeature(name, value);
- }
-
- /**
- * Read the wsdl document from the given URL
- */
- public Definition parse(URL wsdlLocation) throws WSDLException
- {
- if (wsdlLocation == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "URL_CANNOT_BE_NULL"));
-
- log.trace("parse: " + wsdlLocation.toExternalForm());
-
- EntityResolver entityResolver = new JBossWSEntityResolver();
-
- // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
- // [TODO] show the usecase that needs this
- // ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
- Definition wsdlDefinition = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver, wsdlLocation));
-
- return wsdlDefinition;
- }
-}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -33,7 +33,6 @@
import javax.xml.namespace.QName;
import org.jboss.ws.WSException;
-import org.jboss.ws.api.addressing.AddressingConstants;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMUtils;
@@ -347,7 +346,6 @@
protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
{
String prefix = wsdl.getPrefix(intf.getName().getNamespaceURI());
- String wsamPrefix = wsdl.getPrefix(AddressingConstants.Metadata.NS);
WSDLInterfaceOperation[] operations = intf.getSortedOperations();
for (int i = 0; i < operations.length; i++)
@@ -374,10 +372,6 @@
{
buffer.append("<input message='" + msgEl + "'>").append("</input>");
}
- else
- {
- buffer.append("<input message='" + msgEl + "' " + wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + inputAction + "'/>");
- }
if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
{
@@ -386,10 +380,6 @@
{
buffer.append("<output message='" + msgEl + "Response'>").append("</output>");
}
- else
- {
- buffer.append("<output message='" + msgEl + "Response' " + wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + outputAction + "'/>");
- }
}
//Append the Faults
@@ -402,12 +392,6 @@
buffer.append("<fault message='" + prefix + ":" + element.getLocalPart());
buffer.append("' name='" + element.getLocalPart() + "'/>");
}
- else
- {
- buffer.append("<fault message='" + prefix + ":" + element.getLocalPart());
- buffer.append("' name='" + element.getLocalPart() + "' ");
- buffer.append(wsamPrefix + ":" + AddressingConstants.Metadata.Attributes.ACTION + "='" + faultAction + "'/>");
- }
}
buffer.append("</operation>");
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,454 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.wsdl;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.ws.soap.SOAPBinding;
-
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.soap.Style;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FaultMetaData;
-import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.metadata.wsdl.WSDLBindingFault;
-import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLImport;
-import org.jboss.ws.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-import org.jboss.ws.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.metadata.wsdl.WSDLService;
-
-/**
- * Generates a WSDL object model.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- */
-public abstract class WSDLGenerator
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLGenerator.class);
- protected WSDLDefinitions wsdl;
-
- protected boolean extension;
-
- protected abstract void processTypes();
-
- protected Map<String,String> packageNamespaceMap = new HashMap<String,String>();
-
- protected void processEndpoint(WSDLService service, EndpointMetaData endpoint)
- {
- WSDLEndpoint wsdlEndpoint = new WSDLEndpoint(service, endpoint.getPortName());
- String address = endpoint.getEndpointAddress();
- wsdlEndpoint.setAddress(address == null ? "REPLACE_WITH_ACTUAL_URL" : address);
- service.addEndpoint(wsdlEndpoint);
-
- QName interfaceQName = endpoint.getPortTypeName();
- WSDLInterface wsdlInterface = new WSDLInterface(wsdl, interfaceQName);
- wsdl.addInterface(wsdlInterface);
-
- // Add imports
- if (!interfaceQName.getNamespaceURI().equals(endpoint.getServiceMetaData().getServiceName().getNamespaceURI()))
- {
- WSDLImport wsdlImport = new WSDLImport(wsdl);
- wsdlImport.setLocation(interfaceQName.getLocalPart() + "_PortType");
- wsdlImport.setNamespace(interfaceQName.getNamespaceURI());
- wsdl.addImport(wsdlImport);
- wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
- }
-
- QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
- WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
- wsdlBinding.setInterfaceName(interfaceQName);
- if (extension)
- endpoint.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
- wsdlBinding.setType(endpoint.getBindingId());
- wsdl.addBinding(wsdlBinding);
- wsdlEndpoint.setBinding(bindingQName);
-
- for (OperationMetaData operation : endpoint.getOperations())
- {
- processOperation(wsdlInterface, wsdlBinding, operation);
- }
- }
-
- protected void processOperation(WSDLInterface wsdlInterface, WSDLBinding wsdlBinding, OperationMetaData operation)
- {
- WSDLInterfaceOperation interfaceOperation = new WSDLInterfaceOperation(wsdlInterface, operation.getQName());
- WSDLBindingOperation bindingOperation = new WSDLBindingOperation(wsdlBinding);
-
- interfaceOperation.setPattern(operation.isOneWay() ? Constants.WSDL20_PATTERN_IN_ONLY
- : Constants.WSDL20_PATTERN_IN_OUT);
-
- bindingOperation.setRef(operation.getQName());
- bindingOperation.setSOAPAction(operation.getSOAPAction());
-
- if (operation.getStyle() == Style.DOCUMENT)
- processOperationDOC(interfaceOperation, bindingOperation, operation);
- else
- processOperationRPC(interfaceOperation, bindingOperation, operation);
-
- for (FaultMetaData fault : operation.getFaults())
- {
- QName faultName = new QName(operation.getQName().getNamespaceURI(), fault.getXmlName().getLocalPart());
- WSDLInterfaceFault interfaceFault = new WSDLInterfaceFault(wsdlInterface, faultName);
- interfaceFault.setElement(fault.getXmlName());
- wsdlInterface.addFault(interfaceFault);
-
- WSDLInterfaceOperationOutfault outfault = new WSDLInterfaceOperationOutfault(interfaceOperation);
- String ns = getNamespace(fault.getJavaType(), fault.getXmlName().getNamespaceURI());
- QName outFaultName = new QName(ns, fault.getXmlName().getLocalPart());
- outfault.setRef(outFaultName);
- interfaceOperation.addOutfault(outfault);
-
- WSDLBindingFault bindingFault = new WSDLBindingFault(wsdlBinding);
- bindingFault.setRef(faultName);
- wsdlBinding.addFault(bindingFault);
- }
-
- wsdlInterface.addOperation(interfaceOperation);
- wsdlBinding.addOperation(bindingOperation);
- }
-
- protected void addSignatureItem(WSDLInterfaceOperation operation, ParameterMetaData param, boolean isReturn)
- {
- Direction direction;
- if (isReturn)
- {
- direction = Direction.RETURN;
- }
- else if (param.getMode() == ParameterMode.INOUT)
- {
- direction = Direction.INOUT;
- }
- else if (param.getMode() == ParameterMode.OUT)
- {
- direction = Direction.OUT;
- }
- else
- {
- direction = Direction.IN;
- }
-
- operation.addRpcSignatureItem(new WSDLRPCSignatureItem(param.getPartName(), direction));
- }
-
- protected void processOperationDOC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
- {
- interfaceOperation.setStyle(Constants.URI_STYLE_DOCUMENT);
-
- WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
- WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);
-
- WSDLInterfaceOperationOutput output = null;
- WSDLBindingOperationOutput bindingOutput = null;
-
- boolean twoWay = !operation.isOneWay();
- if (twoWay)
- {
- output = new WSDLInterfaceOperationOutput(interfaceOperation);
- bindingOutput = new WSDLBindingOperationOutput(bindingOperation);
-
- ParameterMetaData returnParameter = operation.getReturnParameter();
- if (returnParameter != null)
- {
- QName xmlName = returnParameter.getXmlName();
- String partName = returnParameter.getPartName();
- if (returnParameter.isInHeader())
- {
- WSDLSOAPHeader header = new WSDLSOAPHeader(xmlName, partName);
- header.setIncludeInSignature(true);
- bindingOutput.addSoapHeader(header);
- }
- else
- {
- output.setElement(xmlName);
- output.setPartName(partName);
- }
- addSignatureItem(interfaceOperation, returnParameter, true);
- }
-
- // If there is no return parameter, it will most likely be set later with an INOUT or OUT parameter.
- // Otherwise, a null element means there is a 0 body element part, which is allowed by BP 1.0
- interfaceOperation.addOutput(output);
- bindingOperation.addOutput(bindingOutput);
- }
-
- for (ParameterMetaData param : operation.getParameters())
- {
- if (param.isInHeader())
- {
- WSDLSOAPHeader header = new WSDLSOAPHeader(param.getXmlName(), param.getPartName());
- header.setIncludeInSignature(true);
- if (param.getMode() != ParameterMode.OUT)
- bindingInput.addSoapHeader(header);
- if (twoWay && param.getMode() != ParameterMode.IN)
- bindingOutput.addSoapHeader(header);
- }
- else
- {
- if (param.getMode() != ParameterMode.OUT)
- {
- input.setElement(param.getXmlName());
- input.setPartName(param.getPartName());
- }
- if (twoWay && param.getMode() != ParameterMode.IN)
- {
- output.setElement(param.getXmlName());
- output.setPartName(param.getPartName());
- }
- }
- addSignatureItem(interfaceOperation, param, false);
- }
-
- interfaceOperation.addInput(input);
- bindingOperation.addInput(bindingInput);
- }
-
- protected void processOperationRPC(WSDLInterfaceOperation interfaceOperation, WSDLBindingOperation bindingOperation, OperationMetaData operation)
- {
- interfaceOperation.setStyle(Constants.URI_STYLE_RPC);
-
- WSDLInterfaceOperationInput input = new WSDLInterfaceOperationInput(interfaceOperation);
- WSDLBindingOperationInput bindingInput = new WSDLBindingOperationInput(bindingOperation);
- QName operationName = operation.getQName();
- input.setElement(operationName);
-
- WSDLInterfaceOperationOutput output = null;
- WSDLBindingOperationOutput bindingOutput = null;
-
- boolean twoWay = !operation.isOneWay();
- if (twoWay)
- {
- output = new WSDLInterfaceOperationOutput(interfaceOperation);
- bindingOutput = new WSDLBindingOperationOutput(bindingOperation);
- output.setElement(new QName(operationName.getNamespaceURI(), operationName.getLocalPart() + "Response"));
-
- ParameterMetaData returnParameter = operation.getReturnParameter();
- if (returnParameter != null)
- {
- QName xmlName = returnParameter.getXmlName();
- String partName = returnParameter.getPartName();
- if (returnParameter.isInHeader())
- {
- WSDLSOAPHeader header = new WSDLSOAPHeader(xmlName, partName);
- header.setIncludeInSignature(true);
- bindingOutput.addSoapHeader(header);
- }
- else
- {
- QName xmlType = returnParameter.getXmlType();
- String ns = getNamespace(returnParameter.getJavaType(), xmlType.getNamespaceURI());
- QName newXmlType = new QName(ns, xmlType.getLocalPart());
- WSDLRPCPart part = new WSDLRPCPart(partName, newXmlType);
-
- output.addChildPart(part);
- }
- addSignatureItem(interfaceOperation, returnParameter, true);
- }
-
- interfaceOperation.addOutput(output);
- bindingOperation.addOutput(bindingOutput);
- }
-
- for (ParameterMetaData param : operation.getParameters())
- {
- if (param.isInHeader())
- {
- WSDLSOAPHeader header = new WSDLSOAPHeader(param.getXmlName(), param.getPartName());
- header.setIncludeInSignature(true);
- if (param.getMode() != ParameterMode.OUT)
- bindingInput.addSoapHeader(header);
- if (twoWay && param.getMode() != ParameterMode.IN)
- bindingOutput.addSoapHeader(header);
- }
- else
- {
- QName xmlType = param.getXmlType();
-
- String ns = getNamespace(param.getJavaType(), xmlType.getNamespaceURI());
- QName newXmlType = new QName(ns, xmlType.getLocalPart());
- WSDLRPCPart part = new WSDLRPCPart(param.getPartName(), newXmlType);
- if (param.getMode() != ParameterMode.OUT)
- input.addChildPart(part);
- if (twoWay && param.getMode() != ParameterMode.IN)
- output.addChildPart(part);
- }
- addSignatureItem(interfaceOperation, param, false);
- }
-
- interfaceOperation.addInput(input);
- bindingOperation.addInput(bindingInput);
- }
-
- protected void processService(ServiceMetaData service)
- {
-
- WSDLService wsdlService = new WSDLService(wsdl, service.getServiceName());
- wsdl.addService(wsdlService);
-
- EndpointMetaData endpoint = null;
- for (Iterator<EndpointMetaData> iter = service.getEndpoints().iterator(); iter.hasNext();)
- {
- endpoint = iter.next();
- processEndpoint(wsdlService, endpoint);
- }
-
- if (endpoint == null)
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "A_SERVICE_MUST_HAVE_AN_ENDPOINT"));
-
- wsdlService.setInterfaceName(endpoint.getPortName());
- }
-
- /**
- * Whether to force SOAP 1.2
- *
- * @param extension whether to force SOAP 1.2
- */
- public void setExtension(boolean extension)
- {
- this.extension = extension;
- }
-
- /**
- * Generate a WSDL object model from the passed in ServiceMetaData.
- *
- * @param service the service
- * @return the WSDL object model
- */
- public WSDLDefinitions generate(ServiceMetaData service)
- {
- // For now only WSDL 1.1
- wsdl = new WSDLDefinitions();
- wsdl.setWsdlNamespace(Constants.NS_WSDL11);
-
- // One WSDL per service
- String ns = service.getServiceName().getNamespaceURI();
- wsdl.setTargetNamespace(ns);
- wsdl.registerNamespaceURI(ns, "tns");
- wsdl.registerNamespaceURI(Constants.NS_SCHEMA_XSD, "xsd");
-
- // Register global namespaces
- if (packageNamespaceMap != null)
- {
- Set<String> keys = packageNamespaceMap.keySet();
- Iterator<String> iter = keys.iterator();
- while (iter != null && iter.hasNext())
- {
- String pkg = iter.next();
- wsdl.registerNamespaceURI(packageNamespaceMap.get(pkg), null);
- }
- }
-
- String soapPrefix = extension ? "soap12" : null;
- String soapURI = extension ? Constants.NS_SOAP12 : null;
- if (!extension)
- {
- for (EndpointMetaData ep : service.getEndpoints())
- {
- String bindingId = ep.getBindingId();
- if (bindingId.startsWith(SOAPBinding.SOAP11HTTP_BINDING))
- {
- soapPrefix = "soap";
- soapURI = Constants.NS_SOAP11;
- }
- else if (bindingId.startsWith(SOAPBinding.SOAP12HTTP_BINDING))
- {
- soapPrefix = "soap12";
- soapURI = Constants.NS_SOAP12;
- }
-
- }
- }
-
- if (soapURI != null && soapPrefix != null)
- wsdl.registerNamespaceURI(soapURI, soapPrefix);
-
- processTypes();
- processService(service);
-
- return wsdl;
- }
-
- protected String getNamespace(String packageName, String defaultNS)
- {
- String retNS = defaultNS;
- //Get it from global config if it is overriden
- if (packageNamespaceMap != null)
- {
- String ns = packageNamespaceMap.get(packageName);
- if (ns != null)
- {
- retNS = ns;
- }
- }
- return retNS;
- }
-
- protected String getNamespace(String packageName)
- {
- return getNamespace(packageName, wsdl.getTargetNamespace());
- }
-
- protected String getNamespace(Class type, String defaultNS)
- {
- while (type.isArray())
- {
- type = type.getComponentType();
- }
- Package pkg = type.getPackage();
- String pkgName = null;
- if (pkg != null)
- {
- pkgName = pkg.getName();
- }
- return getNamespace(pkgName, defaultNS);
- }
-
- protected String getJustPackageName(String classname)
- {
- int index = classname.lastIndexOf(".");
- if (index < 0)
- index = classname.length();
- return classname.substring(0,index);
- }
-}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -65,7 +65,6 @@
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
-import org.jboss.ws.core.jaxws.spi.http.AbstractNettyMessage;
import org.jboss.ws.core.server.MimeHeaderSource;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServletHeaderSource;
@@ -268,7 +267,6 @@
// Set servlet specific properties
HttpServletResponse httpResponse = null;
ServletHeaderSource headerSource = null;
- AbstractNettyMessage nettyMessage = this.getNettyHeadersSource(invContext);
if (invContext instanceof ServletRequestContext)
{
ServletRequestContext reqContext = (ServletRequestContext)invContext;
@@ -302,7 +300,7 @@
try
{
msgContext.setEndpointMetaData(sepMetaData);
- MessageAbstraction resMessage = processRequest(endpoint, nettyMessage == null ? headerSource : nettyMessage, invContext, inStream);
+ MessageAbstraction resMessage = processRequest(endpoint, headerSource, invContext, inStream);
CommonMessageContext reqMsgContext = msgContext;
// Replace the message context with the response context
msgContext = MessageContextAssociation.peekMessageContext();
@@ -323,10 +321,6 @@
{
httpResponse.setStatus(code.intValue());
}
- else if (nettyMessage != null)
- {
- nettyMessage.setStatus(code.intValue());
- }
}
boolean isFault = false;
@@ -349,10 +343,6 @@
{
httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
- else if (nettyMessage != null)
- {
- nettyMessage.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
}
}
@@ -377,11 +367,6 @@
}
}
- private AbstractNettyMessage getNettyHeadersSource(final InvocationContext invContext)
- {
- return (AbstractNettyMessage)invContext.getProperty(Constants.NETTY_MESSAGE);
- }
-
private void sendResponse(Endpoint endpoint, OutputStream output, boolean isFault) throws SOAPException, IOException
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-04-10 09:07:27 UTC (rev 16135)
@@ -43,24 +43,6 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>wstools</id>
- <phase>test-compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="maven.test.classpath" refid="maven.test.classpath" />
- <property name="tests.resources.dir" value="${test.resources.directory}" />
- <property name="tests.output.dir" value="${project.build.directory}" />
- <property name="jboss.bind.address" value="${jboss.bind.address}" />
- <property name="log4j.output.dir" value="${log4j.output.dir}"/>
- <property name="jboss.home" value="${jboss.home}"/>
- <ant antfile="scripts/antrun-wstools.xml" target="wstools" />
- </tasks>
- </configuration>
- </execution>
- <execution>
<id>build-jars</id>
<phase>test-compile</phase>
<goals>
@@ -73,8 +55,6 @@
<property name="log4j.output.dir" value="${log4j.output.dir}"/>
<property name="jboss.home" value="${jboss.home}"/>
<ant antfile="scripts/build-jars-jaxrpc.xml" target="build-jars-jaxrpc" />
- <ant antfile="scripts/build-samples-jaxrpc.xml" target="build-samples-jaxrpc" />
- <ant antfile="scripts/build-jars-jaxws.xml" target="build-jars-jaxws" />
</tasks>
</configuration>
</execution>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wstools.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wstools.xml 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wstools.xml 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project>
-
- <!-- ================================================================== -->
- <!-- Generating sources -->
- <!-- ================================================================== -->
-
- <target name="wstools" description="Generate the JAX-RPC artifacts.">
- <antcall target="generate-sources"/>
- <antcall target="compile-sources"/>
- <antcall target="copy-resources"/>
- </target>
-
- <!-- Generate JAX-RPC artifacts -->
- <target name="generate-sources">
-
- <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
- <classpath>
- <pathelement path="${maven.test.classpath}"/>
- </classpath>
- </taskdef>
-
- <macro-wstools dest="jaxrpc/samples/docstyle/wrapped/WEB-INF" config="jaxrpc/samples/docstyle/wrapped/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/docstyle/bare/WEB-INF" config="jaxrpc/samples/docstyle/bare/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/dynamichandler/WEB-INF" config="jaxrpc/samples/dynamichandler/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/exception/WEB-INF" config="jaxrpc/samples/exception/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/handler/WEB-INF" config="jaxrpc/samples/handler/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/holder/WEB-INF" config="jaxrpc/samples/holder/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/jsr109ejb/doclit/META-INF" config="jaxrpc/samples/jsr109ejb/doclit/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/jsr109ejb/rpclit/META-INF" config="jaxrpc/samples/jsr109ejb/rpclit/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/jsr109pojo/doclit/WEB-INF" config="jaxrpc/samples/jsr109pojo/doclit/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/jsr109pojo/rpclit/WEB-INF" config="jaxrpc/samples/jsr109pojo/rpclit/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/message/WEB-INF" config="jaxrpc/samples/message/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/oneway/WEB-INF" config="jaxrpc/samples/oneway/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/rpcstyle/WEB-INF" config="jaxrpc/samples/rpcstyle/wstools-config.xml"/>
- <macro-wstools dest="jaxrpc/samples/secureejb/META-INF" config="jaxrpc/samples/secureejb/wstools-config.xml"/>
-
- </target>
-
- <target name="compile-sources">
-
- <mkdir dir="${tests.output.dir}/wstools/java"/>
- <move todir="${tests.output.dir}/wstools/java">
- <fileset dir="${tests.output.dir}/wstools/resources/jaxrpc/samples/docstyle/wrapped/WEB-INF" includes="org/**"/>
- </move>
-
- <!--
- Cannot run javac from tasks
- http://jira.codehaus.org/browse/MANTRUN-91
- -->
- <javac destdir="${tests.output.dir}/test-classes" debug="true" encoding="utf-8" deprecation="true" fork="true"
- source="1.5" target="1.5">
- <src path="${tests.output.dir}/wstools/java"/>
- <classpath>
- <pathelement path="${maven.test.classpath}"/>
- </classpath>
- </javac>
- </target>
-
- <target name="copy-resources">
-
- <copy todir="${tests.output.dir}/test-resources">
- <fileset dir="${tests.output.dir}/wstools/resources">
- <include name="**/*.wsdl"/>
- <include name="**/*.xml"/>
- </fileset>
- </copy>
-
- <copy todir="${tests.output.dir}/test-resources/jaxrpc/samples" overwrite="true">
- <fileset dir="${tests.resources.dir}/jaxrpc/samples-override"/>
- <filterset>
- <filter token="jboss.bind.address" value="${jboss.bind.address}"/>
- </filterset>
- </copy>
- </target>
-
- <macrodef name="macro-wstools">
- <attribute name="dest"/>
- <attribute name="config"/>
- <sequential>
- <wstools dest="${tests.output.dir}/wstools/resources/@{dest}" config="${tests.resources.dir}/@{config}">
- <sysproperty key="log4j.output.dir" value="${tests.output.dir}"/>
- </wstools>
- </sequential>
- </macrodef>
-
-</project>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,337 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project>
-
- <description>JBossWS test archive builder</description>
-
- <target name="build-jars-jaxws" description="Build the deployments.">
-
- <mkdir dir="${tests.output.dir}/test-libs" />
-
- <!-- jaxws-jbws1909 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1909.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws1909/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws1909/*TestCase.class" />
- </fileset>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.logging,org.jboss.ws.common"/>
- </manifest>
- </jar>
-
- <!-- jaxws-jbws2221 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2221.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2221/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2221/*TestCase.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2221/META-INF">
- <include name="wsdl/**" />
- </metainf>
- </jar>
-
- <!-- jaxws-jbws2234 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2234.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2234/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2234/*.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2234/JBWS2234TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2234/WEB-INF">
- <include name="jboss-web.xml" />
- <include name="wsdl/*" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws2248 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2248.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2248/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2248/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2248/JBWS2248TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2248/WEB-INF">
- <include name="wsdl/*" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws2437 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2437.jar" manifest="${tests.output.dir}/test-resources/jaxws/jbws2437/META-INF/MANIFEST.MF">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2437/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2437/*TestCase.class" />
- </fileset>
- </jar>
-
- <!-- jaxws-jbws2565 -->
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBean.class" />
- </fileset>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-jbws2565.jar" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2565/correct/META-INF">
- <include name="application.xml" />
- <include name="jboss-app.xml" />
- </metainf>
- </jar>
-
- <!-- jaxws-jbws2637-->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2637.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2637/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2637/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2637/*TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2637/WEB-INF">
- <include name="*" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws2682 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2682.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2682/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2682/Endpoint.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2682/EndpointImpl.class" />
- </classes>
- </war>
-
- <!-- jaxws-jbws2698 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2698.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2698/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2698/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2698/JBWS2698TestCase.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2698/server-handlers.xml" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2698/WEB-INF">
- <include name="jboss-web.xml" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws2706 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2706.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2706/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2706/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2698/JBWS2706TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2706/WEB-INF">
- <include name="wsdl/SwaTestService.wsdl" />
- <include name="jboss-web.xml" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws2784 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2784.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2784/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2784/*TestCase.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2784/META-INF">
- <include name="wsdl/**" />
- </metainf>
- </jar>
-
- <!-- jaxws-jbws2845 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2845.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2845/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2845/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2845/JBWS2845TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2845/WEB-INF">
- <include name="jboss-web.xml" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws2969 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2969.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2969/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2969/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2969/JBWS2969TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2969/WEB-INF">
- <include name="jboss-web.xml" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws2982 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2982.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2982/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2982/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2982/*TestCase*.class" />
- </classes>
- </war>
-
- <!-- jaxws-jbws3070 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3070.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws3070/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws3070/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws3070/*TestCase*.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3070/WEB-INF">
- <include name="**/*.wsdl" />
- <include name="**/*.xsd" />
- </webinf>
- </war>
-
- <!-- jaxws-jbws3071 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3071.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws3071/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws3071/TestEndpointImpl.class" />
- <include name="org/jboss/test/ws/jaxws/jbws3071/TestException.class" />
- </classes>
- </war>
-
- <!-- jaxws-webserviceref -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.class" />
- </classes>
- </war>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/META-INF">
- <include name="application-client.xml" />
- <include name="jboss-client.xml" />
- <include name="wsdl/**" />
- </metainf>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.samples.webserviceref.TestEndpointClientOne" />
- </manifest>
- </jar>
- <war destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-servlet-client.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF-client/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/ServletClient.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/EchoResponse.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/Echo.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/META-INF">
- <include name="wsdl/**" />
- </webinf>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF-client">
- <include name="jboss-web.xml" />
- </webinf>
- </war>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-ejb3-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/EJB3Client.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/EJB3Remote.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/EchoResponse.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/Echo.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/META-INF">
- <include name="jboss.xml" />
- <include name="wsdl/**" />
- </metainf>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.class" />
- </fileset>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/META-INF-secure">
- <include name="application-client.xml" />
- <include name="jboss-client.xml" />
- </metainf>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient" />
- </manifest>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-webserviceref-secure-appclient.jar"/>
- </fileset>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-override-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientTwo.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointService.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/META-INF-override">
- <include name="jbossws-client-config.xml" />
- <include name="application-client.xml" />
- <include name="jboss-client.xml" />
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/META-INF">
- <include name="wsdl/**" />
- </metainf>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo" />
- </manifest>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-override-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-webserviceref-override-appclient.jar"/>
- </fileset>
- </jar>
-
- <!-- jaxws-webserviceref-secure -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-secure.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointImpl.class" />
- </fileset>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-secure-webserviceref-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointClient.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpointService.class" />
- <include name="org/jboss/test/ws/jaxws/webserviceref/SecureEndpoint.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/webserviceref/META-INF-secure">
- <include name="application-client.xml" />
- <include name="jboss-client.xml" />
- </metainf>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.jaxws.webserviceref.SecureEndpointClient" />
- </manifest>
- </jar>
-
- <!-- jaxws-wsdd -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-wsdd.war" webxml="${tests.output.dir}/test-resources/jaxws/wsdd/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/wsdd/*.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/wsdd/WEB-INF">
- <include name="webservices.xml" />
- </webinf>
- </war>
-
- </target>
-
-</project>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxrpc.xml 2012-04-10 09:07:27 UTC (rev 16135)
@@ -1,552 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project>
-
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
-
- <target name="build-samples-jaxrpc" description="Build the jaxrpc samples deployments">
-
- <mkdir dir="${tests.output.dir}/test-libs"/>
-
- <!-- jaxrpc-samples-docstyle-bare -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-docstyle-bare.war"
- webxml="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/bare/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialEndpointJSE.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialOrder.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialOrderResponse.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/bare/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-docstyle-bare-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialOrder.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/bare/TrivialOrderResponse.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/bare/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/bare/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-docstyle-wrapped -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-docstyle-wrapped.war"
- webxml="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/wrapped/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialEndpointJSE.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialService*RequestStruct.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialService*ResponseStruct.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/wrapped/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-docstyle-wrapped-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialService*RequestStruct.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/docstyle/wrapped/TrivialService*ResponseStruct.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/wrapped/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/docstyle/wrapped/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-dynamichandler -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-dynamichandler.war"
- webxml="${tests.output.dir}/test-resources/jaxrpc/samples/dynamichandler/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/dynamichandler/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/dynamichandler/*ServiceBean.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/dynamichandler/*Handler.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/dynamichandler/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-dynamichandler-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/dynamichandler/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/dynamichandler/*Handler.class"/>
- <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
- </manifest>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/dynamichandler/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/dynamichandler/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-dynamichandler-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-samples-dynamichandler-appclient.jar"/>
- </fileset>
- </jar>
-
- <!-- jaxrpc-samples-exception -->
- <war destfile="${tests.output.dir}/test-libs/jaxrpc-samples-exception.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/exception/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/exception/*Exception.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/exception/ServerHandler.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/exception/ExceptionServiceInterface.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/exception/ExceptionBeanImpl.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/exception/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-exception-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/exception/*Exception.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/exception/ExceptionServiceInterface.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/exception/ExceptionService.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/exception/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/exception/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-handler -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-handler.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/handler/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/handler/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/handler/*ServiceBean.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/handler/ServerSideHandler.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/handler/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-handler-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/handler/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/handler/ClientSideHandler.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/handler/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/handler/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-holder -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-holder.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/holder/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/holder/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/holder/*ServiceBean.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/holder/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-holder-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/holder/*Service.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/holder/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/holder/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-jsr109ejb-rpc -->
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109ejb-rpc.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*EJBEndpoint.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF">
- <include name="ejb-jar.xml"/>
- <include name="jboss-webservices.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109ejb-rpc-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Service.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109ejb/rpclit/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-jsr109ejb-doc -->
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109ejb-doc.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Struct.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*EJBEndpoint.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109ejb/doclit/META-INF">
- <include name="ejb-jar.xml"/>
- <include name="jboss-webservices.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109ejb-doc-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Struct.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109ejb/*Service.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109ejb/doclit/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-jsr109pojo-rpc -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109pojo-rpc.war"
- webxml="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/rpclit/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*JSEEndpoint.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/rpclit/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="jboss-webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109pojo-rpc-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Service.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/rpclit/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/rpclit/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-jsr109pojo-doc -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109pojo-doc.war"
- webxml="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/doclit/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Struct.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*JSEEndpoint.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/doclit/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-jsr109pojo-doc-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Type.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Struct.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/jsr109pojo/*Service.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/doclit/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/jsr109pojo/doclit/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-message -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-message.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/message/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/message/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/message/*ServiceBean.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/message/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.common"/>
- </manifest>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-message-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/message/*Service.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/message/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/message/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-oneway -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-oneway.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/oneway/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/oneway/*Service.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/oneway/*ServiceBean.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/oneway/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-oneway-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/oneway/*Service.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/oneway/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/oneway/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-rpcstyle -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-rpcstyle.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/rpcstyle/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialEndpointJSE.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialService.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/rpcstyle/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-rpcstyle-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/rpcstyle/TrivialService.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/rpcstyle/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/rpcstyle/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-secureejb -->
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationHome.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationRemote.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationImpl.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/secureejb/META-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="ejb-jar.xml"/>
- <include name="jboss.xml"/>
- <include name="jboss-ejb3.xml"/>
- <include name="jboss-webservices.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationHome.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/secureejb/OrganizationRemote.class"/>
- <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
- </manifest>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/secureejb/META-INF">
- <include name="application-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-secureejb-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-samples-secureejb-appclient.jar"/>
- </fileset>
- </jar>
-
- <!-- jaxrpc-samples-serviceref -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpointImpl.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpoint.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/META-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/WEB-INF">
- <include name="webservices.xml"/>
- </webinf>
- </war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/ApplicationClient.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpoint.class"/>
- <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
- </manifest>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/META-INF">
- <include name="application-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-samples-serviceref-appclient.jar"/>
- </fileset>
- </jar>
- <war destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-servlet-client.war"
- webxml="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/servlet-client/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/ServletClient.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpoint.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/ExampleHandler.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/META-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-serviceref-ejbclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/EJBClient.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/EJBRemote.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/EJBRemoteHome.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpointService.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/serviceref/TestEndpoint.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/serviceref/META-INF">
- <include name="ejb-jar.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- jaxrpc-samples-swa -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-samples-swa.war" webxml="${tests.output.dir}/test-resources/jaxrpc/samples/swa/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/swa/AttachmentImpl.class"/>
- <include name="org/jboss/test/ws/jaxrpc/samples/swa/Attachment.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxrpc/samples/swa/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-samples-swa-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxrpc/samples/swa/Attachment.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/swa/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- </metainf>
- <metainf dir="${tests.output.dir}/test-resources/jaxrpc/samples/swa/WEB-INF">
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
-
- <!-- Please add alphabetically -->
-
- </target>
-
-</project>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.common.utils;
-import org.jboss.test.ws.tools.jbws_161.custom.HelloObj;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.ws.common.JavaUtils;
@@ -33,14 +32,6 @@
*/
public class JavaUtilsTestCase extends JBossWSTest
{
- public void testLoadArrayType() throws Exception
- {
- String javaTypeName = HelloObj.class.getName();
- Class javaType = JavaUtils.loadJavaType(javaTypeName + "[]");
- assertNotNull("Unexpected null type", javaType);
- assertEquals("[L" + javaTypeName + ";", javaType.getName());
- }
-
public void testGetMultipleArrayWrapperValue() throws Exception
{
int[][] primParams = new int[][] { { 0, 1, 2 }, { 1, 2, 3 }, { 2, 3, 4 } };
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2012-04-10 08:57:22 UTC (rev 16134)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/jbws1384/JBWS1384TestCase.java 2012-04-10 09:07:27 UTC (rev 16135)
@@ -31,7 +31,6 @@
import junit.framework.Test;
import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
-import org.jboss.ws.tools.WSTools;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -50,14 +49,6 @@
return new JBossWSTestSetup(JBWS1384TestCase.class, "jaxrpc-jbws1384.war");
}
- public void testWsdlToJava() throws Exception
- {
- WSTools wstools = new WSTools();
- String configPath = getResourceFile("jaxrpc/jbws1384/wstools-config.xml").getPath();
- boolean ret = wstools.generate(configPath, "./wstools/jbws1384");
- assertTrue("wstools success", ret);
- }
-
public void testEndpoint() throws Exception
{
ServiceFactoryImpl factory = (ServiceFactoryImpl)ServiceFactory.newInstance();
12 years, 1 month
JBossWS SVN: r16134 - in stack/native/branches/jbossws-native-4.0.x: modules/testsuite/native-tests/scripts and 5 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 04:57:22 -0400 (Tue, 10 Apr 2012)
New Revision: 16134
Removed:
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1857/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2187/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2285/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2319/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2526/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2651/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2949/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2964/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2975/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws771/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws871/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1857/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1909/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2187/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2285/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2319/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2526/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2949/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws871/
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2698/SOAPHandler.java
Log:
[JBPAPP-8668] Merged revisions 16065 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16065 | ropalka | 2012-03-29 11:49:45 +0200 (Thu, 29 Mar 2012) | 1 line
[JBWS-3474] removing JAX-WS tests relying on Native impl. classes
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16064
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16065
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:53:26 UTC (rev 16133)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:57:22 UTC (rev 16134)
@@ -30,60 +30,17 @@
<mkdir dir="${tests.output.dir}/test-libs" />
- <!-- jaxws-jbws771 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws771.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws771/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws771/*TestCase.class" />
- </fileset>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </jar>
-
- <!-- jaxws-jbws871 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws871-rpc.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws871/WEB-INF-rpc/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpoint.class" />
- <include name="org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointImpl.class" />
- </classes>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </war>
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws871-rpc-client.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws871/IntegerArray.class" />
- <include name="org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpoint.class" />
- <include name="org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointService.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws871/META-INF">
- <include name="application-client.xml" />
- <include name="jboss-client.xml" />
- <include name="jaxrpc-mapping.xml" />
- <include name="wsdl/**" />
- </metainf>
- </jar>
-
<!-- jaxws-jbws1909 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1909.jar" manifest="${tests.output.dir}/test-resources/jaxws/jbws1909/META-INF/MANIFEST.MF">
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1909.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/jbws1909/*.class" />
<exclude name="org/jboss/test/ws/jaxws/jbws1909/*TestCase.class" />
</fileset>
+ <manifest>
+ <attribute name="Dependencies" value="org.jboss.logging,org.jboss.ws.common"/>
+ </manifest>
</jar>
- <!-- jaxws-jbws2187 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2187.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2187/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2187/TestEndpoint.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2187/TestEndpointImpl.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2187/WEB-INF">
- <include name="jboss-web.xml" />
- </webinf>
- </war>
-
<!-- jaxws-jbws2221 -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2221.jar">
<fileset dir="${tests.output.dir}/test-classes">
@@ -118,38 +75,6 @@
</webinf>
</war>
- <!-- jaxws-jbws2285 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2285.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2285/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2285/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2285/JBWS2285TestCase.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2285/server-handlers.xml" />
- <include name="org/jboss/test/helper/DOMWriter.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2285/WEB-INF">
- <include name="jboss-web.xml" />
- </webinf>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </war>
-
- <!-- jaxws-jbws2319 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2319.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2319/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2319/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2319/JBWS2285TestCase.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2319/server-handlers.xml" />
- <include name="org/jboss/test/helper/DOMWriter.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2319/WEB-INF">
- <include name="jboss-web.xml" />
- </webinf>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </war>
-
<!-- jaxws-jbws2437 -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2437.jar" manifest="${tests.output.dir}/test-resources/jaxws/jbws2437/META-INF/MANIFEST.MF">
<fileset dir="${tests.output.dir}/test-classes">
@@ -158,21 +83,6 @@
</fileset>
</jar>
- <!-- jaxws-jbws2526 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2526.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2526/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2526/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2526/JBWS2526TestCase.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2526/server-handlers.xml" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2526/WEB-INF">
- <include name="wsdl/**" />
- </webinf>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </war>
-
<!-- jaxws-jbws2565 -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565.jar">
<fileset dir="${tests.output.dir}/test-classes">
@@ -218,9 +128,6 @@
<webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2698/WEB-INF">
<include name="jboss-web.xml" />
</webinf>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
</war>
<!-- jaxws-jbws2706 -->
@@ -257,21 +164,6 @@
</webinf>
</war>
- <!-- jaxws-jbws2949 -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2949.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2949/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2949/*.class" />
- <include name="org/jboss/test/ws/jaxws/jbws2949/server-handlers.xml" />
- <exclude name="org/jboss/test/ws/jaxws/jbws2949/JBWS2949TestCase.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2949/WEB-INF">
- <include name="jboss-web.xml" />
- </webinf>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </war>
-
<!-- jaxws-jbws2969 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2969.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2969/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java 2012-04-10 08:53:26 UTC (rev 16133)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java 2012-04-10 08:57:22 UTC (rev 16134)
@@ -24,7 +24,6 @@
import java.io.ByteArrayInputStream;
import java.net.URL;
-import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -47,9 +46,9 @@
import junit.framework.Test;
+import org.jboss.ws.common.DOMUtils;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
-import org.jboss.ws.api.util.DOMUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java 2012-04-10 08:53:26 UTC (rev 16133)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1909/TestEndpointImpl.java 2012-04-10 08:57:22 UTC (rev 16134)
@@ -34,6 +34,7 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
+import org.jboss.ws.common.DOMUtils;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
@@ -41,7 +42,6 @@
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.ws.api.util.DOMUtils;
import org.w3c.dom.Element;
@WebService(serviceName = "TestEndpointService", name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1909")
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2698/SOAPHandler.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2698/SOAPHandler.java 2012-04-10 08:53:26 UTC (rev 16133)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2698/SOAPHandler.java 2012-04-10 08:57:22 UTC (rev 16134)
@@ -28,10 +28,10 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.ws.WSException;
import org.jboss.ws.api.handler.GenericSOAPHandler;
/**
@@ -65,7 +65,7 @@
}
catch (SOAPException se)
{
- throw new WSException(se);
+ throw new WebServiceException(se);
}
return true;
}
@@ -85,7 +85,7 @@
}
catch (SOAPException se)
{
- throw new WSException(se);
+ throw new WebServiceException(se);
}
return true;
@@ -96,7 +96,7 @@
String prefix = element.getPrefix();
if (PREFIX.equals(prefix) == false)
{
- throw new WSException("Expected prefix '" + PREFIX + "' found prefix '" + prefix + "' for element '" + element.getElementName());
+ throw new WebServiceException("Expected prefix '" + PREFIX + "' found prefix '" + prefix + "' for element '" + element.getElementName());
}
}
12 years, 1 month
JBossWS SVN: r16133 - in stack/native/branches/jbossws-native-4.0.x: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 04:53:26 -0400 (Tue, 10 Apr 2012)
New Revision: 16133
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
Log:
[JBPAPP-8667] Merged revisions 16064 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16064 | ropalka | 2012-03-29 08:03:47 +0200 (Thu, 29 Mar 2012) | 1 line
[JBWS-3474] fixing native test suite
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063-16064
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 08:50:22 UTC (rev 16132)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 08:53:26 UTC (rev 16133)
@@ -42,6 +42,11 @@
<artifactId>xercesImpl</artifactId>
</dependency>
<dependency>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-common-tools</artifactId>
</dependency>
12 years, 1 month
JBossWS SVN: r16132 - in stack/native/branches/jbossws-native-4.0.x: modules/dist and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 04:50:22 -0400 (Tue, 10 Apr 2012)
New Revision: 16132
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
Log:
[JBPAPP-8667] Merged revisions 16063 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16063 | ropalka | 2012-03-29 07:40:26 +0200 (Thu, 29 Mar 2012) | 1 line
[JBWS-3474] removing native-client dependency
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052,16063
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml 2012-04-10 08:46:22 UTC (rev 16131)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/pom.xml 2012-04-10 08:50:22 UTC (rev 16132)
@@ -19,12 +19,6 @@
<dependencies>
<dependency>
<groupId>org.jboss.ws.native</groupId>
- <artifactId>jbossws-native-client</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-factories</artifactId>
<version>${project.version}</version>
</dependency>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:46:22 UTC (rev 16131)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:50:22 UTC (rev 16132)
@@ -31,7 +31,6 @@
<outputDirectory>deploy-artifacts/lib</outputDirectory>
<unpack>false</unpack>
<includes>
- <include>org.jboss.ws.native:jbossws-native-client</include>
<include>org.jboss.ws.native:jbossws-native-factories:jar</include>
<include>org.jboss.ws.native:jbossws-native-services:jar</include>
<include>org.jboss.ws.native:jbossws-native-core</include>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 08:46:22 UTC (rev 16131)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 08:50:22 UTC (rev 16132)
@@ -42,11 +42,6 @@
<artifactId>xercesImpl</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.ws.native</groupId>
- <artifactId>jbossws-native-client</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-common-tools</artifactId>
</dependency>
12 years, 1 month
JBossWS SVN: r16131 - in stack/native/branches/jbossws-native-4.0.x: modules/core/src/main/resources and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 04:46:22 -0400 (Tue, 10 Apr 2012)
New Revision: 16131
Removed:
stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/modules/jboss710/org/jboss/jaxbintros/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jaxbintros/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1809/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jaxbintros/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/jaxws/jbws1809/
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/jbossws-native-config-as7.xml
stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/common/main/module.xml
stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
stack/native/branches/jbossws-native-4.0.x/pom.xml
Log:
[JBPAPP-8667] Merged revisions 16052 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16052 | ropalka | 2012-03-27 14:59:28 +0200 (Tue, 27 Mar 2012) | 1 line
[JBWS-3474] removing jaxb intros & jaxr
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16051
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16052
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/jbossws-native-config-as7.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/jbossws-native-config-as7.xml 2012-04-10 08:39:42 UTC (rev 16130)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/resources/jbossws-native-config-as7.xml 2012-04-10 08:46:22 UTC (rev 16131)
@@ -52,7 +52,7 @@
</deploymentAspect>
<deploymentAspect class="org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect">
- <property name="requires" class="java.lang.String">UnifiedMetaDataModel, JAXBIntros</property>
+ <property name="requires" class="java.lang.String">UnifiedMetaDataModel</property>
<property name="provides" class="java.lang.String">PublishedContract</property>
</deploymentAspect>
@@ -61,12 +61,8 @@
</deploymentAspect>
<deploymentAspect class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
- <property name="requires" class="java.lang.String">ContainerMetaData, URLPattern, EndpointAddress, VFSRoot, JAXBIntros</property>
+ <property name="requires" class="java.lang.String">ContainerMetaData, URLPattern, EndpointAddress, VFSRoot</property>
<property name="provides" class="java.lang.String">UnifiedMetaDataModel</property>
</deploymentAspect>
- <deploymentAspect class="org.jboss.ws.common.deployment.JAXBIntroDeploymentAspect">
- <property name="provides" class="java.lang.String">JAXBIntros</property>
- </deploymentAspect>
-
</deploymentAspects>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:39:42 UTC (rev 16130)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:46:22 UTC (rev 16131)
@@ -40,7 +40,6 @@
<include>com.sun.xml.bind:jaxb-xjc:jar</include>
<include>com.sun.xml.ws:jaxws-tools:jar</include>
<include>com.sun.xml.ws:jaxws-rt:jar</include>
- <include>jboss.jaxbintros:jboss-jaxb-intros:jar</include>
<include>org.jboss.ws:jbossws-api:jar</include>
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/common/main/module.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/common/main/module.xml 2012-04-10 08:39:42 UTC (rev 16130)
+++ stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/modules/jboss710/org/jboss/ws/common/main/module.xml 2012-04-10 08:46:22 UTC (rev 16131)
@@ -37,12 +37,10 @@
<module name="javax.servlet.api"/>
<module name="javax.wsdl4j.api" />
<module name="javax.xml.ws.api"/>
- <module name="org.jboss.jaxbintros"/>
<module name="org.jboss.ws.api"/>
<module name="org.jboss.ws.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.common-core"/>
<module name="org.apache.xerces" services="import"/>
- <module name="org.jboss.jaxbintros"/>
</dependencies>
</module>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-10 08:39:42 UTC (rev 16130)
+++ stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2012-04-10 08:46:22 UTC (rev 16131)
@@ -25,29 +25,6 @@
<project>
<!-- ================================================================== -->
- <!-- Deploy JUDDI Service -->
- <!-- ================================================================== -->
-
- <macrodef name="macro-deploy-juddi-sar">
- <attribute name="thirdpartydir"/>
- <attribute name="targetdir"/>
- <sequential>
- <mkdir dir="@{targetdir}"/>
- <unzip dest="@{targetdir}">
- <fileset dir="@{thirdpartydir}">
- <include name="**/juddi-service.sar"/>
- </fileset>
- </unzip>
- <copy todir="@{targetdir}" flatten="true" overwrite="true">
- <fileset dir="@{thirdpartydir}">
- <include name="**/juddi.jar"/>
- <include name="**/scout.jar"/>
- </fileset>
- </copy>
- </sequential>
- </macrodef>
-
- <!-- ================================================================== -->
<!-- Modules -->
<!-- ================================================================== -->
@@ -58,11 +35,6 @@
<attribute name="modules-jbossid"/>
<sequential>
<!-- libraries -->
- <copy todir="@{targetdir}/org/jboss/ws/jaxws-client/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/jbossws-native-client.jar"/>
- </fileset>
- </copy>
<copy todir="@{targetdir}/org/jboss/ws/native/jbossws-native-core/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-native-core.jar"/>
@@ -113,11 +85,6 @@
<include name="**/stax-ex.jar"/>
</fileset>
</copy>
- <copy todir="@{targetdir}/org/jboss/jaxbintros/main" flatten="false" overwrite="true">
- <fileset dir="@{thirdpartydir}/lib">
- <include name="**/jboss-jaxb-intros.jar"/>
- </fileset>
- </copy>
<copy todir="@{targetdir}/org/apache/commons/beanutils/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/commons-beanutils.jar"/>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:39:42 UTC (rev 16130)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:46:22 UTC (rev 16131)
@@ -30,22 +30,6 @@
<mkdir dir="${tests.output.dir}/test-libs" />
- <!-- jaxws-jaxbintros -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-jaxbintros.war" webxml="${tests.output.dir}/test-resources/jaxws/jaxbintros/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jaxbintros/**/*.class" />
- <include name="org/jboss/test/helper/DOMWriter.class" />
- </classes>
-
- <webinf dir="${tests.output.dir}/test-resources/jaxws/jaxbintros/WEB-INF">
- <include name="*.xml" />
- <include name="**/*.wsdl" />
- </webinf>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </war>
-
<!-- jaxws-jbws771 -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws771.jar">
<fileset dir="${tests.output.dir}/test-classes">
@@ -81,15 +65,6 @@
</metainf>
</jar>
- <!-- jaxws-jbws1809 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1809.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws1809/*.class" />
- <exclude name="org/jboss/test/ws/jaxws/jbws1809/*TestCase.class" />
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws1809/META-INF" />
- </jar>
-
<!-- jaxws-jbws1909 -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1909.jar" manifest="${tests.output.dir}/test-resources/jaxws/jbws1909/META-INF/MANIFEST.MF">
<fileset dir="${tests.output.dir}/test-classes">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 08:39:42 UTC (rev 16130)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/pom.xml 2012-04-10 08:46:22 UTC (rev 16131)
@@ -82,33 +82,7 @@
<version>3.8.1</version>
<scope>test</scope>
</dependency>
- <!-- required for WS-RM client backports server -->
<dependency>
- <groupId>jboss.web</groupId>
- <artifactId>jbossweb</artifactId>
- <version>2.1.1.CR7</version>
- <scope>test</scope>
- </dependency>
- <!-- JAXR samples -->
- <dependency>
- <groupId>apache-scout</groupId>
- <artifactId>scout</artifactId>
- <version>${apache.scout.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>juddi</groupId>
- <artifactId>juddi</artifactId>
- <version>${juddi.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.jaxr</groupId>
- <artifactId>juddi-saaj</artifactId>
- <version>${jboss.jaxr.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-javaee</artifactId>
<version>${jboss.javaee.version}</version>
Modified: stack/native/branches/jbossws-native-4.0.x/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-04-10 08:39:42 UTC (rev 16130)
+++ stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-04-10 08:46:22 UTC (rev 16131)
@@ -75,9 +75,6 @@
<jaxb.impl.version>2.2.4</jaxb.impl.version>
<jboss.common.core.version>2.2.16.GA</jboss.common.core.version>
<jboss.logging.version>3.1.0.GA</jboss.logging.version>
- <jboss.jaxr.version>2.0.3</jboss.jaxr.version>
- <apache.scout.version>1.1.1</apache.scout.version>
- <juddi.version>0.9RC4</juddi.version>
<netty.version>3.2.6.Final</netty.version>
<sun.jaxws.version>2.2</sun.jaxws.version>
<sun.policy.version>2.0-b01</sun.policy.version>
@@ -296,22 +293,6 @@
<version>${jaxb.impl.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.jaxr</groupId>
- <artifactId>juddi-service</artifactId>
- <version>${jboss.jaxr.version}</version>
- <type>sar</type>
- </dependency>
- <dependency>
- <groupId>apache-scout</groupId>
- <artifactId>scout</artifactId>
- <version>${apache.scout.version}</version>
- </dependency>
- <dependency>
- <groupId>juddi</groupId>
- <artifactId>juddi</artifactId>
- <version>${juddi.version}</version>
- </dependency>
- <dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<version>${stax.api.version}</version>
12 years, 1 month
JBossWS SVN: r16130 - in stack/native/branches/jbossws-native-4.0.x: modules/core/src/main/java/org/jboss/ws and 11 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 04:39:42 -0400 (Tue, 10 Apr 2012)
New Revision: 16130
Removed:
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/annotation/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/feature/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1850/
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterface.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/distro/build.xml
stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java
Log:
[JBPAPP-8668] Merged revisions 16051 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16051 | ropalka | 2012-03-27 13:18:25 +0200 (Tue, 27 Mar 2012) | 1 line
[JBWS-3474] removing features and annotations processing
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050-16051
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientFeatureProcessor.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -1,154 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.core.jaxws.client;
-
-import java.util.List;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.RespectBindingFeature;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.core.StubExt;
-import org.jboss.ws.feature.ChunkedEncodingFeature;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureAwareEndpointMetaData;
-import org.jboss.ws.metadata.umdm.FeatureSet;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.wsdl.Extendable;
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
-import org.jboss.ws.metadata.wsdl.WSDLService;
-
-/**
- * Process WebServiceFeature provided on client side
- *
- * @author alessio.soldano(a)jboss.com
- * @since 14-Jan-2009
- *
- */
-public class ClientFeatureProcessor
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(ClientFeatureProcessor.class);
- private static Logger log = Logger.getLogger(ClientFeatureProcessor.class);
-
- private static FeatureSet supportedFeatures = new FeatureSet();
- static
- {
- supportedFeatures.addFeature(new RespectBindingFeature());
- supportedFeatures.addFeature(new ChunkedEncodingFeature());
- }
-
- public static <T> void processFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
- {
- if (!supportedFeatures.hasFeature(feature.getClass()))
- {
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "UNSUPPORTED_FEATURE", feature));
- }
- processRespectBindingFeature(feature, epMetaData, stub);
- processChunkedEncodingFeature(feature, epMetaData, stub);
-
- // overriding feature for this stub
- FeatureAwareEndpointMetaData featureOverridableMetaData = (FeatureAwareEndpointMetaData)stub;
- featureOverridableMetaData.setFeature(feature);
- }
-
- /**
- * Setup http chunked encoding
- *
- * @param <T>
- * @param feature
- * @param epMetaData
- * @param stub
- * @return
- */
- private static <T> void processChunkedEncodingFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
- {
- if (feature instanceof ChunkedEncodingFeature)
- {
- Map<String, Object> ctx = ((BindingProvider)stub).getRequestContext();
- ctx.put(StubExt.PROPERTY_CHUNKED_ENCODING_SIZE, ((ChunkedEncodingFeature)feature).getChunkSize());
- }
- }
-
- /**
- *
- * Perform respect binding checks
- *
- * @param <T>
- * @param feature
- * @param epMetaData
- * @param stub
- * @return
- */
- private static <T> void processRespectBindingFeature(WebServiceFeature feature, EndpointMetaData epMetaData, T stub)
- {
- if (feature instanceof RespectBindingFeature && feature.isEnabled())
- {
- ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
- WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
-
- WSDLService wsdlService = wsdlDefinitions.getService(serviceMetaData.getServiceName());
- if (wsdlService != null)
- {
- WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(epMetaData.getPortName());
- if (wsdlEndpoint != null)
- {
- // Conformance 6.11 (javax.xml.ws.RespectBindingFeature): When the javax.xml.ws.RespectBindingFeature
- // is enabled, a JAX-WS implementation MUST inspect the wsdl:binding at runtime to determine
- // result and parameter bindings as well as any wsdl:extensions that have the required=true attribute.
- // All required wsdl:extensions MUST be supported and honored by a JAX-WS implementation unless a
- // specific wsdl:extension has be explicitly disabled via a WebServiceFeature.
- checkNotUnderstoodExtElements(wsdlEndpoint, epMetaData);
- WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(wsdlEndpoint.getBinding());
- checkNotUnderstoodExtElements(wsdlBinding, epMetaData);
- }
- else
- {
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_FIND_PORT", epMetaData.getPortName()));
- }
- }
- }
- }
-
- private static void checkNotUnderstoodExtElements(Extendable extendable, EndpointMetaData epMetaData)
- {
- List<WSDLExtensibilityElement> notUnderstoodList = extendable.getNotUnderstoodExtElements();
- for (WSDLExtensibilityElement el : notUnderstoodList)
- {
- boolean disabledByFeature = false; //TODO [JBWS-2459]
- if (el.isRequired() && !disabledByFeature)
- {
- String s = DOMWriter.printNode(el.getElement(), true);
- throw new WebServiceException(BundleUtils.getMessage(bundle, "NOT_UNDERSTOOD_ELEMENT_WAS_FOUND", s));
- }
- }
- }
-
-}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -53,9 +53,7 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.ResourceLoaderAdapter;
import org.jboss.ws.common.utils.DelegateClassLoader;
-import org.jboss.ws.core.EndpointMetadataProvider;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.core.jaxws.client.ClientFeatureProcessor;
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.core.jaxws.client.ClientProxy;
import org.jboss.ws.core.jaxws.client.DispatchImpl;
@@ -235,15 +233,7 @@
}
}
- T port = (T)createProxy(seiClass, epMetaData);
- initWebserviceFeatures(port, epMetaData.getFeatures().getFeatures());
-
- //initialize webserviceFeature in service for getPort(Class<T> seiClass) and getPort(QName portName, Class<T> seiClass)
- // This will override the features from policy
-
- initWebserviceFeatures(port, this.features);
-
- return port;
+ return (T)createProxy(seiClass, epMetaData);
}
private void assertSEIConstraints(Class seiClass)
@@ -470,10 +460,7 @@
@Override
public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode mode, WebServiceFeature... features)
{
- Dispatch<T> dispatch = createDispatch(portName, type, mode);
- initWebserviceFeatures(dispatch, this.features);
- initWebserviceFeatures(dispatch, features);
- return dispatch;
+ return createDispatch(portName, type, mode);
}
@Override
@@ -485,10 +472,7 @@
@Override
public Dispatch<Object> createDispatch(QName portName, JAXBContext context, Mode mode, WebServiceFeature... features)
{
- Dispatch<Object> dispatch = createDispatch(portName, context, mode);
- initWebserviceFeatures(dispatch, this.features);
- initWebserviceFeatures(dispatch, features);
- return dispatch;
+ return createDispatch(portName, context, mode);
}
@Override
@@ -500,26 +484,19 @@
@Override
public <T> T getPort(QName portName, Class<T> sei, WebServiceFeature... features)
{
- T port = getPort(portName, sei);
- initWebserviceFeatures(port, this.features);
- initWebserviceFeatures(port, features);
- return port;
+ return getPort(portName, sei);
}
@Override
public <T> T getPort(EndpointReference epr, Class<T> sei, WebServiceFeature... features)
{
- T port = getPort(sei);
- initWebserviceFeatures(port, features);
- return port;
+ return getPort(sei);
}
@Override
public <T> T getPort(Class<T> sei, WebServiceFeature... features)
{
- T port = getPort(sei);
- initWebserviceFeatures(port, features);
- return port;
+ return getPort(sei);
}
/**
@@ -593,16 +570,4 @@
return getPortInternal(epMetaData, seiClass);
}
-
- private <T> void initWebserviceFeatures(T stub, WebServiceFeature... features)
- {
- if (features != null)
- {
- EndpointMetaData epMetaData = ((EndpointMetadataProvider)stub).getEndpointMetaData();
- for (WebServiceFeature feature : features)
- {
- ClientFeatureProcessor.processFeature(feature, epMetaData, stub);
- }
- }
- }
}
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/EndpointFeatureProcessor.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.metadata.builder.jaxws;
-
-import java.lang.annotation.Annotation;
-import java.util.List;
-import java.util.ResourceBundle;
-
-import javax.xml.ws.RespectBinding;
-import javax.xml.ws.RespectBindingFeature;
-import javax.xml.ws.WebServiceException;
-import javax.xml.ws.spi.WebServiceFeatureAnnotation;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.wsdl.Extendable;
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
-import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * Process EndpointFeature annotations
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 12-Mar-2008
- */
-public class EndpointFeatureProcessor
-{
- private static final ResourceBundle bundle = BundleUtils.getBundle(EndpointFeatureProcessor.class);
- private static final Logger log = Logger.getLogger(EndpointFeatureProcessor.class);
-
- protected void processEndpointFeatures(Deployment dep, ServerEndpointMetaData sepMetaData, Class<?> sepClass)
- {
- for (Annotation an : sepClass.getAnnotations())
- {
- WebServiceFeatureAnnotation wsfa = an.annotationType().getAnnotation(WebServiceFeatureAnnotation.class);
- if (wsfa != null)
- {
- if (an.annotationType() == RespectBinding.class)
- {
- RespectBinding anFeature = sepClass.getAnnotation(RespectBinding.class);
- RespectBindingFeature feature = new RespectBindingFeature(anFeature.enabled());
- sepMetaData.addFeature(feature);
- }
- else
- {
- throw new WebServiceException(BundleUtils.getMessage(bundle, "UNSUPPORTED_FEATURE", wsfa.bean()));
- }
- }
- }
- }
-
- protected void setupEndpointFeatures(ServerEndpointMetaData sepMetaData)
- {
- setupRespectBindingFeature(sepMetaData);
- }
-
- private static void setupRespectBindingFeature(ServerEndpointMetaData sepMetaData)
- {
- RespectBindingFeature respectBindingFeature = sepMetaData.getFeature(RespectBindingFeature.class);
- if (respectBindingFeature != null && respectBindingFeature.isEnabled())
- {
- log.debug("RespectBindingFeature found, looking for required not understood extensibility elements...");
- ServiceMetaData serviceMetaData = sepMetaData.getServiceMetaData();
- WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
-
- WSDLService wsdlService = wsdlDefinitions.getService(serviceMetaData.getServiceName());
- if (wsdlService != null)
- {
- WSDLEndpoint wsdlEndpoint = wsdlService.getEndpoint(sepMetaData.getPortName());
- if (wsdlEndpoint != null)
- {
- // Conformance 6.11 (javax.xml.ws.RespectBindingFeature): When the javax.xml.ws.RespectBindingFeature
- // is enabled, a JAX-WS implementation MUST inspect the wsdl:binding at runtime to determine
- // result and parameter bindings as well as any wsdl:extensions that have the required=true attribute.
- // All required wsdl:extensions MUST be supported and honored by a JAX-WS implementation unless a
- // specific wsdl:extension has be explicitly disabled via a WebServiceFeature.
- checkNotUnderstoodExtElements(wsdlEndpoint, sepMetaData);
- WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(wsdlEndpoint.getBinding());
- checkNotUnderstoodExtElements(wsdlBinding, sepMetaData);
- }
- else
- {
- log.warn(BundleUtils.getMessage(bundle, "CANNOT_FIND_PORT", sepMetaData.getPortName()));
- }
- }
- }
- }
-
- private static void checkNotUnderstoodExtElements(Extendable extendable, ServerEndpointMetaData sepMetaData)
- {
- List<WSDLExtensibilityElement> notUnderstoodList = extendable.getNotUnderstoodExtElements();
- for (WSDLExtensibilityElement el : notUnderstoodList)
- {
- boolean disabledByFeature = false; //TODO [JBWS-2459]
- if (el.isRequired() && !disabledByFeature)
- {
- String s = DOMWriter.printNode(el.getElement(), true);
- throw new WebServiceException(BundleUtils.getMessage(bundle, "NOT_UNDERSTOOD_ELEMENT_WAS_FOUND", s));
- }
- }
- }
-
-}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -57,7 +57,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.annotation.Documentation;
import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
@@ -594,11 +593,6 @@
opMetaData.setParameterStyle(anBinding.parameterStyle());
}
- if (method.isAnnotationPresent(Documentation.class))
- {
- opMetaData.setDocumentation(method.getAnnotation(Documentation.class).content());
- }
-
Class<?>[] parameterTypes = method.getParameterTypes();
Type[] genericTypes = method.getGenericParameterTypes();
Annotation[][] parameterAnnotations = method.getParameterAnnotations();
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -38,7 +38,6 @@
import javax.xml.ws.WebServiceProvider;
import org.jboss.ws.WSException;
-import org.jboss.ws.annotation.Documentation;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.IOUtils;
@@ -131,14 +130,6 @@
// process config
processEndpointConfig(dep, sepMetaData, sepClass, linkName);
- // process web service features
- EndpointFeatureProcessor epFeatureProcessor = new EndpointFeatureProcessor();
- epFeatureProcessor.processEndpointFeatures(dep, sepMetaData, sepClass);
-
- // Process endpoint documentation
- if (seiClass.isAnnotationPresent(Documentation.class))
- sepMetaData.setDocumentation(seiClass.getAnnotation(Documentation.class).content());
-
if (!toolMode)
{
setupOperationsFromWSDL(serviceMetaData, sepMetaData);
@@ -185,9 +176,6 @@
// process webservices.xml contributions
processWSDDContribution(dep, sepMetaData);
- //setup web service feature contributions
- epFeatureProcessor.setupEndpointFeatures(sepMetaData);
-
// Init the endpoint address
initEndpointAddress(dep, sepMetaData);
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -142,8 +142,6 @@
private List<Class> registeredTypes = new ArrayList<Class>();
// The features defined for this endpoint
private FeatureSet features = new FeatureSet();
- // The documentation edfined through the @Documentation annotation
- private String documentation;
private ConfigObservable configObservable = new ConfigObservable();
@@ -383,16 +381,6 @@
this.features.addFeature(feature);
}
- public String getDocumentation()
- {
- return documentation;
- }
-
- public void setDocumentation(String documentation)
- {
- this.documentation = documentation;
- }
-
public List<OperationMetaData> getOperations()
{
return new ArrayList<OperationMetaData>(operations);
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/FeatureAwareClientEndpointMetaDataAdapter.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -228,12 +228,6 @@
}
@Override
- public String getDocumentation()
- {
- return this.delegee.getDocumentation();
- }
-
- @Override
public Use getEncodingStyle()
{
return this.delegee.getEncodingStyle();
@@ -402,12 +396,6 @@
}
@Override
- public void setDocumentation(String documentation)
- {
- this.delegee.setDocumentation(documentation);
- }
-
- @Override
public void setEncodingStyle(Use value)
{
this.delegee.setEncodingStyle(value);
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -67,7 +67,6 @@
private List<ParameterMetaData> parameters = new ArrayList<ParameterMetaData>();
private List<FaultMetaData> faults = new ArrayList<FaultMetaData>();
private ParameterMetaData returnParam;
- private String documentation;
public OperationMetaData(EndpointMetaData epMetaData, QName qname, String javaName)
{
@@ -523,14 +522,4 @@
}
return buffer.toString();
}
-
- public String getDocumentation()
- {
- return documentation;
- }
-
- public void setDocumentation(String documentation)
- {
- this.documentation = documentation;
- }
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterface.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterface.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/metadata/wsdl/WSDLInterface.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -28,8 +28,6 @@
import javax.xml.namespace.QName;
-import org.jboss.logging.Logger;
-
/**
* An Interface component describes sequences of messages that a service sends and/or receives. It does this
* by grouping related messages into operations. An operation is a sequence of input and output messages,
@@ -41,9 +39,6 @@
*/
public class WSDLInterface extends Extendable
{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLInterface.class);
-
private static final long serialVersionUID = 2453454924501233964L;
// The parent WSDL definitions element.
@@ -64,8 +59,6 @@
private Map<QName, WSDLInterfaceOperation> operations = new LinkedHashMap<QName, WSDLInterfaceOperation>();
/** Zero or more fault element information items */
private Map<QName, WSDLInterfaceFault> faults = new LinkedHashMap<QName, WSDLInterfaceFault>();
-
- private WSDLDocumentation documentationElement;
/** Construct a WSDL interface for a given WSDL definition */
public WSDLInterface(WSDLDefinitions wsdlDefinitions, QName name)
@@ -158,14 +151,4 @@
{
faults.put(fault.getName(), fault);
}
-
- public WSDLDocumentation getDocumentationElement()
- {
- return documentationElement;
- }
-
- public void setDocumentationElement(WSDLDocumentation documentationElement)
- {
- this.documentationElement = documentationElement;
- }
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -75,7 +75,6 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.api.addressing.AddressingConstants;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMUtils;
@@ -320,47 +319,11 @@
if (extElement instanceof UnknownExtensibilityElement)
{
UnknownExtensibilityElement uee = (UnknownExtensibilityElement)extElement;
- boolean understood = false;
- understood = understood || processEPR(uee, dest);
- //add processing of further extensibility element types below
-
- if (!understood)
- {
- processNotUnderstoodExtesibilityElement(uee, dest);
- }
+ processNotUnderstoodExtesibilityElement(uee, dest);
}
}
}
- /**
- * Process the provided extensibility element looking for UsingAddressing.
- * Returns true if the provided element is UsingAddressing, false otherwise.
- *
- * @param extElement
- * @param dest
- * @return
- */
- private boolean processEPR(UnknownExtensibilityElement extElement, Extendable dest)
- {
- final Element srcElement = extElement.getElement();
- final boolean isWSANamespace = AddressingConstants.Core.NS.equals(srcElement.getNamespaceURI());
- final boolean isEPRLocalName = AddressingConstants.Core.Elements.ENDPOINTREFERENCE.equals(srcElement.getLocalName());
- boolean result = false;
-
- if (isWSANamespace && isEPRLocalName)
- {
- Element element = (Element) srcElement.cloneNode(true);
- copyMissingNamespaceDeclarations(element, srcElement);
-
- WSDLExtensibilityElement el = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_EPR, element);
- el.setRequired(true);
- dest.addExtensibilityElement(el);
- result = true;
- }
-
- return result;
- }
-
private void processNotUnderstoodExtesibilityElement(UnknownExtensibilityElement extElement, Extendable dest)
{
Element element = (Element)extElement.getElement().cloneNode(true);
@@ -709,13 +672,6 @@
{
WSDLInterface destInterface = new WSDLInterface(destWsdl, qname);
- // documentation
- Element documentationElement = srcPortType.getDocumentationElement();
- if (documentationElement != null && documentationElement.getTextContent() != null)
- {
- destInterface.setDocumentationElement(new WSDLDocumentation(documentationElement.getTextContent()));
- }
-
destWsdl.addInterface(destInterface);
processPortTypeOperations(srcWsdl, destInterface, srcPortType, destBinding);
@@ -765,13 +721,6 @@
log.trace("processOperationInput: " + srcMessage.getQName());
- QName wsaAction = (QName)wsdlOperationInput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
- if (wsaAction != null)
- umdmOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN, wsaAction.getLocalPart()));
- wsaAction = (QName)wsdlOperationInput.getExtensionAttribute(AddressingConstants.Metadata.Attributes.ACTION_QNAME);
- if (wsaAction != null)
- umdmOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN, wsaAction.getLocalPart()));
-
List<String> paramOrder = (List<String>)wsdlOperation.getParameterOrdering();
if (paramOrder != null)
{
@@ -867,12 +816,6 @@
log.trace("processOperationOutput: " + wsdlMessage.getQName());
umdmOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
- QName wsaAction = (QName)wsdlOperationOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
- if (wsaAction != null)
- umdmOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT, wsaAction.getLocalPart()));
- wsaAction = (QName)wsdlOperationOutput.getExtensionAttribute(AddressingConstants.Metadata.Attributes.ACTION_QNAME);
- if (wsaAction != null)
- umdmOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT, wsaAction.getLocalPart()));
List<String> paramOrder = (List<String>)wsdlOperation.getParameterOrdering();
if (paramOrder != null)
@@ -958,12 +901,6 @@
QName messageName = wsdlMessage.getQName();
WSDLInterfaceOperationOutfault opOutFault = new WSDLInterfaceOperationOutfault(umdmOperation);
- QName wsaAction = (QName)wsdlFault.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
- if (wsaAction != null)
- opOutFault.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_FAULT, wsaAction.getLocalPart()));
- wsaAction = (QName)wsdlFault.getExtensionAttribute(AddressingConstants.Metadata.Attributes.ACTION_QNAME);
- if (wsaAction != null)
- opOutFault.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_FAULT, wsaAction.getLocalPart()));
opOutFault.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_FAULT, faultName));
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -38,16 +38,13 @@
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.DOMWriter;
-import org.jboss.ws.metadata.wsdl.Extendable;
import org.jboss.ws.metadata.wsdl.WSDLBinding;
import org.jboss.ws.metadata.wsdl.WSDLBindingMessageReference;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationOutput;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLDocumentation;
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
import org.jboss.ws.metadata.wsdl.WSDLImport;
import org.jboss.ws.metadata.wsdl.WSDLInterface;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceMessageReference;
@@ -55,17 +52,12 @@
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutfault;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.metadata.wsdl.WSDLProperty;
import org.jboss.ws.metadata.wsdl.WSDLRPCPart;
import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem;
import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem.Direction;
import org.jboss.ws.metadata.wsdl.WSDLSOAPHeader;
import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.w3c.dom.Attr;
import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
* A WSDL Writer that writes a WSDL 1.1 file. It works off
@@ -175,7 +167,6 @@
writtenFaultMessages.clear();
appendTypes(builder, namespace);
- appendUnknownExtensibilityElements(builder, wsdl);
appendMessages(builder, namespace);
appendInterfaces(builder, namespace);
appendBindings(builder, namespace);
@@ -183,74 +174,6 @@
builder.append("</definitions>");
}
- protected void appendUnknownExtensibilityElements(StringBuilder builder, Extendable extendable)
- {
- for (WSDLExtensibilityElement ext : extendable.getAllExtensibilityElements())
- {
- appendPolicyElements(builder, ext);
- appendAddressingPolicyElements(builder, ext);
- appendJAXWSCustomizationElements(builder, ext);
- //add processing of further extensibility element types below
- }
- }
-
- private void appendPolicyElements(StringBuilder builder, WSDLExtensibilityElement extElem)
- {
- if (Constants.WSDL_ELEMENT_POLICY.equalsIgnoreCase(extElem.getUri()) ||
- Constants.WSDL_ELEMENT_POLICYREFERENCE.equalsIgnoreCase(extElem.getUri()))
- {
- appendElementSkippingKnownNs(builder, extElem.getElement());
- }
- }
-
- private void appendAddressingPolicyElements(StringBuilder builder, WSDLExtensibilityElement extElem)
- {
- if (WSDLGenerator.WSP_NS.equalsIgnoreCase(extElem.getUri()))
- {
- appendElementSkippingKnownNs(builder, extElem.getElement());
- }
- }
-
- private void appendJAXWSCustomizationElements(StringBuilder builder, WSDLExtensibilityElement extElem)
- {
- if (Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS.equalsIgnoreCase(extElem.getUri()))
- {
- appendElementSkippingKnownNs(builder, extElem.getElement());
- }
- }
-
- private void appendElementSkippingKnownNs(StringBuilder builder, Element el)
- {
- builder.append("<"+el.getNodeName());
- NamedNodeMap attributes = el.getAttributes();
- for (int i = 0; i < attributes.getLength(); i++)
- {
- Attr attr = (Attr)attributes.item(i);
- if (attr.getName().startsWith("xmlns:") && attr.getValue()!=null)
- {
- String prefix = attr.getName().substring(6);
- if (attr.getValue().equalsIgnoreCase(wsdl.getNamespaceURI(prefix)))
- continue;
- }
- builder.append(" "+attr.getName()+"='"+attr.getValue()+"'");
- }
- builder.append(">");
- NodeList childrenList = el.getChildNodes();
- for (int i=0; i<childrenList.getLength(); i++)
- {
- Node node = childrenList.item(i);
- if (node instanceof Element)
- {
- appendElementSkippingKnownNs(builder, (Element)node);
- }
- else
- {
- builder.append(DOMWriter.printNode(node, false));
- }
- }
- builder.append("</"+el.getNodeName()+">");
- }
-
protected void appendMessages(StringBuilder buffer, String namespace)
{
WSDLInterface[] interfaces = wsdl.getInterfaces();
@@ -282,7 +205,6 @@
buffer.append("<message name='" + interfaceName + "_" + opname + "' >");
for (WSDLInterfaceOperationInput input : operation.getInputs())
{
- appendUnknownExtensibilityElements(buffer, input); //only one may contain extensibility elements
appendMessageParts(buffer, input);
}
buffer.append("</message>");
@@ -400,21 +322,7 @@
continue;
buffer.append("<portType name='" + intf.getName().getLocalPart() + "'");
- WSDLProperty policyProp = intf.getProperty(Constants.WSDL_PROPERTY_POLICYURIS);
- if (policyProp != null)
- {
- String prefix = wsdl.getPrefix(Constants.URI_WS_POLICY);
- buffer.append(" ");
- buffer.append(prefix);
- buffer.append(":");
- buffer.append(Constants.WSDL_ATTRIBUTE_WSP_POLICYURIS.getLocalPart());
- buffer.append("='");
- buffer.append(policyProp.getValue());
- buffer.append("'");
- }
buffer.append(">");
- appendDocumentation(buffer, intf.getDocumentationElement());
- appendUnknownExtensibilityElements(buffer, intf);
appendPortOperations(buffer, intf);
buffer.append("</portType>");
}
@@ -456,8 +364,6 @@
}
buffer.append(">");
- appendDocumentation(buffer, operation.getDocumentationElement());
- appendUnknownExtensibilityElements(buffer, operation);
String opname = operation.getName().getLocalPart();
String interfaceName = operation.getWsdlInterface().getName().getLocalPart();
@@ -508,16 +414,6 @@
}
}
- protected void appendDocumentation(StringBuilder buffer, WSDLDocumentation documentation)
- {
- if (documentation != null && documentation.getContent() != null)
- {
- buffer.append("<documentation>");
- buffer.append(documentation.getContent());
- buffer.append("</documentation>");
- }
- }
-
protected void appendBindings(StringBuilder buffer, String namespace)
{
WSDLBinding[] bindings = wsdl.getBindings();
@@ -533,7 +429,6 @@
String style = "rpc";
if (wsdlStyle.equals(Constants.DOCUMENT_LITERAL))
style = "document";
- appendUnknownExtensibilityElements(buffer, binding);
// The value of the REQUIRED transport attribute (of type xs:anyURI) indicates which transport of SOAP this binding corresponds to.
// The URI value "http://schemas.xmlsoap.org/soap/http" corresponds to the HTTP binding.
@@ -562,7 +457,6 @@
buffer.append("<operation name='" + interfaceOperation.getName().getLocalPart() + "'>");
String soapAction = (operation.getSOAPAction() != null ? operation.getSOAPAction() : "");
- appendUnknownExtensibilityElements(buffer, operation);
buffer.append("<" + soapPrefix + ":operation soapAction=\"" + soapAction + "\"/>");
WSDLBindingOperationInput[] inputs = operation.getInputs();
@@ -570,7 +464,6 @@
throw new WSException(BundleUtils.getMessage(bundle, "WSDL11_SUPPORT_MEPS"));
buffer.append("<input>");
- appendUnknownExtensibilityElements(buffer, inputs[0]);
appendSOAPBinding(buffer, wsdlInterface, operation, inputs);
buffer.append("</input>");
@@ -668,7 +561,6 @@
if (!namespace.equals(service.getName().getNamespaceURI()))
continue;
buffer.append("<service name='" + service.getName().getLocalPart() + "'>");
- appendUnknownExtensibilityElements(buffer, service);
WSDLEndpoint[] endpoints = service.getEndpoints();
int lenend = endpoints.length;
for (int j = 0; j < lenend; j++)
@@ -690,7 +582,6 @@
String ebname = prefix + ":" + endpointBinding.getLocalPart();
buffer.append("<port name='" + name + "' binding='" + ebname + "'>");
buffer.append("<" + soapPrefix + ":address location='" + endpoint.getAddress() + "'/>");
- appendUnknownExtensibilityElements(buffer, endpoint);
buffer.append("</port>");
}
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/org/jboss/ws/tools/wsdl/WSDLGenerator.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -33,7 +33,6 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.core.soap.Style;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.FaultMetaData;
@@ -46,9 +45,7 @@
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationOutput;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLDocumentation;
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
import org.jboss.ws.metadata.wsdl.WSDLImport;
import org.jboss.ws.metadata.wsdl.WSDLInterface;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceFault;
@@ -61,7 +58,6 @@
import org.jboss.ws.metadata.wsdl.WSDLRPCSignatureItem.Direction;
import org.jboss.ws.metadata.wsdl.WSDLSOAPHeader;
import org.jboss.ws.metadata.wsdl.WSDLService;
-import org.w3c.dom.Element;
/**
* Generates a WSDL object model.
@@ -71,8 +67,6 @@
public abstract class WSDLGenerator
{
private static final ResourceBundle bundle = BundleUtils.getBundle(WSDLGenerator.class);
- public static final String WSU_NS = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit...";
- public static final String WSP_NS = "http://www.w3.org/ns/ws-policy";
protected WSDLDefinitions wsdl;
protected boolean extension;
@@ -111,27 +105,6 @@
wsdl.addBinding(wsdlBinding);
wsdlEndpoint.setBinding(bindingQName);
- if (endpoint.getDocumentation() != null)
- {
- String prefix = wsdl.getPrefix(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS);
- if (prefix == null)
- {
- prefix = "jaxws";
- wsdl.registerNamespaceURI(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS, prefix);
- }
-
- Element javadocElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_JAVADOC.getLocalPart(), prefix);
- javadocElement.setTextContent(endpoint.getDocumentation());
- Element classElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_CLASS.getLocalPart(), prefix);
- classElement.setAttribute("name", interfaceQName.getLocalPart());
- classElement.appendChild(javadocElement);
- Element bindingsElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_BINDINGS.getLocalPart(), prefix);
- bindingsElement.appendChild(classElement);
- WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS, bindingsElement);
- wsdlInterface.addExtensibilityElement(ext);
- wsdlInterface.setDocumentationElement(new WSDLDocumentation(endpoint.getDocumentation()));
- }
-
for (OperationMetaData operation : endpoint.getOperations())
{
processOperation(wsdlInterface, wsdlBinding, operation);
@@ -172,28 +145,6 @@
wsdlBinding.addFault(bindingFault);
}
- // process optional documentation
- if (operation.getDocumentation() != null)
- {
- String prefix = wsdl.getPrefix(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS);
- if (prefix == null)
- {
- prefix = "jaxws";
- wsdl.registerNamespaceURI(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS, prefix);
- }
-
- Element javadocElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_JAVADOC.getLocalPart(), prefix);
- javadocElement.setTextContent(operation.getDocumentation());
- Element methodElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_METHOD.getLocalPart(), prefix);
- methodElement.setAttribute("name", operation.getQName().getLocalPart());
- methodElement.appendChild(javadocElement);
- Element bindingsElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_BINDINGS.getLocalPart(), prefix);
- bindingsElement.appendChild(methodElement);
- WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS, bindingsElement);
- interfaceOperation.addExtensibilityElement(ext);
- interfaceOperation.setDocumentationElement(new WSDLDocumentation(operation.getDocumentation()));
- }
-
wsdlInterface.addOperation(interfaceOperation);
wsdlBinding.addOperation(bindingOperation);
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/distro/build.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/distro/build.xml 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/distro/build.xml 2012-04-10 08:39:42 UTC (rev 16130)
@@ -76,7 +76,6 @@
<pathelement location="${thirdparty.dir}/jbossws-native-factories.jar"/>
<fileset dir="${thirdparty.dir}">
<exclude name="**/jbossws-jboss*.jar"/>
- <exclude name="**/jboss-as-webservices-tests-integration.jar"/>
</fileset>
</path>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:39:42 UTC (rev 16130)
@@ -63,7 +63,6 @@
<include>org.jboss.ws:jbossws-common-tools:jar</include>
<include>org.jboss.ws:jbossws-jboss*:jar</include>
<include>org.jboss:jbossxb:jar</include>
- <include>org.jboss.as:jboss-as-webservices-tests-integration:jar</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<scope>provided</scope>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:39:42 UTC (rev 16130)
@@ -90,16 +90,6 @@
<metainf dir="${tests.output.dir}/test-resources/jaxws/jbws1809/META-INF" />
</jar>
- <!-- jaxws-jbws1850 -->
- <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1850.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws1850/TestServiceImpl.class" />
- </fileset>
- <manifest>
- <attribute name="Dependencies" value="org.jboss.ws.native.jbossws-native-core"/>
- </manifest>
- </jar>
-
<!-- jaxws-jbws1909 -->
<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws1909.jar" manifest="${tests.output.dir}/test-resources/jaxws/jbws1909/META-INF/MANIFEST.MF">
<fileset dir="${tests.output.dir}/test-classes">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -21,30 +21,24 @@
*/
package org.jboss.test.ws.tools.validation;
-import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.metadata.wsdl.Extendable;
import org.jboss.ws.metadata.wsdl.WSDLBinding;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperation;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLBindingOperationOutput;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
import org.jboss.ws.metadata.wsdl.WSDLInterface;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperation;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInfault;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutfault;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.metadata.wsdl.WSDLProperty;
import org.jboss.ws.metadata.wsdl.WSDLService;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
import org.jboss.ws.common.DOMUtils;
@@ -87,7 +81,6 @@
{
WSDLBinding binding1 = bindings1[i];
WSDLBinding binding2 = bindings2[i];
- bool = bool && validateExtensibilityElements(binding1, binding2);
bool = bool && validateBindingOperations(binding1.getOperations(),binding2.getOperations());
}
return bool;
@@ -137,103 +130,6 @@
}
/**
- * Validates the extensibility elements contained into the specified Extendable
- * objects.
- * @param w1
- * @param w2
- * @return
- * @throws JBossWSToolsException
- */
- public static boolean validateExtensibilityElements(Extendable ext1, Extendable ext2)
- throws JBossWSToolsException
- {
- boolean bool = true;
- //add validation of further extensibility element types below
- if (bool) bool = validatePolicyElements(ext1,ext2);
-
- return bool;
- }
-
-
- private static boolean validatePolicyElements(Extendable ext1, Extendable ext2)
- throws JBossWSToolsException
- {
- //policies
- List<WSDLExtensibilityElement> pol1 = new ArrayList<WSDLExtensibilityElement>(
- ext1.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICY));
- List<WSDLExtensibilityElement> pol2 = new ArrayList<WSDLExtensibilityElement>(
- ext2.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICY));
- //check whether lists are the same size
- if (pol1.size() != pol2.size())
- throw new JBossWSToolsException("Policy WSDLExtensibilityElement mismatch!");
- //check equality
- for (WSDLExtensibilityElement el1 : pol1)
- {
- boolean done = false;
- Iterator it = pol2.iterator();
- WSDLExtensibilityElement el2 = null;
- while (it.hasNext() && !done)
- {
- el2 = (WSDLExtensibilityElement)it.next();
- done = (el1.isRequired() == el2.isRequired()) &&
- checkElementEquality(el1.getElement(), el2.getElement());
- }
- if (!done)
- {
- log.error("Failing policy validation on policy on: "+ext1+" and "+ext2);
- return false;
- }
- pol2.remove(el2);
- }
- //policy references
- List<WSDLExtensibilityElement> polRef1 = new ArrayList<WSDLExtensibilityElement>(
- ext1.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICYREFERENCE));
- List<WSDLExtensibilityElement> polRef2 = new ArrayList<WSDLExtensibilityElement>(
- ext2.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICYREFERENCE));
- //check whether lists are the same size
- if (polRef1.size() != polRef2.size())
- throw new JBossWSToolsException("Policy ref WSDLExtensibilityElement mismatch!");
- //check equality
- for (WSDLExtensibilityElement el1 : polRef1)
- {
- boolean done = false;
- Iterator it = polRef2.iterator();
- WSDLExtensibilityElement el2 = null;
- while (it.hasNext() && !done)
- {
- el2 = (WSDLExtensibilityElement)it.next();
- done = (el1.isRequired() == el2.isRequired()) &&
- checkElementEquality(el1.getElement(), el2.getElement());
- }
- if (!done)
- {
- log.error("Failing policy validation on policy ref on: "+ext1+" and "+ext2);
- return false;
- }
- polRef2.remove(el2);
- }
- //check properties
- WSDLProperty prop1 = ext1.getProperty(Constants.WSDL_PROPERTY_POLICYURIS);
- WSDLProperty prop2 = ext2.getProperty(Constants.WSDL_PROPERTY_POLICYURIS);
- if (prop1 != null || prop2 != null)
- {
- if (prop1 == null || prop2 == null || prop1.isRequired() != prop2.isRequired())
- throw new JBossWSToolsException("Policy prop WSDLExtensibilityElement mismatch!");
- String value1 = prop1.getValue();
- String value2 = prop2.getValue();
- if (value1 != null || value2 != null)
- {
- if (value1 == null || value2 == null || !value1.equalsIgnoreCase(value2))
- {
- log.error("Failing policy validation on policy uri prop on: "+ext1+" and "+ext2);
- return false;
- }
- }
- }
- return true;
- }
-
- /**
* Validates the namespace definitions in the wsdl
* @param w1 WSDL Definitions for the first wsdl
* @param w2 WSDL Definitions for the second wsdl
@@ -326,10 +222,9 @@
bool = checkQNameEquality(s1.getName(),s2.getName());
if(bool)
{
- bool = validateExtensibilityElements(s1, s2);
WSDLEndpoint[] we1 = s1.getEndpoints();
WSDLEndpoint[] we2 = s2.getEndpoints();
- bool = bool && validateWSDLEndpoints(we1, we2);
+ bool = validateWSDLEndpoints(we1, we2);
}
}
return bool;
@@ -389,7 +284,6 @@
{
boolean bool = checkQNameEquality(w1.getName(),w2.getName());
- bool = bool && validateExtensibilityElements(w1, w2);
if(bool)
{
//validate the inputs
@@ -470,9 +364,6 @@
bool = checkQNameEquality(xmlName1,xmlName2);
if(bool == false)
throw new JBossWSToolsException(xmlName1 + " & " + xmlName2 + " mismatch");
- bool = validateExtensibilityElements(i1, i2);
- if(bool == false)
- throw new JBossWSToolsException("WSDLExtensibilityElement mismatch");
return bool;
}
@@ -524,7 +415,6 @@
WSDLBindingOperationInput bindin1 = wb1[i];
WSDLBindingOperationInput bindin2 = wb2[i];
bool = checkStringEquality(bindin1.getMessageLabel(),bindin2.getMessageLabel());
- bool = bool & validateExtensibilityElements(bindin1, bindin2);
if(!bool) return bool;
}
@@ -541,7 +431,6 @@
WSDLBindingOperationOutput bindout2 = wboutarr2[i];
bool = checkStringEquality(bindout1.getMessageLabel(),bindout2.getMessageLabel());
}
- bool = bool & validateExtensibilityElements(b1, b2);
return bool;
}
@@ -568,7 +457,6 @@
bool = checkQNameEquality(e1.getName(),e2.getName());
if(bool == false)
throw new JBossWSToolsException("Endpoint Names do not match");
- bool = bool && validateExtensibilityElements(e1, e2);
}
return bool;
}
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java 2012-04-10 08:30:31 UTC (rev 16129)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java 2012-04-10 08:39:42 UTC (rev 16130)
@@ -100,8 +100,6 @@
{
boolean bool = false;
bool = WSDLValidationHelper.validateNSDefinitions(wsdlExp,wsdlAct);
- if ( bool )
- bool = WSDLValidationHelper.validateExtensibilityElements(wsdlExp,wsdlAct);
if( bool)
bool = WSDLValidationHelper.validateBindings(wsdlExp,wsdlAct);
if( bool)
12 years, 1 month
JBossWS SVN: r16129 - in stack/native/branches/jbossws-native-4.0.x: modules and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: ropalka
Date: 2012-04-10 04:30:31 -0400 (Tue, 10 Apr 2012)
New Revision: 16129
Removed:
stack/native/branches/jbossws-native-4.0.x/.gitignore
stack/native/branches/jbossws-native-4.0.x/README-COMMITTERS
stack/native/branches/jbossws-native-4.0.x/eclipse/
stack/native/branches/jbossws-native-4.0.x/modules/client/
stack/native/branches/jbossws-native-4.0.x/modules/core/src/main/java/javax/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-benchmark.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/benchmark/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/core/
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/src/test/resources/benchmark/
Modified:
stack/native/branches/jbossws-native-4.0.x/
stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/scripts/zip-other-configs.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-4.0.x/pom.xml
Log:
[JBPAPP-8667] Merged revisions 16050 via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/native/trunk
.......
r16050 | ropalka | 2012-03-27 12:02:50 +0200 (Tue, 27 Mar 2012) | 1 line
[JBWS-3474] removing empty dirs and useless benchmark tests
.......
Property changes on: stack/native/branches/jbossws-native-4.0.x
___________________________________________________________________
Modified: svnmerge-integrated
- https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
+ https://svn.jboss.org/repos/jbossws/stack/native/trunk:1-15651,15653-1567...
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/trunk:15653,15670-15677,15686,15696,15707,15714,15726-15731,15739-15740,15749-15759,15761,15775-15777,15779,15787-15791,15793,15795,15797-15804,15810,15812-15818,15821,15823-15827,15829,15831,15836-15840,15858,15861,15871,15873,15880-15883,15887,15890-15891,15904-15931,15944,15974,15988,15991,15995,15997,15999,16003,16013,16015,16021,16050
Deleted: stack/native/branches/jbossws-native-4.0.x/.gitignore
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/.gitignore 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/.gitignore 2012-04-10 08:30:31 UTC (rev 16129)
@@ -1,45 +0,0 @@
-
-# /
-/target.properties
-/.settings
-/target
-/profiles.xml
-/clipboard.*
-
-# /modules/client/
-/modules/client/target
-
-# /modules/core/
-/modules/core/target
-
-# /modules/endorsed/
-/modules/endorsed/target
-
-# /modules/management/
-/modules/management/target
-
-# /modules/resources/
-/modules/resources/target
-
-# /modules/services/
-/modules/services/target
-
-# /modules/testsuite/framework-tests/
-/modules/testsuite/framework-tests/target
-/modules/testsuite/framework-tests/wsprovide
-/modules/testsuite/framework-tests/work
-/modules/testsuite/framework-tests/wsconsume
-/modules/testsuite/framework-tests/*.log
-/modules/testsuite/framework-tests/*.txt
-
-# /modules/testsuite/framework-tests/src/test/
-/modules/testsuite/framework-tests/src/test/ant-import
-/modules/testsuite/framework-tests/src/test/java
-/modules/testsuite/framework-tests/src/test/resources
-
-# /modules/testsuite/native-tests/
-/modules/testsuite/native-tests/target
-/modules/testsuite/native-tests/tools
-/modules/testsuite/native-tests/wstools
-/modules/testsuite/native-tests/*.log
-/modules/testsuite/native-tests/*.txt
Deleted: stack/native/branches/jbossws-native-4.0.x/README-COMMITTERS
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/README-COMMITTERS 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/README-COMMITTERS 2012-04-10 08:30:31 UTC (rev 16129)
@@ -1,4 +0,0 @@
- * If you are using Eclipse then set your code style to eclipse/jboss-style.xml.
- * If you are using Eclipse then set your check style to eclipse/jboss-format.xml.
- * According to http://community.jboss.org/wiki/CopyrightOwnershipandLicenses
- ensure you're putting correct license headers to Java and XML files.
Modified: stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/core/pom.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -59,11 +59,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.jms</groupId>
- <artifactId>jms</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -93,17 +93,6 @@
<dependencySet>
<outputDirectory>deploy-artifacts/lib</outputDirectory>
- <unpack>false</unpack>
- <includes>
- <include>org.jboss.naming:jnp-client:jar</include>
- </includes>
- <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
- <scope>test</scope>
- <useProjectArtifact>false</useProjectArtifact>
- </dependencySet>
-
- <dependencySet>
- <outputDirectory>deploy-artifacts/lib</outputDirectory>
<unpack>false</unpack>
<outputFileNameMapping>wstx.jar</outputFileNameMapping>
<includes>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/scripts/zip-other-configs.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/scripts/zip-other-configs.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/resources/src/main/scripts/zip-other-configs.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -31,10 +31,9 @@
<target name="main">
<copy todir="${target.dir}/classes/resources">
<fileset dir="${basedir}/../core/target/resources"/>
- <fileset dir="${basedir}/../client/src/main/resources/META-INF"/>
</copy>
<jar destfile="${source.jar}" basedir="${target.dir}/classes" update="true"/>
<jar destfile="${binary.jar}" basedir="${target.dir}/classes" update="true"/>
</target>
-
+
</project>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/pom.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -43,26 +43,6 @@
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>wsconsume</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="maven.test.classpath" refid="maven.test.classpath" />
- <property name="tests.resources.dir" value="${basedir}/src/test/resources" />
- <property name="tests.output.dir" value="${project.build.directory}" />
- <property name="project.version" value="${project.version}" />
- <property name="log4j.conf" value="${basedir}/src/test/etc/log4j.xml" />
- <property name="log4j.output.dir" value="${log4j.output.dir}"/>
- <property name="endorsed.dirs" value="${endorsed.dirs}"/>
- <property name="jboss.home" value="${jboss.home}"/>
- <ant antfile="scripts/antrun-wsconsume.xml" target="wsconsume" />
- </tasks>
- </configuration>
- </execution>
- <execution>
<id>wstools</id>
<phase>test-compile</phase>
<goals>
@@ -81,25 +61,6 @@
</configuration>
</execution>
<execution>
- <id>wsprovide</id>
- <phase>test-compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <property name="maven.test.classpath" refid="maven.test.classpath" />
- <property name="tests.resources.dir" value="${basedir}/src/test/resources" />
- <property name="tests.output.dir" value="${project.build.directory}" />
- <property name="log4j.conf" value="${basedir}/src/test/etc/log4j.xml" />
- <property name="log4j.output.dir" value="${log4j.output.dir}"/>
- <property name="jboss.home" value="${jboss.home}"/>
- <property name="endorsed.dirs" value="${endorsed.dirs}"/>
- <ant antfile="scripts/antrun-wsprovide.xml" target="wsprovide" />
- </tasks>
- </configuration>
- </execution>
- <execution>
<id>build-jars</id>
<phase>test-compile</phase>
<goals>
@@ -114,7 +75,6 @@
<ant antfile="scripts/build-jars-jaxrpc.xml" target="build-jars-jaxrpc" />
<ant antfile="scripts/build-samples-jaxrpc.xml" target="build-samples-jaxrpc" />
<ant antfile="scripts/build-jars-jaxws.xml" target="build-jars-jaxws" />
- <ant antfile="scripts/build-samples-jaxws.xml" target="build-samples-jaxws" />
</tasks>
</configuration>
</execution>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsconsume.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project>
-
- <target name="wsconsume" description="Consume JAX-WS contracts">
-
- <taskdef name="wsconsume" classname="org.jboss.ws.tools.ant.WSConsumeTask">
- <classpath>
- <pathelement path="${maven.test.classpath}"/>
- </classpath>
- </taskdef>
-
- <wsconsume-macro
- wsdl="${tests.resources.dir}/benchmark/jaxws/doclit/WEB-INF/wsdl/BenchmarkWebService.wsdl"
- package="org.jboss.test.ws.benchmark.jaxws.doclit"
- outputDir="${tests.output.dir}"
- javaEndorsedDirs="${endorsed.dirs}"
- jbossHome="${jboss.home}"
- log4jConf="${log4j.conf}"
- loggingDir="${log4j.output.dir}"
- />
-
- </target>
-
- <macrodef name="wsconsume-macro">
-
- <attribute name="wsdl"/>
- <attribute name="package"/>
- <attribute name="outputDir"/>
- <attribute name="jbossHome"/>
- <attribute name="log4jConf"/>
- <attribute name="loggingDir"/>
- <attribute name="javaEndorsedDirs"/>
-
- <sequential>
- <wsconsume
- wsdl="@{wsdl}"
- package="@{package}"
- sourcedestdir="@{outputdir}/wsconsume/java"
- destdir="@{outputdir}"
- nocompile="true"
- keep="true"
- verbose="false"
- target="2.2"
- fork="true"
- >
- <jvmarg line="-Djava.endorsed.dirs=@{javaEndorsedDirs}"/>
- <jvmarg line="-Dlog4j.configuration=file://@{log4jConf}"/>
- <jvmarg line="-Dlog4j.output.dir=@{loggingDir}"/>
- </wsconsume>
- </sequential>
-
- </macrodef>
-
-</project>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/antrun-wsprovide.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project>
-
- <target name="wsprovide" description="Provide the JAX-WS contracts.">
-
- <taskdef name="wsprovide" classname="org.jboss.ws.tools.ant.WSProvideTask">
- <classpath>
- <pathelement path="${maven.test.classpath}"/>
- </classpath>
- </taskdef>
-
- </target>
-
- <macrodef name="wsprovide-macro">
-
- <attribute name="sei"/>
- <attribute name="destDir"/>
- <attribute name="jbossHome"/>
- <attribute name="outputDir"/>
- <attribute name="log4jConf"/>
- <attribute name="loggingDir"/>
- <attribute name="resourcesDir"/>
- <attribute name="javaEndorsedDirs"/>
-
- <sequential>
- <wsprovide
- sei="@{sei}"
- fork="true"
- keep="true"
- genwsdl="true"
- verbose="false"
- classpath="@{outputDir}/test-classes"
- destdir="@{outputDir}/test-classes/@{destDir}"
- resourcedestdir="@{outputDir}/test-resources/@{resourcesDir}"
- sourcedestdir="@{outputDir}/test-sources/@{resourcesDir}"
- >
- <jvmarg line="-Djava.endorsed.dirs=@{javaEndorsedDirs}"/>
- <jvmarg line="-Dlog4j.configuration=file://@{log4jConf}"/>
- <jvmarg line="-Dlog4j.output.dir=@{loggingDir}"/>
- </wsprovide>
- </sequential>
-
- </macrodef>
-
-</project>
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-benchmark.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-benchmark.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-benchmark.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project name="JBossWS Benchmarks">
-
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
-
- <target name="build-benchmark" depends="main">
- <ant antfile="src/test/ant/build-benchmark-jars.xml" target="build-benchmark-jars" inheritall="true"/>
- </target>
-
- <!-- ================================================================== -->
- <!-- Testing -->
- <!-- ================================================================== -->
-
- <!-- Run benchmark test cases -->
- <target name="tests-benchmark" depends="init" description="Run benchmark unit tests">
- <antcall target="tests-main">
- <param name="include.wildcard" value="org/jboss/test/ws/benchmark/**/*TestCase.class"/>
- </antcall>
- <antcall target="tests-report"/>
- </target>
-
-</project>
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxrpc.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -99,114 +99,6 @@
</fileset>
</jar>
- <!-- jaxrpc-benchmark -->
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-rpclit.war" webxml="${tests.output.dir}/test-resources/benchmark/jaxrpc/rpclit/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxrpc/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*_*.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*EJBEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*TestCase.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/benchmark/jaxrpc/rpclit/WEB-INF">
- <include name="jboss-web.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-rpclit.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxrpc/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*_*.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*JSEEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*TestCase.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/benchmark/jaxrpc/rpclit/META-INF">
- <include name="ejb-jar.xml"/>
- <include name="jboss-webservices.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-rpclit-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxrpc/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*_*.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*JSEEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*EJBEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*TestCase.class"/>
- <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
- </manifest>
- <metainf dir="${tests.output.dir}/test-resources/benchmark/jaxrpc/rpclit/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-rpclit-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-benchmark-rpclit-appclient.jar"/>
- </fileset>
- </jar>
- <war warfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-doclit.war" webxml="${tests.output.dir}/test-resources/benchmark/jaxrpc/doclit/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxrpc/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*_arr*/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*EJBEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*TestCase.class"/>
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/benchmark/jaxrpc/doclit/WEB-INF">
- <include name="jboss-web.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </webinf>
- </war>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-doclit.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxrpc/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*_arr*/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*JSEEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*TestCase.class"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/benchmark/jaxrpc/doclit/META-INF">
- <include name="ejb-jar.xml"/>
- <include name="jboss-webservices.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="webservices.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-doclit-appclient.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxrpc/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*_arr*/**"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*JSEEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*EJBEndpoint.class"/>
- <exclude name="org/jboss/test/ws/benchmark/jaxrpc/*TestCase.class"/>
- <include name="org/jboss/test/ws/appclient/AppclientKiller.class"/>
- </fileset>
- <manifest>
- <attribute name="main-class" value="org.jboss.test.ws.appclient.AppclientKiller"/>
- </manifest>
- <metainf dir="${tests.output.dir}/test-resources/benchmark/jaxrpc/doclit/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
- <jar destfile="${tests.output.dir}/test-libs/jaxrpc-benchmark-doclit-appclient.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxrpc-benchmark-doclit-appclient.jar"/>
- </fileset>
- </jar>
-
<!-- jaxrpc-encoded-href.war -->
<war warfile="${tests.output.dir}/test-libs/jaxrpc-encoded-href.war" webxml="${tests.output.dir}/test-resources/jaxrpc/encoded/href/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -26,55 +26,10 @@
<description>JBossWS test archive builder</description>
- <!-- ============================================================================== -->
- <!-- Building -->
- <!-- -->
- <!-- Where to create your tests -->
- <!-- http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144172#4144172 -->
- <!-- -->
- <!-- ============================================================================== -->
-
<target name="build-jars-jaxws" description="Build the deployments.">
<mkdir dir="${tests.output.dir}/test-libs" />
- <!-- jaxws-benchmark-doclit -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-benchmark-doclit.war" webxml="${tests.output.dir}/test-resources/benchmark/jaxws/doclit/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxws/**/*.class" />
- <include name="org/jboss/test/ws/benchmark/jaxws/**/*.xml" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/benchmark/jaxws/doclit/WEB-INF">
- <include name="wsdl/**" />
- </webinf>
- </war>
-
- <war warfile="${tests.output.dir}/test-libs/ri-benchmark-doclit.war" webxml="${tests.output.dir}/test-resources/benchmark/jaxws/doclit/ri/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/benchmark/jaxws/**/*.class" />
- </classes>
- <webinf dir="${tests.output.dir}/test-resources/benchmark/jaxws/doclit/ri/WEB-INF">
- <include name="wsdl/**" />
- </webinf>
- <webinf dir="${tests.output.dir}/test-resources/benchmark/jaxws/doclit/ri/WEB-INF">
- <include name="handlers.xml" />
- <include name="sun-jaxws.xml" />
- </webinf>
- </war>
-
- <!-- esb adoption -->
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-benchmark-doclit.esb">
- <metainf dir="${tests.output.dir}/test-resources/benchmark/jaxws/esb/META-INF">
- <include name="*.xml" />
- </metainf>
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-benchmark-doclit.war" />
- </fileset>
- <fileset dir="${tests.output.dir}/test-resources/benchmark/jaxws/esb">
- <include name="*.xml" />
- </fileset>
- </jar>
-
<!-- jaxws-jaxbintros -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jaxbintros.war" webxml="${tests.output.dir}/test-resources/jaxws/jaxbintros/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Deleted: stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project>
-
- <!-- ================================================================== -->
- <!-- Building -->
- <!-- ================================================================== -->
-
- <target name="build-samples-jaxws" description="Build the jaxws samples deployments">
-
- <!-- Please add alphabetically -->
-
- </target>
-
-</project>
Modified: stack/native/branches/jbossws-native-4.0.x/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-04-10 08:02:54 UTC (rev 16128)
+++ stack/native/branches/jbossws-native-4.0.x/pom.xml 2012-04-10 08:30:31 UTC (rev 16129)
@@ -51,7 +51,6 @@
<modules>
<module>modules/endorsed</module>
<module>modules/core</module>
- <module>modules/client</module>
<module>modules/resources</module>
<module>modules/services</module>
</modules>
12 years, 1 month
JBossWS SVN: r16128 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-10 04:02:54 -0400 (Tue, 10 Apr 2012)
New Revision: 16128
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3482] Default to concurrent testsuite execution, one thread per core
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2012-04-10 08:01:45 UTC (rev 16127)
+++ stack/native/trunk/modules/testsuite/pom.xml 2012-04-10 08:02:54 UTC (rev 16128)
@@ -160,6 +160,9 @@
<goal>test</goal>
</goals>
<configuration>
+ <parallel>classes</parallel>
+ <threadCount>1</threadCount>
+ <perCoreThreadCount>true</perCoreThreadCount>
<skip>false</skip>
<includes>
<include>**/*Test.java</include>
12 years, 1 month
JBossWS SVN: r16127 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2012-04-10 04:01:45 -0400 (Tue, 10 Apr 2012)
New Revision: 16127
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3482] Default to concurrent testsuite execution, one thread per core
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2012-04-10 01:06:03 UTC (rev 16126)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2012-04-10 08:01:45 UTC (rev 16127)
@@ -264,6 +264,9 @@
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>
</includes>
+ <parallel>classes</parallel>
+ <threadCount>1</threadCount>
+ <perCoreThreadCount>true</perCoreThreadCount>
<systemProperties>
<property>
<name>jboss.bind.address</name>
12 years, 1 month