You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-commits@ws.apache.org by sc...@apache.org on 2005/10/20 19:51:37 UTC
svn commit: r326958 [1/9] - in /webservices/wsrf/trunk/src:
examples/filesystem/
examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/
java/org/apache/ws/addressing/ java/org/apache/ws/addressing/handler/
java/org/apache/ws/addressing...
Author: scamp
Date: Thu Oct 20 10:50:00 2005
New Revision: 326958
URL: http://svn.apache.org/viewcvs?rev=326958&view=rev
Log: (empty)
Modified:
webservices/wsrf/trunk/src/examples/filesystem/build.xml
webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml
webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/addressing/EndpointReference.java
webservices/wsrf/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java
webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java
webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2003_03/AddressingConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_03/AddressingConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_08/AddressingConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataConfiguration.java
webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataEntry.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/AbstractPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/JndiConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/NamespaceVersionHolder.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/Resource.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCapability.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDefinition.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceHome.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/WsrfRuntime.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/AbstractBaseFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/ErrorCode.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/FaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/ResourceKeyHeaderNotFoundFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ServiceSoapMethodNameMap.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/WsddSoapMethodNameMap.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/axis/AxisConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/axis/AxisResourceContext.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/axis/GenericAxisHandler.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/websphere/WASEjbResourceContext.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/websphere/WASResourceContext.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/i18n/Keys.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceCapabilityImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceContextImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceDefinitionImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/ResourceSweeper.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/ScheduledResourceTerminationResource.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/callback/CurrentTimeCallback.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceNotDestroyedFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceUnknownFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/faults/TerminationTimeChangeRejectedFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/faults/UnableToSetTerminationTimeFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/impl/AbstractResourceTerminationEvent.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/impl/ResourceTerminationEventImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/ResourceLifetimeConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ImmediateResourceTerminationPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/ScheduledResourceTerminationPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_06/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/ResourceLifetimeConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ImmediateResourceTerminationPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/ScheduledResourceTerminationPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/lifetime/v2004_11/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/MetadataExchangePortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/metadataexchange/v2004_09/porttype/impl/MetadataExchangePortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourceProperty.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertyMetaData.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/ResourcePropertySet.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/SetResourcePropertyCallback.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/XmlBeansResourcePropertyUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidUpdateResourcePropertiesRequestContentFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/ResourcePropertyRetrievalFailedFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/faults/UpdateResourcePropertyRequestFailedFaultException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/AbstractGetResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/AbstractResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/AbstractSetResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/AnyResourcePropertyMetaData.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/XmlBeansResourceProperty.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/XmlBeansResourcePropertyMetaData.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/XmlBeansResourcePropertySet.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/impl/XmlBeansResourcePropertySetMetaData.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/ExpressionEvaluator.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/QueryEngine.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/QueryExpression.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/UnknownQueryExpressionDialectException.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/impl/QueryEngineImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/impl/XmlBeansQueryExpression.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/xpath/XPathExpression.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/xpath/impl/JaxenXPathExpressionEvaluator.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/query/xpath/impl/XalanXPathExpressionEvaluator.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/ResourcePropertiesConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetMultipleResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/GetResourcePropertyPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/QueryResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/SetResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/GetResourcePropertyPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/QueryResourcePropertiesPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_06/porttype/impl/SetResourcePropertiesPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/ResourcePropertiesConstants.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/DeleteResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/GetMultipleResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/GetResourcePropertyDocumentPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/GetResourcePropertyPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/InsertResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/QueryResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/SetResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/UpdateResourcePropertiesPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/GetResourcePropertyPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/QueryResourcePropertiesPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/properties/v2004_11/porttype/impl/SetResourcePropertiesPortTypeImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/porttype/ServiceGroupEntryPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/porttype/ServiceGroupPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/servicegroup/v2004_06/porttype/ServiceGroupRegistrationPortType.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/GenerationUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/Wsdl2JavaTask.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_06/GetMultipleResourcePropertiesPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_06/GetResourcePropertyPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_06/ImmediateResourceTerminationPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_06/QueryResourcePropertiesPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_06/ScheduledResourceTerminationPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_06/SetResourcePropertiesPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_09/MetadataExchangePortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/GetMultipleResourcePropertiesPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/GetResourcePropertyPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/ImmediateResourceTerminationPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/QueryResourcePropertiesPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/ScheduledResourceTerminationPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/porttype/v2004_11/SetResourcePropertiesPortType2JavaInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/velocity/ImplementsListBuilder.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/tool/velocity/ServiceProperties.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/webapp/WsrfServer.java
webservices/wsrf/trunk/src/java/org/apache/ws/resource/webapp/WsrfServletContextListener.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/IoUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/JaxpUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/NameUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/OperationInfo.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/SaajUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/WsdlUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/WsrfWsdlUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/XalanOutputKeys.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/XmlBeanNameUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/XmlBeanUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/ant/FileTask.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/helper/Dom2SaajConverter.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/helper/Saaj2StringConverter.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/i18n/ProjectResourceBundle.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/j2ee/WebDDMergeTask.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/j2ee/WebservicesDDMergeTask.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/BasicBeanFactory.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/BeanFactory.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/SpringJndiPopulator.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanJndiUtils.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/XmlBeanNamingContext.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/tools/JndiConfigUpdater.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jndi/tools/MetadataEntry.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jsr109/DummyEndpoint.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/jsr109/DummyEndpointImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/lock/Lock.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/lock/LockManager.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/JaxRpcPlatform.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/axis/AxisJaxRpcPlatform.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/axis/tool/WsddUpdater.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/jboss/JBossJaxRpcPlatform.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/weblogic/WeblogicJaxRpcPlatform.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/platform/websphere/WebsphereJaxRpcPlatform.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClient.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/soap/SoapClientTask.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/spring/ClassEditor.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/spring/QNameEditor.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/spring/SpringBeanObjectFactory.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/spring/SpringBeansXmlMergeTask.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/AbstractAxisTestCase.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/NotSoSimpleAxisServer.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/test/axis/NotSoSimpleAxisWorker.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/timer/TimerImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/timer/TimerManagerImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/timer/TimerTaskImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/work/WorkManagerImpl.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/xml/impl/BasicNamespaceContext.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/xml/impl/DomNamespaceContext.java
webservices/wsrf/trunk/src/java/org/apache/ws/util/xml/impl/XmlBeansNamespaceContext.java
webservices/wsrf/trunk/src/test/org/apache/ws/resource/TestBean.java
webservices/wsrf/trunk/src/test/org/apache/ws/resource/WsrfRuntimeTestCase.java
webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/AbstractResourcePropertiesTestCase.java
webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiHome.java
webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiResource.java
webservices/wsrf/trunk/src/test/org/apache/ws/resource/properties/v2004_06/porttype/impl/AbstractWsrpPortTypeImplTestCase.java
Modified: webservices/wsrf/trunk/src/examples/filesystem/build.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/examples/filesystem/build.xml?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/examples/filesystem/build.xml (original)
+++ webservices/wsrf/trunk/src/examples/filesystem/build.xml Thu Oct 20 10:50:00 2005
@@ -64,26 +64,13 @@
<wsddPaths dir="${src.dir}" includes="**/Filesystem_deploy.wsdd" />
</wsddUpdater>
- <!-- update jndi-config.wsdd using JndiConfigUpdater -->
- <taskdef name="jndiUpdater" classname="org.apache.ws.util.jndi.tools.JndiConfigUpdater" classpathref="Filesystem.classpath.id" />
- <property name="jndi.config" location="${wsrf.webapp.dir}/WEB-INF/classes/jndi-config.xml" /> <!-- normalize path -->
- <jndiUpdater jndiConfig="${jndi.config}">
- <jndiConfigPaths dir="${src.dir}" includes="**/Filesystem_jndi-config.xml" />
- </jndiUpdater>
+ <!-- update wsrf-config.xml using SpringBeansXmlMergeTask -->
+ <taskdef name="springBeansXmlMerger" classname="org.apache.ws.util.spring.SpringBeansXmlMergeTask" classpathref="Filesystem.classpath.id" />
+ <property name="wsrf.config" location="${wsrf.webapp.dir}/WEB-INF/classes/wsrf-config.xml" />
+ <springBeansXmlMerger targetFile="${wsrf.config}">
+ <sourceFiles dir="${src.dir}" includes="**/Filesystem_wsrf-config.xml" />
+ </springBeansXmlMerger>
-<!--
- <taskdef name="webDDMerge" classname="org.apache.ws.util.j2ee.WebDDMergeTask" classpathref="Filesystem.classpath.id" />
- <property name="web.xml" location="${wsrf.webapp.dir}/WEB-INF/web.xml" />
- <webDDMerge targetFile="${web.xml}">
- <sourceFiles dir="${src.dir}" includes="**/Filesystem_web.xml" />
- </webDDMerge>
-
- <taskdef name="webservicesDDMerge" classname="org.apache.ws.util.j2ee.WebservicesDDMergeTask" classpathref="Filesystem.classpath.id" />
- <property name="webservices.xml" location="${wsrf.webapp.dir}/WEB-INF/webservices.xml" />
- <webservicesDDMerge targetFile="${webservices.xml}">
- <sourceFiles dir="${src.dir}" includes="**/Filesystem_webservices.xml" />
- </webservicesDDMerge>
--->
</target>
Modified: webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml (original)
+++ webservices/wsrf/trunk/src/examples/filesystem/src/java/org/apache/ws/resource/example/filesystem/Filesystem_wsrf-config.xml Thu Oct 20 10:50:00 2005
@@ -6,7 +6,7 @@
<beans>
- <bean id="resource/filesystem" class="org.apache.ws.resource.example.filesystem.FilesystemHome" init-method="init">
+ <bean id="FilesystemHome" class="org.apache.ws.resource.example.filesystem.FilesystemHome" init-method="init">
<property name="portComponentName"><value>filesystem</value></property>
<property name="serviceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemService</value></property>
<property name="resourceClass"><value>org.apache.ws.resource.example.filesystem.FilesystemResource</value></property>
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/AddressingUtils.java Thu Oct 20 10:50:00 2005
@@ -1,108 +1,110 @@
-/*=============================================================================*
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.addressing;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-
-import org.apache.ws.util.NameUtils;
-
-/**
- * A set of WS-Addressing-related utility methods.
- */
-public abstract class AddressingUtils
-{
-
- /**
- * An array that contains the namespace URIs (as Strings) for the various versions of WSA that we support. The URIs
- * are indexed in the array in order of preference.
- */
- private static final String[] SUPPORTED_WSA_NSURIS = new String[]
- {
- org.apache.ws.addressing.v2004_08.AddressingConstants.NSURI_ADDRESSING_SCHEMA,
- org.apache.ws.addressing.v2004_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA,
- org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA
- };
-
- /**
- * @param soapHeader
- * @param headerElemName
- *
- * @return the header element with the name that was specified
- */
- public static SOAPHeaderElement getHeaderElement( SOAPHeader soapHeader, QName headerElemName )
- {
- if ( headerElemName == null )
- {
- throw new IllegalArgumentException( "Header element name must not be null." );
- }
- SOAPHeaderElement headerElem = null;
- if ( soapHeader != null )
- {
- Iterator headerElemIter = soapHeader.examineAllHeaderElements();
- while ( headerElemIter.hasNext() )
- {
- SOAPHeaderElement elem = (SOAPHeaderElement) headerElemIter.next();
- if ( NameUtils.toQName( elem.getElementName() ).equals( headerElemName ) )
- {
- headerElem = elem;
- break;
- }
- }
- }
- return headerElem;
- }
-
- /**
- * Returns the WS-Addressing namespace URI for the specified SOAP header, or null if the header is <code>null</code>
- * or does not contain any WS-Addressing header elements.
- *
- * @param soapHeader a SOAP header
- *
- * @return the WS-Addressing namespace URI for the specified SOAP header
- */
- public static String getAddressingNamespaceURI( SOAPHeader soapHeader )
- {
- String wsaNsURI = null;
- if ( soapHeader != null )
- {
- Iterator headerElemIter = soapHeader.examineAllHeaderElements();
- while ( headerElemIter.hasNext() )
- {
- SOAPHeaderElement headerElem = (SOAPHeaderElement) headerElemIter.next();
- Name headerElemName = headerElem.getElementName();
- // NOTE: Action is the only message info header that is required by all versions of WS-A
- if ( "Action".equals( headerElemName.getLocalName() ) )
- {
- for ( int i = 0; i < SUPPORTED_WSA_NSURIS.length; i++ )
- {
- if ( SUPPORTED_WSA_NSURIS[i].equals( headerElemName.getURI() ) )
- {
- wsaNsURI = SUPPORTED_WSA_NSURIS[i];
- break;
- }
- }
- }
- }
- }
- return wsaNsURI;
- }
-
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.addressing;
+
+import org.apache.ws.util.NameUtils;
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
+import java.util.Iterator;
+
+/**
+ * A set of WS-Addressing-related utility methods.
+ */
+public abstract class AddressingUtils
+{
+ /**
+ * An array that contains the namespace URIs (as Strings) for the various versions of WSA that we support. The URIs
+ * are indexed in the array in order of preference.
+ */
+ private static final String[] SUPPORTED_WSA_NSURIS =
+ new String[]
+ {
+ org.apache.ws.addressing.v2004_08.AddressingConstants.NSURI_ADDRESSING_SCHEMA,
+ org.apache.ws.addressing.v2004_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA,
+ org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA
+ };
+
+ /**
+ * Returns the WS-Addressing namespace URI for the specified SOAP header, or null if the header is <code>null</code>
+ * or does not contain any WS-Addressing header elements.
+ *
+ * @param soapHeader a SOAP header
+ *
+ * @return the WS-Addressing namespace URI for the specified SOAP header
+ */
+ public static String getAddressingNamespaceURI( SOAPHeader soapHeader )
+ {
+ String wsaNsURI = null;
+ if ( soapHeader != null )
+ {
+ Iterator headerElemIter = soapHeader.examineAllHeaderElements( );
+ while ( headerElemIter.hasNext( ) )
+ {
+ SOAPHeaderElement headerElem = (SOAPHeaderElement) headerElemIter.next( );
+ Name headerElemName = headerElem.getElementName( );
+
+ // NOTE: Action is the only message info header that is required by all versions of WS-A
+ if ( "Action".equals( headerElemName.getLocalName( ) ) )
+ {
+ for ( int i = 0; i < SUPPORTED_WSA_NSURIS.length; i++ )
+ {
+ if ( SUPPORTED_WSA_NSURIS[i].equals( headerElemName.getURI( ) ) )
+ {
+ wsaNsURI = SUPPORTED_WSA_NSURIS[i];
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return wsaNsURI;
+ }
+
+ /**
+ * @param soapHeader
+ * @param headerElemName
+ *
+ * @return the header element with the name that was specified
+ */
+ public static SOAPHeaderElement getHeaderElement( SOAPHeader soapHeader,
+ QName headerElemName )
+ {
+ if ( headerElemName == null )
+ {
+ throw new IllegalArgumentException( "Header element name must not be null." );
+ }
+
+ SOAPHeaderElement headerElem = null;
+ if ( soapHeader != null )
+ {
+ Iterator headerElemIter = soapHeader.examineAllHeaderElements( );
+ while ( headerElemIter.hasNext( ) )
+ {
+ SOAPHeaderElement elem = (SOAPHeaderElement) headerElemIter.next( );
+ if ( NameUtils.toQName( elem.getElementName( ) ).equals( headerElemName ) )
+ {
+ headerElem = elem;
+ break;
+ }
+ }
+ }
+
+ return headerElem;
+ }
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/EndpointReference.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/EndpointReference.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/EndpointReference.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/EndpointReference.java Thu Oct 20 10:50:00 2005
@@ -66,16 +66,15 @@
*/
QName getServiceName( );
- /**
- *
- * @param refProp
- */
- void addReferenceParameter( Object refProp );
-
- /**
- *
- * @param refProp
- */
- void addReferenceProperty( Object refProp );
+ /**
+ *
+ * @param refProp
+ */
+ void addReferenceParameter( Object refProp );
+ /**
+ *
+ * @param refProp
+ */
+ void addReferenceProperty( Object refProp );
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/XmlBeansEndpointReference.java Thu Oct 20 10:50:00 2005
@@ -15,12 +15,6 @@
*=============================================================================*/
package org.apache.ws.addressing;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
import org.apache.ws.XmlObjectWrapper;
import org.apache.ws.util.XmlBeanUtils;
import org.apache.xmlbeans.XmlObject;
@@ -30,6 +24,10 @@
import org.xmlsoap.schemas.ws.x2003.x03.addressing.ReferencePropertiesType;
import org.xmlsoap.schemas.ws.x2003.x03.addressing.ServiceNameType;
import org.xmlsoap.schemas.ws.x2004.x08.addressing.ReferenceParametersType;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
/**
* This class wraps XmlBean-generated XmlBeansEndpointReference types for use throughout the system.
@@ -49,10 +47,9 @@
private QName m_portTypeQName;
private String m_servicePortName;
private QName m_serviceQName;
-
private String m_addressingVersionURI;
- private List m_refParams = new ArrayList();
- private List m_refProps = new ArrayList();
+ private List m_refParams = new ArrayList( );
+ private List m_refProps = new ArrayList( );
/**
* Constructs an EPR (and the underlying XmlObject representation) given the params.
@@ -198,7 +195,7 @@
*/
public Object[] getReferenceParameters( )
{
- return m_refParams.toArray( new XmlObject[m_refParams.size()] );
+ return m_refParams.toArray( new XmlObject[m_refParams.size( )] );
}
/**
@@ -209,7 +206,7 @@
*/
public Object[] getReferenceProperties( )
{
- return m_refProps.toArray( new XmlObject[m_refParams.size()] );
+ return m_refProps.toArray( new XmlObject[m_refParams.size( )] );
}
/**
@@ -302,13 +299,50 @@
epr = endpointReferenceType;
}
}
+
return epr;
}
+ /**
+ * DOCUMENT_ME
+ *
+ * @param refProp DOCUMENT_ME
+ */
+ public void addReferenceParameter( Object refProp )
+ {
+ try
+ {
+ m_refProps.add( XmlBeanUtils.toXmlObject( refProp ) );
+ }
+ catch ( Exception e )
+ {
+ throw new IllegalArgumentException( "Unable to convert specified " + refProp.getClass( ).getName( )
+ + " object to an XmlObject." );
+ }
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param refParam DOCUMENT_ME
+ */
+ public void addReferenceProperty( Object refParam )
+ {
+ try
+ {
+ m_refParams.add( XmlBeanUtils.toXmlObject( refParam ) );
+ }
+ catch ( Exception e )
+ {
+ throw new IllegalArgumentException( "Unable to convert specified " + refParam.getClass( ).getName( )
+ + " object to an XmlObject." );
+ }
+ }
+
private static void addToHolderType( XmlObject refPropsType,
List refProps )
{
- for ( int i = 0; i < refProps.size(); i++ )
+ for ( int i = 0; i < refProps.size( ); i++ )
{
XmlObject refProp = (XmlObject) refProps.get( i );
XmlBeanUtils.addChildElement( refPropsType, refProp );
@@ -330,10 +364,11 @@
if ( m_servicePortName != null )
{
ServiceNameType serviceNameType = endpointReferenceType.addNewServiceName( );
- if(m_serviceQName != null)
+ if ( m_serviceQName != null )
{
- serviceNameType.setQNameValue(m_serviceQName);
+ serviceNameType.setQNameValue( m_serviceQName );
}
+
serviceNameType.setPortName( m_servicePortName );
}
@@ -365,17 +400,18 @@
{
org.xmlsoap.schemas.ws.x2004.x08.addressing.ServiceNameType serviceNameType =
endpointReferenceType.addNewServiceName( );
- if(m_serviceQName != null)
+ if ( m_serviceQName != null )
{
- serviceNameType.setQNameValue(m_serviceQName);
+ serviceNameType.setQNameValue( m_serviceQName );
}
+
serviceNameType.setPortName( m_servicePortName );
}
- if ( m_refProps != null )
+ if ( m_refProps != null )
{
- org.xmlsoap.schemas.ws.x2004.x08.addressing.ReferencePropertiesType refPropsType =
- endpointReferenceType.addNewReferenceProperties( );
+ org.xmlsoap.schemas.ws.x2004.x08.addressing.ReferencePropertiesType refPropsType =
+ endpointReferenceType.addNewReferenceProperties( );
addToHolderType( refPropsType, m_refProps );
}
@@ -387,28 +423,4 @@
return endpointReferenceType;
}
-
- public void addReferenceParameter( Object refProp )
- {
- try
- {
- m_refProps.add( XmlBeanUtils.toXmlObject( refProp ) );
- }
- catch ( Exception e )
- {
- throw new IllegalArgumentException( "Unable to convert specified " + refProp.getClass().getName() + " object to an XmlObject." );
- }
- }
-
- public void addReferenceProperty( Object refParam )
- {
- try
- {
- m_refParams.add( XmlBeanUtils.toXmlObject( refParam ) );
- }
- catch ( Exception e )
- {
- throw new IllegalArgumentException( "Unable to convert specified " + refParam.getClass().getName() + " object to an XmlObject." );
- }
- }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/handler/WSAddressingHandler.java Thu Oct 20 10:50:00 2005
@@ -1,183 +1,240 @@
-/*=============================================================================*
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.addressing.handler;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.MessageContext;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPHeaderElement;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.ws.Soap1_1Constants;
-import org.apache.ws.addressing.AddressingUtils;
-import org.apache.ws.resource.faults.FaultException;
-import org.apache.ws.resource.i18n.Keys;
-import org.apache.ws.resource.i18n.MessagesImpl;
-import org.apache.ws.util.NameUtils;
-import org.apache.ws.util.i18n.Messages;
-
-
-/**
- * A JAX-RPC {@link javax.xml.rpc.handler.Handler} that provides minimal support for WS-Addressing.
- *
- * @author Sal Campana
- */
-public class WSAddressingHandler extends GenericHandler
-{
- private static final Log LOG = LogFactory.getLog(WSAddressingHandler.class.getName());
- private static final Messages MSG = MessagesImpl.getInstance();
- public static final String CONTEXT_PROP_WSA_NAMESPACE_URI = "wsa.namespace.uri";
- public static final String CONTEXT_PROP_WSA_RESPONSE_ACTION = "wsa.response.action";
- public static final String CONTEXT_PROP_WSA_RESPONSE_DESTINATION = "wsa.response.destination";
- public static final String CONTEXT_PROP_WSA_REQUEST_DESTINATION = "wsa.request.destination";
- public static final String CONTEXT_PROP_WSA_REQUEST_ACTION = "wsa.request.action";
-
- public QName[] getHeaders()
- {
- return new QName[0];
- }
-
- /**
- * Checks for the required WS-Addressing Headers and adds them to the MessageContext.
- *
- * @param messageContext
- * @return always true
- */
- public boolean handleRequest(MessageContext messageContext)
- {
- SOAPMessageContext soapMsgContext = (SOAPMessageContext) messageContext;
-
- String addressingAction = getAddressingAction(soapMsgContext);
- String addressingTo = getAddressingTo(soapMsgContext);
- String addressingNamespaceURI = getAddressingNamespaceURI(soapMsgContext);
-
- soapMsgContext.setProperty(CONTEXT_PROP_WSA_NAMESPACE_URI, addressingNamespaceURI);
- soapMsgContext.setProperty(CONTEXT_PROP_WSA_REQUEST_ACTION, addressingAction);
- soapMsgContext.setProperty(CONTEXT_PROP_WSA_REQUEST_DESTINATION, addressingTo);
- return true;
- }
-
- /**
- * @param messageContext
- * @return always true
- */
- public boolean handleResponse(MessageContext messageContext)
- {
- LOG.debug(MSG.getMessage(Keys.HANDLING_RESPONSE));
-
- try
- {
- SOAPHeader header = ((SOAPMessageContext) messageContext).getMessage().getSOAPHeader();
-
- //wsa:Action
- String wsaAction = (String) messageContext.getProperty(CONTEXT_PROP_WSA_RESPONSE_ACTION); //how would this ever be null?
- if (wsaAction == null)
- {
- wsaAction = (String) messageContext.getProperty(CONTEXT_PROP_WSA_NAMESPACE_URI) + "/anonymous";
- }
-
- SOAPHeaderElement actionHeaderElem = header.addHeaderElement(NameUtils.createName("Action", "wsa", (String) messageContext.getProperty(CONTEXT_PROP_WSA_NAMESPACE_URI)));
- actionHeaderElem.setValue(wsaAction);
-
- //wsa:To
- String wsaTo = (String) messageContext.getProperty(CONTEXT_PROP_WSA_RESPONSE_DESTINATION);
- if (wsaTo == null)
- {
- wsaTo = (String) messageContext.getProperty(CONTEXT_PROP_WSA_NAMESPACE_URI) + "/anonymous";
- }
- SOAPHeaderElement toHeaderElem = header.addHeaderElement(NameUtils.createName("To", "wsa", (String) messageContext.getProperty(CONTEXT_PROP_WSA_NAMESPACE_URI)));
- toHeaderElem.setValue(wsaTo);
-
- }
- catch (SOAPException e)
- {
- LOG.error(MSG.getMessage(Keys.INTERNAL_SERVER_ERROR), e);
- throw new FaultException(Soap1_1Constants.FAULT_SERVER, "An exception occurred while adding the required WS-Addressing fields to the response.");
- }
-
- return true;
- }
-
- public static String getAddressingAction(SOAPMessageContext msgContext)
- {
- SOAPHeaderElement actionHeaderElem = AddressingUtils.getHeaderElement(getSOAPHeader(msgContext), new QName(getAddressingNamespaceURI(msgContext), "Action"));
- if (actionHeaderElem == null)
- {
- LOG.debug(MSG.getMessage(Keys.NO_WSA_ACTION));
- throw new FaultException(Soap1_1Constants.FAULT_CLIENT,
- "A WS-Addressing Action SOAP header element is required by this endpoint.");
- }
- String action = actionHeaderElem.getValue();
- try
- {
- new URI(action);
- }
- catch (URISyntaxException urise)
- {
- LOG.debug(MSG.getMessage(Keys.INVALID_WSA_ACTION, action));
- throw new FaultException(Soap1_1Constants.FAULT_CLIENT,
- "The WS-Addressing Action specified in the SOAP header is not a valid URI.");
- }
- LOG.debug(MSG.getMessage(Keys.FOUND_WSA_ACTION, action));
- return action;
- }
-
- public static SOAPHeader getSOAPHeader(SOAPMessageContext msgContext)
- {
- try
- {
- return msgContext.getMessage().getSOAPHeader();
- }
- catch (SOAPException soape)
- {
- throw new RuntimeException("Failed to extract header from SOAP message.", soape);
- }
- }
-
- public static String getAddressingNamespaceURI(SOAPMessageContext msgContext)
- {
- String wsaNsURI = (String) msgContext.getProperty(CONTEXT_PROP_WSA_NAMESPACE_URI);
- if (wsaNsURI == null)
- {
- wsaNsURI = AddressingUtils.getAddressingNamespaceURI(getSOAPHeader(msgContext));
- msgContext.setProperty(CONTEXT_PROP_WSA_NAMESPACE_URI, wsaNsURI);
- }
- return wsaNsURI;
- }
-
- public static String getAddressingTo(SOAPMessageContext msgContext)
- {
- SOAPHeaderElement toHeaderElem = AddressingUtils.getHeaderElement(getSOAPHeader(msgContext), new QName(getAddressingNamespaceURI(msgContext), "To"));
- String addressingTo;
- if (toHeaderElem == null)
- {
- LOG.debug(MSG.getMessage(Keys.NO_WSA_TO));
- throw new FaultException(Soap1_1Constants.FAULT_CLIENT,
- "A WS-Addressing To SOAP header element is required by this endpoint.");
- }
-
- addressingTo = toHeaderElem.getValue();
-
- return addressingTo;
- }
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.addressing.handler;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.Soap1_1Constants;
+import org.apache.ws.addressing.AddressingUtils;
+import org.apache.ws.resource.faults.FaultException;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.util.NameUtils;
+import org.apache.ws.util.i18n.Messages;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.handler.GenericHandler;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * A JAX-RPC {@link javax.xml.rpc.handler.Handler} that provides minimal support for WS-Addressing.
+ *
+ * @author Sal Campana
+ */
+public class WSAddressingHandler
+ extends GenericHandler
+{
+ private static final Log LOG =
+ LogFactory.getLog( WSAddressingHandler.class.getName( ) );
+ private static final Messages MSG = MessagesImpl.getInstance( );
+
+ /** DOCUMENT_ME */
+ public static final String CONTEXT_PROP_WSA_NAMESPACE_URI = "wsa.namespace.uri";
+
+ /** DOCUMENT_ME */
+ public static final String CONTEXT_PROP_WSA_RESPONSE_ACTION = "wsa.response.action";
+
+ /** DOCUMENT_ME */
+ public static final String CONTEXT_PROP_WSA_RESPONSE_DESTINATION = "wsa.response.destination";
+
+ /** DOCUMENT_ME */
+ public static final String CONTEXT_PROP_WSA_REQUEST_DESTINATION = "wsa.request.destination";
+
+ /** DOCUMENT_ME */
+ public static final String CONTEXT_PROP_WSA_REQUEST_ACTION = "wsa.request.action";
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param msgContext DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public static String getAddressingAction( SOAPMessageContext msgContext )
+ {
+ SOAPHeaderElement actionHeaderElem =
+ AddressingUtils.getHeaderElement( getSOAPHeader( msgContext ),
+ new QName( getAddressingNamespaceURI( msgContext ),
+ "Action" ) );
+ if ( actionHeaderElem == null )
+ {
+ LOG.debug( MSG.getMessage( Keys.NO_WSA_ACTION ) );
+ throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
+ "A WS-Addressing Action SOAP header element is required by this endpoint." );
+ }
+
+ String action = actionHeaderElem.getValue( );
+ try
+ {
+ new URI( action );
+ }
+ catch ( URISyntaxException urise )
+ {
+ LOG.debug( MSG.getMessage( Keys.INVALID_WSA_ACTION, action ) );
+ throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
+ "The WS-Addressing Action specified in the SOAP header is not a valid URI." );
+ }
+
+ LOG.debug( MSG.getMessage( Keys.FOUND_WSA_ACTION, action ) );
+ return action;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param msgContext DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public static String getAddressingNamespaceURI( SOAPMessageContext msgContext )
+ {
+ String wsaNsURI = (String) msgContext.getProperty( CONTEXT_PROP_WSA_NAMESPACE_URI );
+ if ( wsaNsURI == null )
+ {
+ wsaNsURI = AddressingUtils.getAddressingNamespaceURI( getSOAPHeader( msgContext ) );
+ msgContext.setProperty( CONTEXT_PROP_WSA_NAMESPACE_URI, wsaNsURI );
+ }
+
+ return wsaNsURI;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param msgContext DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public static String getAddressingTo( SOAPMessageContext msgContext )
+ {
+ SOAPHeaderElement toHeaderElem =
+ AddressingUtils.getHeaderElement( getSOAPHeader( msgContext ),
+ new QName( getAddressingNamespaceURI( msgContext ),
+ "To" ) );
+ String addressingTo;
+ if ( toHeaderElem == null )
+ {
+ LOG.debug( MSG.getMessage( Keys.NO_WSA_TO ) );
+ throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
+ "A WS-Addressing To SOAP header element is required by this endpoint." );
+ }
+
+ addressingTo = toHeaderElem.getValue( );
+
+ return addressingTo;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public QName[] getHeaders( )
+ {
+ return new QName[0];
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param msgContext DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public static SOAPHeader getSOAPHeader( SOAPMessageContext msgContext )
+ {
+ try
+ {
+ return msgContext.getMessage( ).getSOAPHeader( );
+ }
+ catch ( SOAPException soape )
+ {
+ throw new RuntimeException( "Failed to extract header from SOAP message.", soape );
+ }
+ }
+
+ /**
+ * Checks for the required WS-Addressing Headers and adds them to the MessageContext.
+ *
+ * @param messageContext
+ * @return always true
+ */
+ public boolean handleRequest( MessageContext messageContext )
+ {
+ SOAPMessageContext soapMsgContext = (SOAPMessageContext) messageContext;
+
+ String addressingAction = getAddressingAction( soapMsgContext );
+ String addressingTo = getAddressingTo( soapMsgContext );
+ String addressingNamespaceURI = getAddressingNamespaceURI( soapMsgContext );
+
+ soapMsgContext.setProperty( CONTEXT_PROP_WSA_NAMESPACE_URI, addressingNamespaceURI );
+ soapMsgContext.setProperty( CONTEXT_PROP_WSA_REQUEST_ACTION, addressingAction );
+ soapMsgContext.setProperty( CONTEXT_PROP_WSA_REQUEST_DESTINATION, addressingTo );
+ return true;
+ }
+
+ /**
+ * @param messageContext
+ * @return always true
+ */
+ public boolean handleResponse( MessageContext messageContext )
+ {
+ LOG.debug( MSG.getMessage( Keys.HANDLING_RESPONSE ) );
+
+ try
+ {
+ SOAPHeader header = ( (SOAPMessageContext) messageContext ).getMessage( ).getSOAPHeader( );
+
+ //wsa:Action
+ String wsaAction = (String) messageContext.getProperty( CONTEXT_PROP_WSA_RESPONSE_ACTION ); //how would this ever be null?
+ if ( wsaAction == null )
+ {
+ wsaAction = (String) messageContext.getProperty( CONTEXT_PROP_WSA_NAMESPACE_URI ) + "/anonymous";
+ }
+
+ SOAPHeaderElement actionHeaderElem =
+ header.addHeaderElement( NameUtils.createName( "Action", "wsa",
+ (String) messageContext.getProperty( CONTEXT_PROP_WSA_NAMESPACE_URI ) ) );
+ actionHeaderElem.setValue( wsaAction );
+
+ //wsa:To
+ String wsaTo = (String) messageContext.getProperty( CONTEXT_PROP_WSA_RESPONSE_DESTINATION );
+ if ( wsaTo == null )
+ {
+ wsaTo = (String) messageContext.getProperty( CONTEXT_PROP_WSA_NAMESPACE_URI ) + "/anonymous";
+ }
+
+ SOAPHeaderElement toHeaderElem =
+ header.addHeaderElement( NameUtils.createName( "To", "wsa",
+ (String) messageContext.getProperty( CONTEXT_PROP_WSA_NAMESPACE_URI ) ) );
+ toHeaderElem.setValue( wsaTo );
+ }
+ catch ( SOAPException e )
+ {
+ LOG.error( MSG.getMessage( Keys.INTERNAL_SERVER_ERROR ),
+ e );
+ throw new FaultException( Soap1_1Constants.FAULT_SERVER,
+ "An exception occurred while adding the required WS-Addressing fields to the response." );
+ }
+
+ return true;
+ }
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2003_03/AddressingConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2003_03/AddressingConstants.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2003_03/AddressingConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2003_03/AddressingConstants.java Thu Oct 20 10:50:00 2005
@@ -15,6 +15,7 @@
*=============================================================================*/
package org.apache.ws.addressing.v2003_03;
+
/**
* WS-Addressing 2003/03 constants.
*/
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_03/AddressingConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_03/AddressingConstants.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_03/AddressingConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_03/AddressingConstants.java Thu Oct 20 10:50:00 2005
@@ -1,34 +1,35 @@
-/*=============================================================================*
- * Copyright 2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.addressing.v2004_03;
-
-/**
- * WS-Addressing 2004/03 constants.
- */
-public interface AddressingConstants
-{
- /** DOCUMENT_ME */
- String NSURI_ADDRESSING_SCHEMA = "http://schemas.xmlsoap.org/ws/2004/03/addressing";
-
- /** DOCUMENT_ME */
- String NSPREFIX_ADDRESSING_SCHEMA = "wsa04";
-
- /** DOCUMENT_ME */
- String TO = "To";
-
- /** DOCUMENT_ME */
- String ACTION = "Action";
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.addressing.v2004_03;
+
+
+/**
+ * WS-Addressing 2004/03 constants.
+ */
+public interface AddressingConstants
+{
+ /** DOCUMENT_ME */
+ String NSURI_ADDRESSING_SCHEMA = "http://schemas.xmlsoap.org/ws/2004/03/addressing";
+
+ /** DOCUMENT_ME */
+ String NSPREFIX_ADDRESSING_SCHEMA = "wsa04";
+
+ /** DOCUMENT_ME */
+ String TO = "To";
+
+ /** DOCUMENT_ME */
+ String ACTION = "Action";
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_08/AddressingConstants.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_08/AddressingConstants.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_08/AddressingConstants.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/addressing/v2004_08/AddressingConstants.java Thu Oct 20 10:50:00 2005
@@ -15,6 +15,7 @@
*=============================================================================*/
package org.apache.ws.addressing.v2004_08;
+
/**
* WS-Addressing 2004/08 constants.
*/
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataConfiguration.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataConfiguration.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataConfiguration.java Thu Oct 20 10:50:00 2005
@@ -1,5 +1,5 @@
/*=============================================================================*
- * Copyright 2004-2005 The Apache Software Foundation
+ * Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,152 +29,178 @@
*/
public class MetadataConfiguration
{
-
- /*
- * Internal Map for storing metatdata.
- *
- * The map will have the structure of:
- *
- * key=dialect value=Map (dialect-specific Map)
- *
- * The dialect-specific Map will have the structure:
- *
- * Two Entries: key= IDENTIFIER_MAP value= A Map keyed on Identifier
- * keyed-to the metatdata
- *
- * key= COMPLETE_METADATA_LIST value= A List containing ALL metadata given
- * this dialect (this includes all entries from IDENTIFIER_MAP)
- *
- */
- private Map m_dialectToIdentifierMapMap = new HashMap();
-
- /* list of all the MetadataEntry's */
- private List m_metadataEntryList;
-
- /**
- * Creates a new <code>MetadataConfigImpl</code> object.
- */
- public MetadataConfiguration() {
- this( new ArrayList() );
- }
-
- /**
- * Creates a new <code>MetadataConfigImpl</code> object.
- *
- * @param metadataEntryList a list of {@link MetadataEntry}s
- */
- public MetadataConfiguration(List metadataEntryList) {
- m_metadataEntryList = metadataEntryList;
- initMetadataEntryMap();
- }
-
- public void addMetadataEntry(MetadataEntry metadataEntry) {
- m_metadataEntryList.add(metadataEntry);
- addToMetadataMap(metadataEntry);
- }
-
- /**
- * Returns all known metadata for all dialects.
- *
- * @return A list of all metadata
- */
- public List getAllMetadata() {
- return m_metadataEntryList;
- }
-
- /**
- * Returns the metadata given a dialect and an identifier.
- *
- * @param dialect
- * @param identifierUri
- * @return A Map keyed on dialect keyed-to a List of metadata
- */
- public Map getMetadata(String dialect, String identifierUri) {
- Map results = new HashMap();
- if ((dialect != null) && !"".equals(dialect)) // only get metatdata
- // for specific dialect
- {
- Map dialectMap = (Map) m_dialectToIdentifierMapMap.get(dialect);
- if (dialectMap != null) {
- if (identifierUri != null) {
- Object metatdata = dialectMap.get(identifierUri);
- if (metatdata != null) {
- List list = new ArrayList();
- list.add(metatdata);
- results.put(dialect, list);
- }
- } else {
- // based on dialect get all entries
- results.put(dialect, new ArrayList(dialectMap.values()));
- }
- }
- }
- // if dialect was not defined then they are saying "send all!"
- else {
- return buildDialectToListMap();
- }
- return results;
- }
-
- private Map buildDialectToListMap() {
- Map dialectToMetadataList = new HashMap();
-
- Iterator iter = m_dialectToIdentifierMapMap.keySet().iterator();
- while (iter.hasNext()) {
- String dialect = (String) iter.next();
- Map identifierMap = (Map) m_dialectToIdentifierMapMap.get(dialect);
- dialectToMetadataList.put(dialect, new ArrayList(identifierMap
- .values()));
- }
- return dialectToMetadataList;
- }
-
- /**
- * Returns metadata based on dialect
- *
- * @param dialect
- * @return A Map keyed on dialect keyed-to a List of metadata
- */
- public Map getMetadata(String dialect) {
- return getMetadata(dialect, null);
- }
-
- /**
- * Adds the specified metadata entry to the undelying lookup structures.
- *
- * precondition: The structures have already been setup for the metadata
- *
- * @param metadataEntry
- */
- protected void addToMetadataMap(MetadataEntry metadataEntry) {
- String dialect = metadataEntry.getDialect();
- String identifier = metadataEntry.getIdentifier();
- Map identifierToMetadataEntryMap = (Map) m_dialectToIdentifierMapMap
- .get(dialect);
- if (identifierToMetadataEntryMap == null) {
- // build the entries for the maps
- identifierToMetadataEntryMap = new HashMap();
- m_dialectToIdentifierMapMap.put(dialect, identifierToMetadataEntryMap );
- }
- // if there is an identifier then the metadata is registered with it
- // else it only lives in the list of all metadata
- if ((identifier != null) && !"".equals(identifier)) {
- identifierToMetadataEntryMap.put(identifier, metadataEntry);
- }
- }
-
- /**
- * Loads up lookup structures with the metadata.
- *
- * This method initializes a Map for a given dialect if it doesn't already
- * exist. The Map is keyed using 2 constants for pulling a map of
- * identifiers->metatada AND a List of all metatdata.
- */
- private synchronized void initMetadataEntryMap() {
- for (int i = 0; i < m_metadataEntryList.size(); i++) {
- MetadataEntry metadataEntry = (MetadataEntry) m_metadataEntryList.get(i);
- addToMetadataMap(metadataEntry);
- }
- }
-
-}
+ /*
+ * Internal Map for storing metatdata.
+ *
+ * The map will have the structure of:
+ *
+ * key=dialect value=Map (dialect-specific Map)
+ *
+ * The dialect-specific Map will have the structure:
+ *
+ * Two Entries: key= IDENTIFIER_MAP value= A Map keyed on Identifier
+ * keyed-to the metatdata
+ *
+ * key= COMPLETE_METADATA_LIST value= A List containing ALL metadata given
+ * this dialect (this includes all entries from IDENTIFIER_MAP)
+ *
+ */
+ private Map m_dialectToIdentifierMapMap = new HashMap( );
+
+ /* list of all the MetadataEntry's */
+ private List m_metadataEntryList;
+
+ /**
+ * Creates a new <code>MetadataConfigImpl</code> object.
+ */
+ public MetadataConfiguration( )
+ {
+ this( new ArrayList( ) );
+ }
+
+ /**
+ * Creates a new <code>MetadataConfigImpl</code> object.
+ *
+ * @param metadataEntryList a list of {@link MetadataEntry}s
+ */
+ public MetadataConfiguration( List metadataEntryList )
+ {
+ m_metadataEntryList = metadataEntryList;
+ initMetadataEntryMap( );
+ }
+
+ /**
+ * Returns all known metadata for all dialects.
+ *
+ * @return A list of all metadata
+ */
+ public List getAllMetadata( )
+ {
+ return m_metadataEntryList;
+ }
+
+ /**
+ * Returns the metadata given a dialect and an identifier.
+ *
+ * @param dialect
+ * @param identifierUri
+ * @return A Map keyed on dialect keyed-to a List of metadata
+ */
+ public Map getMetadata( String dialect,
+ String identifierUri )
+ {
+ Map results = new HashMap( );
+ if ( ( dialect != null ) && !"".equals( dialect ) ) // only get metatdata// for specific dialect
+ {
+ Map dialectMap = (Map) m_dialectToIdentifierMapMap.get( dialect );
+ if ( dialectMap != null )
+ {
+ if ( identifierUri != null )
+ {
+ Object metatdata = dialectMap.get( identifierUri );
+ if ( metatdata != null )
+ {
+ List list = new ArrayList( );
+ list.add( metatdata );
+ results.put( dialect, list );
+ }
+ }
+ else
+ {
+ // based on dialect get all entries
+ results.put( dialect,
+ new ArrayList( dialectMap.values( ) ) );
+ }
+ }
+ }
+
+ // if dialect was not defined then they are saying "send all!"
+ else
+ {
+ return buildDialectToListMap( );
+ }
+
+ return results;
+ }
+
+ /**
+ * Returns metadata based on dialect
+ *
+ * @param dialect
+ * @return A Map keyed on dialect keyed-to a List of metadata
+ */
+ public Map getMetadata( String dialect )
+ {
+ return getMetadata( dialect, null );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param metadataEntry DOCUMENT_ME
+ */
+ public void addMetadataEntry( MetadataEntry metadataEntry )
+ {
+ m_metadataEntryList.add( metadataEntry );
+ addToMetadataMap( metadataEntry );
+ }
+
+ /**
+ * Adds the specified metadata entry to the undelying lookup structures.
+ *
+ * precondition: The structures have already been setup for the metadata
+ *
+ * @param metadataEntry
+ */
+ protected void addToMetadataMap( MetadataEntry metadataEntry )
+ {
+ String dialect = metadataEntry.getDialect( );
+ String identifier = metadataEntry.getIdentifier( );
+ Map identifierToMetadataEntryMap = (Map) m_dialectToIdentifierMapMap.get( dialect );
+ if ( identifierToMetadataEntryMap == null )
+ {
+ // build the entries for the maps
+ identifierToMetadataEntryMap = new HashMap( );
+ m_dialectToIdentifierMapMap.put( dialect, identifierToMetadataEntryMap );
+ }
+
+ // if there is an identifier then the metadata is registered with it
+ // else it only lives in the list of all metadata
+ if ( ( identifier != null ) && !"".equals( identifier ) )
+ {
+ identifierToMetadataEntryMap.put( identifier, metadataEntry );
+ }
+ }
+
+ private Map buildDialectToListMap( )
+ {
+ Map dialectToMetadataList = new HashMap( );
+
+ Iterator iter = m_dialectToIdentifierMapMap.keySet( ).iterator( );
+ while ( iter.hasNext( ) )
+ {
+ String dialect = (String) iter.next( );
+ Map identifierMap = (Map) m_dialectToIdentifierMapMap.get( dialect );
+ dialectToMetadataList.put( dialect,
+ new ArrayList( identifierMap.values( ) ) );
+ }
+
+ return dialectToMetadataList;
+ }
+
+ /**
+ * Loads up lookup structures with the metadata.
+ *
+ * This method initializes a Map for a given dialect if it doesn't already
+ * exist. The Map is keyed using 2 constants for pulling a map of
+ * identifiers->metatada AND a List of all metatdata.
+ */
+ private synchronized void initMetadataEntryMap( )
+ {
+ for ( int i = 0; i < m_metadataEntryList.size( ); i++ )
+ {
+ MetadataEntry metadataEntry = (MetadataEntry) m_metadataEntryList.get( i );
+ addToMetadataMap( metadataEntry );
+ }
+ }
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataEntry.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataEntry.java?rev=326958&r1=326957&r2=326958&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataEntry.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/metadata/MetadataEntry.java Thu Oct 20 10:50:00 2005
@@ -1,203 +1,238 @@
-/*=============================================================================*
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.metadata;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.ws.addressing.XmlBeansEndpointReference;
-import org.apache.ws.addressing.v2004_08.AddressingConstants;
-import org.apache.xmlbeans.XmlObject;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceDocument;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.LocationDocument;
-import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataReferenceDocument;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * A WS-MEX metadata entry.
- */
-public class MetadataEntry
-{
-
- private static final Log LOG = LogFactory.getLog( MetadataEntry.class );
-
- private String m_dialect;
- private String m_identifier;
- private String m_location;
- private XmlObject m_metadata;
-
- public String getDialect()
- {
- return m_dialect;
- }
-
- public void setDialect( String dialect )
- {
- m_dialect = dialect;
- }
-
- public String getIdentifier()
- {
- return m_identifier;
- }
-
- public void setIdentifier( String identifier )
- {
- m_identifier = identifier;
- }
-
- public String getLocation()
- {
- return m_location;
- }
-
- public void setLocation( String location )
- {
- m_location = location;
- }
-
- public synchronized XmlObject getMetadata()
- {
- if ( m_metadata == null )
- {
- initMetadata();
- }
- return m_metadata;
- }
-
- /**
- * This method will return either a MetadataReferenceDocument, LocationDocument or an XmlObject which has the
- * metadata document parsed into it.
- * <p/>
- * The operation ALWAYS avoids loading the file if the metadata contains a MetadataReference. The operation ALWAYS
- * avoids loading the file if the metadata contains a Location which is a standard Http URL.
- * <p/>
- * The operation WILL load the file if it is a file or a file URL. The operation WILL load the file if it is located
- * in the classpath.
- * <p/>
- * Note: The "load" scenarios are handled last, and if the documents are un-loadable, null will be returned
- */
- private void initMetadata()
- {
- //check for MetadataReference...if its there, we're finished.
- XmlObject metadata = null;
-
- //determine if its a valid URL
- if ( m_location != null )
- {
- try
- {
- URL url = new URL( m_location );
-
- //if we get here then is it a file url??? if so load it
- if ( url.getProtocol().equals( "file" ) )
- {
- try
- {
- metadata = XmlObject.Factory.parse( url );
- }
- catch ( Exception e )
- {
- LOG.fatal( "*********Unable to load file from file url: " + url + " CAUSE:", e );
- }
- }
- else //if not then return a Location...let them do it....
- {
- LocationDocument locationDocument = LocationDocument.Factory.newInstance();
- locationDocument.setLocation( m_location );
- metadata = locationDocument;
- }
- }
- catch ( MalformedURLException e )
- {
- //not valid..is it a file withoud url prefix? ...load it
- File f = new File( m_location );
- if ( f.exists() )
- {
- try
- {
- metadata = XmlObject.Factory.parse( f );
- }
- catch ( Exception e1 )
- {
- LOG.fatal( "*********Unable to load file: " + f + " CAUSE:", e );
- }
- }
- else //check classpath
- {
- URL resource = this.getClass().getClassLoader().getResource( m_location );
- try
- {
- metadata = XmlObject.Factory.parse( resource );
- }
- catch ( Exception e1 )
- {
- LOG.fatal( "*********Unable to load file: " + resource + " from classpath." + " CAUSE:", e );
- }
- }
- }
- metadata = wrapEndpointReferenceType( metadata );
- }
- m_metadata = metadata;
- }
-
- private XmlObject wrapEndpointReferenceType( XmlObject metadata )
- {
- if ( m_dialect.equals( AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
- {
- if ( metadata instanceof EndpointReferenceDocument )
- {
- EndpointReferenceDocument metadataReferenceDoc = (EndpointReferenceDocument) metadata;
- metadata = createMetadataReferenceDocument(
- metadataReferenceDoc.getEndpointReference() );
- }
- else
- {
- LOG.error( "Error resolving MetadataEntry - dialect was " + m_dialect + ", but document at location " +
- m_location + " was not of type {" + m_dialect + "}EndpointReference" );
- }
- }
- else if ( m_dialect.equals( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
- {
- if ( metadata instanceof org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument )
- {
- org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument metadataReferenceDoc = (org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument) metadata;
- XmlBeansEndpointReference xmlBeansEndpointReference = new XmlBeansEndpointReference(
- metadataReferenceDoc.getEndpointReference() );
- EndpointReferenceType epr = (EndpointReferenceType) xmlBeansEndpointReference
- .getXmlObject( AddressingConstants.NSURI_ADDRESSING_SCHEMA );
- metadata = createMetadataReferenceDocument( epr );
- }
- else
- {
- LOG.error( "Error resolving MetadataEntry - dialect was " + m_dialect + ", but document at location " +
- m_location + " was not of type {" + m_dialect + "}EndpointReference" );
- }
- }
- return metadata;
- }
-
- private MetadataReferenceDocument createMetadataReferenceDocument( EndpointReferenceType epr )
- {
- MetadataReferenceDocument metadataReferenceDoc = MetadataReferenceDocument.Factory.newInstance();
- metadataReferenceDoc.setMetadataReference( epr );
- return metadataReferenceDoc;
- }
-
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.metadata;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.addressing.XmlBeansEndpointReference;
+import org.apache.ws.addressing.v2004_08.AddressingConstants;
+import org.apache.xmlbeans.XmlObject;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceDocument;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.LocationDocument;
+import org.xmlsoap.schemas.ws.x2004.x09.mex.MetadataReferenceDocument;
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * A WS-MEX metadata entry.
+ */
+public class MetadataEntry
+{
+ private static final Log LOG = LogFactory.getLog( MetadataEntry.class );
+ private String m_dialect;
+ private String m_identifier;
+ private String m_location;
+ private XmlObject m_metadata;
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param dialect DOCUMENT_ME
+ */
+ public void setDialect( String dialect )
+ {
+ m_dialect = dialect;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String getDialect( )
+ {
+ return m_dialect;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param identifier DOCUMENT_ME
+ */
+ public void setIdentifier( String identifier )
+ {
+ m_identifier = identifier;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String getIdentifier( )
+ {
+ return m_identifier;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param location DOCUMENT_ME
+ */
+ public void setLocation( String location )
+ {
+ m_location = location;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String getLocation( )
+ {
+ return m_location;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized XmlObject getMetadata( )
+ {
+ if ( m_metadata == null )
+ {
+ initMetadata( );
+ }
+
+ return m_metadata;
+ }
+
+ private MetadataReferenceDocument createMetadataReferenceDocument( EndpointReferenceType epr )
+ {
+ MetadataReferenceDocument metadataReferenceDoc = MetadataReferenceDocument.Factory.newInstance( );
+ metadataReferenceDoc.setMetadataReference( epr );
+ return metadataReferenceDoc;
+ }
+
+ /**
+ * This method will return either a MetadataReferenceDocument, LocationDocument or an XmlObject which has the
+ * metadata document parsed into it.
+ * <p/>
+ * The operation ALWAYS avoids loading the file if the metadata contains a MetadataReference. The operation ALWAYS
+ * avoids loading the file if the metadata contains a Location which is a standard Http URL.
+ * <p/>
+ * The operation WILL load the file if it is a file or a file URL. The operation WILL load the file if it is located
+ * in the classpath.
+ * <p/>
+ * Note: The "load" scenarios are handled last, and if the documents are un-loadable, null will be returned
+ */
+ private void initMetadata( )
+ {
+ //check for MetadataReference...if its there, we're finished.
+ XmlObject metadata = null;
+
+ //determine if its a valid URL
+ if ( m_location != null )
+ {
+ try
+ {
+ URL url = new URL( m_location );
+
+ //if we get here then is it a file url??? if so load it
+ if ( url.getProtocol( ).equals( "file" ) )
+ {
+ try
+ {
+ metadata = XmlObject.Factory.parse( url );
+ }
+ catch ( Exception e )
+ {
+ LOG.fatal( "*********Unable to load file from file url: " + url + " CAUSE:", e );
+ }
+ }
+ else //if not then return a Location...let them do it....
+ {
+ LocationDocument locationDocument = LocationDocument.Factory.newInstance( );
+ locationDocument.setLocation( m_location );
+ metadata = locationDocument;
+ }
+ }
+ catch ( MalformedURLException e )
+ {
+ //not valid..is it a file withoud url prefix? ...load it
+ File f = new File( m_location );
+ if ( f.exists( ) )
+ {
+ try
+ {
+ metadata = XmlObject.Factory.parse( f );
+ }
+ catch ( Exception e1 )
+ {
+ LOG.fatal( "*********Unable to load file: " + f + " CAUSE:", e );
+ }
+ }
+ else //check classpath
+ {
+ URL resource = this.getClass( ).getClassLoader( ).getResource( m_location );
+ try
+ {
+ metadata = XmlObject.Factory.parse( resource );
+ }
+ catch ( Exception e1 )
+ {
+ LOG.fatal( "*********Unable to load file: " + resource + " from classpath." + " CAUSE:", e );
+ }
+ }
+ }
+
+ metadata = wrapEndpointReferenceType( metadata );
+ }
+
+ m_metadata = metadata;
+ }
+
+ private XmlObject wrapEndpointReferenceType( XmlObject metadata )
+ {
+ if ( m_dialect.equals( AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
+ {
+ if ( metadata instanceof EndpointReferenceDocument )
+ {
+ EndpointReferenceDocument metadataReferenceDoc = (EndpointReferenceDocument) metadata;
+ metadata = createMetadataReferenceDocument( metadataReferenceDoc.getEndpointReference( ) );
+ }
+ else
+ {
+ LOG.error( "Error resolving MetadataEntry - dialect was " + m_dialect + ", but document at location "
+ + m_location + " was not of type {" + m_dialect + "}EndpointReference" );
+ }
+ }
+ else if ( m_dialect.equals( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
+ {
+ if ( metadata instanceof org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument )
+ {
+ org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument metadataReferenceDoc =
+ (org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument) metadata;
+ XmlBeansEndpointReference xmlBeansEndpointReference =
+ new XmlBeansEndpointReference( metadataReferenceDoc.getEndpointReference( ) );
+ EndpointReferenceType epr =
+ (EndpointReferenceType) xmlBeansEndpointReference.getXmlObject( AddressingConstants.NSURI_ADDRESSING_SCHEMA );
+ metadata = createMetadataReferenceDocument( epr );
+ }
+ else
+ {
+ LOG.error( "Error resolving MetadataEntry - dialect was " + m_dialect + ", but document at location "
+ + m_location + " was not of type {" + m_dialect + "}EndpointReference" );
+ }
+ }
+
+ return metadata;
+ }
+}
\ No newline at end of file