Author: thomas.diesler(a)jboss.com
Date: 2006-12-06 19:41:57 -0500 (Wed, 06 Dec 2006)
New Revision: 1587
Added:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/Constants.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/WSException.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/WSCommonConfig.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/WSConfigFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSClientConfigJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigRootJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSClientConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSCommonConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigFactoryJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigRootJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSEndpointConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedApplicationMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedBeanMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedHandlerMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedMessageDrivenMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedPortComponentRefMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedServiceRefMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedSessionMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebSecurityMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ExceptionMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaXmlTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/MethodParamPartsMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PackageMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PortMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceInterfaceMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/VariableMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlMessageMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlReturnValueMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainsMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ClientEndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/EndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ExtensibleMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/FaultMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/MetaDataExtension.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/OperationMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ParameterMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServerEndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServiceMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypeMappingMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypesMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/UnifiedMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/WrappedParameter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/PortComponentMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebserviceDescriptionMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/DOMTypes.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/Extendable.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/NCName.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingFault.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingMessageReference.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperation.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationInput.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationOutput.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitions.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDocumentation.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLEndpoint.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLException.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLFeature.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLImport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInclude.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterface.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceFault.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceMessageReference.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperation.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInfault.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInput.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutfault.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutput.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLMIMEPart.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLProperty.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCPart.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCSignatureItem.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLSOAPHeader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLService.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLTypes.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/XSModelTypes.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSErrorHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModel.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModelGroup.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamedMap.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObject.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObjectList.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSParticle.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSStringList.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/WSSchemaUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/SchemaUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/XSDWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/NameImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/IOUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavaUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavassistUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/ObjectNameFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/UUIDGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/XMLPredefinedEntityReferenceResolver.java
Removed:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/Constants.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/NameImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/WSException.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSClientConfigJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigRootJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSClientConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSCommonConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigFactoryJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigRootJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSEndpointConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedApplicationMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedBeanMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedHandlerMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedMessageDrivenMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedPortComponentRefMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedServiceRefMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedSessionMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebSecurityMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ExceptionMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaXmlTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/MethodParamPartsMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PackageMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PortMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceInterfaceMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/VariableMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlMessageMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlReturnValueMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainsMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ClientEndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/EndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ExtensibleMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/FaultMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/MetaDataExtension.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/OperationMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ParameterMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServerEndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServiceMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypeMappingMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypesMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/UnifiedMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/WrappedParameter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/PortComponentMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebserviceDescriptionMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSErrorHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModel.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModelGroup.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamedMap.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObject.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObjectList.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSParticle.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSStringList.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/WSSchemaUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/SchemaUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/XSDWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/IOUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavaUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavassistUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/ObjectNameFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/UUIDGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/XMLPredefinedEntityReferenceResolver.java
Modified:
branches/tdiesler/trunk/.classpath
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP12Binding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/EndpointInvocation.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/SOAPMessageUnMarshaller.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Deserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Serializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/NullValueSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallProxy.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Use.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/WrapperGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingExt.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingProviderImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP11BindingJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP12BindingJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPBindingJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/PortInfoImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/JAXBAccessor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/ReflectiveMethodAccessor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/MetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCDeployment.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/HandlerDelegate.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/EndpointInfo.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/NodeImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPDocument.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPHeaderElementImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/UnboundHeader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/ByteArrayContentHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/XmlDataContentHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingClientUtil.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingConstantsImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/EndpointReferenceImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxrpc/WSAddressingServerHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxws/WSAddressingServerHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/metadata/AddressingOpMetaExt.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/soap/SOAPAddressingPropertiesImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingConstants.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingEndpointBase.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/SubscriptionManagerEndpointImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpoint.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpointDI.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/metadata/EventingEpMetaExt.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/DispatcherDelegate.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/EventingBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/Subscription.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/SubscriptionManager.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/Policy.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAlternative.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAssertion.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/STRTransform.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/SecurityAdaptorFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/WSSecurityDispatcher.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxrpc/WSSecurityHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxws/WSSecurityHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/JBossXBContentAdapter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/XOPUnmarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossServiceEndpointServlet.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToXSD.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaWriter.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/RPCSignature.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSTools.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSToolsConstants.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/config/ToolsSchemaConfigReader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/JavaToXSDIntf.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/SchemaCreatorIntf.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsAnnotationMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/JBossWSTest.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPEnvelopeTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLWithAnonTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws434/JBWS434TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws775/JBWS775TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws807/TestServiceImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/JBWS812TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/ServerHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws955/JBWS955TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/outparam/OutParamDIITestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderDIITestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestServiceBean.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentDIITestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/AddrConstraintsHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventSinkServlet.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/InlineHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/asynchronous/AsynchronousDispatchTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalSourceHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanPayload.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/EndpointReferenceTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ClientHandler.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/SchemaGeneratorTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/Jaxrpc20AssertionsTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/config/globalconfig/GlobalConfigTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/enums/EnumTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaModelTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaTypesCreatorTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1170/JBWS1170TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1253/JBWS1253TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws818/JBWS818TestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardArraysTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardDoubleArraysTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/JavaWsdlMappingMetaDataTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/WebServicesMetaDataTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11Validator.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/XercesSchemaParserTestCase.java
Log:
Modified: branches/tdiesler/trunk/.classpath
===================================================================
--- branches/tdiesler/trunk/.classpath 2006-12-07 00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/.classpath 2006-12-07 00:41:57 UTC (rev 1587)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry
excluding="org/jboss/ws/integration/jboss50/ServiceRefHandler.java"
kind="src" path="src/main/java"/>
<classpathentry kind="src" path="output/tests/wstools/java"/>
<classpathentry excluding="org/jboss/test/ws/interop/" kind="src"
path="src/test/java"/>
<classpathentry kind="lib" path="thirdparty/activation.jar"/>
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/Constants.java (from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/Constants.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/Constants.java 2006-12-06
22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/Constants.java 2006-12-07 00:41:57
UTC (rev 1587)
@@ -0,0 +1,278 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws;
+
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+
+import org.jboss.ws.core.soap.NameImpl;
+
+
+/**
+ * A collection of constants relevant to JBossWS
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public interface Constants
+{
+ /** Header for XML Documents */
+ static final String XML_HEADER = "<?xml version='1.0'
encoding='UTF-8'?>";
+
+ /** Default charset for XML Documents */
+ static final String DEFAULT_XML_CHARSET = "UTF-8";
+
+ /** JBossWS namespace URI */
+ static final String NS_JBOSSWS_URI = "http://www.jboss.org/jbossws";
+ /** XML Namespace */
+ static final String NS_XML = "http://www.w3.org/XML/1998/namespace";
+ /** XMLSchema namespace
http://www.w3.org/2001/XMLSchema */
+ static final String NS_SCHEMA_XSD = "http://www.w3.org/2001/XMLSchema";
+ /** XMLSchema instance namespace
http://www.w3.org/2001/XMLSchema-instance */
+ static final String NS_SCHEMA_XSI =
"http://www.w3.org/2001/XMLSchema-instance";
+ /** SOAP-1.1 namespace
http://schemas.xmlsoap.org/wsdl/soap/ */
+ static final String NS_SOAP11 = "http://schemas.xmlsoap.org/wsdl/soap/";
+ /** SOAP-1.1 envelope namespace
http://schemas.xmlsoap.org/soap/envelope/ */
+ static final String NS_SOAP11_ENV =
"http://schemas.xmlsoap.org/soap/envelope/";
+ /** SOAP-1.2 namespace
http://schemas.xmlsoap.org/wsdl/soap12/ */
+ static final String NS_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/";
+ /** SOAP-1.2 envelope namespace
http://www.w3.org/2003/05/soap-envelope */
+ static final String NS_SOAP12_ENV =
"http://www.w3.org/2003/05/soap-envelope";
+ /** The namespace for the SwA mime type */
+ static final String NS_SWA_MIME = "http://schemas.xmlsoap.org/wsdl/mime/";
+ /** Default namespace for WSDL-1.1
http://schemas.xmlsoap.org/wsdl/ */
+ static final String NS_WSDL11 = "http://schemas.xmlsoap.org/wsdl/";
+ /** Default namespace for WSDL-2.0
http://www.w3.org/TR/wsdl20 */
+ static final String NS_WSDL20 = "http://www.w3.org/2003/11/wsdl";
+ /** The namespace for the MTOM content type attribute. */
+ static final String NS_XML_MIME = "http://www.w3.org/2005/05/xmlmime";
+ /** The namespace for XOP. */
+ static final String NS_XOP = "http://www.w3.org/2004/08/xop/include";
+
+ /** A constant representing the identity of the SOAP 1.2 over HTTP binding. */
+ static final String SOAP12HTTP_BINDING =
"http://www.w3.org/2003/05/soap/bindings/HTTP/";
+ /** A constant representing the identity of the SOAP 1.1 over HTTP binding. */
+ static final String SOAP11HTTP_BINDING =
"http://schemas.xmlsoap.org/wsdl/soap/http";
+
+ /** SOAP-1.1 encoding URI */
+ static final String URI_SOAP11_ENC =
"http://schemas.xmlsoap.org/soap/encoding/";
+ /** SOAP-1.2 encoding URI */
+ static final String URI_SOAP12_ENC =
"http://www.w3.org/2003/05/soap-encoding";
+ /** Literal encoding URI */
+ static final String URI_LITERAL_ENC = "";
+ /** WSDL 2.0 Encoding Rules */
+ static final String URI_STYLE_RPC =
"http://www.w3.org/2004/03/wsdl/style/rpc";
+ static final String URI_STYLE_IRI =
"http://www.w3.org/2004/03/wsdl/style/iri"; //represents doc
+ /**Style of WSDL */
+ static final String RPC_LITERAL = "RPC/Literal";
+ static final String DOCUMENT_LITERAL = "Document/Literal";
+
+ // Some prefixes
+ static final String PREFIX_ENV = "env";
+ static final String PREFIX_XMIME = "xmime";
+ static final String PREFIX_SOAP11 = "soap";
+ static final String PREFIX_SOAP12 = "soap12";
+ static final String PREFIX_SOAP11_ENC = "soap11-enc";
+ static final String PREFIX_TNS = "tns";
+ static final String PREFIX_WSDL = "wsdl";
+ static final String PREFIX_XOP = "xop";
+ static final String PREFIX_XSD = "xsd";
+ static final String PREFIX_XSI = "xsi";
+ static final String PREFIX_XML = "xml";
+
+ /** XOP Include */
+ static final Name NAME_XOP_INCLUDE = new NameImpl("Include", PREFIX_XOP,
NS_XOP);
+
+ /** SOAP-1.1 roles */
+ static final String URI_SOAP11_NEXT_ACTOR =
"http://schemas.xmlsoap.org/soap/actor/next";
+
+ /** SOAP-1.1 attributes */
+ static final String SOAP11_ATTR_ACTOR = "actor";
+ static final String SOAP11_ATTR_ROLE = "role";
+ static final String SOAP11_ATTR_MUST_UNDERSTAND = "mustUnderstand";
+
+ /** SOAP-1.1 fault codes */
+ static final QName SOAP11_FAULT_CODE_CLIENT = new QName(NS_SOAP11_ENV,
"Client", PREFIX_ENV);
+ static final QName SOAP11_FAULT_CODE_SERVER = new QName(NS_SOAP11_ENV,
"Server", PREFIX_ENV);
+ static final QName SOAP11_FAULT_CODE_VERSION_MISMATCH = new QName(NS_SOAP11_ENV,
"VersionMismatch", PREFIX_ENV);
+ static final QName SOAP11_FAULT_CODE_MUST_UNDERSTAND = new QName(NS_SOAP11_ENV,
"MustUnderstand", PREFIX_ENV);
+
+ /** SOAP-1.1 elements */
+ static final Name SOAP11_ENVELOPE = new NameImpl("Envelope", PREFIX_ENV,
NS_SOAP11_ENV);
+ static final Name SOAP11_HEADER = new NameImpl("Header", PREFIX_ENV,
NS_SOAP11_ENV);
+ static final Name SOAP11_BODY = new NameImpl("Body", PREFIX_ENV,
NS_SOAP11_ENV);
+ static final Name SOAP11_FAULT = new NameImpl("Fault", PREFIX_ENV,
NS_SOAP11_ENV);
+
+ /** SOAP-1.2 roles */
+ static final String URI_SOAP12_ROLE_NONE =
"http://www.w3.org/2003/05/soap-envelope/role/none";
+ static final String URI_SOAP12_ROLE_NEXT =
"http://www.w3.org/2003/05/soap-envelope/role/next";
+ static final String URI_SOAP12_ROLE_ULTIMATE_RECEIVER =
"http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
+
+ /** The default RPC return parameter name */
+ static final String DEFAULT_RPC_RETURN_NAME = "result"; // FIXME: According
to JSR-181 this should be 'return'
+
+ /** Standard Literal XML types */
+ static final QName TYPE_LITERAL_ANYSIMPLETYPE = new QName(NS_SCHEMA_XSD,
"anySimpleType", PREFIX_XSD);
+ static final QName TYPE_LITERAL_ANYTYPE = new QName(NS_SCHEMA_XSD,
"anyType", PREFIX_XSD);
+ static final QName TYPE_LITERAL_ANYURI = new QName(NS_SCHEMA_XSD, "anyURI",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_BASE64BINARY = new QName(NS_SCHEMA_XSD,
"base64Binary", PREFIX_XSD);
+ static final QName TYPE_LITERAL_BOOLEAN = new QName(NS_SCHEMA_XSD,
"boolean", PREFIX_XSD);
+ static final QName TYPE_LITERAL_BYTE = new QName(NS_SCHEMA_XSD, "byte",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_DATE = new QName(NS_SCHEMA_XSD, "date",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_DATETIME = new QName(NS_SCHEMA_XSD,
"dateTime", PREFIX_XSD);
+ static final QName TYPE_LITERAL_DECIMAL = new QName(NS_SCHEMA_XSD,
"decimal", PREFIX_XSD);
+ static final QName TYPE_LITERAL_DOUBLE = new QName(NS_SCHEMA_XSD, "double",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_DURATION = new QName(NS_SCHEMA_XSD,
"duration", PREFIX_XSD);
+ static final QName TYPE_LITERAL_FLOAT = new QName(NS_SCHEMA_XSD, "float",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_GDAY = new QName(NS_SCHEMA_XSD, "gDay",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_GMONTH = new QName(NS_SCHEMA_XSD, "gMonth",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_GMONTHDAY = new QName(NS_SCHEMA_XSD,
"gMonthDay", PREFIX_XSD);
+ static final QName TYPE_LITERAL_GYEAR = new QName(NS_SCHEMA_XSD, "gYear",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_GYEARMONTH = new QName(NS_SCHEMA_XSD,
"gYearMonth", PREFIX_XSD);
+ static final QName TYPE_LITERAL_HEXBINARY = new QName(NS_SCHEMA_XSD,
"hexBinary", PREFIX_XSD);
+ static final QName TYPE_LITERAL_ID = new QName(NS_SCHEMA_XSD, "ID",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_INT = new QName(NS_SCHEMA_XSD, "int",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_INTEGER = new QName(NS_SCHEMA_XSD,
"integer", PREFIX_XSD);
+ static final QName TYPE_LITERAL_LANGUAGE = new QName(NS_SCHEMA_XSD,
"language", PREFIX_XSD);
+ static final QName TYPE_LITERAL_LONG = new QName(NS_SCHEMA_XSD, "long",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_NAME = new QName(NS_SCHEMA_XSD, "Name",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_NCNAME = new QName(NS_SCHEMA_XSD, "NCName",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_NEGATIVEINTEGER = new QName(NS_SCHEMA_XSD,
"negativeInteger", PREFIX_XSD);
+ static final QName TYPE_LITERAL_NMTOKEN = new QName(NS_SCHEMA_XSD,
"NMTOKEN", PREFIX_XSD);
+ static final QName TYPE_LITERAL_NMTOKENS = new QName(NS_SCHEMA_XSD,
"NMTOKENS", PREFIX_XSD);
+ static final QName TYPE_LITERAL_NONNEGATIVEINTEGER = new QName(NS_SCHEMA_XSD,
"nonNegativeInteger", PREFIX_XSD);
+ static final QName TYPE_LITERAL_NONPOSITIVEINTEGER = new QName(NS_SCHEMA_XSD,
"nonPositiveInteger", PREFIX_XSD);
+ static final QName TYPE_LITERAL_NORMALIZEDSTRING = new QName(NS_SCHEMA_XSD,
"normalizedString", PREFIX_XSD);
+ static final QName TYPE_LITERAL_POSITIVEINTEGER = new QName(NS_SCHEMA_XSD,
"positiveInteger", PREFIX_XSD);
+ static final QName TYPE_LITERAL_QNAME = new QName(NS_SCHEMA_XSD, "QName",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_SHORT = new QName(NS_SCHEMA_XSD, "short",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_STRING = new QName(NS_SCHEMA_XSD, "string",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_TIME = new QName(NS_SCHEMA_XSD, "time",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_TOKEN = new QName(NS_SCHEMA_XSD, "token",
PREFIX_XSD);
+ static final QName TYPE_LITERAL_UNSIGNEDBYTE = new QName(NS_SCHEMA_XSD,
"unsignedByte", PREFIX_XSD);
+ static final QName TYPE_LITERAL_UNSIGNEDINT = new QName(NS_SCHEMA_XSD,
"unsignedInt", PREFIX_XSD);
+ static final QName TYPE_LITERAL_UNSIGNEDLONG = new QName(NS_SCHEMA_XSD,
"unsignedLong", PREFIX_XSD);
+ static final QName TYPE_LITERAL_UNSIGNEDSHORT = new QName(NS_SCHEMA_XSD,
"unsignedShort", PREFIX_XSD);
+
+ /** Standard SOAP-1.1 encoded XML types */
+ static final QName TYPE_SOAP11_ANYSIMPLETYPE = new QName(URI_SOAP11_ENC,
"anySimpleType", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_ANYTYPE = new QName(URI_SOAP11_ENC,
"anyType", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_ANYURI = new QName(URI_SOAP11_ENC, "anyURI",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_BASE64 = new QName(URI_SOAP11_ENC, "base64",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_BASE64BINARY = new QName(URI_SOAP11_ENC,
"base64Binary", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_BOOLEAN = new QName(URI_SOAP11_ENC,
"boolean", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_BYTE = new QName(URI_SOAP11_ENC, "byte",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_DATE = new QName(URI_SOAP11_ENC, "date",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_DATETIME = new QName(URI_SOAP11_ENC,
"dateTime", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_DECIMAL = new QName(URI_SOAP11_ENC,
"decimal", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_DOUBLE = new QName(URI_SOAP11_ENC, "double",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_DURATION = new QName(URI_SOAP11_ENC,
"duration", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_FLOAT = new QName(URI_SOAP11_ENC, "float",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_GDAY = new QName(URI_SOAP11_ENC, "gDay",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_GMONTH = new QName(URI_SOAP11_ENC, "gMonth",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_GMONTHDAY = new QName(URI_SOAP11_ENC,
"gMonthDay", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_GYEAR = new QName(URI_SOAP11_ENC, "gYear",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_GYEARMONTH = new QName(URI_SOAP11_ENC,
"gYearMonth", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_HEXBINARY = new QName(URI_SOAP11_ENC,
"hexBinary", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_ID = new QName(URI_SOAP11_ENC, "ID",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_INT = new QName(URI_SOAP11_ENC, "int",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_INTEGER = new QName(URI_SOAP11_ENC,
"integer", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_LANGUAGE = new QName(URI_SOAP11_ENC,
"language", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_LONG = new QName(URI_SOAP11_ENC, "long",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NAME = new QName(URI_SOAP11_ENC, "Name",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NCNAME = new QName(URI_SOAP11_ENC, "NCName",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NEGATIVEINTEGER = new QName(URI_SOAP11_ENC,
"negativeInteger", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NMTOKEN = new QName(URI_SOAP11_ENC,
"NMTOKEN", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NMTOKENS = new QName(URI_SOAP11_ENC,
"NMTOKENS", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NONNEGATIVEINTEGER = new QName(URI_SOAP11_ENC,
"nonNegativeInteger", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NONPOSITIVEINTEGER = new QName(URI_SOAP11_ENC,
"nonPositiveInteger", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_NORMALIZEDSTRING = new QName(URI_SOAP11_ENC,
"normalizedString", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_POSITIVEINTEGER = new QName(URI_SOAP11_ENC,
"positiveInteger", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_QNAME = new QName(URI_SOAP11_ENC, "QName",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_SHORT = new QName(URI_SOAP11_ENC, "short",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_STRING = new QName(URI_SOAP11_ENC, "string",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_TIME = new QName(URI_SOAP11_ENC, "time",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_TOKEN = new QName(URI_SOAP11_ENC, "token",
PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_UNSIGNEDBYTE = new QName(URI_SOAP11_ENC,
"unsignedByte", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_UNSIGNEDINT = new QName(URI_SOAP11_ENC,
"unsignedInt", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_UNSIGNEDLONG = new QName(URI_SOAP11_ENC,
"unsignedLong", PREFIX_SOAP11_ENC);
+ static final QName TYPE_SOAP11_UNSIGNEDSHORT = new QName(URI_SOAP11_ENC,
"unsignedShort", PREFIX_SOAP11_ENC);
+
+ /** Encoded mime type namespace for internall and DII use */
+ static final String NS_ATTACHMENT_MIME_TYPE =
"http://www.jboss.org/jbossws/attachment/mimetype";
+
+ /** Attachment Types */
+ static final QName TYPE_MIME_APPLICATION_XML = new QName(NS_ATTACHMENT_MIME_TYPE,
"application_xml");
+ static final QName TYPE_MIME_IMAGE_JPEG = new QName(NS_ATTACHMENT_MIME_TYPE,
"image_jpeg");
+ static final QName TYPE_MIME_IMAGE_GIF = new QName(NS_ATTACHMENT_MIME_TYPE,
"image_gif");
+ static final QName TYPE_MIME_MULTIPART_MIXED = new QName(NS_ATTACHMENT_MIME_TYPE,
"multipart_mixed");
+ static final QName TYPE_MIME_TEXT_PLAIN = new QName(NS_ATTACHMENT_MIME_TYPE,
"text_plain");
+ static final QName TYPE_MIME_TEXT_XML = new QName(NS_ATTACHMENT_MIME_TYPE,
"text_xml");
+
+ static final QName TYPE_XMIME_DEFAULT = new QName(NS_XML_MIME,
"base64Binary");
+
+ /** For out of bound transport (i.e. in headers);
http://www.w3.org/2004/08/wsdl/feature/AD/data */
+ static final String WSDL_PROPERTY_APPLICATION_DATA =
"http://www.w3.org/2004/08/wsdl/feature/AD/data";
+ /** The key to the original message part name */
+ static final String WSDL_PROPERTY_MESSAGE_NAME =
"http://www.jboss.org/jbossws/messagename";
+ /** Key to the inbound message name */
+ static final String WSDL_PROPERTY_MESSAGE_NAME_IN =
"http://www.jboss.org/jbossws/messagename/in";
+ /** Key to the outbound message name */
+ static final String WSDL_PROPERTY_MESSAGE_NAME_OUT =
"http://www.jboss.org/jbossws/messagename/out";
+ /** Key to the inboudn wsa action */
+ static final String WSDL_PROPERTY_ACTION_IN =
"http://www.jboss.org/jbossws/wsa/actionIn";
+ /** Key to the outbound wsa action */
+ static final String WSDL_PROPERTY_ACTION_OUT =
"http://www.jboss.org/jbossws/wsa/actionOut";
+
+ static final String WSDL_PROPERTY_EVENTSOURCE =
"http://www.jboss.org/jbossws/wse/isEventSource";
+
+ /** The key to the original message part name */
+ static final String WSDL_PROPERTY_PART_NAME =
"http://www.jboss.org/jbossws/partname";
+ /** The key to the message part type in case a part does not reference an element;
http://www.jboss.org/jbossws/rpc/xmltype */
+ static final String WSDL_PROPERTY_RPC_XMLTYPE =
"http://www.jboss.org/jbossws/rpc/xmltype";
+ /** Used as WSDL 2.0 property string to provide support for WSDL 1.1 mime types */
+ static final String WSDL_PROPERTY_WSDL11_MIME_TYPE = NS_ATTACHMENT_MIME_TYPE;
+ /** Indicate that the operation has zero arguments */
+ static final String WSDL_PROPERTY_ZERO_ARGS =
"http://www.jboss.org/jbossws/zero-args";
+ /** Indicate that the operation has a void return*/
+ static final String WSDL_PROPERTY_VOID_RETURN =
"http://www.jboss.org/jbossws/void-return";
+ /** Indicates that an output is a return parameter */
+ static final String WSDL_PROPERTY_RETURN_PART =
"http://www.jboss.org/jbossws/return-part";
+
+ static final QName WSDL_ATTRIBUTE_WSA_ACTION = new
QName("http://www.w3.org/2005/08/addressing", "Action");
+
+ static final QName WSDL_ATTRIBUTE_WSE_EVENTSOURCE = new
QName("http://schemas.xmlsoap.org/ws/2004/08/eventing",
"EventSource");
+
+ /** WSDL-2.0 exchange patterns */
+ static final String WSDL20_PATTERN_IN_ONLY =
"http://www.w3.org/2004/08/wsdl/in-only";
+ static final String WSDL20_PATTERN_ROUST_IN_ONLY =
"http://www.w3.org/2004/08/wsdl/robust-in-only";
+ static final String WSDL20_PATTERN_IN_OUT =
"http://www.w3.org/2004/08/wsdl/in-out";
+ static final String WSDL20_PATTERN_IN_OPTIONAL_OUT =
"http://www.w3.org/2004/08/wsdl/in-opt-out";
+ static final String WSDL20_PATTERN_OUT_ONLY =
"http://www.w3.org/2004/08/wsdl/out-only";
+ static final String WSDL20_PATTERN_ROBUST_OUT_ONLY =
"http://www.w3.org/2004/08/wsdl/robust-out-only";
+ static final String WSDL20_PATTERN_OUT_IN =
"http://www.w3.org/2004/08/wsdl/out-in";
+ static final String WSDL20_PATTERN_OUT_OPT_IN =
"http://www.w3.org/2004/08/wsdl/out-opt-in";
+
+ static final String ASYNC_METHOD_SUFFIX = "Async";
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/WSException.java (from rev
1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/WSException.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/WSException.java 2006-12-06
22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/WSException.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws;
+
+/**
+ * A RuntimeException that should be thrown when a cause is needed
+ *
+ * The retrotranslator-0.9.5 cannot handle
+ *
+ * new IllegalStateException(String, Throwable)
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06-Jan-2006
+ */
+public class WSException extends RuntimeException
+{
+ public WSException()
+ {
+ }
+
+ public WSException(String message)
+ {
+ super(message);
+ }
+
+ public WSException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public WSException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public static void rethrow(String string, Throwable th)
+ {
+ if (th instanceof WSException)
+ throw (WSException)th;
+
+ throw new WSException(string, th);
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/Constants.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/Constants.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/Constants.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,276 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common;
-
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-
-
-/**
- * A collection of constants relevant to JBossWS
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 10-Oct-2004
- */
-public interface Constants
-{
- /** Header for XML Documents */
- static final String XML_HEADER = "<?xml version='1.0'
encoding='UTF-8'?>";
-
- /** Default charset for XML Documents */
- static final String DEFAULT_XML_CHARSET = "UTF-8";
-
- /** JBossWS namespace URI */
- static final String NS_JBOSSWS_URI = "http://www.jboss.org/jbossws";
- /** XML Namespace */
- static final String NS_XML = "http://www.w3.org/XML/1998/namespace";
- /** XMLSchema namespace
http://www.w3.org/2001/XMLSchema */
- static final String NS_SCHEMA_XSD = "http://www.w3.org/2001/XMLSchema";
- /** XMLSchema instance namespace
http://www.w3.org/2001/XMLSchema-instance */
- static final String NS_SCHEMA_XSI =
"http://www.w3.org/2001/XMLSchema-instance";
- /** SOAP-1.1 namespace
http://schemas.xmlsoap.org/wsdl/soap/ */
- static final String NS_SOAP11 = "http://schemas.xmlsoap.org/wsdl/soap/";
- /** SOAP-1.1 envelope namespace
http://schemas.xmlsoap.org/soap/envelope/ */
- static final String NS_SOAP11_ENV =
"http://schemas.xmlsoap.org/soap/envelope/";
- /** SOAP-1.2 namespace
http://schemas.xmlsoap.org/wsdl/soap12/ */
- static final String NS_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/";
- /** SOAP-1.2 envelope namespace
http://www.w3.org/2003/05/soap-envelope */
- static final String NS_SOAP12_ENV =
"http://www.w3.org/2003/05/soap-envelope";
- /** The namespace for the SwA mime type */
- static final String NS_SWA_MIME = "http://schemas.xmlsoap.org/wsdl/mime/";
- /** Default namespace for WSDL-1.1
http://schemas.xmlsoap.org/wsdl/ */
- static final String NS_WSDL11 = "http://schemas.xmlsoap.org/wsdl/";
- /** Default namespace for WSDL-2.0
http://www.w3.org/TR/wsdl20 */
- static final String NS_WSDL20 = "http://www.w3.org/2003/11/wsdl";
- /** The namespace for the MTOM content type attribute. */
- static final String NS_XML_MIME = "http://www.w3.org/2005/05/xmlmime";
- /** The namespace for XOP. */
- static final String NS_XOP = "http://www.w3.org/2004/08/xop/include";
-
- /** A constant representing the identity of the SOAP 1.2 over HTTP binding. */
- static final String SOAP12HTTP_BINDING =
"http://www.w3.org/2003/05/soap/bindings/HTTP/";
- /** A constant representing the identity of the SOAP 1.1 over HTTP binding. */
- static final String SOAP11HTTP_BINDING =
"http://schemas.xmlsoap.org/wsdl/soap/http";
-
- /** SOAP-1.1 encoding URI */
- static final String URI_SOAP11_ENC =
"http://schemas.xmlsoap.org/soap/encoding/";
- /** SOAP-1.2 encoding URI */
- static final String URI_SOAP12_ENC =
"http://www.w3.org/2003/05/soap-encoding";
- /** Literal encoding URI */
- static final String URI_LITERAL_ENC = "";
- /** WSDL 2.0 Encoding Rules */
- static final String URI_STYLE_RPC =
"http://www.w3.org/2004/03/wsdl/style/rpc";
- static final String URI_STYLE_IRI =
"http://www.w3.org/2004/03/wsdl/style/iri"; //represents doc
- /**Style of WSDL */
- static final String RPC_LITERAL = "RPC/Literal";
- static final String DOCUMENT_LITERAL = "Document/Literal";
-
- // Some prefixes
- static final String PREFIX_ENV = "env";
- static final String PREFIX_XMIME = "xmime";
- static final String PREFIX_SOAP11 = "soap";
- static final String PREFIX_SOAP12 = "soap12";
- static final String PREFIX_SOAP11_ENC = "soap11-enc";
- static final String PREFIX_TNS = "tns";
- static final String PREFIX_WSDL = "wsdl";
- static final String PREFIX_XOP = "xop";
- static final String PREFIX_XSD = "xsd";
- static final String PREFIX_XSI = "xsi";
- static final String PREFIX_XML = "xml";
-
- /** XOP Include */
- static final Name NAME_XOP_INCLUDE = new NameImpl("Include", PREFIX_XOP,
NS_XOP);
-
- /** SOAP-1.1 roles */
- static final String URI_SOAP11_NEXT_ACTOR =
"http://schemas.xmlsoap.org/soap/actor/next";
-
- /** SOAP-1.1 attributes */
- static final String SOAP11_ATTR_ACTOR = "actor";
- static final String SOAP11_ATTR_ROLE = "role";
- static final String SOAP11_ATTR_MUST_UNDERSTAND = "mustUnderstand";
-
- /** SOAP-1.1 fault codes */
- static final QName SOAP11_FAULT_CODE_CLIENT = new QName(NS_SOAP11_ENV,
"Client", PREFIX_ENV);
- static final QName SOAP11_FAULT_CODE_SERVER = new QName(NS_SOAP11_ENV,
"Server", PREFIX_ENV);
- static final QName SOAP11_FAULT_CODE_VERSION_MISMATCH = new QName(NS_SOAP11_ENV,
"VersionMismatch", PREFIX_ENV);
- static final QName SOAP11_FAULT_CODE_MUST_UNDERSTAND = new QName(NS_SOAP11_ENV,
"MustUnderstand", PREFIX_ENV);
-
- /** SOAP-1.1 elements */
- static final Name SOAP11_ENVELOPE = new NameImpl("Envelope", PREFIX_ENV,
NS_SOAP11_ENV);
- static final Name SOAP11_HEADER = new NameImpl("Header", PREFIX_ENV,
NS_SOAP11_ENV);
- static final Name SOAP11_BODY = new NameImpl("Body", PREFIX_ENV,
NS_SOAP11_ENV);
- static final Name SOAP11_FAULT = new NameImpl("Fault", PREFIX_ENV,
NS_SOAP11_ENV);
-
- /** SOAP-1.2 roles */
- static final String URI_SOAP12_ROLE_NONE =
"http://www.w3.org/2003/05/soap-envelope/role/none";
- static final String URI_SOAP12_ROLE_NEXT =
"http://www.w3.org/2003/05/soap-envelope/role/next";
- static final String URI_SOAP12_ROLE_ULTIMATE_RECEIVER =
"http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver";
-
- /** The default RPC return parameter name */
- static final String DEFAULT_RPC_RETURN_NAME = "result"; // FIXME: According
to JSR-181 this should be 'return'
-
- /** Standard Literal XML types */
- static final QName TYPE_LITERAL_ANYSIMPLETYPE = new QName(NS_SCHEMA_XSD,
"anySimpleType", PREFIX_XSD);
- static final QName TYPE_LITERAL_ANYTYPE = new QName(NS_SCHEMA_XSD,
"anyType", PREFIX_XSD);
- static final QName TYPE_LITERAL_ANYURI = new QName(NS_SCHEMA_XSD, "anyURI",
PREFIX_XSD);
- static final QName TYPE_LITERAL_BASE64BINARY = new QName(NS_SCHEMA_XSD,
"base64Binary", PREFIX_XSD);
- static final QName TYPE_LITERAL_BOOLEAN = new QName(NS_SCHEMA_XSD,
"boolean", PREFIX_XSD);
- static final QName TYPE_LITERAL_BYTE = new QName(NS_SCHEMA_XSD, "byte",
PREFIX_XSD);
- static final QName TYPE_LITERAL_DATE = new QName(NS_SCHEMA_XSD, "date",
PREFIX_XSD);
- static final QName TYPE_LITERAL_DATETIME = new QName(NS_SCHEMA_XSD,
"dateTime", PREFIX_XSD);
- static final QName TYPE_LITERAL_DECIMAL = new QName(NS_SCHEMA_XSD,
"decimal", PREFIX_XSD);
- static final QName TYPE_LITERAL_DOUBLE = new QName(NS_SCHEMA_XSD, "double",
PREFIX_XSD);
- static final QName TYPE_LITERAL_DURATION = new QName(NS_SCHEMA_XSD,
"duration", PREFIX_XSD);
- static final QName TYPE_LITERAL_FLOAT = new QName(NS_SCHEMA_XSD, "float",
PREFIX_XSD);
- static final QName TYPE_LITERAL_GDAY = new QName(NS_SCHEMA_XSD, "gDay",
PREFIX_XSD);
- static final QName TYPE_LITERAL_GMONTH = new QName(NS_SCHEMA_XSD, "gMonth",
PREFIX_XSD);
- static final QName TYPE_LITERAL_GMONTHDAY = new QName(NS_SCHEMA_XSD,
"gMonthDay", PREFIX_XSD);
- static final QName TYPE_LITERAL_GYEAR = new QName(NS_SCHEMA_XSD, "gYear",
PREFIX_XSD);
- static final QName TYPE_LITERAL_GYEARMONTH = new QName(NS_SCHEMA_XSD,
"gYearMonth", PREFIX_XSD);
- static final QName TYPE_LITERAL_HEXBINARY = new QName(NS_SCHEMA_XSD,
"hexBinary", PREFIX_XSD);
- static final QName TYPE_LITERAL_ID = new QName(NS_SCHEMA_XSD, "ID",
PREFIX_XSD);
- static final QName TYPE_LITERAL_INT = new QName(NS_SCHEMA_XSD, "int",
PREFIX_XSD);
- static final QName TYPE_LITERAL_INTEGER = new QName(NS_SCHEMA_XSD,
"integer", PREFIX_XSD);
- static final QName TYPE_LITERAL_LANGUAGE = new QName(NS_SCHEMA_XSD,
"language", PREFIX_XSD);
- static final QName TYPE_LITERAL_LONG = new QName(NS_SCHEMA_XSD, "long",
PREFIX_XSD);
- static final QName TYPE_LITERAL_NAME = new QName(NS_SCHEMA_XSD, "Name",
PREFIX_XSD);
- static final QName TYPE_LITERAL_NCNAME = new QName(NS_SCHEMA_XSD, "NCName",
PREFIX_XSD);
- static final QName TYPE_LITERAL_NEGATIVEINTEGER = new QName(NS_SCHEMA_XSD,
"negativeInteger", PREFIX_XSD);
- static final QName TYPE_LITERAL_NMTOKEN = new QName(NS_SCHEMA_XSD,
"NMTOKEN", PREFIX_XSD);
- static final QName TYPE_LITERAL_NMTOKENS = new QName(NS_SCHEMA_XSD,
"NMTOKENS", PREFIX_XSD);
- static final QName TYPE_LITERAL_NONNEGATIVEINTEGER = new QName(NS_SCHEMA_XSD,
"nonNegativeInteger", PREFIX_XSD);
- static final QName TYPE_LITERAL_NONPOSITIVEINTEGER = new QName(NS_SCHEMA_XSD,
"nonPositiveInteger", PREFIX_XSD);
- static final QName TYPE_LITERAL_NORMALIZEDSTRING = new QName(NS_SCHEMA_XSD,
"normalizedString", PREFIX_XSD);
- static final QName TYPE_LITERAL_POSITIVEINTEGER = new QName(NS_SCHEMA_XSD,
"positiveInteger", PREFIX_XSD);
- static final QName TYPE_LITERAL_QNAME = new QName(NS_SCHEMA_XSD, "QName",
PREFIX_XSD);
- static final QName TYPE_LITERAL_SHORT = new QName(NS_SCHEMA_XSD, "short",
PREFIX_XSD);
- static final QName TYPE_LITERAL_STRING = new QName(NS_SCHEMA_XSD, "string",
PREFIX_XSD);
- static final QName TYPE_LITERAL_TIME = new QName(NS_SCHEMA_XSD, "time",
PREFIX_XSD);
- static final QName TYPE_LITERAL_TOKEN = new QName(NS_SCHEMA_XSD, "token",
PREFIX_XSD);
- static final QName TYPE_LITERAL_UNSIGNEDBYTE = new QName(NS_SCHEMA_XSD,
"unsignedByte", PREFIX_XSD);
- static final QName TYPE_LITERAL_UNSIGNEDINT = new QName(NS_SCHEMA_XSD,
"unsignedInt", PREFIX_XSD);
- static final QName TYPE_LITERAL_UNSIGNEDLONG = new QName(NS_SCHEMA_XSD,
"unsignedLong", PREFIX_XSD);
- static final QName TYPE_LITERAL_UNSIGNEDSHORT = new QName(NS_SCHEMA_XSD,
"unsignedShort", PREFIX_XSD);
-
- /** Standard SOAP-1.1 encoded XML types */
- static final QName TYPE_SOAP11_ANYSIMPLETYPE = new QName(URI_SOAP11_ENC,
"anySimpleType", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_ANYTYPE = new QName(URI_SOAP11_ENC,
"anyType", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_ANYURI = new QName(URI_SOAP11_ENC, "anyURI",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_BASE64 = new QName(URI_SOAP11_ENC, "base64",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_BASE64BINARY = new QName(URI_SOAP11_ENC,
"base64Binary", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_BOOLEAN = new QName(URI_SOAP11_ENC,
"boolean", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_BYTE = new QName(URI_SOAP11_ENC, "byte",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_DATE = new QName(URI_SOAP11_ENC, "date",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_DATETIME = new QName(URI_SOAP11_ENC,
"dateTime", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_DECIMAL = new QName(URI_SOAP11_ENC,
"decimal", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_DOUBLE = new QName(URI_SOAP11_ENC, "double",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_DURATION = new QName(URI_SOAP11_ENC,
"duration", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_FLOAT = new QName(URI_SOAP11_ENC, "float",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_GDAY = new QName(URI_SOAP11_ENC, "gDay",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_GMONTH = new QName(URI_SOAP11_ENC, "gMonth",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_GMONTHDAY = new QName(URI_SOAP11_ENC,
"gMonthDay", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_GYEAR = new QName(URI_SOAP11_ENC, "gYear",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_GYEARMONTH = new QName(URI_SOAP11_ENC,
"gYearMonth", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_HEXBINARY = new QName(URI_SOAP11_ENC,
"hexBinary", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_ID = new QName(URI_SOAP11_ENC, "ID",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_INT = new QName(URI_SOAP11_ENC, "int",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_INTEGER = new QName(URI_SOAP11_ENC,
"integer", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_LANGUAGE = new QName(URI_SOAP11_ENC,
"language", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_LONG = new QName(URI_SOAP11_ENC, "long",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NAME = new QName(URI_SOAP11_ENC, "Name",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NCNAME = new QName(URI_SOAP11_ENC, "NCName",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NEGATIVEINTEGER = new QName(URI_SOAP11_ENC,
"negativeInteger", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NMTOKEN = new QName(URI_SOAP11_ENC,
"NMTOKEN", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NMTOKENS = new QName(URI_SOAP11_ENC,
"NMTOKENS", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NONNEGATIVEINTEGER = new QName(URI_SOAP11_ENC,
"nonNegativeInteger", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NONPOSITIVEINTEGER = new QName(URI_SOAP11_ENC,
"nonPositiveInteger", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_NORMALIZEDSTRING = new QName(URI_SOAP11_ENC,
"normalizedString", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_POSITIVEINTEGER = new QName(URI_SOAP11_ENC,
"positiveInteger", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_QNAME = new QName(URI_SOAP11_ENC, "QName",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_SHORT = new QName(URI_SOAP11_ENC, "short",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_STRING = new QName(URI_SOAP11_ENC, "string",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_TIME = new QName(URI_SOAP11_ENC, "time",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_TOKEN = new QName(URI_SOAP11_ENC, "token",
PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_UNSIGNEDBYTE = new QName(URI_SOAP11_ENC,
"unsignedByte", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_UNSIGNEDINT = new QName(URI_SOAP11_ENC,
"unsignedInt", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_UNSIGNEDLONG = new QName(URI_SOAP11_ENC,
"unsignedLong", PREFIX_SOAP11_ENC);
- static final QName TYPE_SOAP11_UNSIGNEDSHORT = new QName(URI_SOAP11_ENC,
"unsignedShort", PREFIX_SOAP11_ENC);
-
- /** Encoded mime type namespace for internall and DII use */
- static final String NS_ATTACHMENT_MIME_TYPE =
"http://www.jboss.org/jbossws/attachment/mimetype";
-
- /** Attachment Types */
- static final QName TYPE_MIME_APPLICATION_XML = new QName(NS_ATTACHMENT_MIME_TYPE,
"application_xml");
- static final QName TYPE_MIME_IMAGE_JPEG = new QName(NS_ATTACHMENT_MIME_TYPE,
"image_jpeg");
- static final QName TYPE_MIME_IMAGE_GIF = new QName(NS_ATTACHMENT_MIME_TYPE,
"image_gif");
- static final QName TYPE_MIME_MULTIPART_MIXED = new QName(NS_ATTACHMENT_MIME_TYPE,
"multipart_mixed");
- static final QName TYPE_MIME_TEXT_PLAIN = new QName(NS_ATTACHMENT_MIME_TYPE,
"text_plain");
- static final QName TYPE_MIME_TEXT_XML = new QName(NS_ATTACHMENT_MIME_TYPE,
"text_xml");
-
- static final QName TYPE_XMIME_DEFAULT = new QName(NS_XML_MIME,
"base64Binary");
-
- /** For out of bound transport (i.e. in headers);
http://www.w3.org/2004/08/wsdl/feature/AD/data */
- static final String WSDL_PROPERTY_APPLICATION_DATA =
"http://www.w3.org/2004/08/wsdl/feature/AD/data";
- /** The key to the original message part name */
- static final String WSDL_PROPERTY_MESSAGE_NAME =
"http://www.jboss.org/jbossws/messagename";
- /** Key to the inbound message name */
- static final String WSDL_PROPERTY_MESSAGE_NAME_IN =
"http://www.jboss.org/jbossws/messagename/in";
- /** Key to the outbound message name */
- static final String WSDL_PROPERTY_MESSAGE_NAME_OUT =
"http://www.jboss.org/jbossws/messagename/out";
- /** Key to the inboudn wsa action */
- static final String WSDL_PROPERTY_ACTION_IN =
"http://www.jboss.org/jbossws/wsa/actionIn";
- /** Key to the outbound wsa action */
- static final String WSDL_PROPERTY_ACTION_OUT =
"http://www.jboss.org/jbossws/wsa/actionOut";
-
- static final String WSDL_PROPERTY_EVENTSOURCE =
"http://www.jboss.org/jbossws/wse/isEventSource";
-
- /** The key to the original message part name */
- static final String WSDL_PROPERTY_PART_NAME =
"http://www.jboss.org/jbossws/partname";
- /** The key to the message part type in case a part does not reference an element;
http://www.jboss.org/jbossws/rpc/xmltype */
- static final String WSDL_PROPERTY_RPC_XMLTYPE =
"http://www.jboss.org/jbossws/rpc/xmltype";
- /** Used as WSDL 2.0 property string to provide support for WSDL 1.1 mime types */
- static final String WSDL_PROPERTY_WSDL11_MIME_TYPE = NS_ATTACHMENT_MIME_TYPE;
- /** Indicate that the operation has zero arguments */
- static final String WSDL_PROPERTY_ZERO_ARGS =
"http://www.jboss.org/jbossws/zero-args";
- /** Indicate that the operation has a void return*/
- static final String WSDL_PROPERTY_VOID_RETURN =
"http://www.jboss.org/jbossws/void-return";
- /** Indicates that an output is a return parameter */
- static final String WSDL_PROPERTY_RETURN_PART =
"http://www.jboss.org/jbossws/return-part";
-
- static final QName WSDL_ATTRIBUTE_WSA_ACTION = new
QName("http://www.w3.org/2005/08/addressing", "Action");
-
- static final QName WSDL_ATTRIBUTE_WSE_EVENTSOURCE = new
QName("http://schemas.xmlsoap.org/ws/2004/08/eventing",
"EventSource");
-
- /** WSDL-2.0 exchange patterns */
- static final String WSDL20_PATTERN_IN_ONLY =
"http://www.w3.org/2004/08/wsdl/in-only";
- static final String WSDL20_PATTERN_ROUST_IN_ONLY =
"http://www.w3.org/2004/08/wsdl/robust-in-only";
- static final String WSDL20_PATTERN_IN_OUT =
"http://www.w3.org/2004/08/wsdl/in-out";
- static final String WSDL20_PATTERN_IN_OPTIONAL_OUT =
"http://www.w3.org/2004/08/wsdl/in-opt-out";
- static final String WSDL20_PATTERN_OUT_ONLY =
"http://www.w3.org/2004/08/wsdl/out-only";
- static final String WSDL20_PATTERN_ROBUST_OUT_ONLY =
"http://www.w3.org/2004/08/wsdl/robust-out-only";
- static final String WSDL20_PATTERN_OUT_IN =
"http://www.w3.org/2004/08/wsdl/out-in";
- static final String WSDL20_PATTERN_OUT_OPT_IN =
"http://www.w3.org/2004/08/wsdl/out-opt-in";
-
- static final String ASYNC_METHOD_SUFFIX = "Async";
-}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/NameImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/NameImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/NameImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,127 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-
-/**
- * An implementation of a Name
- * <p/>
- * At this time of writing, the spec does not say anything about null values.
- * We assume emty string for any null value.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 01-June-2004
- */
-public class NameImpl implements Name
-{
- private QName qname;
-
- public NameImpl(QName qname)
- {
- this.qname = qname;
- }
-
- public NameImpl(String local)
- {
- qname = new QName(local);
- }
-
- public NameImpl(String local, String prefix, String uri)
- {
- if (prefix != null)
- qname = new QName(uri, local, prefix);
- else
- qname = new QName(uri, local);
- }
-
- /**
- * Gets the local name part of the XML name that this Name object represents.
- *
- * @return a string giving the local name
- */
- public String getLocalName()
- {
- return qname.getLocalPart();
- }
-
- /**
- * Returns the prefix that was specified when this Name object was initialized.
- * This prefix is associated with the namespace for the XML name that this Name object
represents.
- *
- * @return the prefix as a string
- */
- public String getPrefix()
- {
- return qname.getPrefix();
- }
-
- /**
- * Gets the namespace-qualified name of the XML name that this Name object
represents.
- *
- * @return the namespace-qualified name as a string
- */
- public String getQualifiedName()
- {
- String prefix = getPrefix();
- if (prefix.length() > 0)
- return prefix + ":" + qname.getLocalPart();
- else
- return qname.getLocalPart();
- }
-
- /**
- * Returns the URI of the namespace for the XML name that this Name object
represents.
- *
- * @return the URI as a string
- */
- public String getURI()
- {
- return qname.getNamespaceURI();
- }
-
- public int hashCode()
- {
- return qname.hashCode();
- }
-
- public boolean equals(Object obj)
- {
- if (!(obj instanceof NameImpl)) return false;
- if (obj == this) return true;
- NameImpl other = (NameImpl)obj;
- return qname.equals(other.qname);
- }
-
- public QName toQName()
- {
- return qname;
- }
-
- public String toString()
- {
- return qname.toString();
- }
-}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/WSException.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/WSException.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/WSException.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common;
-
-/**
- * A RuntimeException that should be thrown when a cause is needed
- *
- * The retrotranslator-0.9.5 cannot handle
- *
- * new IllegalStateException(String, Throwable)
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 06-Jan-2006
- */
-public class WSException extends RuntimeException
-{
- public WSException()
- {
- }
-
- public WSException(String message)
- {
- super(message);
- }
-
- public WSException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
- public WSException(Throwable cause)
- {
- super(cause);
- }
-
- public static void rethrow(String string, Throwable th)
- {
- if (th instanceof WSException)
- throw (WSException)th;
-
- throw new WSException(string, th);
- }
-}
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,8 +27,8 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.UnboundHeader;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -23,13 +23,13 @@
// $Id$
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.SOAP11BindingJAXRPC;
import org.jboss.ws.core.jaxrpc.SOAP12BindingJAXRPC;
import org.jboss.ws.core.jaxws.core.SOAP11BindingJAXWS;
import org.jboss.ws.core.jaxws.core.SOAP12BindingJAXWS;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
/**
* Provides access to the protocol binding.
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,25 +35,25 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ClientEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.utils.HolderUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
+import org.jboss.ws.core.metadata.umdm.ClientEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.EndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPConnectionImpl;
import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.extras.addressing.AddressingConstantsImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,9 +29,9 @@
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.server.MessageContextPropertyHelper;
import org.jboss.xb.binding.NamespaceRegistry;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,9 +27,9 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.MessageFactoryImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP12Binding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP12Binding.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP12Binding.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,8 +26,8 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.MessageFactoryImpl;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -46,21 +46,18 @@
import org.apache.xerces.xs.XSElementDeclaration;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.TypesMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.utils.MimeUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.TypesMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPBodyElementDoc;
import org.jboss.ws.core.soap.SOAPBodyElementRpc;
import org.jboss.ws.core.soap.SOAPContentElement;
@@ -72,6 +69,9 @@
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.soap.attachment.AttachmentPartImpl;
import org.jboss.ws.core.soap.attachment.CIDGenerator;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.core.utils.MimeUtils;
import org.jboss.ws.extras.xop.XOPContext;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.Element;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -38,15 +38,15 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.utils.HolderUtils;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.utils.MimeUtils;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.core.utils.MimeUtils;
/** A web service invocation.
*
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/SOAPMessageUnMarshaller.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/SOAPMessageUnMarshaller.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/SOAPMessageUnMarshaller.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -38,7 +38,7 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.marshal.UnMarshaller;
import org.jboss.remoting.transport.http.HTTPMetadataConstants;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.soap.MessageFactoryImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Deserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Deserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Deserializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,11 +28,11 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extras.xop.XOPContext;
import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
import org.jboss.xb.binding.SimpleTypeBindings;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Serializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Serializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Serializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,10 +26,10 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extras.xop.XOPContext;
import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
import org.jboss.xb.binding.NamespaceRegistry;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import javax.xml.rpc.encoding.Deserializer;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.utils.XMLPredefinedEntityReferenceResolver;
+import org.jboss.ws.core.utils.XMLPredefinedEntityReferenceResolver;
/** The base class for all Deserializers.
*
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,10 +26,10 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,10 +26,10 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,10 +26,10 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,7 +29,6 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeDeserializer;
import org.jboss.ws.core.binding.SerializationContext;
@@ -37,6 +36,7 @@
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshaller;
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
* A Deserializer that can handle complex types by delegating to JAXB.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,7 +29,6 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeSerializer;
import org.jboss.ws.core.binding.SerializationContext;
@@ -38,6 +37,7 @@
import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.core.binding.jbossxb.XercesXSMarshallerImpl;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.w3c.dom.NamedNodeMap;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/NullValueSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/NullValueSerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/NullValueSerializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,10 +28,10 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,16 +31,16 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.JavaUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,14 +26,14 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.utils.JavaUtils;
import org.w3c.dom.NamedNodeMap;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,10 +29,10 @@
import javax.xml.soap.SOAPFactory;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,10 +27,10 @@
import javax.xml.soap.SOAPElement;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.NamedNodeMap;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import javax.xml.rpc.encoding.Serializer;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,11 +32,11 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
import org.jboss.xb.binding.Constants;
import org.jboss.xb.binding.sunday.marshalling.MarshallerImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -4,12 +4,12 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.xb.binding.MarshallingContext;
import org.jboss.xb.binding.ObjectLocalMarshaller;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import java.io.InputStream;
import java.util.HashMap;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.UnmarshallerFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,14 +35,14 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ExceptionMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ExceptionMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
import org.jboss.ws.extras.xop.jaxrpc.JBossXBContentAdapter;
import org.jboss.xb.binding.metadata.ClassMetaData;
import org.jboss.xb.binding.metadata.PackageMetaData;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,11 +33,11 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.xb.binding.Constants;
import org.jboss.xb.binding.MappingObjectModelProvider;
import org.jboss.xb.binding.XercesXsMarshaller;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -45,22 +45,22 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.TypesMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
import org.jboss.ws.core.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.TypesMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extras.xop.XOPContext;
/** Provides support for the dynamic invocation of a service endpoint.
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallProxy.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallProxy.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallProxy.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -38,10 +38,10 @@
import javax.xml.rpc.soap.SOAPFaultException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* The dynamic proxy that delegates to the underlying Call implementation
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,7 +33,7 @@
import javax.xml.soap.SOAPElement;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.binding.Base64DeserializerFactory;
import org.jboss.ws.core.binding.Base64SerializerFactory;
import org.jboss.ws.core.binding.CalendarDeserializerFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/HandlerRegistryImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,11 +35,11 @@
import javax.xml.rpc.handler.HandlerRegistry;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.jaxrpc.handler.ClientHandlerChain;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
/**
* Provides support for the programmatic configuration of
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,7 +31,7 @@
import javax.xml.transform.Source;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.binding.ElementDeserializerFactory;
import org.jboss.ws.core.binding.ElementSerializerFactory;
import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -40,18 +40,18 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.TypeMappingMetaData;
-import org.jboss.ws.common.metadata.umdm.TypesMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.utils.HolderUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
import org.jboss.ws.core.binding.JBossXBSerializerFactory;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.TypeMappingMetaData;
+import org.jboss.ws.core.metadata.umdm.TypesMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.JavaUtils;
/** A helper class to wrap/unwrap ducument style request/response structures.
*
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,8 +25,8 @@
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.CommonSOAP11Binding;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.SOAPFaultImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,8 +25,8 @@
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.CommonSOAP12Binding;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.SOAPFaultImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPBindingJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,8 +28,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -43,13 +43,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerFactoryBase;
@@ -57,10 +52,15 @@
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerFactoryBase;
import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,8 +30,8 @@
import javax.xml.rpc.JAXRPCException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.JavaToXSD;
/** A generator for XML schema that is used by unconfigured DII clients
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,18 +27,18 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.TypesMetaData;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.TypesMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* The serialization context for JAXRPC endpoints/clients
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -38,13 +38,13 @@
import javax.xml.rpc.handler.HandlerChain;
import javax.xml.rpc.handler.HandlerRegistry;
-import org.jboss.ws.common.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
+import org.jboss.ws.core.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -56,17 +56,17 @@
import javax.xml.rpc.handler.HandlerInfo;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.j2ee.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.core.server.ServiceEndpoint;
import org.jboss.ws.core.server.ServiceEndpointManager;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceReferenceable.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,9 +35,9 @@
import javax.naming.Referenceable;
import javax.naming.StringRefAddr;
-import org.jboss.ws.common.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfigurationFactory;
import org.jboss.ws.core.server.ServiceEndpointManager;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/StubExt.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -39,8 +39,7 @@
import javax.xml.rpc.encoding.TypeMapping;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.binding.Base64DeserializerFactory;
import org.jboss.ws.core.binding.Base64SerializerFactory;
import org.jboss.ws.core.binding.CalendarDeserializerFactory;
@@ -53,6 +52,7 @@
import org.jboss.ws.core.binding.QNameSerializerFactory;
import org.jboss.ws.core.binding.SimpleDeserializerFactory;
import org.jboss.ws.core.binding.SimpleSerializerFactory;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* This is the representation of a type mapping.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,7 +31,7 @@
import javax.xml.rpc.encoding.TypeMappingRegistry;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
* This defines a registry of TypeMapping instances for encoding styles.
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Use.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Use.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Use.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.core.jaxrpc;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -47,12 +47,12 @@
import javax.xml.soap.SOAPPart;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.SOAPElementImpl;
import org.jboss.ws.core.soap.SOAPElementWriter;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,11 +34,11 @@
import javax.xml.rpc.handler.HandlerInfo;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.server.HandlerDelegate;
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,11 +26,11 @@
import javax.xml.rpc.handler.MessageContext;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,7 +28,7 @@
import javax.xml.rpc.handler.MessageContext;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
/**
* Represents a list of handlers. All elements in the
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -43,15 +43,15 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.TypeMappingMetaData;
-import org.jboss.ws.common.metadata.umdm.TypesMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.utils.JavassistUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.TypeMappingMetaData;
+import org.jboss.ws.core.metadata.umdm.TypesMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.core.utils.JavassistUtils;
public class DynamicWrapperGenerator extends WrapperGenerator
{
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/WrapperGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/WrapperGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/WrapperGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,8 +28,8 @@
import java.util.SortedMap;
import java.util.TreeMap;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -40,9 +40,6 @@
import javax.xml.ws.soap.SOAPFaultException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
@@ -52,6 +49,9 @@
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.MessageContextAssociation;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -43,11 +43,11 @@
import javax.xml.ws.soap.SOAPFaultException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* The dynamic proxy that delegates to the underlying client implementation
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -51,11 +51,11 @@
import javax.xml.ws.Service.Mode;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.jaxws.core.BindingProviderImpl;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPConnectionImpl;
+import org.jboss.ws.core.utils.DOMWriter;
/**
* The Dispatch interface provides support for the dynamic invocation of a service
endpoint operations.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingExt.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingExt.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingExt.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import javax.xml.ws.Binding;
import javax.xml.ws.handler.Handler;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,7 +30,7 @@
import javax.xml.ws.handler.Handler;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
/**
* The Binding interface is the base interface for JAXWS protocol bindings.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingProviderImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingProviderImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/BindingProviderImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,9 +33,9 @@
import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPBinding;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
/**
* The BindingProvider interface provides access to the protocol binding and associated
context objects
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,11 +31,11 @@
import javax.xml.ws.http.HTTPBinding;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.UnboundHeader;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,14 +32,14 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.UnboundHeader;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,15 +33,15 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.SOAPBodyImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP11BindingJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP11BindingJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP11BindingJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,10 +32,10 @@
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.SOAPBinding;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonSOAP11Binding;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.SOAPFaultImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP12BindingJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP12BindingJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAP12BindingJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,10 +33,10 @@
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.SOAPBinding;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonSOAP12Binding;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.SOAPFaultImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPBindingJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPBindingJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPBindingJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,8 +32,8 @@
import javax.xml.ws.BindingProvider;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -38,12 +38,7 @@
import javax.xml.ws.soap.SOAPFaultException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerFactoryBase;
@@ -52,8 +47,13 @@
import org.jboss.ws.core.binding.SerializerFactoryBase;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,11 +34,11 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
+import org.jboss.ws.core.utils.DOMWriter;
/**
* Executes a list of JAXWS handlers.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,9 +31,9 @@
import javax.xml.ws.handler.PortInfo;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.server.HandlerDelegate;
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -39,13 +39,13 @@
import javax.xml.ws.soap.SOAPBinding;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaDataJAXWS;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaDataJAXWS;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
/**
* HandlerResolver is an interface implemented by an application to get control over
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,11 +30,11 @@
import javax.xml.ws.handler.MessageContext;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/PortInfoImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/PortInfoImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/PortInfoImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.handler.PortInfo;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
/**
* The PortInfo interface is used by a HandlerResolver to query information about the
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -44,18 +44,18 @@
import javax.xml.ws.spi.ServiceDelegate;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.ClientEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.Constants;
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.handler.HandlerResolverImpl;
import org.jboss.ws.core.metadata.builder.jaxws.JAXWSClientEndpointMetaDataBuilder;
import org.jboss.ws.core.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
+import org.jboss.ws.core.metadata.umdm.ClientEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
/**
* Service delegates are used internally by Service objects to allow pluggability of
JAX-WS implementations.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/JAXBAccessor.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/JAXBAccessor.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/JAXBAccessor.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,12 +24,12 @@
import javax.xml.bind.JAXBException;
import javax.xml.namespace.QName;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData.AccessorFactoryCreator;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter.Accessor;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter.AccessorFactory;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData.AccessorFactoryCreator;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter.Accessor;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter.AccessorFactory;
import com.sun.xml.bind.api.AccessorException;
import com.sun.xml.bind.api.JAXBRIContext;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/ReflectiveMethodAccessor.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/ReflectiveMethodAccessor.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/acessor/ReflectiveMethodAccessor.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,12 +24,12 @@
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData.AccessorFactoryCreator;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter.Accessor;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter.AccessorFactory;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData.AccessorFactoryCreator;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter.Accessor;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter.AccessorFactory;
/**
* A simple JavaBean accessor that uses ordinary reflection.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/MetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/MetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/MetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -43,33 +43,33 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedMessageDrivenMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebSecurityMetaData;
-import
org.jboss.ws.common.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
-import org.jboss.ws.common.metadata.umdm.ClientEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.utils.ObjectNameFactory;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonSOAPBinding;
import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebSecurityMetaData;
+import
org.jboss.ws.core.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
+import org.jboss.ws.core.metadata.umdm.ClientEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfigurationFactory;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.utils.ObjectNameFactory;
import org.w3c.dom.Element;
/** An abstract meta data builder.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,24 +30,24 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.config.jaxrpc.WSClientConfigJAXRPC;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.umdm.ClientEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.config.jaxrpc.WSClientConfigJAXRPC;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.umdm.ClientEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfigurationFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCDeployment.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCDeployment.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCDeployment.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,8 +24,8 @@
import java.io.InputStream;
import java.net.URL;
-import org.jboss.ws.common.metadata.webservices.WebservicesFactory;
-import org.jboss.ws.common.metadata.webservices.WebservicesMetaData;
+import org.jboss.ws.core.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.core.metadata.webservices.WebservicesMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.Unmarshaller;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,49 +36,8 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ExceptionMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlMessageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlReturnValueMapping;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.TypeMappingMetaData;
-import org.jboss.ws.common.metadata.umdm.TypesMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLMIMEPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLProperty;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
@@ -86,6 +45,47 @@
import org.jboss.ws.core.jaxrpc.UnqualifiedFaultException;
import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.metadata.builder.MetaDataBuilder;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ExceptionMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.MethodParamPartsMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlMessageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlReturnValueMapping;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.TypeMappingMetaData;
+import org.jboss.ws.core.metadata.umdm.TypesMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLMIMEPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLProperty;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem;
+import org.jboss.ws.core.metadata.wsdl.WSDLSOAPHeader;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extras.addressing.AddressingPropertiesImpl;
import org.jboss.ws.extras.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.extras.eventing.EventingConstants;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,25 +28,25 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.config.jaxrpc.WSEndpointConfigJAXRPC;
-import org.jboss.ws.common.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.metadata.webservices.PortComponentMetaData;
-import org.jboss.ws.common.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.config.jaxrpc.WSEndpointConfigJAXRPC;
+import org.jboss.ws.core.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.core.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientEndpointMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,9 +27,9 @@
import javax.xml.ws.BindingType;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.config.jaxws.WSClientConfigJAXWS;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.config.jaxws.WSClientConfigJAXWS;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
/**
* A client side meta data builder that is based on JSR-181 annotations
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,25 +29,25 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ClientEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.umdm.ClientEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
/**
* A client side meta data builder.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSEndpointMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,9 +25,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.annotation.PortComponent;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB21.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,10 +25,10 @@
import java.util.Iterator;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,10 +28,10 @@
import org.jboss.annotation.security.SecurityDomain;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,9 +25,9 @@
import java.util.Map;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,18 +35,18 @@
import javax.xml.ws.Service.Mode;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.metadata.builder.MetaDataBuilder;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* A server side meta data builder that is based on JSR-181 annotations
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import javax.jws.WebService;
import javax.xml.ws.WebServiceProvider;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/** An abstract annotation meta data builder.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -59,39 +59,39 @@
import javax.xml.ws.addressing.AddressingProperties;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.config.jaxws.WSEndpointConfigJAXWS;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainFactory;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainsMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.TypeMappingMetaData;
-import org.jboss.ws.common.metadata.umdm.TypesMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.HolderUtils;
-import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.jaxws.WrapperGenerator;
import org.jboss.ws.core.metadata.acessor.JAXBAccessor;
import org.jboss.ws.core.metadata.builder.MetaDataBuilder;
+import org.jboss.ws.core.metadata.config.jaxws.WSEndpointConfigJAXWS;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainFactory;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainsMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.TypeMappingMetaData;
+import org.jboss.ws.core.metadata.umdm.TypesMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extras.addressing.AddressingPropertiesImpl;
import org.jboss.ws.extras.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/WSCommonConfig.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/WSCommonConfig.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/WSCommonConfig.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/WSCommonConfig.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config;
+
+//$Id$
+
+import java.util.List;
+
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * A common configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public abstract class WSCommonConfig
+{
+ private String configName;
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public abstract List<HandlerMetaData> getHandlers(EndpointMetaData epMetaData,
HandlerType type);
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/WSConfigFactory.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/WSConfigFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/WSConfigFactory.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/WSConfigFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.config.jaxrpc.WSConfigFactoryJAXRPC;
+import org.jboss.ws.core.metadata.config.jaxws.WSConfigFactoryJAXWS;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
+import org.w3c.dom.Element;
+
+/**
+ * A factory for the JBossWS endpoint/client configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSConfigFactory
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(WSConfigFactory.class);
+
+ private static String URN_JAXRPC_CONFIG = "urn:jboss:jaxrpc-config:2.0";
+ private static String URN_JAXWS_CONFIG = "urn:jboss:jaxws-config:2.0";
+
+ // Hide constructor
+ private WSConfigFactory()
+ {
+ }
+
+ /** Create a new instance of the factory
+ */
+ public static WSConfigFactory newInstance()
+ {
+ return new WSConfigFactory();
+ }
+
+ public Object parseWithSchemaBinding(URL configURL) throws IOException,
JBossXBException
+ {
+ log.debug("parse: " + configURL);
+
+ String configSchema = "schema/jaxrpc-config_2_0.xsd";
+ URL xsdURL =
Thread.currentThread().getContextClassLoader().getResource(configSchema);
+ if (xsdURL == null)
+ throw new WSException("Cannot find: " + configSchema);
+
+ InputStream xsd = xsdURL.openStream();
+ SchemaBinding schemaBinding = XsdBinder.bind(xsd, "UTF-8");
+
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setValidation(true);
+ unmarshaller.setSchemaValidation(true);
+ unmarshaller.setEntityResolver(new JBossWSEntityResolver());
+ Object wsConfig = unmarshaller.unmarshal(configURL.openStream(), schemaBinding);
+ return wsConfig;
+ }
+
+ // Below is ObjectModelFactory stuff, which should be removed when
parseWithSchemaBinding works.
+
+ public Object parseWithObjectModelFactory(URL configURL) throws IOException,
JBossXBException
+ {
+ log.debug("parse: " + configURL);
+
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setValidation(true);
+ unmarshaller.setSchemaValidation(true);
+
+ Object wsConfig;
+ String nsURI = getNamespaceURI(configURL);
+ if (URN_JAXRPC_CONFIG.equals(nsURI))
+ {
+ wsConfig = unmarshaller.unmarshal(configURL.openStream(), new
WSConfigFactoryJAXRPC(), null);
+ }
+ else if (URN_JAXWS_CONFIG.equals(nsURI))
+ {
+ wsConfig = unmarshaller.unmarshal(configURL.openStream(), new
WSConfigFactoryJAXWS(), null);
+ }
+ else
+ {
+ throw new WSException("Invalid config namespace: " + nsURI);
+ }
+
+ return wsConfig;
+ }
+
+ private String getNamespaceURI(URL configURL)
+ {
+ try
+ {
+ Element root = DOMUtils.parse(configURL.openStream());
+ return root.getNamespaceURI();
+ }
+ catch (IOException ex)
+ {
+ throw new WSException(ex);
+ }
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSClientConfigJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSClientConfigJAXRPC.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSClientConfigJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxrpc;
-
-
-// $Id$
-
-/**
- * A JBossWS client configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSClientConfigJAXRPC extends WSCommonConfigJAXRPC
-{
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSClientConfigJAXRPC.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSClientConfigJAXRPC.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSClientConfigJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSClientConfigJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxrpc;
+
+
+// $Id$
+
+/**
+ * A JBossWS client configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSClientConfigJAXRPC extends WSCommonConfigJAXRPC
+{
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxrpc;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.common.metadata.config.WSCommonConfig;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-
-
-// $Id$
-
-/**
- * A JBossWS client configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public abstract class WSCommonConfigJAXRPC extends WSCommonConfig
-{
- private HandlerChainMetaData preHandlerChain;
- private HandlerChainMetaData postHandlerChain;
-
- public HandlerChainMetaData getPostHandlerChain()
- {
- return postHandlerChain;
- }
-
- public void setPostHandlerChain(HandlerChainMetaData postHandlerChain)
- {
- this.postHandlerChain = postHandlerChain;
- }
-
- public HandlerChainMetaData getPreHandlerChain()
- {
- return preHandlerChain;
- }
-
- public void setPreHandlerChain(HandlerChainMetaData preHandlerChain)
- {
- this.preHandlerChain = preHandlerChain;
- }
-
- @Override
- public List<HandlerMetaData> getHandlers(EndpointMetaData epMetaData,
HandlerType type)
- {
- List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
-
- HandlerChainMetaData handlerChain;
- if (type == HandlerType.PRE)
- handlerChain = getPreHandlerChain();
- else if (type == HandlerType.POST)
- handlerChain = getPostHandlerChain();
- else
- throw new IllegalArgumentException("Invalid handler type: " + type);
-
- if (handlerChain != null)
- {
- for (UnifiedHandlerMetaData uhmd : handlerChain.getHandlers())
- {
- handlers.add(uhmd.getHandlerMetaDataJAXRPC(epMetaData, type));
- }
- }
-
- return handlers;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSCommonConfigJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxrpc;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.core.metadata.config.WSCommonConfig;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+
+
+// $Id$
+
+/**
+ * A JBossWS client configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public abstract class WSCommonConfigJAXRPC extends WSCommonConfig
+{
+ private HandlerChainMetaData preHandlerChain;
+ private HandlerChainMetaData postHandlerChain;
+
+ public HandlerChainMetaData getPostHandlerChain()
+ {
+ return postHandlerChain;
+ }
+
+ public void setPostHandlerChain(HandlerChainMetaData postHandlerChain)
+ {
+ this.postHandlerChain = postHandlerChain;
+ }
+
+ public HandlerChainMetaData getPreHandlerChain()
+ {
+ return preHandlerChain;
+ }
+
+ public void setPreHandlerChain(HandlerChainMetaData preHandlerChain)
+ {
+ this.preHandlerChain = preHandlerChain;
+ }
+
+ @Override
+ public List<HandlerMetaData> getHandlers(EndpointMetaData epMetaData,
HandlerType type)
+ {
+ List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
+
+ HandlerChainMetaData handlerChain;
+ if (type == HandlerType.PRE)
+ handlerChain = getPreHandlerChain();
+ else if (type == HandlerType.POST)
+ handlerChain = getPostHandlerChain();
+ else
+ throw new IllegalArgumentException("Invalid handler type: " + type);
+
+ if (handlerChain != null)
+ {
+ for (UnifiedHandlerMetaData uhmd : handlerChain.getHandlers())
+ {
+ handlers.add(uhmd.getHandlerMetaDataJAXRPC(epMetaData, type));
+ }
+ }
+
+ return handlers;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,161 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxrpc;
-
-//$Id$
-
-import java.util.List;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A factory for the JBossWS endpoint/client configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSConfigFactoryJAXRPC implements ObjectModelFactory
-{
- // provide logging
- private final Logger log = Logger.getLogger(WSConfigFactoryJAXRPC.class);
-
- public Object newRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName, Attributes attrs)
- {
- return new WSConfigRootJAXRPC();
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName)
- {
- return root;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WSConfigRootJAXRPC wsConfig, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("WSConfig newChild: " + localName);
- if ("endpoint-config".equals(localName))
- {
- WSEndpointConfigJAXRPC wsEndpointConfig = new WSEndpointConfigJAXRPC();
- wsConfig.getEndpointConfig().add(wsEndpointConfig);
- return wsEndpointConfig;
- }
- if ("client-config".equals(localName))
- {
- WSClientConfigJAXRPC wsClientConfig = new WSClientConfigJAXRPC();
- wsConfig.getClientConfig().add(wsClientConfig);
- return wsClientConfig;
- }
- return null;
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(WSCommonConfigJAXRPC wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("WSCommonConfig setValue: nuri=" + namespaceURI + "
localName=" + localName + " value=" + value);
-
- if (localName.equals("config-name"))
- wsCommonConfig.setConfigName(value);
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WSCommonConfigJAXRPC wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("WSCommonConfig newChild: " + localName);
-
- if ("pre-handler-chain".equals(localName))
- {
- HandlerChainMetaData preHandlerChain = new HandlerChainMetaData(null);
- wsCommonConfig.setPreHandlerChain(preHandlerChain);
- return preHandlerChain;
- }
- if ("post-handler-chain".equals(localName))
- {
- HandlerChainMetaData postHandlerChain = new HandlerChainMetaData(null);
- wsCommonConfig.setPostHandlerChain(postHandlerChain);
- return postHandlerChain;
- }
- return null;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(HandlerChainMetaData handlerChainMetaData, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("WSHandlerChainConfig newChild: " + localName);
- if ("handler".equals(localName))
- {
- UnifiedHandlerMetaData handler = new
UnifiedHandlerMetaData(handlerChainMetaData);
- List<UnifiedHandlerMetaData> handlers =
handlerChainMetaData.getHandlers();
- handlers.add(handler);
- return handler;
- }
- return null;
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("UnifiedHandlerMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("handler-name"))
- handler.setHandlerName(value);
- else if (localName.equals("handler-class"))
- handler.setHandlerClass(value);
- else if (localName.equals("soap-header"))
- handler.addSoapHeader(navigator.resolveQName(value));
- else if (localName.equals("soap-role"))
- handler.addSoapRole(value);
- else if (localName.equals("port-name"))
- handler.addPortName(value);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("param-name"))
- param.setParamName(value);
- else if (localName.equals("param-value"))
- param.setParamValue(value);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigFactoryJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,161 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxrpc;
+
+//$Id$
+
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A factory for the JBossWS endpoint/client configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSConfigFactoryJAXRPC implements ObjectModelFactory
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(WSConfigFactoryJAXRPC.class);
+
+ public Object newRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName, Attributes attrs)
+ {
+ return new WSConfigRootJAXRPC();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WSConfigRootJAXRPC wsConfig, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("WSConfig newChild: " + localName);
+ if ("endpoint-config".equals(localName))
+ {
+ WSEndpointConfigJAXRPC wsEndpointConfig = new WSEndpointConfigJAXRPC();
+ wsConfig.getEndpointConfig().add(wsEndpointConfig);
+ return wsEndpointConfig;
+ }
+ if ("client-config".equals(localName))
+ {
+ WSClientConfigJAXRPC wsClientConfig = new WSClientConfigJAXRPC();
+ wsConfig.getClientConfig().add(wsClientConfig);
+ return wsClientConfig;
+ }
+ return null;
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(WSCommonConfigJAXRPC wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("WSCommonConfig setValue: nuri=" + namespaceURI + "
localName=" + localName + " value=" + value);
+
+ if (localName.equals("config-name"))
+ wsCommonConfig.setConfigName(value);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WSCommonConfigJAXRPC wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("WSCommonConfig newChild: " + localName);
+
+ if ("pre-handler-chain".equals(localName))
+ {
+ HandlerChainMetaData preHandlerChain = new HandlerChainMetaData(null);
+ wsCommonConfig.setPreHandlerChain(preHandlerChain);
+ return preHandlerChain;
+ }
+ if ("post-handler-chain".equals(localName))
+ {
+ HandlerChainMetaData postHandlerChain = new HandlerChainMetaData(null);
+ wsCommonConfig.setPostHandlerChain(postHandlerChain);
+ return postHandlerChain;
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(HandlerChainMetaData handlerChainMetaData, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("WSHandlerChainConfig newChild: " + localName);
+ if ("handler".equals(localName))
+ {
+ UnifiedHandlerMetaData handler = new
UnifiedHandlerMetaData(handlerChainMetaData);
+ List<UnifiedHandlerMetaData> handlers =
handlerChainMetaData.getHandlers();
+ handlers.add(handler);
+ return handler;
+ }
+ return null;
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedHandlerMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("handler-name"))
+ handler.setHandlerName(value);
+ else if (localName.equals("handler-class"))
+ handler.setHandlerClass(value);
+ else if (localName.equals("soap-header"))
+ handler.addSoapHeader(navigator.resolveQName(value));
+ else if (localName.equals("soap-role"))
+ handler.addSoapRole(value);
+ else if (localName.equals("port-name"))
+ handler.addPortName(value);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("param-name"))
+ param.setParamName(value);
+ else if (localName.equals("param-value"))
+ param.setParamValue(value);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigRootJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSConfigRootJAXRPC.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigRootJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxrpc;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * A JBossWS configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSConfigRootJAXRPC
-{
- private List<WSClientConfigJAXRPC> clientConfigList = new
ArrayList<WSClientConfigJAXRPC>();
- private List<WSEndpointConfigJAXRPC> endpointConfigList = new
ArrayList<WSEndpointConfigJAXRPC>();
-
- public List<WSClientConfigJAXRPC> getClientConfig()
- {
- return clientConfigList;
- }
-
- public void setClientConfig(List<WSClientConfigJAXRPC> clientConfig)
- {
- this.clientConfigList = clientConfig;
- }
-
- public List<WSEndpointConfigJAXRPC> getEndpointConfig()
- {
- return endpointConfigList;
- }
-
- public void setEndpointConfig(List<WSEndpointConfigJAXRPC> endpointConfig)
- {
- this.endpointConfigList = endpointConfig;
- }
-
- public WSClientConfigJAXRPC getClientConfigByName(String configName)
- {
- WSClientConfigJAXRPC config = null;
- for(WSClientConfigJAXRPC aux : clientConfigList)
- {
- if (aux.getConfigName().equals(configName))
- {
- config = aux;
- break;
- }
- }
-
- if (config == null && clientConfigList.size() == 1)
- config = clientConfigList.get(0);
-
- return config;
- }
-
- public WSEndpointConfigJAXRPC getEndpointConfigByName(String configName)
- {
- WSEndpointConfigJAXRPC config = null;
- for(WSEndpointConfigJAXRPC aux : endpointConfigList)
- {
- if (aux.getConfigName().equals(configName))
- {
- config = aux;
- break;
- }
- }
-
- if (config == null && endpointConfigList.size() == 1)
- config = endpointConfigList.get(0);
-
- return config;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigRootJAXRPC.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSConfigRootJAXRPC.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSConfigRootJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSConfigRootJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxrpc;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * A JBossWS configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSConfigRootJAXRPC
+{
+ private List<WSClientConfigJAXRPC> clientConfigList = new
ArrayList<WSClientConfigJAXRPC>();
+ private List<WSEndpointConfigJAXRPC> endpointConfigList = new
ArrayList<WSEndpointConfigJAXRPC>();
+
+ public List<WSClientConfigJAXRPC> getClientConfig()
+ {
+ return clientConfigList;
+ }
+
+ public void setClientConfig(List<WSClientConfigJAXRPC> clientConfig)
+ {
+ this.clientConfigList = clientConfig;
+ }
+
+ public List<WSEndpointConfigJAXRPC> getEndpointConfig()
+ {
+ return endpointConfigList;
+ }
+
+ public void setEndpointConfig(List<WSEndpointConfigJAXRPC> endpointConfig)
+ {
+ this.endpointConfigList = endpointConfig;
+ }
+
+ public WSClientConfigJAXRPC getClientConfigByName(String configName)
+ {
+ WSClientConfigJAXRPC config = null;
+ for(WSClientConfigJAXRPC aux : clientConfigList)
+ {
+ if (aux.getConfigName().equals(configName))
+ {
+ config = aux;
+ break;
+ }
+ }
+
+ if (config == null && clientConfigList.size() == 1)
+ config = clientConfigList.get(0);
+
+ return config;
+ }
+
+ public WSEndpointConfigJAXRPC getEndpointConfigByName(String configName)
+ {
+ WSEndpointConfigJAXRPC config = null;
+ for(WSEndpointConfigJAXRPC aux : endpointConfigList)
+ {
+ if (aux.getConfigName().equals(configName))
+ {
+ config = aux;
+ break;
+ }
+ }
+
+ if (config == null && endpointConfigList.size() == 1)
+ config = endpointConfigList.get(0);
+
+ return config;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxrpc;
-
-
-
-// $Id$
-
-/**
- * A JBossWS endpoint configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSEndpointConfigJAXRPC extends WSCommonConfigJAXRPC
-{
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxrpc/WSEndpointConfigJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxrpc;
+
+
+
+// $Id$
+
+/**
+ * A JBossWS endpoint configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSEndpointConfigJAXRPC extends WSCommonConfigJAXRPC
+{
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSClientConfigJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSClientConfigJAXWS.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSClientConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxws;
-
-
-// $Id$
-
-/**
- * A JBossWS client configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSClientConfigJAXWS extends WSCommonConfigJAXWS
-{
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSClientConfigJAXWS.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSClientConfigJAXWS.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSClientConfigJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSClientConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxws;
+
+
+// $Id$
+
+/**
+ * A JBossWS client configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSClientConfigJAXWS extends WSCommonConfigJAXWS
+{
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSCommonConfigJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSCommonConfigJAXWS.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSCommonConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxws;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.common.metadata.config.WSCommonConfig;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-
-// $Id$
-
-/**
- * A JBossWS client configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public abstract class WSCommonConfigJAXWS extends WSCommonConfig
-{
- private WSHandlerChainsConfigJAXWS preHandlerChains;
- private WSHandlerChainsConfigJAXWS postHandlerChains;
-
- public WSHandlerChainsConfigJAXWS getPostHandlerChains()
- {
- return postHandlerChains;
- }
-
- public void setPostHandlerChains(WSHandlerChainsConfigJAXWS postHandlerChain)
- {
- this.postHandlerChains = postHandlerChain;
- }
-
- public WSHandlerChainsConfigJAXWS getPreHandlerChains()
- {
- return preHandlerChains;
- }
-
- public void setPreHandlerChains(WSHandlerChainsConfigJAXWS preHandlerChains)
- {
- this.preHandlerChains = preHandlerChains;
- }
-
- public List<HandlerMetaData> getHandlers(EndpointMetaData epMetaData,
HandlerType type)
- {
- List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
-
- WSHandlerChainsConfigJAXWS handlerChains;
- if (type == HandlerType.PRE)
- handlerChains = getPreHandlerChains();
- else if (type == HandlerType.POST)
- handlerChains = getPostHandlerChains();
- else throw new IllegalArgumentException("Invalid handler type: " +
type);
-
- if (handlerChains != null)
- {
- for (HandlerChainMetaData handlerChainMetaData :
handlerChains.getHandlerChains())
- {
- for (UnifiedHandlerMetaData uhmd : handlerChainMetaData.getHandlers())
- {
- handlers.add(uhmd.getHandlerMetaDataJAXWS(epMetaData, type));
- }
- }
- }
-
- return handlers;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSCommonConfigJAXWS.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSCommonConfigJAXWS.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSCommonConfigJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSCommonConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxws;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.core.metadata.config.WSCommonConfig;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+
+// $Id$
+
+/**
+ * A JBossWS client configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public abstract class WSCommonConfigJAXWS extends WSCommonConfig
+{
+ private WSHandlerChainsConfigJAXWS preHandlerChains;
+ private WSHandlerChainsConfigJAXWS postHandlerChains;
+
+ public WSHandlerChainsConfigJAXWS getPostHandlerChains()
+ {
+ return postHandlerChains;
+ }
+
+ public void setPostHandlerChains(WSHandlerChainsConfigJAXWS postHandlerChain)
+ {
+ this.postHandlerChains = postHandlerChain;
+ }
+
+ public WSHandlerChainsConfigJAXWS getPreHandlerChains()
+ {
+ return preHandlerChains;
+ }
+
+ public void setPreHandlerChains(WSHandlerChainsConfigJAXWS preHandlerChains)
+ {
+ this.preHandlerChains = preHandlerChains;
+ }
+
+ public List<HandlerMetaData> getHandlers(EndpointMetaData epMetaData,
HandlerType type)
+ {
+ List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
+
+ WSHandlerChainsConfigJAXWS handlerChains;
+ if (type == HandlerType.PRE)
+ handlerChains = getPreHandlerChains();
+ else if (type == HandlerType.POST)
+ handlerChains = getPostHandlerChains();
+ else throw new IllegalArgumentException("Invalid handler type: " +
type);
+
+ if (handlerChains != null)
+ {
+ for (HandlerChainMetaData handlerChainMetaData :
handlerChains.getHandlerChains())
+ {
+ for (UnifiedHandlerMetaData uhmd : handlerChainMetaData.getHandlers())
+ {
+ handlers.add(uhmd.getHandlerMetaDataJAXWS(epMetaData, type));
+ }
+ }
+ }
+
+ return handlers;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigFactoryJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSConfigFactoryJAXWS.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigFactoryJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxws;
-
-//$Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainFactory;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A factory for the JBossWS endpoint/client configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSConfigFactoryJAXWS extends HandlerChainFactory
-{
- // provide logging
- private final Logger log = Logger.getLogger(WSConfigFactoryJAXWS.class);
-
- public Object newRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName, Attributes attrs)
- {
- return new WSConfigRootJAXWS();
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName)
- {
- return root;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WSConfigRootJAXWS wsConfig, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("WSConfig newChild: " + localName);
- if ("endpoint-config".equals(localName))
- {
- WSEndpointConfigJAXWS wsEndpointConfig = new WSEndpointConfigJAXWS();
- wsConfig.getEndpointConfig().add(wsEndpointConfig);
- return wsEndpointConfig;
- }
- if ("client-config".equals(localName))
- {
- WSClientConfigJAXWS wsClientConfig = new WSClientConfigJAXWS();
- wsConfig.getClientConfig().add(wsClientConfig);
- return wsClientConfig;
- }
- return null;
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(WSCommonConfigJAXWS wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("WSCommonConfig setValue: nuri=" + namespaceURI + "
localName=" + localName + " value=" + value);
-
- if (localName.equals("config-name"))
- wsCommonConfig.setConfigName(value);
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WSCommonConfigJAXWS wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("WSCommonConfig newChild: " + localName);
-
- if ("pre-handler-chains".equals(localName))
- {
- WSHandlerChainsConfigJAXWS preHandlerChains = new WSHandlerChainsConfigJAXWS();
- wsCommonConfig.setPreHandlerChains(preHandlerChains);
- return preHandlerChains;
- }
- if ("post-handler-chains".equals(localName))
- {
- WSHandlerChainsConfigJAXWS postHandlerChains = new
WSHandlerChainsConfigJAXWS();
- wsCommonConfig.setPostHandlerChains(postHandlerChains);
- return postHandlerChains;
- }
- return null;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WSHandlerChainsConfigJAXWS wsHandlerChains,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("WSHandlerChainsConfig newChild: " + localName);
-
- if ("handler-chain".equals(localName))
- {
- HandlerChainMetaData handlerChain = new HandlerChainMetaData(null);
- wsHandlerChains.getHandlerChains().add(handlerChain);
- return handlerChain;
- }
- return null;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigFactoryJAXWS.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSConfigFactoryJAXWS.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSConfigFactoryJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigFactoryJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxws;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainFactory;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A factory for the JBossWS endpoint/client configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSConfigFactoryJAXWS extends HandlerChainFactory
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(WSConfigFactoryJAXWS.class);
+
+ public Object newRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName, Attributes attrs)
+ {
+ return new WSConfigRootJAXWS();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String namespaceURI,
String localName)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WSConfigRootJAXWS wsConfig, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("WSConfig newChild: " + localName);
+ if ("endpoint-config".equals(localName))
+ {
+ WSEndpointConfigJAXWS wsEndpointConfig = new WSEndpointConfigJAXWS();
+ wsConfig.getEndpointConfig().add(wsEndpointConfig);
+ return wsEndpointConfig;
+ }
+ if ("client-config".equals(localName))
+ {
+ WSClientConfigJAXWS wsClientConfig = new WSClientConfigJAXWS();
+ wsConfig.getClientConfig().add(wsClientConfig);
+ return wsClientConfig;
+ }
+ return null;
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(WSCommonConfigJAXWS wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("WSCommonConfig setValue: nuri=" + namespaceURI + "
localName=" + localName + " value=" + value);
+
+ if (localName.equals("config-name"))
+ wsCommonConfig.setConfigName(value);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WSCommonConfigJAXWS wsCommonConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("WSCommonConfig newChild: " + localName);
+
+ if ("pre-handler-chains".equals(localName))
+ {
+ WSHandlerChainsConfigJAXWS preHandlerChains = new WSHandlerChainsConfigJAXWS();
+ wsCommonConfig.setPreHandlerChains(preHandlerChains);
+ return preHandlerChains;
+ }
+ if ("post-handler-chains".equals(localName))
+ {
+ WSHandlerChainsConfigJAXWS postHandlerChains = new
WSHandlerChainsConfigJAXWS();
+ wsCommonConfig.setPostHandlerChains(postHandlerChains);
+ return postHandlerChains;
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WSHandlerChainsConfigJAXWS wsHandlerChains,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("WSHandlerChainsConfig newChild: " + localName);
+
+ if ("handler-chain".equals(localName))
+ {
+ HandlerChainMetaData handlerChain = new HandlerChainMetaData(null);
+ wsHandlerChains.getHandlerChains().add(handlerChain);
+ return handlerChain;
+ }
+ return null;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigRootJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSConfigRootJAXWS.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigRootJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxws;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * A JBossWS configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSConfigRootJAXWS
-{
- private List<WSClientConfigJAXWS> clientConfigList = new
ArrayList<WSClientConfigJAXWS>();
- private List<WSEndpointConfigJAXWS> endpointConfigList = new
ArrayList<WSEndpointConfigJAXWS>();
-
- public List<WSClientConfigJAXWS> getClientConfig()
- {
- return clientConfigList;
- }
-
- public void setClientConfig(List<WSClientConfigJAXWS> clientConfig)
- {
- this.clientConfigList = clientConfig;
- }
-
- public List<WSEndpointConfigJAXWS> getEndpointConfig()
- {
- return endpointConfigList;
- }
-
- public void setEndpointConfig(List<WSEndpointConfigJAXWS> endpointConfig)
- {
- this.endpointConfigList = endpointConfig;
- }
-
- public WSClientConfigJAXWS getClientConfigByName(String configName)
- {
- WSClientConfigJAXWS config = null;
- for(WSClientConfigJAXWS aux : clientConfigList)
- {
- if (aux.getConfigName().equals(configName))
- {
- config = aux;
- break;
- }
- }
-
- if (config == null && clientConfigList.size() == 1)
- config = clientConfigList.get(0);
-
- return config;
- }
-
- public WSEndpointConfigJAXWS getEndpointConfigByName(String configName)
- {
- WSEndpointConfigJAXWS config = null;
- for(WSEndpointConfigJAXWS aux : endpointConfigList)
- {
- if (aux.getConfigName().equals(configName))
- {
- config = aux;
- break;
- }
- }
-
- if (config == null && endpointConfigList.size() == 1)
- config = endpointConfigList.get(0);
-
- return config;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigRootJAXWS.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSConfigRootJAXWS.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSConfigRootJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSConfigRootJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxws;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * A JBossWS configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSConfigRootJAXWS
+{
+ private List<WSClientConfigJAXWS> clientConfigList = new
ArrayList<WSClientConfigJAXWS>();
+ private List<WSEndpointConfigJAXWS> endpointConfigList = new
ArrayList<WSEndpointConfigJAXWS>();
+
+ public List<WSClientConfigJAXWS> getClientConfig()
+ {
+ return clientConfigList;
+ }
+
+ public void setClientConfig(List<WSClientConfigJAXWS> clientConfig)
+ {
+ this.clientConfigList = clientConfig;
+ }
+
+ public List<WSEndpointConfigJAXWS> getEndpointConfig()
+ {
+ return endpointConfigList;
+ }
+
+ public void setEndpointConfig(List<WSEndpointConfigJAXWS> endpointConfig)
+ {
+ this.endpointConfigList = endpointConfig;
+ }
+
+ public WSClientConfigJAXWS getClientConfigByName(String configName)
+ {
+ WSClientConfigJAXWS config = null;
+ for(WSClientConfigJAXWS aux : clientConfigList)
+ {
+ if (aux.getConfigName().equals(configName))
+ {
+ config = aux;
+ break;
+ }
+ }
+
+ if (config == null && clientConfigList.size() == 1)
+ config = clientConfigList.get(0);
+
+ return config;
+ }
+
+ public WSEndpointConfigJAXWS getEndpointConfigByName(String configName)
+ {
+ WSEndpointConfigJAXWS config = null;
+ for(WSEndpointConfigJAXWS aux : endpointConfigList)
+ {
+ if (aux.getConfigName().equals(configName))
+ {
+ config = aux;
+ break;
+ }
+ }
+
+ if (config == null && endpointConfigList.size() == 1)
+ config = endpointConfigList.get(0);
+
+ return config;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSEndpointConfigJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSEndpointConfigJAXWS.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSEndpointConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxws;
-
-
-// $Id$
-
-/**
- * A JBossWS endpoint configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSEndpointConfigJAXWS extends WSCommonConfigJAXWS
-{
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSEndpointConfigJAXWS.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSEndpointConfigJAXWS.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSEndpointConfigJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSEndpointConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxws;
+
+
+// $Id$
+
+/**
+ * A JBossWS endpoint configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSEndpointConfigJAXWS extends WSCommonConfigJAXWS
+{
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.config.jaxws;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
-
-
-/**
- * A JBossWS handler chains configuration
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Dec-2005
- */
-public class WSHandlerChainsConfigJAXWS
-{
- private List<HandlerChainMetaData> chains = new
ArrayList<HandlerChainMetaData>();
-
- public WSHandlerChainsConfigJAXWS()
- {
- }
-
- public List<HandlerChainMetaData> getHandlerChains()
- {
- return chains;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/jaxws/WSHandlerChainsConfigJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.config.jaxws;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
+
+
+/**
+ * A JBossWS handler chains configuration
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Dec-2005
+ */
+public class WSHandlerChainsConfigJAXWS
+{
+ private List<HandlerChainMetaData> chains = new
ArrayList<HandlerChainMetaData>();
+
+ public WSHandlerChainsConfigJAXWS()
+ {
+ }
+
+ public List<HandlerChainMetaData> getHandlerChains()
+ {
+ return chains;
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee (from rev
1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedApplicationMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedApplicationMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedApplicationMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,131 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * The container independent top level meta data from the jboss.xml and ejb-jar.xml
descriptor.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedApplicationMetaData
-{
- /** ArrayList<BeanMetaData> for the ejbs */
- private List<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
- /** The optional JBossWS config-name */
- private String configName;
- /** The optional JBossWS config-file */
- private String configFile;
- /** The web context root to use for web services */
- private String webServiceContextRoot;
- /** The security-domain value assigned to the application */
- private String securityDomain;
- /** A HashMap<String, String> for webservice description publish locations */
- private PublishLocationAdapter publishLocationAdapter;
-
- public UnifiedBeanMetaData getBeanByEjbName(String ejbName)
- {
- for (UnifiedBeanMetaData beanMetaData : beans)
- {
- if (beanMetaData.getEjbName().equals(ejbName))
- {
- return beanMetaData;
- }
- }
- return null;
- }
-
- public Iterator<UnifiedBeanMetaData> getEnterpriseBeans()
- {
- return beans.iterator();
- }
-
- public void setEnterpriseBeans(List<UnifiedBeanMetaData> beans)
- {
- this.beans = beans;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getWebServiceContextRoot()
- {
- return webServiceContextRoot;
- }
-
- public void setWebServiceContextRoot(String contextRoot)
- {
- this.webServiceContextRoot = contextRoot;
- }
-
- public String getSecurityDomain()
- {
- return securityDomain;
- }
-
- public void setSecurityDomain(String securityDomain)
- {
- this.securityDomain = securityDomain;
- }
-
- public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
- {
- this.publishLocationAdapter = publishLocationAdapter;
- }
-
- public String getWsdlPublishLocationByName(String name)
- {
- String publishLocation = null;
- if (publishLocationAdapter != null)
- publishLocation = publishLocationAdapter.getWsdlPublishLocationByName(name);
- return publishLocation;
-
- }
-
- public interface PublishLocationAdapter
- {
- String getWsdlPublishLocationByName(String name);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedApplicationMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedApplicationMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedApplicationMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedApplicationMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * The container independent top level meta data from the jboss.xml and ejb-jar.xml
descriptor.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedApplicationMetaData
+{
+ /** ArrayList<BeanMetaData> for the ejbs */
+ private List<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
+ /** The optional JBossWS config-name */
+ private String configName;
+ /** The optional JBossWS config-file */
+ private String configFile;
+ /** The web context root to use for web services */
+ private String webServiceContextRoot;
+ /** The security-domain value assigned to the application */
+ private String securityDomain;
+ /** A HashMap<String, String> for webservice description publish locations */
+ private PublishLocationAdapter publishLocationAdapter;
+
+ public UnifiedBeanMetaData getBeanByEjbName(String ejbName)
+ {
+ for (UnifiedBeanMetaData beanMetaData : beans)
+ {
+ if (beanMetaData.getEjbName().equals(ejbName))
+ {
+ return beanMetaData;
+ }
+ }
+ return null;
+ }
+
+ public Iterator<UnifiedBeanMetaData> getEnterpriseBeans()
+ {
+ return beans.iterator();
+ }
+
+ public void setEnterpriseBeans(List<UnifiedBeanMetaData> beans)
+ {
+ this.beans = beans;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getWebServiceContextRoot()
+ {
+ return webServiceContextRoot;
+ }
+
+ public void setWebServiceContextRoot(String contextRoot)
+ {
+ this.webServiceContextRoot = contextRoot;
+ }
+
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+ public void setSecurityDomain(String securityDomain)
+ {
+ this.securityDomain = securityDomain;
+ }
+
+ public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
+ {
+ this.publishLocationAdapter = publishLocationAdapter;
+ }
+
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String publishLocation = null;
+ if (publishLocationAdapter != null)
+ publishLocation = publishLocationAdapter.getWsdlPublishLocationByName(name);
+ return publishLocation;
+
+ }
+
+ public interface PublishLocationAdapter
+ {
+ String getWsdlPublishLocationByName(String name);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedBeanMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedBeanMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedBeanMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,138 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-//$Id$
-
-/**
- * The container independent common meta data class for the entity, message-driven and
session beans.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedBeanMetaData
-{
- /** The ejb-name element specifies an enterprise bean's name. */
- private String ejbName;
- /** The ejb-class element contains the fully-qualified name of the enterprise
bean's class. */
- private String ejbClass;
- /** The home element contains the fully-qualified name of the enterprise
- bean's home interface. */
- private String homeClass;
- /** The local-home element contains the fully-qualified name of the
- enterprise bean's local home interface. */
- private String localHomeClass;
- /** The service-endpoint element contains the fully-qualified name of the beans
service endpoint interface (SEI) */
- protected String seiName;
- /** The JNDI name under with the home interface should be bound */
- private String jndiName;
- /** The JNDI name under with the local home interface should be bound */
- private String localJndiName;
- /** The jboss port-component binding for a ejb webservice */
- protected UnifiedEjbPortComponentMetaData portComponent;
-
- public String getEjbName()
- {
- return ejbName;
- }
-
- public void setEjbName(String ejbName)
- {
- this.ejbName = ejbName;
- }
-
- public String getEjbClass()
- {
- return ejbClass;
- }
-
- public void setEjbClass(String ejbClass)
- {
- this.ejbClass = ejbClass;
- }
-
- public UnifiedEjbPortComponentMetaData getPortComponent()
- {
- return portComponent;
- }
-
- public void setPortComponent(UnifiedEjbPortComponentMetaData portComponent)
- {
- this.portComponent = portComponent;
- }
-
- public String getServiceEndpoint()
- {
- return seiName;
- }
-
- public void setServiceEndpoint(String seiName)
- {
- this.seiName = seiName;
- }
-
- public String getContainerObjectNameJndiName()
- {
- return getHome() != null ? getJndiName() : getLocalJndiName();
- }
-
- public String getHome()
- {
- return homeClass;
- }
-
- public void setHome(String homeClass)
- {
- this.homeClass = homeClass;
- }
-
- public String getJndiName()
- {
- return jndiName;
- }
-
- public void setJndiName(String jndiName)
- {
- this.jndiName = jndiName;
- }
-
- public String getLocalHome()
- {
- return localHomeClass;
- }
-
- public void setLocalHome(String localHomeClass)
- {
- this.localHomeClass = localHomeClass;
- }
-
- public String getLocalJndiName()
- {
- return localJndiName;
- }
-
- public void setLocalJndiName(String localJndiName)
- {
- this.localJndiName = localJndiName;
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedBeanMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedBeanMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedBeanMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedBeanMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+//$Id$
+
+/**
+ * The container independent common meta data class for the entity, message-driven and
session beans.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedBeanMetaData
+{
+ /** The ejb-name element specifies an enterprise bean's name. */
+ private String ejbName;
+ /** The ejb-class element contains the fully-qualified name of the enterprise
bean's class. */
+ private String ejbClass;
+ /** The home element contains the fully-qualified name of the enterprise
+ bean's home interface. */
+ private String homeClass;
+ /** The local-home element contains the fully-qualified name of the
+ enterprise bean's local home interface. */
+ private String localHomeClass;
+ /** The service-endpoint element contains the fully-qualified name of the beans
service endpoint interface (SEI) */
+ protected String seiName;
+ /** The JNDI name under with the home interface should be bound */
+ private String jndiName;
+ /** The JNDI name under with the local home interface should be bound */
+ private String localJndiName;
+ /** The jboss port-component binding for a ejb webservice */
+ protected UnifiedEjbPortComponentMetaData portComponent;
+
+ public String getEjbName()
+ {
+ return ejbName;
+ }
+
+ public void setEjbName(String ejbName)
+ {
+ this.ejbName = ejbName;
+ }
+
+ public String getEjbClass()
+ {
+ return ejbClass;
+ }
+
+ public void setEjbClass(String ejbClass)
+ {
+ this.ejbClass = ejbClass;
+ }
+
+ public UnifiedEjbPortComponentMetaData getPortComponent()
+ {
+ return portComponent;
+ }
+
+ public void setPortComponent(UnifiedEjbPortComponentMetaData portComponent)
+ {
+ this.portComponent = portComponent;
+ }
+
+ public String getServiceEndpoint()
+ {
+ return seiName;
+ }
+
+ public void setServiceEndpoint(String seiName)
+ {
+ this.seiName = seiName;
+ }
+
+ public String getContainerObjectNameJndiName()
+ {
+ return getHome() != null ? getJndiName() : getLocalJndiName();
+ }
+
+ public String getHome()
+ {
+ return homeClass;
+ }
+
+ public void setHome(String homeClass)
+ {
+ this.homeClass = homeClass;
+ }
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ public String getLocalHome()
+ {
+ return localHomeClass;
+ }
+
+ public void setLocalHome(String localHomeClass)
+ {
+ this.localHomeClass = localHomeClass;
+ }
+
+ public String getLocalJndiName()
+ {
+ return localJndiName;
+ }
+
+ public void setLocalJndiName(String localJndiName)
+ {
+ this.localJndiName = localJndiName;
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-
-//$Id$
-
-
-/**
- * The container independent metadata for session/port-component element from jboss.xml
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedEjbPortComponentMetaData
-{
- private String portComponentName;
- private String portComponentURI;
- private String authMethod;
- private String transportGuarantee;
-
- public String getPortComponentName()
- {
- return portComponentName;
- }
-
- public void setPortComponentName(String portComponentName)
- {
- this.portComponentName = portComponentName;
- }
-
- public String getPortComponentURI()
- {
- return portComponentURI;
- }
-
- public void setPortComponentURI(String portComponentURI)
- {
- this.portComponentURI = portComponentURI;
- }
-
- public String getURLPattern()
- {
- String pattern = "/*";
- if (portComponentURI != null)
- {
- return portComponentURI;
- }
- return pattern;
- }
-
- public String getAuthMethod()
- {
- return authMethod;
- }
-
- public void setAuthMethod(String authMethod)
- {
- this.authMethod = authMethod;
- }
-
- public String getTransportGuarantee()
- {
- return transportGuarantee;
- }
-
- public void setTransportGuarantee(String transportGuarantee)
- {
- this.transportGuarantee = transportGuarantee;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedEjbPortComponentMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+
+//$Id$
+
+
+/**
+ * The container independent metadata for session/port-component element from jboss.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedEjbPortComponentMetaData
+{
+ private String portComponentName;
+ private String portComponentURI;
+ private String authMethod;
+ private String transportGuarantee;
+
+ public String getPortComponentName()
+ {
+ return portComponentName;
+ }
+
+ public void setPortComponentName(String portComponentName)
+ {
+ this.portComponentName = portComponentName;
+ }
+
+ public String getPortComponentURI()
+ {
+ return portComponentURI;
+ }
+
+ public void setPortComponentURI(String portComponentURI)
+ {
+ this.portComponentURI = portComponentURI;
+ }
+
+ public String getURLPattern()
+ {
+ String pattern = "/*";
+ if (portComponentURI != null)
+ {
+ return portComponentURI;
+ }
+ return pattern;
+ }
+
+ public String getAuthMethod()
+ {
+ return authMethod;
+ }
+
+ public void setAuthMethod(String authMethod)
+ {
+ this.authMethod = authMethod;
+ }
+
+ public String getTransportGuarantee()
+ {
+ return transportGuarantee;
+ }
+
+ public void setTransportGuarantee(String transportGuarantee)
+ {
+ this.transportGuarantee = transportGuarantee;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedHandlerMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedHandlerMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedHandlerMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,183 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-//$Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaDataJAXRPC;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaDataJAXWS;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-
-/**
- * The container independent metdata data for a handler element
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedHandlerMetaData implements Serializable
-{
- private static final long serialVersionUID = -3019416564080333900L;
-
- private HandlerChainMetaData chainConfig;
-
- // The required <handler-name> element
- private String handlerName;
- // The required <handler-class> element
- private String handlerClass;
- // The optional <init-param> elements
- private ArrayList<HandlerInitParam> initParams = new
ArrayList<HandlerInitParam>();
- // The optional <soap-header> elements
- private Set<QName> soapHeaders = new HashSet<QName>();
- // The optional <soap-role> elements
- private Set<String> soapRoles = new HashSet<String>();
- // The optional <port-name> elements
- private Set<String> portNames = new HashSet<String>();
-
- public UnifiedHandlerMetaData(HandlerChainMetaData handlerChainMetaData)
- {
- this.chainConfig = handlerChainMetaData;
- }
-
- public void setHandlerName(String value)
- {
- this.handlerName = value;
- }
-
- public String getHandlerName()
- {
- return handlerName;
- }
-
- public void setHandlerClass(String handlerClass)
- {
- this.handlerClass = handlerClass;
- }
-
- public String getHandlerClass()
- {
- return handlerClass;
- }
-
- public void addInitParam(HandlerInitParam param)
- {
- initParams.add(param);
- }
-
- public List<HandlerInitParam> getInitParams()
- {
- return initParams;
- }
-
- public void addSoapRole(String value)
- {
- soapRoles.add(value);
- }
-
- public Set<String> getSoapRoles()
- {
- return soapRoles;
- }
-
- public void addSoapHeader(QName qName)
- {
- soapHeaders.add(qName);
- }
-
- public Set<QName> getSoapHeaders()
- {
- return soapHeaders;
- }
-
- public String getProtocolBindings()
- {
- return (chainConfig != null ? chainConfig.getProtocolBindings() : null);
- }
-
- public QName getServiceNamePattern()
- {
- return (chainConfig != null ? chainConfig.getServiceNamePattern() : null);
- }
-
- public QName getPortNamePattern()
- {
- return (chainConfig != null ? chainConfig.getPortNamePattern() : null);
- }
-
- public void addPortName(String portName)
- {
- portNames.add(portName);
- }
-
- public Set<String> getPortNames()
- {
- return portNames;
- }
-
- public HandlerMetaDataJAXRPC getHandlerMetaDataJAXRPC (EndpointMetaData epMetaData,
HandlerType type)
- {
- HandlerMetaDataJAXRPC hmd = new HandlerMetaDataJAXRPC(epMetaData, type);
- hmd.setHandlerName(getHandlerName());
- hmd.setHandlerClassName(getHandlerClass());
- hmd.seiInitParams(getInitParams());
- hmd.setSoapHeaders(getSoapHeaders());
- hmd.setSoapRoles(getSoapRoles());
- hmd.setPortNames(getPortNames());
- return hmd;
- }
-
- public HandlerMetaDataJAXWS getHandlerMetaDataJAXWS (EndpointMetaData epMetaData,
HandlerType type)
- {
- HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(epMetaData, type);
- hmd.setHandlerName(getHandlerName());
- hmd.setHandlerClassName(getHandlerClass());
- hmd.seiInitParams(getInitParams());
- hmd.setProtocolBindings(getProtocolBindings());
- hmd.setServiceNamePattern(getServiceNamePattern());
- hmd.setPortNamePattern(getPortNamePattern());
- return hmd;
- }
-
- public String toString()
- {
- StringBuffer buffer = new StringBuffer("\nUnifiedHandlerMetaData:");
- buffer.append("\n name=" + getHandlerName());
- buffer.append("\n class=" + getHandlerClass());
- buffer.append("\n params=" + getInitParams());
- buffer.append("\n headers=" + getSoapHeaders());
- buffer.append("\n roles=" + getSoapRoles());
- buffer.append("\n protocols=" + getProtocolBindings());
- buffer.append("\n services=" + getServiceNamePattern());
- buffer.append("\n ports=" + (getPortNamePattern() != null ?
getPortNamePattern() : portNames));
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedHandlerMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedHandlerMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedHandlerMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedHandlerMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,183 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+//$Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaDataJAXRPC;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaDataJAXWS;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * The container independent metdata data for a handler element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedHandlerMetaData implements Serializable
+{
+ private static final long serialVersionUID = -3019416564080333900L;
+
+ private HandlerChainMetaData chainConfig;
+
+ // The required <handler-name> element
+ private String handlerName;
+ // The required <handler-class> element
+ private String handlerClass;
+ // The optional <init-param> elements
+ private ArrayList<HandlerInitParam> initParams = new
ArrayList<HandlerInitParam>();
+ // The optional <soap-header> elements
+ private Set<QName> soapHeaders = new HashSet<QName>();
+ // The optional <soap-role> elements
+ private Set<String> soapRoles = new HashSet<String>();
+ // The optional <port-name> elements
+ private Set<String> portNames = new HashSet<String>();
+
+ public UnifiedHandlerMetaData(HandlerChainMetaData handlerChainMetaData)
+ {
+ this.chainConfig = handlerChainMetaData;
+ }
+
+ public void setHandlerName(String value)
+ {
+ this.handlerName = value;
+ }
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public void setHandlerClass(String handlerClass)
+ {
+ this.handlerClass = handlerClass;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void addInitParam(HandlerInitParam param)
+ {
+ initParams.add(param);
+ }
+
+ public List<HandlerInitParam> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void addSoapRole(String value)
+ {
+ soapRoles.add(value);
+ }
+
+ public Set<String> getSoapRoles()
+ {
+ return soapRoles;
+ }
+
+ public void addSoapHeader(QName qName)
+ {
+ soapHeaders.add(qName);
+ }
+
+ public Set<QName> getSoapHeaders()
+ {
+ return soapHeaders;
+ }
+
+ public String getProtocolBindings()
+ {
+ return (chainConfig != null ? chainConfig.getProtocolBindings() : null);
+ }
+
+ public QName getServiceNamePattern()
+ {
+ return (chainConfig != null ? chainConfig.getServiceNamePattern() : null);
+ }
+
+ public QName getPortNamePattern()
+ {
+ return (chainConfig != null ? chainConfig.getPortNamePattern() : null);
+ }
+
+ public void addPortName(String portName)
+ {
+ portNames.add(portName);
+ }
+
+ public Set<String> getPortNames()
+ {
+ return portNames;
+ }
+
+ public HandlerMetaDataJAXRPC getHandlerMetaDataJAXRPC (EndpointMetaData epMetaData,
HandlerType type)
+ {
+ HandlerMetaDataJAXRPC hmd = new HandlerMetaDataJAXRPC(epMetaData, type);
+ hmd.setHandlerName(getHandlerName());
+ hmd.setHandlerClassName(getHandlerClass());
+ hmd.seiInitParams(getInitParams());
+ hmd.setSoapHeaders(getSoapHeaders());
+ hmd.setSoapRoles(getSoapRoles());
+ hmd.setPortNames(getPortNames());
+ return hmd;
+ }
+
+ public HandlerMetaDataJAXWS getHandlerMetaDataJAXWS (EndpointMetaData epMetaData,
HandlerType type)
+ {
+ HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(epMetaData, type);
+ hmd.setHandlerName(getHandlerName());
+ hmd.setHandlerClassName(getHandlerClass());
+ hmd.seiInitParams(getInitParams());
+ hmd.setProtocolBindings(getProtocolBindings());
+ hmd.setServiceNamePattern(getServiceNamePattern());
+ hmd.setPortNamePattern(getPortNamePattern());
+ return hmd;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer("\nUnifiedHandlerMetaData:");
+ buffer.append("\n name=" + getHandlerName());
+ buffer.append("\n class=" + getHandlerClass());
+ buffer.append("\n params=" + getInitParams());
+ buffer.append("\n headers=" + getSoapHeaders());
+ buffer.append("\n roles=" + getSoapRoles());
+ buffer.append("\n protocols=" + getProtocolBindings());
+ buffer.append("\n services=" + getServiceNamePattern());
+ buffer.append("\n ports=" + (getPortNamePattern() != null ?
getPortNamePattern() : portNames));
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedMessageDrivenMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedMessageDrivenMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedMessageDrivenMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-
-// $Id$
-
-
-/**
- * The container independent metadata of a message driven bean.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedMessageDrivenMetaData extends UnifiedBeanMetaData
-{
- private String destinationJndiName;
-
- public String getDestinationJndiName()
- {
- return destinationJndiName;
- }
-
- public void setDestinationJndiName(String destinationJndiName)
- {
- this.destinationJndiName = destinationJndiName;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedMessageDrivenMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedMessageDrivenMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedMessageDrivenMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedMessageDrivenMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+
+// $Id$
+
+
+/**
+ * The container independent metadata of a message driven bean.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedMessageDrivenMetaData extends UnifiedBeanMetaData
+{
+ private String destinationJndiName;
+
+ public String getDestinationJndiName()
+ {
+ return destinationJndiName;
+ }
+
+ public void setDestinationJndiName(String destinationJndiName)
+ {
+ this.destinationJndiName = destinationJndiName;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedPortComponentRefMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-import java.io.Serializable;
-import java.util.Properties;
-
-//$Id$
-
-/**
- * The container independent metdata data from handler init params
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedPortComponentRefMetaData implements Serializable
-{
- private static final long serialVersionUID = -7030007637678646740L;
-
- // The required <service-endpoint-interface> element
- private String serviceEndpointInterface;
- // The optional <port-component-link> element
- private String portComponentLink;
-
- /** Arbitrary proxy properties given by <call-property> */
- private Properties callProperties;
-
- public String getPortComponentLink()
- {
- return portComponentLink;
- }
-
- public void setPortComponentLink(String portComponentLink)
- {
- this.portComponentLink = portComponentLink;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public void setServiceEndpointInterface(String serviceEndpointInterface)
- {
- this.serviceEndpointInterface = serviceEndpointInterface;
- }
-
- public Properties getCallProperties()
- {
- return callProperties;
- }
-
- public void setCallProperties(Properties callProperties)
- {
- this.callProperties = callProperties;
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedPortComponentRefMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedPortComponentRefMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+//$Id$
+
+/**
+ * The container independent metdata data from handler init params
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedPortComponentRefMetaData implements Serializable
+{
+ private static final long serialVersionUID = -7030007637678646740L;
+
+ // The required <service-endpoint-interface> element
+ private String serviceEndpointInterface;
+ // The optional <port-component-link> element
+ private String portComponentLink;
+
+ /** Arbitrary proxy properties given by <call-property> */
+ private Properties callProperties;
+
+ public String getPortComponentLink()
+ {
+ return portComponentLink;
+ }
+
+ public void setPortComponentLink(String portComponentLink)
+ {
+ this.portComponentLink = portComponentLink;
+ }
+
+ public String getServiceEndpointInterface()
+ {
+ return serviceEndpointInterface;
+ }
+
+ public void setServiceEndpointInterface(String serviceEndpointInterface)
+ {
+ this.serviceEndpointInterface = serviceEndpointInterface;
+ }
+
+ public Properties getCallProperties()
+ {
+ return callProperties;
+ }
+
+ public void setCallProperties(Properties callProperties)
+ {
+ this.callProperties = callProperties;
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedServiceRefMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedServiceRefMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedServiceRefMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,258 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-//$Id$
-
-import java.io.Serializable;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * The container independent metdata data from service-ref element in web.xml,
ejb-jar.xml, and
- * application-client.xml.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedServiceRefMetaData implements Serializable
-{
- private static final long serialVersionUID = 122554634182144069L;
-
- // The required <service-ref-name> element
- private String serviceRefName;
- // The required <service-interface> element
- private String serviceInterface;
- // The optional <wsdl-file> element
- private String wsdlFile;
- // The optional <jaxrpc-mapping-file> element
- private String jaxrpcMappingFile;
- // The optional <service-qname> element
- private QName serviceQName;
- // The LinkedHashMap<String, UnifiedPortComponentRefMetaData> for
<port-component-ref> elements
- private Map<String, UnifiedPortComponentRefMetaData> portComponentRefs = new
LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
- // The optional <handler> elements
- private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
-
- // The optional JBossWS config-name
- private String configName;
- // The optional JBossWS config-file
- private String configFile;
- /** The URL of the actual WSDL to use, <wsdl-override> */
- private URL wsdlOverride;
- /** Arbitrary proxy properties given by <call-property> */
- private Properties callProperties;
-
- // The wsdl definition, if we have one
- private Object wsdlDefinition;
- // The java/wsdl mapping, if we have one
- private Object javaWsdlMapping;
-
- //The ClassLoader to load additional resources
- private transient URLClassLoader resourceCL;
-
- /** Set the resource classloader that can load the wsdl file
- * On the client side this is set expicitly after unmarshalling.
- */
- public void setResourceCL(URLClassLoader resourceCL)
- {
- if (resourceCL == null)
- throw new IllegalArgumentException("ResourceClassLoader cannot be
null");
-
- this.resourceCL = resourceCL;
- }
-
- public URLClassLoader getResourceCL()
- {
- if (resourceCL == null)
- resourceCL = new URLClassLoader(new URL[] {},
Thread.currentThread().getContextClassLoader());
-
- return resourceCL;
- }
-
- public String getJaxrpcMappingFile()
- {
- return jaxrpcMappingFile;
- }
-
- public void setJaxrpcMappingFile(String jaxrpcMappingFile)
- {
- this.jaxrpcMappingFile = jaxrpcMappingFile;
- }
-
- public URL getJavaWsdlMappingURL()
- {
- URL mappingURL = null;
- if (jaxrpcMappingFile != null)
- {
- mappingURL = getResourceCL().findResource(jaxrpcMappingFile);
- if (mappingURL == null)
- throw new IllegalStateException("Cannot find resource: " +
jaxrpcMappingFile);
- }
- return mappingURL;
- }
-
- public Object getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public void setJavaWsdlMapping(Object javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public UnifiedPortComponentRefMetaData[] getPortComponentRefs()
- {
- UnifiedPortComponentRefMetaData[] array = new
UnifiedPortComponentRefMetaData[portComponentRefs.size()];
- portComponentRefs.values().toArray(array);
- return array;
- }
-
- public void setPortComponentRefs(LinkedHashMap<String,
UnifiedPortComponentRefMetaData> portComponentRefs)
- {
- this.portComponentRefs = portComponentRefs;
- }
-
- public UnifiedHandlerMetaData[] getHandlers()
- {
- UnifiedHandlerMetaData[] array = new UnifiedHandlerMetaData[handlers.size()];
- handlers.toArray(array);
- return array;
- }
-
- public void setHandlers(ArrayList<UnifiedHandlerMetaData> handlers)
- {
- this.handlers = handlers;
- }
-
- public String getServiceInterface()
- {
- return serviceInterface;
- }
-
- public void setServiceInterface(String serviceInterface)
- {
- this.serviceInterface = serviceInterface;
- }
-
- public QName getServiceQName()
- {
- return serviceQName;
- }
-
- public void setServiceQName(QName serviceQName)
- {
- this.serviceQName = serviceQName;
- }
-
- public String getServiceRefName()
- {
- return serviceRefName;
- }
-
- public void setServiceRefName(String serviceRefName)
- {
- this.serviceRefName = serviceRefName;
- }
-
- public String getWsdlFile()
- {
- return wsdlFile;
- }
-
- public void setWsdlFile(String wsdlFile)
- {
- this.wsdlFile = wsdlFile;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public URL getWsdlOverride()
- {
- return wsdlOverride;
- }
-
-
- public void setWsdlOverride(URL wsdlOverride)
- {
- this.wsdlOverride = wsdlOverride;
- }
-
- public URL getWsdlURL()
- {
- URL wsdlURL = wsdlOverride;
- if (wsdlURL == null && wsdlFile != null)
- {
- wsdlURL = getResourceCL().findResource(wsdlFile);
- if (wsdlURL == null)
- throw new IllegalStateException("Cannot find resource: " +
wsdlFile);
- }
- return wsdlURL;
- }
-
- public Properties getCallProperties()
- {
- return callProperties;
- }
-
- public void setCallProperties(Properties callProperties)
- {
- this.callProperties = callProperties;
- }
-
- public Object getWsdlDefinition()
- {
- return wsdlDefinition;
- }
-
- public void setWsdlDefinition(Object wsdlDefinition)
- {
- this.wsdlDefinition = wsdlDefinition;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedServiceRefMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedServiceRefMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedServiceRefMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedServiceRefMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,258 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+//$Id$
+
+import java.io.Serializable;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * The container independent metdata data from service-ref element in web.xml,
ejb-jar.xml, and
+ * application-client.xml.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedServiceRefMetaData implements Serializable
+{
+ private static final long serialVersionUID = 122554634182144069L;
+
+ // The required <service-ref-name> element
+ private String serviceRefName;
+ // The required <service-interface> element
+ private String serviceInterface;
+ // The optional <wsdl-file> element
+ private String wsdlFile;
+ // The optional <jaxrpc-mapping-file> element
+ private String jaxrpcMappingFile;
+ // The optional <service-qname> element
+ private QName serviceQName;
+ // The LinkedHashMap<String, UnifiedPortComponentRefMetaData> for
<port-component-ref> elements
+ private Map<String, UnifiedPortComponentRefMetaData> portComponentRefs = new
LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
+ // The optional <handler> elements
+ private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
+
+ // The optional JBossWS config-name
+ private String configName;
+ // The optional JBossWS config-file
+ private String configFile;
+ /** The URL of the actual WSDL to use, <wsdl-override> */
+ private URL wsdlOverride;
+ /** Arbitrary proxy properties given by <call-property> */
+ private Properties callProperties;
+
+ // The wsdl definition, if we have one
+ private Object wsdlDefinition;
+ // The java/wsdl mapping, if we have one
+ private Object javaWsdlMapping;
+
+ //The ClassLoader to load additional resources
+ private transient URLClassLoader resourceCL;
+
+ /** Set the resource classloader that can load the wsdl file
+ * On the client side this is set expicitly after unmarshalling.
+ */
+ public void setResourceCL(URLClassLoader resourceCL)
+ {
+ if (resourceCL == null)
+ throw new IllegalArgumentException("ResourceClassLoader cannot be
null");
+
+ this.resourceCL = resourceCL;
+ }
+
+ public URLClassLoader getResourceCL()
+ {
+ if (resourceCL == null)
+ resourceCL = new URLClassLoader(new URL[] {},
Thread.currentThread().getContextClassLoader());
+
+ return resourceCL;
+ }
+
+ public String getJaxrpcMappingFile()
+ {
+ return jaxrpcMappingFile;
+ }
+
+ public void setJaxrpcMappingFile(String jaxrpcMappingFile)
+ {
+ this.jaxrpcMappingFile = jaxrpcMappingFile;
+ }
+
+ public URL getJavaWsdlMappingURL()
+ {
+ URL mappingURL = null;
+ if (jaxrpcMappingFile != null)
+ {
+ mappingURL = getResourceCL().findResource(jaxrpcMappingFile);
+ if (mappingURL == null)
+ throw new IllegalStateException("Cannot find resource: " +
jaxrpcMappingFile);
+ }
+ return mappingURL;
+ }
+
+ public Object getJavaWsdlMapping()
+ {
+ return javaWsdlMapping;
+ }
+
+ public void setJavaWsdlMapping(Object javaWsdlMapping)
+ {
+ this.javaWsdlMapping = javaWsdlMapping;
+ }
+
+ public UnifiedPortComponentRefMetaData[] getPortComponentRefs()
+ {
+ UnifiedPortComponentRefMetaData[] array = new
UnifiedPortComponentRefMetaData[portComponentRefs.size()];
+ portComponentRefs.values().toArray(array);
+ return array;
+ }
+
+ public void setPortComponentRefs(LinkedHashMap<String,
UnifiedPortComponentRefMetaData> portComponentRefs)
+ {
+ this.portComponentRefs = portComponentRefs;
+ }
+
+ public UnifiedHandlerMetaData[] getHandlers()
+ {
+ UnifiedHandlerMetaData[] array = new UnifiedHandlerMetaData[handlers.size()];
+ handlers.toArray(array);
+ return array;
+ }
+
+ public void setHandlers(ArrayList<UnifiedHandlerMetaData> handlers)
+ {
+ this.handlers = handlers;
+ }
+
+ public String getServiceInterface()
+ {
+ return serviceInterface;
+ }
+
+ public void setServiceInterface(String serviceInterface)
+ {
+ this.serviceInterface = serviceInterface;
+ }
+
+ public QName getServiceQName()
+ {
+ return serviceQName;
+ }
+
+ public void setServiceQName(QName serviceQName)
+ {
+ this.serviceQName = serviceQName;
+ }
+
+ public String getServiceRefName()
+ {
+ return serviceRefName;
+ }
+
+ public void setServiceRefName(String serviceRefName)
+ {
+ this.serviceRefName = serviceRefName;
+ }
+
+ public String getWsdlFile()
+ {
+ return wsdlFile;
+ }
+
+ public void setWsdlFile(String wsdlFile)
+ {
+ this.wsdlFile = wsdlFile;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public URL getWsdlOverride()
+ {
+ return wsdlOverride;
+ }
+
+
+ public void setWsdlOverride(URL wsdlOverride)
+ {
+ this.wsdlOverride = wsdlOverride;
+ }
+
+ public URL getWsdlURL()
+ {
+ URL wsdlURL = wsdlOverride;
+ if (wsdlURL == null && wsdlFile != null)
+ {
+ wsdlURL = getResourceCL().findResource(wsdlFile);
+ if (wsdlURL == null)
+ throw new IllegalStateException("Cannot find resource: " +
wsdlFile);
+ }
+ return wsdlURL;
+ }
+
+ public Properties getCallProperties()
+ {
+ return callProperties;
+ }
+
+ public void setCallProperties(Properties callProperties)
+ {
+ this.callProperties = callProperties;
+ }
+
+ public Object getWsdlDefinition()
+ {
+ return wsdlDefinition;
+ }
+
+ public void setWsdlDefinition(Object wsdlDefinition)
+ {
+ this.wsdlDefinition = wsdlDefinition;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedSessionMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedSessionMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedSessionMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-
-// $Id$
-
-
-/**
- * The container independent metadata of a message driven bean.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedSessionMetaData extends UnifiedBeanMetaData
-{
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedSessionMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedSessionMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedSessionMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedSessionMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+
+// $Id$
+
+
+/**
+ * The container independent metadata of a message driven bean.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedSessionMetaData extends UnifiedBeanMetaData
+{
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedWebMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,143 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-//$Id$
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The container independent representation of the web.xml and jboss-web.xml deployment
descriptors
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedWebMetaData
-{
- /** The war context root as specified at the jboss-web.xml descriptor level. */
- private String contextRoot;
- /** The servlet-mapping <servlet-name, url-pattern> */
- private Map<String, String> servletMappings = new HashMap<String,
String>();
- /** The servlet <servlet-name, servlet-class> */
- private Map<String, String> servletClassNames = new HashMap<String,
String>();
- /** The optional JBossWS config-name */
- private String configName;
- /** The optional JBossWS config-file */
- private String configFile;
- /** The security-domain value assigned to the application */
- private String securityDomain;
- /** A HashMap<String, String> for webservice description publish locations */
- private PublishLocationAdapter publishLocationAdapter;
- /** web.xml security-constraints */
- private List<UnifiedWebSecurityMetaData> securityMetaData;
-
- public String getContextRoot()
- {
- return contextRoot;
- }
-
- public void setContextRoot(String contextRoot)
- {
- this.contextRoot = contextRoot;
- }
-
- public Map<String, String> getServletMappings()
- {
- return servletMappings;
- }
-
- public void setServletMappings(Map<String, String> servletMappings)
- {
- this.servletMappings = servletMappings;
- }
-
- public Map<String, String> getServletClassNames()
- {
- return servletClassNames;
- }
-
- public void setServletClassNames(Map<String, String> servletClassNames)
- {
- this.servletClassNames = servletClassNames;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getSecurityDomain()
- {
- return securityDomain;
- }
-
- public void setSecurityDomain(String securityDomain)
- {
- this.securityDomain = securityDomain;
- }
-
- public List<UnifiedWebSecurityMetaData> getSecurityMetaData()
- {
- return securityMetaData;
- }
-
- public void setSecurityMetaData(List<UnifiedWebSecurityMetaData>
securityMetaData)
- {
- this.securityMetaData = securityMetaData;
- }
-
- public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
- {
- this.publishLocationAdapter = publishLocationAdapter;
- }
-
- public String getWsdlPublishLocationByName(String name)
- {
- String publishLocation = null;
- if (publishLocationAdapter != null)
- publishLocation = publishLocationAdapter.getWsdlPublishLocationByName(name);
- return publishLocation;
-
- }
-
- public interface PublishLocationAdapter
- {
- String getWsdlPublishLocationByName(String name);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedWebMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedWebMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+//$Id$
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The container independent representation of the web.xml and jboss-web.xml deployment
descriptors
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class UnifiedWebMetaData
+{
+ /** The war context root as specified at the jboss-web.xml descriptor level. */
+ private String contextRoot;
+ /** The servlet-mapping <servlet-name, url-pattern> */
+ private Map<String, String> servletMappings = new HashMap<String,
String>();
+ /** The servlet <servlet-name, servlet-class> */
+ private Map<String, String> servletClassNames = new HashMap<String,
String>();
+ /** The optional JBossWS config-name */
+ private String configName;
+ /** The optional JBossWS config-file */
+ private String configFile;
+ /** The security-domain value assigned to the application */
+ private String securityDomain;
+ /** A HashMap<String, String> for webservice description publish locations */
+ private PublishLocationAdapter publishLocationAdapter;
+ /** web.xml security-constraints */
+ private List<UnifiedWebSecurityMetaData> securityMetaData;
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot)
+ {
+ this.contextRoot = contextRoot;
+ }
+
+ public Map<String, String> getServletMappings()
+ {
+ return servletMappings;
+ }
+
+ public void setServletMappings(Map<String, String> servletMappings)
+ {
+ this.servletMappings = servletMappings;
+ }
+
+ public Map<String, String> getServletClassNames()
+ {
+ return servletClassNames;
+ }
+
+ public void setServletClassNames(Map<String, String> servletClassNames)
+ {
+ this.servletClassNames = servletClassNames;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+ public void setSecurityDomain(String securityDomain)
+ {
+ this.securityDomain = securityDomain;
+ }
+
+ public List<UnifiedWebSecurityMetaData> getSecurityMetaData()
+ {
+ return securityMetaData;
+ }
+
+ public void setSecurityMetaData(List<UnifiedWebSecurityMetaData>
securityMetaData)
+ {
+ this.securityMetaData = securityMetaData;
+ }
+
+ public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
+ {
+ this.publishLocationAdapter = publishLocationAdapter;
+ }
+
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String publishLocation = null;
+ if (publishLocationAdapter != null)
+ publishLocation = publishLocationAdapter.getWsdlPublishLocationByName(name);
+ return publishLocation;
+
+ }
+
+ public interface PublishLocationAdapter
+ {
+ String getWsdlPublishLocationByName(String name);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebSecurityMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedWebSecurityMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebSecurityMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.j2ee;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-
-/**
- *
- * @author darran.lofthouse(a)jboss.com
- * @since Oct 22, 2006
- */
-public class UnifiedWebSecurityMetaData
-{
-
- /** The optional security-constraint/user-data-constraint/transport-guarantee */
- private String transportGuarantee;
-
- /**
- * The HashMap for the security-constraint/web-resource-collection
- * elements.
- */
- private HashMap<String, UnifiedWebResourceCollection> webResources = new
HashMap<String, UnifiedWebResourceCollection>();
-
- public UnifiedWebResourceCollection addWebResource(final String name)
- {
- UnifiedWebResourceCollection wrc = new UnifiedWebResourceCollection(name);
- webResources.put(name, wrc);
-
- return wrc;
- }
-
- public Collection<UnifiedWebResourceCollection> getWebResources()
- {
- return webResources.values();
- }
-
- public String getTransportGuarantee()
- {
- return transportGuarantee;
- }
-
- public void setTransportGuarantee(String transportGuarantee)
- {
- this.transportGuarantee = transportGuarantee;
- }
-
- public static class UnifiedWebResourceCollection
- {
- private String name;
- /** The required url-pattern element(s) */
- private HashSet<String> urlPatterns = new HashSet<String>();
-
- public UnifiedWebResourceCollection(final String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void addPattern(String pattern)
- {
- urlPatterns.add(pattern);
- }
-
- public HashSet<String> getUrlPatterns()
- {
- return urlPatterns;
- }
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebSecurityMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedWebSecurityMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/j2ee/UnifiedWebSecurityMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/j2ee/UnifiedWebSecurityMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.j2ee;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Oct 22, 2006
+ */
+public class UnifiedWebSecurityMetaData
+{
+
+ /** The optional security-constraint/user-data-constraint/transport-guarantee */
+ private String transportGuarantee;
+
+ /**
+ * The HashMap for the security-constraint/web-resource-collection
+ * elements.
+ */
+ private HashMap<String, UnifiedWebResourceCollection> webResources = new
HashMap<String, UnifiedWebResourceCollection>();
+
+ public UnifiedWebResourceCollection addWebResource(final String name)
+ {
+ UnifiedWebResourceCollection wrc = new UnifiedWebResourceCollection(name);
+ webResources.put(name, wrc);
+
+ return wrc;
+ }
+
+ public Collection<UnifiedWebResourceCollection> getWebResources()
+ {
+ return webResources.values();
+ }
+
+ public String getTransportGuarantee()
+ {
+ return transportGuarantee;
+ }
+
+ public void setTransportGuarantee(String transportGuarantee)
+ {
+ this.transportGuarantee = transportGuarantee;
+ }
+
+ public static class UnifiedWebResourceCollection
+ {
+ private String name;
+ /** The required url-pattern element(s) */
+ private HashSet<String> urlPatterns = new HashSet<String>();
+
+ public UnifiedWebResourceCollection(final String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void addPattern(String pattern)
+ {
+ urlPatterns.add(pattern);
+ }
+
+ public HashSet<String> getUrlPatterns()
+ {
+ return urlPatterns;
+ }
+ }
+
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ExceptionMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ExceptionMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ExceptionMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,113 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-/**
- * XML mapping of the java-wsdl-mapping/exception-mapping element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class ExceptionMapping implements Serializable
-{
- private static final long serialVersionUID = 2964098233936811614L;
-
- // The parent <java-wsdl-mapping> element
- private JavaWsdlMapping javaWsdlMapping;
-
- // The required <exception-type> element
- private String exceptionType;
- // The required <wsdl-message> element
- private QName wsdlMessage;
- // The optional <constructor-parameter-order> element
- private ArrayList constructorParameterOrder = new ArrayList();
-
- public ExceptionMapping(JavaWsdlMapping javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public String getExceptionType()
- {
- return exceptionType;
- }
-
- public void setExceptionType(String exceptionType)
- {
- this.exceptionType = exceptionType;
- }
-
- public QName getWsdlMessage()
- {
- return wsdlMessage;
- }
-
- public void setWsdlMessage(QName wsdlMessage)
- {
- this.wsdlMessage = wsdlMessage;
- }
-
- public String[] getConstructorParameterOrder()
- {
- String[] arr = new String[constructorParameterOrder.size()];
- constructorParameterOrder.toArray(arr);
- return arr;
- }
-
- public void addConstructorParameter(String elementName)
- {
- constructorParameterOrder.add(elementName);
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
- sb.append("<exception-mapping>");
-
sb.append("<exception-type>").append(exceptionType).append("</exception-type>");
- sb.append("<wsdl-message
xmlns:exMsgNS='").append(wsdlMessage.getNamespaceURI()).append("'>");
-
sb.append("exMsgNS").append(":").append(wsdlMessage.getLocalPart());
- sb.append("</wsdl-message>");
-
- if (constructorParameterOrder.size() > 0)
- {
- sb.append("<constructor-parameter-order>");
- for (Iterator i = constructorParameterOrder.iterator(); i.hasNext();)
-
sb.append("<element-name>").append(i.next()).append("</element-name>");
- sb.append("</constructor-parameter-order>");
- }
- sb.append("</exception-mapping>");
- return sb.toString();
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ExceptionMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ExceptionMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ExceptionMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ExceptionMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+/**
+ * XML mapping of the java-wsdl-mapping/exception-mapping element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class ExceptionMapping implements Serializable
+{
+ private static final long serialVersionUID = 2964098233936811614L;
+
+ // The parent <java-wsdl-mapping> element
+ private JavaWsdlMapping javaWsdlMapping;
+
+ // The required <exception-type> element
+ private String exceptionType;
+ // The required <wsdl-message> element
+ private QName wsdlMessage;
+ // The optional <constructor-parameter-order> element
+ private ArrayList constructorParameterOrder = new ArrayList();
+
+ public ExceptionMapping(JavaWsdlMapping javaWsdlMapping)
+ {
+ this.javaWsdlMapping = javaWsdlMapping;
+ }
+
+ public JavaWsdlMapping getJavaWsdlMapping()
+ {
+ return javaWsdlMapping;
+ }
+
+ public String getExceptionType()
+ {
+ return exceptionType;
+ }
+
+ public void setExceptionType(String exceptionType)
+ {
+ this.exceptionType = exceptionType;
+ }
+
+ public QName getWsdlMessage()
+ {
+ return wsdlMessage;
+ }
+
+ public void setWsdlMessage(QName wsdlMessage)
+ {
+ this.wsdlMessage = wsdlMessage;
+ }
+
+ public String[] getConstructorParameterOrder()
+ {
+ String[] arr = new String[constructorParameterOrder.size()];
+ constructorParameterOrder.toArray(arr);
+ return arr;
+ }
+
+ public void addConstructorParameter(String elementName)
+ {
+ constructorParameterOrder.add(elementName);
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append("<exception-mapping>");
+
sb.append("<exception-type>").append(exceptionType).append("</exception-type>");
+ sb.append("<wsdl-message
xmlns:exMsgNS='").append(wsdlMessage.getNamespaceURI()).append("'>");
+
sb.append("exMsgNS").append(":").append(wsdlMessage.getLocalPart());
+ sb.append("</wsdl-message>");
+
+ if (constructorParameterOrder.size() > 0)
+ {
+ sb.append("<constructor-parameter-order>");
+ for (Iterator i = constructorParameterOrder.iterator(); i.hasNext();)
+
sb.append("<element-name>").append(i.next()).append("</element-name>");
+ sb.append("</constructor-parameter-order>");
+ }
+ sb.append("</exception-mapping>");
+ return sb.toString();
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,317 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-
-/**
- * XML mapping of the java-wsdl-mapping root element in jaxrpc-mapping.xml
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class JavaWsdlMapping implements Serializable
-{
- private static final long serialVersionUID = -142671631068024054L;
-
- // provide logging
- private static Logger log = Logger.getLogger(JavaWsdlMapping.class);
-
- // One or more <package-mapping> elements
- private List packageMappings = new ArrayList();
- // Zero or more <java-xml-type-mapping> elements
- private List javaXmlTypeMappings = new ArrayList();
- // Zero or more <exception-mapping> elements
- private List exceptionMappings = new ArrayList();
- // Zero or more <service-interface-mapping> elements
- private List serviceInterfaceMappings = new ArrayList();
- // Zero or more <service-endpoint-interface-mapping> elements
- private List serviceEndpointInterfaceMappings = new ArrayList();
-
- public PackageMapping[] getPackageMappings()
- {
- PackageMapping[] arr = new PackageMapping[packageMappings.size()];
- packageMappings.toArray(arr);
- return arr;
- }
-
- public JavaXmlTypeMapping[] getJavaXmlTypeMappings()
- {
- JavaXmlTypeMapping[] arr = new JavaXmlTypeMapping[javaXmlTypeMappings.size()];
- javaXmlTypeMappings.toArray(arr);
- return arr;
- }
-
- public ExceptionMapping[] getExceptionMappings()
- {
- ExceptionMapping[] arr = new ExceptionMapping[exceptionMappings.size()];
- exceptionMappings.toArray(arr);
- return arr;
- }
-
- public ServiceInterfaceMapping[] getServiceInterfaceMappings()
- {
- ServiceInterfaceMapping[] arr = new
ServiceInterfaceMapping[serviceInterfaceMappings.size()];
- serviceInterfaceMappings.toArray(arr);
- return arr;
- }
-
- public ServiceEndpointInterfaceMapping[] getServiceEndpointInterfaceMappings()
- {
- ServiceEndpointInterfaceMapping[] arr = new
ServiceEndpointInterfaceMapping[serviceEndpointInterfaceMappings.size()];
- serviceEndpointInterfaceMappings.toArray(arr);
- return arr;
- }
-
- // convenience methods
********************************************************************
-
- /** Get the package string for a given URI
- */
- public String getPackageNameForNamespaceURI(String nsURI)
- {
- String packageStr = null;
- for (int i = 0; packageStr == null && i < packageMappings.size(); i++)
- {
- PackageMapping mapping = (PackageMapping)packageMappings.get(i);
- if (mapping.getNamespaceURI().equals(nsURI))
- packageStr = mapping.getPackageType();
- }
- return packageStr;
- }
-
- /** Get the type mapping fo a given root-type-qname
- */
- public JavaXmlTypeMapping getTypeMappingForQName(QName xmlType)
- {
- JavaXmlTypeMapping typeMapping = null;
-
- if (xmlType != null)
- {
- // Check the <root-type-qname>
- Iterator it = javaXmlTypeMappings.iterator();
- while (typeMapping == null && it.hasNext())
- {
- JavaXmlTypeMapping mapping = (JavaXmlTypeMapping)it.next();
- if (xmlType.equals(mapping.getRootTypeQName()))
- typeMapping = mapping;
- }
-
- // Check the <anonymous-type-qname>
- it = javaXmlTypeMappings.iterator();
- while (typeMapping == null && it.hasNext())
- {
- JavaXmlTypeMapping mapping = (JavaXmlTypeMapping)it.next();
- QName anonymousQName = mapping.getAnonymousTypeQName();
- if (anonymousQName != null)
- {
- if (xmlType.getNamespaceURI().equals(anonymousQName.getNamespaceURI()))
- {
- String localPart = xmlType.getLocalPart();
- if (anonymousQName.getLocalPart().equals(localPart))
- typeMapping = mapping;
- if (anonymousQName.getLocalPart().equals(">" +
localPart))
- typeMapping = mapping;
- }
- }
- }
-
- if (typeMapping == null)
- log.warn("Cannot find jaxrpc-mapping for type: " + xmlType);
- }
-
- return typeMapping;
- }
-
- /** Get the exception mapping fo a given wsdl message
- */
- public ExceptionMapping getExceptionMappingForMessageQName(QName wsdlMessage)
- {
- ExceptionMapping exMapping = null;
-
- if (wsdlMessage != null)
- {
- Iterator it = exceptionMappings.iterator();
- while (it.hasNext())
- {
- ExceptionMapping mapping = (ExceptionMapping)it.next();
- if (wsdlMessage.equals(mapping.getWsdlMessage()))
- exMapping = mapping;
- }
- }
-
- return exMapping;
- }
-
- /** Get the exception mapping fo a given exception type
- */
- public ExceptionMapping getExceptionMappingForExceptionType(String javaType)
- {
- ExceptionMapping exMapping = null;
-
- if (javaType != null)
- {
- Iterator it = exceptionMappings.iterator();
- while (it.hasNext())
- {
- ExceptionMapping mapping = (ExceptionMapping)it.next();
- if (javaType.equals(mapping.getExceptionType()))
- exMapping = mapping;
- }
- }
-
- return exMapping;
- }
-
- /** Get the port type qname for a given service endpoint infterface
- */
- public QName getPortTypeQNameForServiceEndpointInterface(String seiName)
- {
- QName portTypeQName = null;
-
- ServiceEndpointInterfaceMapping[] seiMappings =
getServiceEndpointInterfaceMappings();
- for (int i = 0; i < seiMappings.length; i++)
- {
- ServiceEndpointInterfaceMapping aux = seiMappings[i];
- if (aux.getServiceEndpointInterface().equals(seiName))
- portTypeQName = aux.getWsdlPortType();
- }
-
- return portTypeQName;
- }
-
- /** Get the service endpoint infterfacemapping for a given port type qname
- */
- public ServiceEndpointInterfaceMapping
getServiceEndpointInterfaceMappingByPortType(QName portType)
- {
- ServiceEndpointInterfaceMapping seiMapping = null;
-
- ServiceEndpointInterfaceMapping[] seiMappings =
getServiceEndpointInterfaceMappings();
- for (int i = 0; seiMapping == null && i < seiMappings.length; i++)
- {
- ServiceEndpointInterfaceMapping aux = seiMappings[i];
- if (aux.getWsdlPortType().equals(portType))
- seiMapping = aux;
- }
-
- return seiMapping;
- }
-
- /** Get the service endpoint infterface mapping for a service endpoint infterface
- */
- public ServiceEndpointInterfaceMapping getServiceEndpointInterfaceMapping(String
seiName)
- {
- ServiceEndpointInterfaceMapping seiMapping = null;
-
- ServiceEndpointInterfaceMapping[] seiMappings =
getServiceEndpointInterfaceMappings();
- for (int i = 0; seiMapping == null && i < seiMappings.length; i++)
- {
- ServiceEndpointInterfaceMapping aux = seiMappings[i];
- if (aux.getServiceEndpointInterface().equals(seiName))
- seiMapping = aux;
- }
-
- return seiMapping;
- }
-
- /**
- * Serialize the model as a String (Should return the mapping file)
- *
- * @return
- */
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
- //Append Standard Namespace Header
- sb.append("<java-wsdl-mapping version='1.1'
").append("xmlns='http://java.sun.com/xml/ns/j2ee' ");
-
sb.append("xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance&...
");
-
sb.append("xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee ");
-
sb.append("http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_...;
-
- Iterator piter = packageMappings.iterator();
- while (piter != null && piter.hasNext())
- sb.append(((PackageMapping)piter.next()).serialize());
-
- Iterator jxiter = javaXmlTypeMappings.iterator();
- while (jxiter.hasNext())
- sb.append(((JavaXmlTypeMapping)jxiter.next()).serialize());
-
- for (Iterator i = exceptionMappings.iterator(); i.hasNext();)
- sb.append(((ExceptionMapping)i.next()).serialize());
-
- // A <service-interface-mapping> is followed by 1 or many
<service-endpoint-interface-mapping> elements
- int lenSIM = serviceInterfaceMappings.size();
- for (int i = 0; i < lenSIM; i++)
- {
- ServiceInterfaceMapping sim =
(ServiceInterfaceMapping)serviceInterfaceMappings.get(i);
- sb.append(sim.serialize());
- ServiceEndpointInterfaceMapping seim =
(ServiceEndpointInterfaceMapping)serviceEndpointInterfaceMappings.get(i);
- sb.append(seim.serialize());
- }
-
- int lenSEI = serviceEndpointInterfaceMappings.size();
- for (int i = lenSIM; i < lenSEI; i++)
- {
- ServiceEndpointInterfaceMapping seim =
(ServiceEndpointInterfaceMapping)serviceEndpointInterfaceMappings.get(i);
- sb.append(seim.serialize());
- }
-
- sb.append("</java-wsdl-mapping>");
-
- return sb.toString();
- }
-
- // factory methods
********************************************************************
-
- public void addPackageMapping(PackageMapping packageMapping)
- {
- packageMappings.add(packageMapping);
- }
-
- public void addJavaXmlTypeMappings(JavaXmlTypeMapping typeMapping)
- {
- javaXmlTypeMappings.add(typeMapping);
- }
-
- public void addExceptionMappings(ExceptionMapping exceptionMapping)
- {
- exceptionMappings.add(exceptionMapping);
- }
-
- public void addServiceInterfaceMappings(ServiceInterfaceMapping
serviceInterfaceMapping)
- {
- serviceInterfaceMappings.add(serviceInterfaceMapping);
- }
-
- public void addServiceEndpointInterfaceMappings(ServiceEndpointInterfaceMapping
serviceEndpointInterfaceMapping)
- {
- serviceEndpointInterfaceMappings.add(serviceEndpointInterfaceMapping);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,317 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+
+/**
+ * XML mapping of the java-wsdl-mapping root element in jaxrpc-mapping.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class JavaWsdlMapping implements Serializable
+{
+ private static final long serialVersionUID = -142671631068024054L;
+
+ // provide logging
+ private static Logger log = Logger.getLogger(JavaWsdlMapping.class);
+
+ // One or more <package-mapping> elements
+ private List packageMappings = new ArrayList();
+ // Zero or more <java-xml-type-mapping> elements
+ private List javaXmlTypeMappings = new ArrayList();
+ // Zero or more <exception-mapping> elements
+ private List exceptionMappings = new ArrayList();
+ // Zero or more <service-interface-mapping> elements
+ private List serviceInterfaceMappings = new ArrayList();
+ // Zero or more <service-endpoint-interface-mapping> elements
+ private List serviceEndpointInterfaceMappings = new ArrayList();
+
+ public PackageMapping[] getPackageMappings()
+ {
+ PackageMapping[] arr = new PackageMapping[packageMappings.size()];
+ packageMappings.toArray(arr);
+ return arr;
+ }
+
+ public JavaXmlTypeMapping[] getJavaXmlTypeMappings()
+ {
+ JavaXmlTypeMapping[] arr = new JavaXmlTypeMapping[javaXmlTypeMappings.size()];
+ javaXmlTypeMappings.toArray(arr);
+ return arr;
+ }
+
+ public ExceptionMapping[] getExceptionMappings()
+ {
+ ExceptionMapping[] arr = new ExceptionMapping[exceptionMappings.size()];
+ exceptionMappings.toArray(arr);
+ return arr;
+ }
+
+ public ServiceInterfaceMapping[] getServiceInterfaceMappings()
+ {
+ ServiceInterfaceMapping[] arr = new
ServiceInterfaceMapping[serviceInterfaceMappings.size()];
+ serviceInterfaceMappings.toArray(arr);
+ return arr;
+ }
+
+ public ServiceEndpointInterfaceMapping[] getServiceEndpointInterfaceMappings()
+ {
+ ServiceEndpointInterfaceMapping[] arr = new
ServiceEndpointInterfaceMapping[serviceEndpointInterfaceMappings.size()];
+ serviceEndpointInterfaceMappings.toArray(arr);
+ return arr;
+ }
+
+ // convenience methods
********************************************************************
+
+ /** Get the package string for a given URI
+ */
+ public String getPackageNameForNamespaceURI(String nsURI)
+ {
+ String packageStr = null;
+ for (int i = 0; packageStr == null && i < packageMappings.size(); i++)
+ {
+ PackageMapping mapping = (PackageMapping)packageMappings.get(i);
+ if (mapping.getNamespaceURI().equals(nsURI))
+ packageStr = mapping.getPackageType();
+ }
+ return packageStr;
+ }
+
+ /** Get the type mapping fo a given root-type-qname
+ */
+ public JavaXmlTypeMapping getTypeMappingForQName(QName xmlType)
+ {
+ JavaXmlTypeMapping typeMapping = null;
+
+ if (xmlType != null)
+ {
+ // Check the <root-type-qname>
+ Iterator it = javaXmlTypeMappings.iterator();
+ while (typeMapping == null && it.hasNext())
+ {
+ JavaXmlTypeMapping mapping = (JavaXmlTypeMapping)it.next();
+ if (xmlType.equals(mapping.getRootTypeQName()))
+ typeMapping = mapping;
+ }
+
+ // Check the <anonymous-type-qname>
+ it = javaXmlTypeMappings.iterator();
+ while (typeMapping == null && it.hasNext())
+ {
+ JavaXmlTypeMapping mapping = (JavaXmlTypeMapping)it.next();
+ QName anonymousQName = mapping.getAnonymousTypeQName();
+ if (anonymousQName != null)
+ {
+ if (xmlType.getNamespaceURI().equals(anonymousQName.getNamespaceURI()))
+ {
+ String localPart = xmlType.getLocalPart();
+ if (anonymousQName.getLocalPart().equals(localPart))
+ typeMapping = mapping;
+ if (anonymousQName.getLocalPart().equals(">" +
localPart))
+ typeMapping = mapping;
+ }
+ }
+ }
+
+ if (typeMapping == null)
+ log.warn("Cannot find jaxrpc-mapping for type: " + xmlType);
+ }
+
+ return typeMapping;
+ }
+
+ /** Get the exception mapping fo a given wsdl message
+ */
+ public ExceptionMapping getExceptionMappingForMessageQName(QName wsdlMessage)
+ {
+ ExceptionMapping exMapping = null;
+
+ if (wsdlMessage != null)
+ {
+ Iterator it = exceptionMappings.iterator();
+ while (it.hasNext())
+ {
+ ExceptionMapping mapping = (ExceptionMapping)it.next();
+ if (wsdlMessage.equals(mapping.getWsdlMessage()))
+ exMapping = mapping;
+ }
+ }
+
+ return exMapping;
+ }
+
+ /** Get the exception mapping fo a given exception type
+ */
+ public ExceptionMapping getExceptionMappingForExceptionType(String javaType)
+ {
+ ExceptionMapping exMapping = null;
+
+ if (javaType != null)
+ {
+ Iterator it = exceptionMappings.iterator();
+ while (it.hasNext())
+ {
+ ExceptionMapping mapping = (ExceptionMapping)it.next();
+ if (javaType.equals(mapping.getExceptionType()))
+ exMapping = mapping;
+ }
+ }
+
+ return exMapping;
+ }
+
+ /** Get the port type qname for a given service endpoint infterface
+ */
+ public QName getPortTypeQNameForServiceEndpointInterface(String seiName)
+ {
+ QName portTypeQName = null;
+
+ ServiceEndpointInterfaceMapping[] seiMappings =
getServiceEndpointInterfaceMappings();
+ for (int i = 0; i < seiMappings.length; i++)
+ {
+ ServiceEndpointInterfaceMapping aux = seiMappings[i];
+ if (aux.getServiceEndpointInterface().equals(seiName))
+ portTypeQName = aux.getWsdlPortType();
+ }
+
+ return portTypeQName;
+ }
+
+ /** Get the service endpoint infterfacemapping for a given port type qname
+ */
+ public ServiceEndpointInterfaceMapping
getServiceEndpointInterfaceMappingByPortType(QName portType)
+ {
+ ServiceEndpointInterfaceMapping seiMapping = null;
+
+ ServiceEndpointInterfaceMapping[] seiMappings =
getServiceEndpointInterfaceMappings();
+ for (int i = 0; seiMapping == null && i < seiMappings.length; i++)
+ {
+ ServiceEndpointInterfaceMapping aux = seiMappings[i];
+ if (aux.getWsdlPortType().equals(portType))
+ seiMapping = aux;
+ }
+
+ return seiMapping;
+ }
+
+ /** Get the service endpoint infterface mapping for a service endpoint infterface
+ */
+ public ServiceEndpointInterfaceMapping getServiceEndpointInterfaceMapping(String
seiName)
+ {
+ ServiceEndpointInterfaceMapping seiMapping = null;
+
+ ServiceEndpointInterfaceMapping[] seiMappings =
getServiceEndpointInterfaceMappings();
+ for (int i = 0; seiMapping == null && i < seiMappings.length; i++)
+ {
+ ServiceEndpointInterfaceMapping aux = seiMappings[i];
+ if (aux.getServiceEndpointInterface().equals(seiName))
+ seiMapping = aux;
+ }
+
+ return seiMapping;
+ }
+
+ /**
+ * Serialize the model as a String (Should return the mapping file)
+ *
+ * @return
+ */
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+ //Append Standard Namespace Header
+ sb.append("<java-wsdl-mapping version='1.1'
").append("xmlns='http://java.sun.com/xml/ns/j2ee' ");
+
sb.append("xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance&...
");
+
sb.append("xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee ");
+
sb.append("http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_...;
+
+ Iterator piter = packageMappings.iterator();
+ while (piter != null && piter.hasNext())
+ sb.append(((PackageMapping)piter.next()).serialize());
+
+ Iterator jxiter = javaXmlTypeMappings.iterator();
+ while (jxiter.hasNext())
+ sb.append(((JavaXmlTypeMapping)jxiter.next()).serialize());
+
+ for (Iterator i = exceptionMappings.iterator(); i.hasNext();)
+ sb.append(((ExceptionMapping)i.next()).serialize());
+
+ // A <service-interface-mapping> is followed by 1 or many
<service-endpoint-interface-mapping> elements
+ int lenSIM = serviceInterfaceMappings.size();
+ for (int i = 0; i < lenSIM; i++)
+ {
+ ServiceInterfaceMapping sim =
(ServiceInterfaceMapping)serviceInterfaceMappings.get(i);
+ sb.append(sim.serialize());
+ ServiceEndpointInterfaceMapping seim =
(ServiceEndpointInterfaceMapping)serviceEndpointInterfaceMappings.get(i);
+ sb.append(seim.serialize());
+ }
+
+ int lenSEI = serviceEndpointInterfaceMappings.size();
+ for (int i = lenSIM; i < lenSEI; i++)
+ {
+ ServiceEndpointInterfaceMapping seim =
(ServiceEndpointInterfaceMapping)serviceEndpointInterfaceMappings.get(i);
+ sb.append(seim.serialize());
+ }
+
+ sb.append("</java-wsdl-mapping>");
+
+ return sb.toString();
+ }
+
+ // factory methods
********************************************************************
+
+ public void addPackageMapping(PackageMapping packageMapping)
+ {
+ packageMappings.add(packageMapping);
+ }
+
+ public void addJavaXmlTypeMappings(JavaXmlTypeMapping typeMapping)
+ {
+ javaXmlTypeMappings.add(typeMapping);
+ }
+
+ public void addExceptionMappings(ExceptionMapping exceptionMapping)
+ {
+ exceptionMappings.add(exceptionMapping);
+ }
+
+ public void addServiceInterfaceMappings(ServiceInterfaceMapping
serviceInterfaceMapping)
+ {
+ serviceInterfaceMappings.add(serviceInterfaceMapping);
+ }
+
+ public void addServiceEndpointInterfaceMappings(ServiceEndpointInterfaceMapping
serviceEndpointInterfaceMapping)
+ {
+ serviceEndpointInterfaceMappings.add(serviceEndpointInterfaceMapping);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,578 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A JBossXB factory for {@link
org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class JavaWsdlMappingFactory implements ObjectModelFactory
-{
- // provide logging
- private static Logger log = Logger.getLogger(JavaWsdlMappingFactory.class);
-
- // Hide constructor
- private JavaWsdlMappingFactory()
- {
- }
-
- /**
- * Create a new instance of a jaxrpc-mapping factory
- */
- public static JavaWsdlMappingFactory newInstance()
- {
- return new JavaWsdlMappingFactory();
- }
-
- /**
- * Factory method for JavaWsdlMapping
- */
- public JavaWsdlMapping parse(URL jaxrpcMappingFile) throws IOException
- {
- if (jaxrpcMappingFile == null)
- {
- throw new IllegalArgumentException("URL cannot be null");
- }
-
- // setup the XML binding Unmarshaller
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- InputStream is = jaxrpcMappingFile.openStream();
- try
- {
- JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)unmarshaller.unmarshal(is,
this, null);
- return javaWsdlMapping;
- }
- catch (JBossXBException e)
- {
- IOException ioex = new IOException("Cannot parse: " +
jaxrpcMappingFile);
- Throwable cause = e.getCause();
- if (cause != null)
- ioex.initCause(cause);
- throw ioex;
- }
- finally
- {
- is.close();
- }
- }
-
- /**
- * This method is called on the factory by the object model builder when the parsing
starts.
- */
- public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- return new JavaWsdlMapping();
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
- {
- return root;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(JavaWsdlMapping javaWsdlMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("package-mapping".equals(localName))
- {
- return new PackageMapping(javaWsdlMapping);
- }
- if ("java-xml-type-mapping".equals(localName))
- {
- return new JavaXmlTypeMapping(javaWsdlMapping);
- }
- if ("exception-mapping".equals(localName))
- {
- return new ExceptionMapping(javaWsdlMapping);
- }
- if ("service-interface-mapping".equals(localName))
- {
- return new ServiceInterfaceMapping(javaWsdlMapping);
- }
- if ("service-endpoint-interface-mapping".equals(localName))
- {
- return new ServiceEndpointInterfaceMapping(javaWsdlMapping);
- }
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(JavaWsdlMapping javaWsdlMapping, PackageMapping packageMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
packageMapping + "]");
- javaWsdlMapping.addPackageMapping(packageMapping);
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(JavaWsdlMapping javaWsdlMapping, JavaXmlTypeMapping typeMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
typeMapping + "]");
- javaWsdlMapping.addJavaXmlTypeMappings(typeMapping);
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(JavaWsdlMapping javaWsdlMapping, ExceptionMapping
exceptionMapping, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
exceptionMapping + "]");
- javaWsdlMapping.addExceptionMappings(exceptionMapping);
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(JavaWsdlMapping javaWsdlMapping, ServiceInterfaceMapping
siMapping, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
siMapping + "]");
- javaWsdlMapping.addServiceInterfaceMappings(siMapping);
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(JavaWsdlMapping javaWsdlMapping, ServiceEndpointInterfaceMapping
seiMapping, UnmarshallingContext navigator, String namespaceURI,
- String localName)
- {
- log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
seiMapping + "]");
- javaWsdlMapping.addServiceEndpointInterfaceMappings(seiMapping);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(PackageMapping packageMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + packageMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("package-type".equals(localName))
- {
- packageMapping.setPackageType(value);
- }
- else if ("namespaceURI".equals(localName))
- {
- packageMapping.setNamespaceURI(value);
- }
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(JavaXmlTypeMapping typeMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("variable-mapping".equals(localName))
- {
- return new VariableMapping(typeMapping);
- }
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(JavaXmlTypeMapping typeMapping, VariableMapping variableMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- log.trace("addChild: [obj=" + typeMapping + ",child=" +
variableMapping + "]");
- typeMapping.addVariableMapping(variableMapping);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(JavaXmlTypeMapping typeMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + typeMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("java-type".equals(localName))
- {
- typeMapping.setJavaType(value);
- }
- else if ("root-type-qname".equals(localName))
- {
- QName qname = navigator.resolveQName(value);
- typeMapping.setRootTypeQName(qname);
- }
- else if ("anonymous-type-qname".equals(localName))
- {
- QName qname = null;
- try
- {
- // <anonymous-type-qname
xmlns:typeNS="http://org.jboss.ws/anonymous/types">typeNS:>root</anonymous-type-qname>
- qname = navigator.resolveQName(value);
- }
- catch (Exception e)
- {
- // ignore unresolved qname
- }
-
- if (qname == null)
- {
- //
<
anonymous-type-qname>http://example.com/stockquote/schemas:>Get...
- int index = value.lastIndexOf(':');
- if (index > 0)
- {
- String nsURI = value.substring(0, index);
- String localPart = value.substring(index + 1);
- qname = new QName(nsURI, localPart);
- }
- }
-
- if (qname == null)
- throw new IllegalArgumentException("Invalid anonymous qname: " +
value);
-
- typeMapping.setAnonymousTypeQName(qname);
- }
- else if ("qname-scope".equals(localName))
- {
- typeMapping.setQNameScope(value);
- }
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(ExceptionMapping exceptionMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + exceptionMapping + ",localName="
+ localName + ",value=" + value + "]");
- if ("exception-type".equals(localName))
- {
- exceptionMapping.setExceptionType(value);
- }
- else if ("wsdl-message".equals(localName))
- {
- exceptionMapping.setWsdlMessage(navigator.resolveQName(value));
- }
- else if ("constructor-parameter-order".equals(localName))
- {
- exceptionMapping.addConstructorParameter(value);
- }
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(ServiceInterfaceMapping siMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("port-mapping".equals(localName))
- {
- return new PortMapping(siMapping);
- }
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(ServiceInterfaceMapping siMapping, PortMapping portMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- log.trace("addChild: [obj=" + siMapping + ",child=" +
portMapping + "]");
- siMapping.addPortMapping(portMapping);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(ServiceInterfaceMapping siMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + siMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("service-interface".equals(localName))
- {
- siMapping.setServiceInterface(value);
- }
- else if ("wsdl-service-name".equals(localName))
- {
- siMapping.setWsdlServiceName(navigator.resolveQName(value));
- }
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(ServiceEndpointInterfaceMapping seiMapping,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("service-endpoint-method-mapping".equals(localName))
- {
- return new ServiceEndpointMethodMapping(seiMapping);
- }
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(ServiceEndpointInterfaceMapping seiMapping,
ServiceEndpointMethodMapping seiMethodMapping, UnmarshallingContext navigator, String
namespaceURI,
- String localName)
- {
- log.trace("addChild: [obj=" + seiMapping + ",child=" +
seiMapping + "]");
- seiMapping.addServiceEndpointMethodMapping(seiMethodMapping);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(ServiceEndpointInterfaceMapping seiMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + seiMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("service-endpoint-interface".equals(localName))
- {
- seiMapping.setServiceEndpointInterface(value);
- }
- else if ("wsdl-port-type".equals(localName))
- {
- seiMapping.setWsdlPortType(navigator.resolveQName(value));
- }
- else if ("wsdl-binding".equals(localName))
- {
- seiMapping.setWsdlBinding(navigator.resolveQName(value));
- }
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(VariableMapping variableMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + variableMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("java-variable-name".equals(localName))
- {
- variableMapping.setJavaVariableName(value);
- }
- else if ("data-member".equals(localName))
- {
- variableMapping.setDataMember(true);
- }
- else if ("xml-attribute-name".equals(localName))
- {
- variableMapping.setXmlAttributeName(value);
- }
- else if ("xml-element-name".equals(localName))
- {
- variableMapping.setXmlElementName(value);
- }
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(VariableMapping variableMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("data-member".equals(localName))
- {
- variableMapping.setDataMember(true);
- }
- else if ("xml-wildcard".equals(localName))
- {
- variableMapping.setXmlWildcard(true);
- }
- return null;
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(PortMapping portMapping, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + portMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("port-name".equals(localName))
- {
- portMapping.setPortName(value);
- }
- else if ("java-port-name".equals(localName))
- {
- portMapping.setJavaPortName(value);
- }
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(ServiceEndpointMethodMapping methodMapping,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("method-param-parts-mapping".equals(localName))
- {
- return new MethodParamPartsMapping(methodMapping);
- }
- if ("wsdl-return-value-mapping".equals(localName))
- {
- return new WsdlReturnValueMapping(methodMapping);
- }
- if ("wrapped-element".equals(localName))
- {
- methodMapping.setWrappedElement(true);
- }
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(ServiceEndpointMethodMapping methodMapping,
MethodParamPartsMapping partsMapping, UnmarshallingContext navigator, String
namespaceURI,
- String localName)
- {
- log.trace("addChild: [obj=" + methodMapping + ",child=" +
partsMapping + "]");
- methodMapping.addMethodParamPartsMapping(partsMapping);
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(ServiceEndpointMethodMapping methodMapping,
WsdlReturnValueMapping returnValueMapping, UnmarshallingContext navigator, String
namespaceURI,
- String localName)
- {
- log.trace("addChild: [obj=" + methodMapping + ",child=" +
returnValueMapping + "]");
- methodMapping.setWsdlReturnValueMapping(returnValueMapping);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(ServiceEndpointMethodMapping methodMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + methodMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("java-method-name".equals(localName))
- {
- methodMapping.setJavaMethodName(value);
- }
- else if ("wsdl-operation".equals(localName))
- {
- methodMapping.setWsdlOperation(value);
- }
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(MethodParamPartsMapping partsMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("wsdl-message-mapping".equals(localName))
- {
- return new WsdlMessageMapping(partsMapping);
- }
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(MethodParamPartsMapping partsMapping, WsdlMessageMapping
msgMapping, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- log.trace("addChild: [obj=" + partsMapping + ",child=" +
msgMapping + "]");
- partsMapping.setWsdlMessageMapping(msgMapping);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(MethodParamPartsMapping partsMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + partsMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("param-position".equals(localName))
- {
- partsMapping.setParamPosition(new Integer(value).intValue());
- }
- else if ("param-type".equals(localName))
- {
- partsMapping.setParamType(value);
- }
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(WsdlReturnValueMapping retValueMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + retValueMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("method-return-value".equals(localName))
- {
- retValueMapping.setMethodReturnValue(value);
- }
- else if ("wsdl-message".equals(localName))
- {
- retValueMapping.setWsdlMessage(navigator.resolveQName(value));
- }
- else if ("wsdl-message-part-name".equals(localName))
- {
- retValueMapping.setWsdlMessagePartName(value);
- }
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(WsdlMessageMapping msgMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- log.trace("setValue: [obj=" + msgMapping + ",localName=" +
localName + ",value=" + value + "]");
- if ("wsdl-message".equals(localName))
- {
- msgMapping.setWsdlMessage(navigator.resolveQName(value));
- }
- else if ("wsdl-message-part-name".equals(localName))
- {
- msgMapping.setWsdlMessagePartName(value);
- }
- else if ("parameter-mode".equals(localName))
- {
- msgMapping.setParameterMode(value);
- }
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WsdlMessageMapping msgMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- log.trace("newChild: " + localName);
- if ("soap-header".equals(localName))
- {
- msgMapping.setSoapHeader(true);
- }
- return null;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,578 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A JBossXB factory for {@link
org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping}
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class JavaWsdlMappingFactory implements ObjectModelFactory
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(JavaWsdlMappingFactory.class);
+
+ // Hide constructor
+ private JavaWsdlMappingFactory()
+ {
+ }
+
+ /**
+ * Create a new instance of a jaxrpc-mapping factory
+ */
+ public static JavaWsdlMappingFactory newInstance()
+ {
+ return new JavaWsdlMappingFactory();
+ }
+
+ /**
+ * Factory method for JavaWsdlMapping
+ */
+ public JavaWsdlMapping parse(URL jaxrpcMappingFile) throws IOException
+ {
+ if (jaxrpcMappingFile == null)
+ {
+ throw new IllegalArgumentException("URL cannot be null");
+ }
+
+ // setup the XML binding Unmarshaller
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ InputStream is = jaxrpcMappingFile.openStream();
+ try
+ {
+ JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)unmarshaller.unmarshal(is,
this, null);
+ return javaWsdlMapping;
+ }
+ catch (JBossXBException e)
+ {
+ IOException ioex = new IOException("Cannot parse: " +
jaxrpcMappingFile);
+ Throwable cause = e.getCause();
+ if (cause != null)
+ ioex.initCause(cause);
+ throw ioex;
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ /**
+ * This method is called on the factory by the object model builder when the parsing
starts.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ return new JavaWsdlMapping();
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(JavaWsdlMapping javaWsdlMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("package-mapping".equals(localName))
+ {
+ return new PackageMapping(javaWsdlMapping);
+ }
+ if ("java-xml-type-mapping".equals(localName))
+ {
+ return new JavaXmlTypeMapping(javaWsdlMapping);
+ }
+ if ("exception-mapping".equals(localName))
+ {
+ return new ExceptionMapping(javaWsdlMapping);
+ }
+ if ("service-interface-mapping".equals(localName))
+ {
+ return new ServiceInterfaceMapping(javaWsdlMapping);
+ }
+ if ("service-endpoint-interface-mapping".equals(localName))
+ {
+ return new ServiceEndpointInterfaceMapping(javaWsdlMapping);
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JavaWsdlMapping javaWsdlMapping, PackageMapping packageMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
packageMapping + "]");
+ javaWsdlMapping.addPackageMapping(packageMapping);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JavaWsdlMapping javaWsdlMapping, JavaXmlTypeMapping typeMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
typeMapping + "]");
+ javaWsdlMapping.addJavaXmlTypeMappings(typeMapping);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JavaWsdlMapping javaWsdlMapping, ExceptionMapping
exceptionMapping, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
exceptionMapping + "]");
+ javaWsdlMapping.addExceptionMappings(exceptionMapping);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JavaWsdlMapping javaWsdlMapping, ServiceInterfaceMapping
siMapping, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
siMapping + "]");
+ javaWsdlMapping.addServiceInterfaceMappings(siMapping);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JavaWsdlMapping javaWsdlMapping, ServiceEndpointInterfaceMapping
seiMapping, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
+ {
+ log.trace("addChild: [obj=" + javaWsdlMapping + ",child=" +
seiMapping + "]");
+ javaWsdlMapping.addServiceEndpointInterfaceMappings(seiMapping);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(PackageMapping packageMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + packageMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("package-type".equals(localName))
+ {
+ packageMapping.setPackageType(value);
+ }
+ else if ("namespaceURI".equals(localName))
+ {
+ packageMapping.setNamespaceURI(value);
+ }
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(JavaXmlTypeMapping typeMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("variable-mapping".equals(localName))
+ {
+ return new VariableMapping(typeMapping);
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(JavaXmlTypeMapping typeMapping, VariableMapping variableMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + typeMapping + ",child=" +
variableMapping + "]");
+ typeMapping.addVariableMapping(variableMapping);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(JavaXmlTypeMapping typeMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + typeMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("java-type".equals(localName))
+ {
+ typeMapping.setJavaType(value);
+ }
+ else if ("root-type-qname".equals(localName))
+ {
+ QName qname = navigator.resolveQName(value);
+ typeMapping.setRootTypeQName(qname);
+ }
+ else if ("anonymous-type-qname".equals(localName))
+ {
+ QName qname = null;
+ try
+ {
+ // <anonymous-type-qname
xmlns:typeNS="http://org.jboss.ws/anonymous/types">typeNS:>root</anonymous-type-qname>
+ qname = navigator.resolveQName(value);
+ }
+ catch (Exception e)
+ {
+ // ignore unresolved qname
+ }
+
+ if (qname == null)
+ {
+ //
<
anonymous-type-qname>http://example.com/stockquote/schemas:>Get...
+ int index = value.lastIndexOf(':');
+ if (index > 0)
+ {
+ String nsURI = value.substring(0, index);
+ String localPart = value.substring(index + 1);
+ qname = new QName(nsURI, localPart);
+ }
+ }
+
+ if (qname == null)
+ throw new IllegalArgumentException("Invalid anonymous qname: " +
value);
+
+ typeMapping.setAnonymousTypeQName(qname);
+ }
+ else if ("qname-scope".equals(localName))
+ {
+ typeMapping.setQNameScope(value);
+ }
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(ExceptionMapping exceptionMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + exceptionMapping + ",localName="
+ localName + ",value=" + value + "]");
+ if ("exception-type".equals(localName))
+ {
+ exceptionMapping.setExceptionType(value);
+ }
+ else if ("wsdl-message".equals(localName))
+ {
+ exceptionMapping.setWsdlMessage(navigator.resolveQName(value));
+ }
+ else if ("constructor-parameter-order".equals(localName))
+ {
+ exceptionMapping.addConstructorParameter(value);
+ }
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(ServiceInterfaceMapping siMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("port-mapping".equals(localName))
+ {
+ return new PortMapping(siMapping);
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(ServiceInterfaceMapping siMapping, PortMapping portMapping,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + siMapping + ",child=" +
portMapping + "]");
+ siMapping.addPortMapping(portMapping);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(ServiceInterfaceMapping siMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + siMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("service-interface".equals(localName))
+ {
+ siMapping.setServiceInterface(value);
+ }
+ else if ("wsdl-service-name".equals(localName))
+ {
+ siMapping.setWsdlServiceName(navigator.resolveQName(value));
+ }
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(ServiceEndpointInterfaceMapping seiMapping,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("service-endpoint-method-mapping".equals(localName))
+ {
+ return new ServiceEndpointMethodMapping(seiMapping);
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(ServiceEndpointInterfaceMapping seiMapping,
ServiceEndpointMethodMapping seiMethodMapping, UnmarshallingContext navigator, String
namespaceURI,
+ String localName)
+ {
+ log.trace("addChild: [obj=" + seiMapping + ",child=" +
seiMapping + "]");
+ seiMapping.addServiceEndpointMethodMapping(seiMethodMapping);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(ServiceEndpointInterfaceMapping seiMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + seiMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("service-endpoint-interface".equals(localName))
+ {
+ seiMapping.setServiceEndpointInterface(value);
+ }
+ else if ("wsdl-port-type".equals(localName))
+ {
+ seiMapping.setWsdlPortType(navigator.resolveQName(value));
+ }
+ else if ("wsdl-binding".equals(localName))
+ {
+ seiMapping.setWsdlBinding(navigator.resolveQName(value));
+ }
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(VariableMapping variableMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + variableMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("java-variable-name".equals(localName))
+ {
+ variableMapping.setJavaVariableName(value);
+ }
+ else if ("data-member".equals(localName))
+ {
+ variableMapping.setDataMember(true);
+ }
+ else if ("xml-attribute-name".equals(localName))
+ {
+ variableMapping.setXmlAttributeName(value);
+ }
+ else if ("xml-element-name".equals(localName))
+ {
+ variableMapping.setXmlElementName(value);
+ }
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(VariableMapping variableMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("data-member".equals(localName))
+ {
+ variableMapping.setDataMember(true);
+ }
+ else if ("xml-wildcard".equals(localName))
+ {
+ variableMapping.setXmlWildcard(true);
+ }
+ return null;
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(PortMapping portMapping, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + portMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("port-name".equals(localName))
+ {
+ portMapping.setPortName(value);
+ }
+ else if ("java-port-name".equals(localName))
+ {
+ portMapping.setJavaPortName(value);
+ }
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(ServiceEndpointMethodMapping methodMapping,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("method-param-parts-mapping".equals(localName))
+ {
+ return new MethodParamPartsMapping(methodMapping);
+ }
+ if ("wsdl-return-value-mapping".equals(localName))
+ {
+ return new WsdlReturnValueMapping(methodMapping);
+ }
+ if ("wrapped-element".equals(localName))
+ {
+ methodMapping.setWrappedElement(true);
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(ServiceEndpointMethodMapping methodMapping,
MethodParamPartsMapping partsMapping, UnmarshallingContext navigator, String
namespaceURI,
+ String localName)
+ {
+ log.trace("addChild: [obj=" + methodMapping + ",child=" +
partsMapping + "]");
+ methodMapping.addMethodParamPartsMapping(partsMapping);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(ServiceEndpointMethodMapping methodMapping,
WsdlReturnValueMapping returnValueMapping, UnmarshallingContext navigator, String
namespaceURI,
+ String localName)
+ {
+ log.trace("addChild: [obj=" + methodMapping + ",child=" +
returnValueMapping + "]");
+ methodMapping.setWsdlReturnValueMapping(returnValueMapping);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(ServiceEndpointMethodMapping methodMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + methodMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("java-method-name".equals(localName))
+ {
+ methodMapping.setJavaMethodName(value);
+ }
+ else if ("wsdl-operation".equals(localName))
+ {
+ methodMapping.setWsdlOperation(value);
+ }
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(MethodParamPartsMapping partsMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("wsdl-message-mapping".equals(localName))
+ {
+ return new WsdlMessageMapping(partsMapping);
+ }
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(MethodParamPartsMapping partsMapping, WsdlMessageMapping
msgMapping, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + partsMapping + ",child=" +
msgMapping + "]");
+ partsMapping.setWsdlMessageMapping(msgMapping);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(MethodParamPartsMapping partsMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + partsMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("param-position".equals(localName))
+ {
+ partsMapping.setParamPosition(new Integer(value).intValue());
+ }
+ else if ("param-type".equals(localName))
+ {
+ partsMapping.setParamType(value);
+ }
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(WsdlReturnValueMapping retValueMapping, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + retValueMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("method-return-value".equals(localName))
+ {
+ retValueMapping.setMethodReturnValue(value);
+ }
+ else if ("wsdl-message".equals(localName))
+ {
+ retValueMapping.setWsdlMessage(navigator.resolveQName(value));
+ }
+ else if ("wsdl-message-part-name".equals(localName))
+ {
+ retValueMapping.setWsdlMessagePartName(value);
+ }
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(WsdlMessageMapping msgMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ log.trace("setValue: [obj=" + msgMapping + ",localName=" +
localName + ",value=" + value + "]");
+ if ("wsdl-message".equals(localName))
+ {
+ msgMapping.setWsdlMessage(navigator.resolveQName(value));
+ }
+ else if ("wsdl-message-part-name".equals(localName))
+ {
+ msgMapping.setWsdlMessagePartName(value);
+ }
+ else if ("parameter-mode".equals(localName))
+ {
+ msgMapping.setParameterMode(value);
+ }
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WsdlMessageMapping msgMapping, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("soap-header".equals(localName))
+ {
+ msgMapping.setSoapHeader(true);
+ }
+ return null;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaXmlTypeMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaXmlTypeMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaXmlTypeMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,158 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-
-/**
- * XML mapping of the java-wsdl-mapping/java-xml-type-mapping element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class JavaXmlTypeMapping implements Serializable
-{
- private static final long serialVersionUID = -7671078579082015103L;
-
- // The parent <java-wsdl-mapping> element
- private JavaWsdlMapping javaWsdlMapping;
-
- /** The required <java-type> element
- * The java-type element is the fully qualified class name of a Java class.
- */
- private String javaType;
- // The choice <root-type-qname> element
- private QName rootTypeQName;
- // The choice <anonymous-type-qname> element
- private QName anonymousTypeQName;
-
- /** The required <qname-scope> element
- * The qname-scope elements scopes the reference of a QName to the WSDL element type
it applies to.
- * The value of qname-scope may be simpleType, complexType, or element
- */
- private String qnameScope;
-
- // Zero or more <variable-mapping> elements
- private ArrayList variableMappings = new ArrayList();
-
- public JavaXmlTypeMapping(JavaWsdlMapping javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public String getJavaType()
- {
- return javaType;
- }
-
- public void setJavaType(String javaType)
- {
- this.javaType = javaType;
- }
-
- public String getQnameScope()
- {
- return qnameScope;
- }
-
- public void setQNameScope(String qnameScope)
- {
- this.qnameScope = qnameScope;
- }
-
- public QName getRootTypeQName()
- {
- return rootTypeQName;
- }
-
- public void setRootTypeQName(QName rootTypeQName)
- {
- this.rootTypeQName = rootTypeQName;
- }
-
- public QName getAnonymousTypeQName()
- {
- return anonymousTypeQName;
- }
-
- public void setAnonymousTypeQName(QName anonymousTypeQName)
- {
- this.anonymousTypeQName = anonymousTypeQName;
- }
-
- public VariableMapping[] getVariableMappings()
- {
- VariableMapping[] arr = new VariableMapping[variableMappings.size()];
- variableMappings.toArray(arr);
- return arr;
- }
-
- public void addVariableMapping(VariableMapping variableMapping)
- {
- variableMappings.add(variableMapping);
- }
-
- public String toString()
- {
- return "[qname=" + rootTypeQName + ",javaType=" + javaType +
",scope=" + qnameScope + "]";
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
- sb.append("<java-xml-type-mapping>");
-
sb.append("<java-type>").append(javaType).append("</java-type>");
-
- if (rootTypeQName != null)
- {
- sb.append("<root-type-qname
xmlns:typeNS='").append(rootTypeQName.getNamespaceURI()).append("'>");
-
sb.append(rootTypeQName.getPrefix()).append(":").append(rootTypeQName.getLocalPart());
- sb.append("</root-type-qname>");
- }
-
- if (anonymousTypeQName != null)
- {
- sb.append("<anonymous-type-qname
xmlns:typeNS='").append(anonymousTypeQName.getNamespaceURI()).append("'>");
-
sb.append(anonymousTypeQName.getPrefix()).append(":").append(anonymousTypeQName.getLocalPart());
- sb.append("</anonymous-type-qname>");
- }
-
-
sb.append("<qname-scope>").append(qnameScope).append("</qname-scope>");
-
- int len = variableMappings.size();
- for(int i = 0 ; i < len ; i ++)
- sb.append(((VariableMapping)variableMappings.get(i)).serialize());
-
- sb.append("</java-xml-type-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaXmlTypeMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaXmlTypeMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaXmlTypeMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaXmlTypeMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,158 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
+/**
+ * XML mapping of the java-wsdl-mapping/java-xml-type-mapping element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class JavaXmlTypeMapping implements Serializable
+{
+ private static final long serialVersionUID = -7671078579082015103L;
+
+ // The parent <java-wsdl-mapping> element
+ private JavaWsdlMapping javaWsdlMapping;
+
+ /** The required <java-type> element
+ * The java-type element is the fully qualified class name of a Java class.
+ */
+ private String javaType;
+ // The choice <root-type-qname> element
+ private QName rootTypeQName;
+ // The choice <anonymous-type-qname> element
+ private QName anonymousTypeQName;
+
+ /** The required <qname-scope> element
+ * The qname-scope elements scopes the reference of a QName to the WSDL element type
it applies to.
+ * The value of qname-scope may be simpleType, complexType, or element
+ */
+ private String qnameScope;
+
+ // Zero or more <variable-mapping> elements
+ private ArrayList variableMappings = new ArrayList();
+
+ public JavaXmlTypeMapping(JavaWsdlMapping javaWsdlMapping)
+ {
+ this.javaWsdlMapping = javaWsdlMapping;
+ }
+
+ public JavaWsdlMapping getJavaWsdlMapping()
+ {
+ return javaWsdlMapping;
+ }
+
+ public String getJavaType()
+ {
+ return javaType;
+ }
+
+ public void setJavaType(String javaType)
+ {
+ this.javaType = javaType;
+ }
+
+ public String getQnameScope()
+ {
+ return qnameScope;
+ }
+
+ public void setQNameScope(String qnameScope)
+ {
+ this.qnameScope = qnameScope;
+ }
+
+ public QName getRootTypeQName()
+ {
+ return rootTypeQName;
+ }
+
+ public void setRootTypeQName(QName rootTypeQName)
+ {
+ this.rootTypeQName = rootTypeQName;
+ }
+
+ public QName getAnonymousTypeQName()
+ {
+ return anonymousTypeQName;
+ }
+
+ public void setAnonymousTypeQName(QName anonymousTypeQName)
+ {
+ this.anonymousTypeQName = anonymousTypeQName;
+ }
+
+ public VariableMapping[] getVariableMappings()
+ {
+ VariableMapping[] arr = new VariableMapping[variableMappings.size()];
+ variableMappings.toArray(arr);
+ return arr;
+ }
+
+ public void addVariableMapping(VariableMapping variableMapping)
+ {
+ variableMappings.add(variableMapping);
+ }
+
+ public String toString()
+ {
+ return "[qname=" + rootTypeQName + ",javaType=" + javaType +
",scope=" + qnameScope + "]";
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append("<java-xml-type-mapping>");
+
sb.append("<java-type>").append(javaType).append("</java-type>");
+
+ if (rootTypeQName != null)
+ {
+ sb.append("<root-type-qname
xmlns:typeNS='").append(rootTypeQName.getNamespaceURI()).append("'>");
+
sb.append(rootTypeQName.getPrefix()).append(":").append(rootTypeQName.getLocalPart());
+ sb.append("</root-type-qname>");
+ }
+
+ if (anonymousTypeQName != null)
+ {
+ sb.append("<anonymous-type-qname
xmlns:typeNS='").append(anonymousTypeQName.getNamespaceURI()).append("'>");
+
sb.append(anonymousTypeQName.getPrefix()).append(":").append(anonymousTypeQName.getLocalPart());
+ sb.append("</anonymous-type-qname>");
+ }
+
+
sb.append("<qname-scope>").append(qnameScope).append("</qname-scope>");
+
+ int len = variableMappings.size();
+ for(int i = 0 ; i < len ; i ++)
+ sb.append(((VariableMapping)variableMappings.get(i)).serialize());
+
+ sb.append("</java-xml-type-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/MethodParamPartsMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,100 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-import java.io.Serializable;
-
-// $Id$
-
-/**
- * XML mapping of the
java-wsdl-mapping/service-endpoint-interface-mapping/service-endpoint-method-mapping/method-param-parts-mapping
element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class MethodParamPartsMapping implements Serializable
-{
- private static final long serialVersionUID = -1351920471783503813L;
-
- // The parent <service-endpoint-method-mapping> element
- private ServiceEndpointMethodMapping serviceEndpointMethodMapping;
-
- // The required <param-position> element
- private int paramPosition;
- // The required <param-type> element
- private String paramType;
- // The required <wsdl-message-mapping> element
- private WsdlMessageMapping wsdlMessageMapping;
-
- public MethodParamPartsMapping(ServiceEndpointMethodMapping
serviceEndpointMethodMapping)
- {
- this.serviceEndpointMethodMapping = serviceEndpointMethodMapping;
- }
-
- public ServiceEndpointMethodMapping getServiceEndpointMethodMapping()
- {
- return serviceEndpointMethodMapping;
- }
-
- public int getParamPosition()
- {
- return paramPosition;
- }
-
- public void setParamPosition(int paramPosition)
- {
- this.paramPosition = paramPosition;
- }
-
- public String getParamType()
- {
- return paramType;
- }
-
- public void setParamType(String paramType)
- {
- this.paramType = paramType;
- }
-
- public WsdlMessageMapping getWsdlMessageMapping()
- {
- return wsdlMessageMapping;
- }
-
- public void setWsdlMessageMapping(WsdlMessageMapping wsdlMessageMapping)
- {
- this.wsdlMessageMapping = wsdlMessageMapping;
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
-
sb.append("<method-param-parts-mapping><param-position>").append(paramPosition).append("</param-position>");
-
sb.append("<param-type>").append(paramType).append("</param-type>");
- if(wsdlMessageMapping == null)
- throw new IllegalStateException("wsdlMessageMapping is null");
- sb.append(wsdlMessageMapping.serialize());
-
- sb.append("</method-param-parts-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/MethodParamPartsMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/MethodParamPartsMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,100 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * XML mapping of the
java-wsdl-mapping/service-endpoint-interface-mapping/service-endpoint-method-mapping/method-param-parts-mapping
element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class MethodParamPartsMapping implements Serializable
+{
+ private static final long serialVersionUID = -1351920471783503813L;
+
+ // The parent <service-endpoint-method-mapping> element
+ private ServiceEndpointMethodMapping serviceEndpointMethodMapping;
+
+ // The required <param-position> element
+ private int paramPosition;
+ // The required <param-type> element
+ private String paramType;
+ // The required <wsdl-message-mapping> element
+ private WsdlMessageMapping wsdlMessageMapping;
+
+ public MethodParamPartsMapping(ServiceEndpointMethodMapping
serviceEndpointMethodMapping)
+ {
+ this.serviceEndpointMethodMapping = serviceEndpointMethodMapping;
+ }
+
+ public ServiceEndpointMethodMapping getServiceEndpointMethodMapping()
+ {
+ return serviceEndpointMethodMapping;
+ }
+
+ public int getParamPosition()
+ {
+ return paramPosition;
+ }
+
+ public void setParamPosition(int paramPosition)
+ {
+ this.paramPosition = paramPosition;
+ }
+
+ public String getParamType()
+ {
+ return paramType;
+ }
+
+ public void setParamType(String paramType)
+ {
+ this.paramType = paramType;
+ }
+
+ public WsdlMessageMapping getWsdlMessageMapping()
+ {
+ return wsdlMessageMapping;
+ }
+
+ public void setWsdlMessageMapping(WsdlMessageMapping wsdlMessageMapping)
+ {
+ this.wsdlMessageMapping = wsdlMessageMapping;
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+
sb.append("<method-param-parts-mapping><param-position>").append(paramPosition).append("</param-position>");
+
sb.append("<param-type>").append(paramType).append("</param-type>");
+ if(wsdlMessageMapping == null)
+ throw new IllegalStateException("wsdlMessageMapping is null");
+ sb.append(wsdlMessageMapping.serialize());
+
+ sb.append("</method-param-parts-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PackageMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PackageMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PackageMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,88 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-import java.io.Serializable;
-
-// $Id$
-
-/**
- * XML mapping of the java-wsdl-mapping/package-mapping element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class PackageMapping implements Serializable
-{
- private static final long serialVersionUID = 8105452343429986503L;
-
- // The parent <java-wsdl-mapping> element
- private JavaWsdlMapping javaWsdlMapping;
-
- // The required <package-type> element
- private String packageType;
- // The required <namespaceURI> element
- private String namespaceURI;
-
- public PackageMapping(JavaWsdlMapping javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public String getNamespaceURI()
- {
- return namespaceURI;
- }
-
- public void setNamespaceURI(String namespaceURI)
- {
- this.namespaceURI = namespaceURI;
- }
-
- public String getPackageType()
- {
- return packageType;
- }
-
- public void setPackageType(String packageType)
- {
- this.packageType = packageType;
- }
-
- public String toString()
- {
- return "[namespaceURI=" + namespaceURI + ",packageType=" +
packageType + "]";
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
-
sb.append("<package-mapping>").append("<package-type>").append(packageType).append("</package-type>");
-
sb.append("<namespaceURI>").append(namespaceURI).append("</namespaceURI>").append("</package-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PackageMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PackageMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PackageMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PackageMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,88 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * XML mapping of the java-wsdl-mapping/package-mapping element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class PackageMapping implements Serializable
+{
+ private static final long serialVersionUID = 8105452343429986503L;
+
+ // The parent <java-wsdl-mapping> element
+ private JavaWsdlMapping javaWsdlMapping;
+
+ // The required <package-type> element
+ private String packageType;
+ // The required <namespaceURI> element
+ private String namespaceURI;
+
+ public PackageMapping(JavaWsdlMapping javaWsdlMapping)
+ {
+ this.javaWsdlMapping = javaWsdlMapping;
+ }
+
+ public JavaWsdlMapping getJavaWsdlMapping()
+ {
+ return javaWsdlMapping;
+ }
+
+ public String getNamespaceURI()
+ {
+ return namespaceURI;
+ }
+
+ public void setNamespaceURI(String namespaceURI)
+ {
+ this.namespaceURI = namespaceURI;
+ }
+
+ public String getPackageType()
+ {
+ return packageType;
+ }
+
+ public void setPackageType(String packageType)
+ {
+ this.packageType = packageType;
+ }
+
+ public String toString()
+ {
+ return "[namespaceURI=" + namespaceURI + ",packageType=" +
packageType + "]";
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+
sb.append("<package-mapping>").append("<package-type>").append(packageType).append("</package-type>");
+
sb.append("<namespaceURI>").append(namespaceURI).append("</namespaceURI>").append("</package-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PortMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PortMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PortMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,84 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-import java.io.Serializable;
-
-// $Id$
-
-/**
- * XML mapping of the java-wsdl-mapping/service-interface-mapping/port-mapping element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class PortMapping implements Serializable
-{
- private static final long serialVersionUID = 8229257516720800393L;
-
- // The parent <service-interface-mapping> element
- private ServiceInterfaceMapping serviceInterfaceMapping;
-
- // The required <port-name> element
- private String portName;
- // The required <java-port-name> element
- private String javaPortName;
-
- public PortMapping(ServiceInterfaceMapping serviceInterfaceMapping)
- {
- this.serviceInterfaceMapping = serviceInterfaceMapping;
- }
-
- public ServiceInterfaceMapping getServiceInterfaceMapping()
- {
- return serviceInterfaceMapping;
- }
-
- public String getJavaPortName()
- {
- return javaPortName;
- }
-
- public void setJavaPortName(String javaPortName)
- {
- this.javaPortName = javaPortName;
- }
-
- public String getPortName()
- {
- return portName;
- }
-
- public void setPortName(String portName)
- {
- this.portName = portName;
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
-
sb.append("<port-mapping><port-name>").append(portName).append("</port-name><java-port-name>");
-
sb.append(javaPortName).append("</java-port-name></port-mapping>");
- return sb.toString();
- }
-}
-
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PortMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PortMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PortMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PortMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,84 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * XML mapping of the java-wsdl-mapping/service-interface-mapping/port-mapping element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class PortMapping implements Serializable
+{
+ private static final long serialVersionUID = 8229257516720800393L;
+
+ // The parent <service-interface-mapping> element
+ private ServiceInterfaceMapping serviceInterfaceMapping;
+
+ // The required <port-name> element
+ private String portName;
+ // The required <java-port-name> element
+ private String javaPortName;
+
+ public PortMapping(ServiceInterfaceMapping serviceInterfaceMapping)
+ {
+ this.serviceInterfaceMapping = serviceInterfaceMapping;
+ }
+
+ public ServiceInterfaceMapping getServiceInterfaceMapping()
+ {
+ return serviceInterfaceMapping;
+ }
+
+ public String getJavaPortName()
+ {
+ return javaPortName;
+ }
+
+ public void setJavaPortName(String javaPortName)
+ {
+ this.javaPortName = javaPortName;
+ }
+
+ public String getPortName()
+ {
+ return portName;
+ }
+
+ public void setPortName(String portName)
+ {
+ this.portName = portName;
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+
sb.append("<port-mapping><port-name>").append(portName).append("</port-name><java-port-name>");
+
sb.append(javaPortName).append("</java-port-name></port-mapping>");
+ return sb.toString();
+ }
+}
+
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,140 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-/**
- * XML mapping of the java-wsdl-mapping/service-endpoint-interface-mapping element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class ServiceEndpointInterfaceMapping implements Serializable
-{
- private static final long serialVersionUID = 3336973427288868587L;
-
- // The parent <java-wsdl-mapping> element
- private JavaWsdlMapping javaWsdlMapping;
-
- // The required <service-endpoint-interface> element
- private String serviceEndpointInterface;
- // The required <wsdl-port-type> element
- private QName wsdlPortType;
- // The required <wsdl-binding> element
- private QName wsdlBinding;
- // Zero or more <service-endpoint-method-mapping> elements
- private List serviceEndpointMethodMappings = new ArrayList();
-
- public ServiceEndpointInterfaceMapping(JavaWsdlMapping javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public void setServiceEndpointInterface(String serviceEndpointInterface)
- {
- this.serviceEndpointInterface = serviceEndpointInterface;
- }
-
- public QName getWsdlPortType()
- {
- return wsdlPortType;
- }
-
- public void setWsdlPortType(QName wsdlPortType)
- {
- this.wsdlPortType = wsdlPortType;
- }
-
- public QName getWsdlBinding()
- {
- return wsdlBinding;
- }
-
- public void setWsdlBinding(QName wsdlBinding)
- {
- this.wsdlBinding = wsdlBinding;
- }
-
- public ServiceEndpointMethodMapping[] getServiceEndpointMethodMappings()
- {
- ServiceEndpointMethodMapping[] arr = new
ServiceEndpointMethodMapping[serviceEndpointMethodMappings.size()];
- serviceEndpointMethodMappings.toArray(arr);
- return arr;
- }
-
- public void addServiceEndpointMethodMapping(ServiceEndpointMethodMapping
serviceEndpointMethodMapping)
- {
- serviceEndpointMethodMappings.add(serviceEndpointMethodMapping);
- }
-
- public ServiceEndpointMethodMapping
getServiceEndpointMethodMappingByWsdlOperation(String wsdlOperation)
- {
- ServiceEndpointMethodMapping semMapping = null;
-
- Iterator it = serviceEndpointMethodMappings.iterator();
- while (it.hasNext())
- {
- ServiceEndpointMethodMapping aux = (ServiceEndpointMethodMapping)it.next();
- if (aux.getWsdlOperation().equals(wsdlOperation))
- semMapping = aux;
- }
- return semMapping;
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
-
sb.append("<service-endpoint-interface-mapping><service-endpoint-interface>");
-
sb.append(this.serviceEndpointInterface).append("</service-endpoint-interface>");
- sb.append("<wsdl-port-type
xmlns:").append(wsdlPortType.getPrefix()).append("='");
-
sb.append(wsdlPortType.getNamespaceURI()).append("'>").append(wsdlPortType.getPrefix());
-
sb.append(":").append(wsdlPortType.getLocalPart()).append("</wsdl-port-type>");
-
- sb.append("<wsdl-binding
xmlns:").append(wsdlBinding.getPrefix()).append("='");
-
sb.append(wsdlBinding.getNamespaceURI()).append("'>").append(wsdlBinding.getPrefix());
-
sb.append(":").append(wsdlBinding.getLocalPart()).append("</wsdl-binding>");
-
- Iterator iter = serviceEndpointMethodMappings.iterator();
- while(iter != null && iter.hasNext())
- sb.append(((ServiceEndpointMethodMapping)iter.next()).serialize());
- sb.append("</service-endpoint-interface-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,140 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/**
+ * XML mapping of the java-wsdl-mapping/service-endpoint-interface-mapping element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class ServiceEndpointInterfaceMapping implements Serializable
+{
+ private static final long serialVersionUID = 3336973427288868587L;
+
+ // The parent <java-wsdl-mapping> element
+ private JavaWsdlMapping javaWsdlMapping;
+
+ // The required <service-endpoint-interface> element
+ private String serviceEndpointInterface;
+ // The required <wsdl-port-type> element
+ private QName wsdlPortType;
+ // The required <wsdl-binding> element
+ private QName wsdlBinding;
+ // Zero or more <service-endpoint-method-mapping> elements
+ private List serviceEndpointMethodMappings = new ArrayList();
+
+ public ServiceEndpointInterfaceMapping(JavaWsdlMapping javaWsdlMapping)
+ {
+ this.javaWsdlMapping = javaWsdlMapping;
+ }
+
+ public JavaWsdlMapping getJavaWsdlMapping()
+ {
+ return javaWsdlMapping;
+ }
+
+ public String getServiceEndpointInterface()
+ {
+ return serviceEndpointInterface;
+ }
+
+ public void setServiceEndpointInterface(String serviceEndpointInterface)
+ {
+ this.serviceEndpointInterface = serviceEndpointInterface;
+ }
+
+ public QName getWsdlPortType()
+ {
+ return wsdlPortType;
+ }
+
+ public void setWsdlPortType(QName wsdlPortType)
+ {
+ this.wsdlPortType = wsdlPortType;
+ }
+
+ public QName getWsdlBinding()
+ {
+ return wsdlBinding;
+ }
+
+ public void setWsdlBinding(QName wsdlBinding)
+ {
+ this.wsdlBinding = wsdlBinding;
+ }
+
+ public ServiceEndpointMethodMapping[] getServiceEndpointMethodMappings()
+ {
+ ServiceEndpointMethodMapping[] arr = new
ServiceEndpointMethodMapping[serviceEndpointMethodMappings.size()];
+ serviceEndpointMethodMappings.toArray(arr);
+ return arr;
+ }
+
+ public void addServiceEndpointMethodMapping(ServiceEndpointMethodMapping
serviceEndpointMethodMapping)
+ {
+ serviceEndpointMethodMappings.add(serviceEndpointMethodMapping);
+ }
+
+ public ServiceEndpointMethodMapping
getServiceEndpointMethodMappingByWsdlOperation(String wsdlOperation)
+ {
+ ServiceEndpointMethodMapping semMapping = null;
+
+ Iterator it = serviceEndpointMethodMappings.iterator();
+ while (it.hasNext())
+ {
+ ServiceEndpointMethodMapping aux = (ServiceEndpointMethodMapping)it.next();
+ if (aux.getWsdlOperation().equals(wsdlOperation))
+ semMapping = aux;
+ }
+ return semMapping;
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+
sb.append("<service-endpoint-interface-mapping><service-endpoint-interface>");
+
sb.append(this.serviceEndpointInterface).append("</service-endpoint-interface>");
+ sb.append("<wsdl-port-type
xmlns:").append(wsdlPortType.getPrefix()).append("='");
+
sb.append(wsdlPortType.getNamespaceURI()).append("'>").append(wsdlPortType.getPrefix());
+
sb.append(":").append(wsdlPortType.getLocalPart()).append("</wsdl-port-type>");
+
+ sb.append("<wsdl-binding
xmlns:").append(wsdlBinding.getPrefix()).append("='");
+
sb.append(wsdlBinding.getNamespaceURI()).append("'>").append(wsdlBinding.getPrefix());
+
sb.append(":").append(wsdlBinding.getLocalPart()).append("</wsdl-binding>");
+
+ Iterator iter = serviceEndpointMethodMappings.iterator();
+ while(iter != null && iter.hasNext())
+ sb.append(((ServiceEndpointMethodMapping)iter.next()).serialize());
+ sb.append("</service-endpoint-interface-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,156 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * XML mapping of the
java-wsdl-mapping/service-endpoint-interface-mapping/service-endpoint-method-mapping
element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class ServiceEndpointMethodMapping implements Serializable
-{
- private static final long serialVersionUID = 7857267872017006227L;
-
- // The parent <service-endpoint-interface-mapping> element
- private ServiceEndpointInterfaceMapping serviceEndpointInterfaceMapping;
-
- // The required <java-method-name> element
- private String javaMethodName;
- // The required <wsdl-operation> element
- private String wsdlOperation;
- // The optional <wrapped-element> element
- private boolean wrappedElement;
- // Zero or more <method-param-parts-mapping> elements
- private List methodParamPartsMappings = new ArrayList();
- // The optional <wsdl-return-value-mapping> element
- private WsdlReturnValueMapping wsdlReturnValueMapping;
-
- public ServiceEndpointMethodMapping(ServiceEndpointInterfaceMapping
serviceEndpointInterfaceMapping)
- {
- this.serviceEndpointInterfaceMapping = serviceEndpointInterfaceMapping;
- }
-
- public ServiceEndpointInterfaceMapping getServiceEndpointInterfaceMapping()
- {
- return serviceEndpointInterfaceMapping;
- }
-
- public String getJavaMethodName()
- {
- return javaMethodName;
- }
-
- public void setJavaMethodName(String javaMethodName)
- {
- this.javaMethodName = javaMethodName;
- }
-
- public MethodParamPartsMapping[] getMethodParamPartsMappings()
- {
- MethodParamPartsMapping[] arr = new
MethodParamPartsMapping[methodParamPartsMappings.size()];
- methodParamPartsMappings.toArray(arr);
- return arr;
- }
-
- public MethodParamPartsMapping getMethodParamPartsMappingByPartName(String partName)
- {
- MethodParamPartsMapping paramMapping = null;
- for (int i = 0; paramMapping == null && i <
methodParamPartsMappings.size(); i++)
- {
- MethodParamPartsMapping aux =
(MethodParamPartsMapping)methodParamPartsMappings.get(i);
- if (aux.getWsdlMessageMapping().getWsdlMessagePartName().equals(partName))
- paramMapping = aux;
- }
- return paramMapping;
- }
-
- public MethodParamPartsMapping getMethodParamPartsMappingByPosition(int pos)
- {
- MethodParamPartsMapping paramMapping = null;
- for (int i = 0; paramMapping == null && i <
methodParamPartsMappings.size(); i++)
- {
- MethodParamPartsMapping aux =
(MethodParamPartsMapping)methodParamPartsMappings.get(i);
- if (aux.getParamPosition() == pos)
- paramMapping = aux;
- }
- return paramMapping;
- }
-
- public void addMethodParamPartsMapping(MethodParamPartsMapping
methodParamPartsMapping)
- {
- methodParamPartsMappings.add(methodParamPartsMapping);
- }
-
- public boolean isWrappedElement()
- {
- return wrappedElement;
- }
-
- public void setWrappedElement(boolean wrappedElement)
- {
- this.wrappedElement = wrappedElement;
- }
-
- public String getWsdlOperation()
- {
- return wsdlOperation;
- }
-
- public void setWsdlOperation(String wsdlOperation)
- {
- this.wsdlOperation = wsdlOperation;
- }
-
- public WsdlReturnValueMapping getWsdlReturnValueMapping()
- {
- return wsdlReturnValueMapping;
- }
-
- public void setWsdlReturnValueMapping(WsdlReturnValueMapping wsdlReturnValueMapping)
- {
- this.wsdlReturnValueMapping = wsdlReturnValueMapping;
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
-
sb.append("<service-endpoint-method-mapping><java-method-name>").append(javaMethodName).append("</java-method-name>");
-
sb.append("<wsdl-operation>").append(wsdlOperation).append("</wsdl-operation>");
- if (wrappedElement)
- sb.append("<wrapped-element/>");
- Iterator iter = methodParamPartsMappings.iterator();
- while (iter != null && iter.hasNext())
- sb.append(((MethodParamPartsMapping)iter.next()).serialize());
- if (wsdlReturnValueMapping != null)
- sb.append(wsdlReturnValueMapping.serialize());
- sb.append("</service-endpoint-method-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * XML mapping of the
java-wsdl-mapping/service-endpoint-interface-mapping/service-endpoint-method-mapping
element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class ServiceEndpointMethodMapping implements Serializable
+{
+ private static final long serialVersionUID = 7857267872017006227L;
+
+ // The parent <service-endpoint-interface-mapping> element
+ private ServiceEndpointInterfaceMapping serviceEndpointInterfaceMapping;
+
+ // The required <java-method-name> element
+ private String javaMethodName;
+ // The required <wsdl-operation> element
+ private String wsdlOperation;
+ // The optional <wrapped-element> element
+ private boolean wrappedElement;
+ // Zero or more <method-param-parts-mapping> elements
+ private List methodParamPartsMappings = new ArrayList();
+ // The optional <wsdl-return-value-mapping> element
+ private WsdlReturnValueMapping wsdlReturnValueMapping;
+
+ public ServiceEndpointMethodMapping(ServiceEndpointInterfaceMapping
serviceEndpointInterfaceMapping)
+ {
+ this.serviceEndpointInterfaceMapping = serviceEndpointInterfaceMapping;
+ }
+
+ public ServiceEndpointInterfaceMapping getServiceEndpointInterfaceMapping()
+ {
+ return serviceEndpointInterfaceMapping;
+ }
+
+ public String getJavaMethodName()
+ {
+ return javaMethodName;
+ }
+
+ public void setJavaMethodName(String javaMethodName)
+ {
+ this.javaMethodName = javaMethodName;
+ }
+
+ public MethodParamPartsMapping[] getMethodParamPartsMappings()
+ {
+ MethodParamPartsMapping[] arr = new
MethodParamPartsMapping[methodParamPartsMappings.size()];
+ methodParamPartsMappings.toArray(arr);
+ return arr;
+ }
+
+ public MethodParamPartsMapping getMethodParamPartsMappingByPartName(String partName)
+ {
+ MethodParamPartsMapping paramMapping = null;
+ for (int i = 0; paramMapping == null && i <
methodParamPartsMappings.size(); i++)
+ {
+ MethodParamPartsMapping aux =
(MethodParamPartsMapping)methodParamPartsMappings.get(i);
+ if (aux.getWsdlMessageMapping().getWsdlMessagePartName().equals(partName))
+ paramMapping = aux;
+ }
+ return paramMapping;
+ }
+
+ public MethodParamPartsMapping getMethodParamPartsMappingByPosition(int pos)
+ {
+ MethodParamPartsMapping paramMapping = null;
+ for (int i = 0; paramMapping == null && i <
methodParamPartsMappings.size(); i++)
+ {
+ MethodParamPartsMapping aux =
(MethodParamPartsMapping)methodParamPartsMappings.get(i);
+ if (aux.getParamPosition() == pos)
+ paramMapping = aux;
+ }
+ return paramMapping;
+ }
+
+ public void addMethodParamPartsMapping(MethodParamPartsMapping
methodParamPartsMapping)
+ {
+ methodParamPartsMappings.add(methodParamPartsMapping);
+ }
+
+ public boolean isWrappedElement()
+ {
+ return wrappedElement;
+ }
+
+ public void setWrappedElement(boolean wrappedElement)
+ {
+ this.wrappedElement = wrappedElement;
+ }
+
+ public String getWsdlOperation()
+ {
+ return wsdlOperation;
+ }
+
+ public void setWsdlOperation(String wsdlOperation)
+ {
+ this.wsdlOperation = wsdlOperation;
+ }
+
+ public WsdlReturnValueMapping getWsdlReturnValueMapping()
+ {
+ return wsdlReturnValueMapping;
+ }
+
+ public void setWsdlReturnValueMapping(WsdlReturnValueMapping wsdlReturnValueMapping)
+ {
+ this.wsdlReturnValueMapping = wsdlReturnValueMapping;
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+
sb.append("<service-endpoint-method-mapping><java-method-name>").append(javaMethodName).append("</java-method-name>");
+
sb.append("<wsdl-operation>").append(wsdlOperation).append("</wsdl-operation>");
+ if (wrappedElement)
+ sb.append("<wrapped-element/>");
+ Iterator iter = methodParamPartsMappings.iterator();
+ while (iter != null && iter.hasNext())
+ sb.append(((MethodParamPartsMapping)iter.next()).serialize());
+ if (wsdlReturnValueMapping != null)
+ sb.append(wsdlReturnValueMapping.serialize());
+ sb.append("</service-endpoint-method-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceInterfaceMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceInterfaceMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceInterfaceMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,111 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-/**
- * XML mapping of the java-wsdl-mapping/service-interface-mapping element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class ServiceInterfaceMapping implements Serializable
-{
- private static final long serialVersionUID = -447051823681281236L;
-
- // The parent <java-wsdl-mapping> element
- private JavaWsdlMapping javaWsdlMapping;
-
- // The required <service-interface> element
- private String serviceInterface;
- // The required <wsdl-service-name> element
- private QName wsdlServiceName;
- // Zero or more <port-mapping> elements
- private List portMappings = new ArrayList();
-
- public ServiceInterfaceMapping(JavaWsdlMapping javaWsdlMapping)
- {
- this.javaWsdlMapping = javaWsdlMapping;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- return javaWsdlMapping;
- }
-
- public String getServiceInterface()
- {
- return serviceInterface;
- }
-
- public void setServiceInterface(String serviceInterface)
- {
- this.serviceInterface = serviceInterface;
- }
-
- public QName getWsdlServiceName()
- {
- return wsdlServiceName;
- }
-
- public void setWsdlServiceName(QName wsdlServiceName)
- {
- this.wsdlServiceName = wsdlServiceName;
- }
-
- public PortMapping[] getPortMappings()
- {
- PortMapping[] arr = new PortMapping[portMappings.size()];
- portMappings.toArray(arr);
- return arr;
- }
-
- public void addPortMapping(PortMapping portMapping)
- {
- portMappings.add(portMapping);
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
- sb.append("<service-interface-mapping>");
-
sb.append("<service-interface>").append(serviceInterface).append("</service-interface>");
- sb.append("<wsdl-service-name
xmlns:").append(wsdlServiceName.getPrefix()).append("='");
- sb.append(wsdlServiceName.getNamespaceURI()).append("'>");
-
sb.append(wsdlServiceName.getPrefix()).append(":").append(wsdlServiceName.getLocalPart());
- sb.append("</wsdl-service-name>");
-
- Iterator iter = portMappings.iterator();
- while(iter != null && iter.hasNext())
- sb.append(((PortMapping)iter.next()).serialize());
- sb.append("</service-interface-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceInterfaceMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceInterfaceMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceInterfaceMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceInterfaceMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,111 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/**
+ * XML mapping of the java-wsdl-mapping/service-interface-mapping element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class ServiceInterfaceMapping implements Serializable
+{
+ private static final long serialVersionUID = -447051823681281236L;
+
+ // The parent <java-wsdl-mapping> element
+ private JavaWsdlMapping javaWsdlMapping;
+
+ // The required <service-interface> element
+ private String serviceInterface;
+ // The required <wsdl-service-name> element
+ private QName wsdlServiceName;
+ // Zero or more <port-mapping> elements
+ private List portMappings = new ArrayList();
+
+ public ServiceInterfaceMapping(JavaWsdlMapping javaWsdlMapping)
+ {
+ this.javaWsdlMapping = javaWsdlMapping;
+ }
+
+ public JavaWsdlMapping getJavaWsdlMapping()
+ {
+ return javaWsdlMapping;
+ }
+
+ public String getServiceInterface()
+ {
+ return serviceInterface;
+ }
+
+ public void setServiceInterface(String serviceInterface)
+ {
+ this.serviceInterface = serviceInterface;
+ }
+
+ public QName getWsdlServiceName()
+ {
+ return wsdlServiceName;
+ }
+
+ public void setWsdlServiceName(QName wsdlServiceName)
+ {
+ this.wsdlServiceName = wsdlServiceName;
+ }
+
+ public PortMapping[] getPortMappings()
+ {
+ PortMapping[] arr = new PortMapping[portMappings.size()];
+ portMappings.toArray(arr);
+ return arr;
+ }
+
+ public void addPortMapping(PortMapping portMapping)
+ {
+ portMappings.add(portMapping);
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append("<service-interface-mapping>");
+
sb.append("<service-interface>").append(serviceInterface).append("</service-interface>");
+ sb.append("<wsdl-service-name
xmlns:").append(wsdlServiceName.getPrefix()).append("='");
+ sb.append(wsdlServiceName.getNamespaceURI()).append("'>");
+
sb.append(wsdlServiceName.getPrefix()).append(":").append(wsdlServiceName.getLocalPart());
+ sb.append("</wsdl-service-name>");
+
+ Iterator iter = portMappings.iterator();
+ while(iter != null && iter.hasNext())
+ sb.append(((PortMapping)iter.next()).serialize());
+ sb.append("</service-interface-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/VariableMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/VariableMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/VariableMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,134 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-import java.io.Serializable;
-
-// $Id$
-
-/**
- * XML mapping of the java-wsdl-mapping/java-xml-type-mapping/varaible-mapping element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class VariableMapping implements Serializable
-{
- private static final long serialVersionUID = 4168728468137337167L;
-
- // The parent <java-wsdl-mapping> element
- private JavaXmlTypeMapping typeMapping;
-
- // The required <java-variable-name> element
- private String javaVariableName;
- // The optional <data-member> element
- private boolean dataMember;
- // The choice [<xml-attribute-name> | <xml-element-name> |
<xml-wildcard>]
- private String xmlAttributeName;
- private String xmlElementName;
- private boolean xmlWildcard;
-
- public VariableMapping(JavaXmlTypeMapping typeMapping)
- {
- this.typeMapping = typeMapping;
- }
-
- public JavaXmlTypeMapping getTypeMapping()
- {
- return typeMapping;
- }
-
- public boolean isDataMember()
- {
- return dataMember;
- }
-
- public void setDataMember(boolean dataMember)
- {
- this.dataMember = dataMember;
- }
-
- public String getJavaVariableName()
- {
- return javaVariableName;
- }
-
- public void setJavaVariableName(String javaVariableName)
- {
- this.javaVariableName = javaVariableName;
- }
-
- public String getXmlAttributeName()
- {
- return xmlAttributeName;
- }
-
- public void setXmlAttributeName(String xmlAttributeName)
- {
- this.xmlAttributeName = xmlAttributeName;
- }
-
- public String getXmlElementName()
- {
- return xmlElementName;
- }
-
- public void setXmlElementName(String xmlElementName)
- {
- this.xmlElementName = xmlElementName;
- }
-
- public boolean getXmlWildcard()
- {
- return xmlWildcard;
- }
-
- public void setXmlWildcard(boolean xmlWildcard)
- {
- this.xmlWildcard = xmlWildcard;
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
- sb.append("<variable-mapping>");
-
sb.append("<java-variable-name>").append(javaVariableName).append("</java-variable-name>");
- if(dataMember)
- {
- sb.append("<data-member/>");
- }
- if (xmlElementName != null)
- {
-
sb.append("<xml-element-name>").append(xmlElementName).append("</xml-element-name>");
- }
- else if (xmlAttributeName != null)
- {
-
sb.append("<xml-attribute-name>").append(xmlAttributeName).append("</xml-attribute-name>");
- }
- else if (xmlWildcard)
- {
- sb.append("<xml-wildcard/>");
- }
- sb.append("</variable-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/VariableMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/VariableMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/VariableMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/VariableMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,134 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * XML mapping of the java-wsdl-mapping/java-xml-type-mapping/varaible-mapping element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class VariableMapping implements Serializable
+{
+ private static final long serialVersionUID = 4168728468137337167L;
+
+ // The parent <java-wsdl-mapping> element
+ private JavaXmlTypeMapping typeMapping;
+
+ // The required <java-variable-name> element
+ private String javaVariableName;
+ // The optional <data-member> element
+ private boolean dataMember;
+ // The choice [<xml-attribute-name> | <xml-element-name> |
<xml-wildcard>]
+ private String xmlAttributeName;
+ private String xmlElementName;
+ private boolean xmlWildcard;
+
+ public VariableMapping(JavaXmlTypeMapping typeMapping)
+ {
+ this.typeMapping = typeMapping;
+ }
+
+ public JavaXmlTypeMapping getTypeMapping()
+ {
+ return typeMapping;
+ }
+
+ public boolean isDataMember()
+ {
+ return dataMember;
+ }
+
+ public void setDataMember(boolean dataMember)
+ {
+ this.dataMember = dataMember;
+ }
+
+ public String getJavaVariableName()
+ {
+ return javaVariableName;
+ }
+
+ public void setJavaVariableName(String javaVariableName)
+ {
+ this.javaVariableName = javaVariableName;
+ }
+
+ public String getXmlAttributeName()
+ {
+ return xmlAttributeName;
+ }
+
+ public void setXmlAttributeName(String xmlAttributeName)
+ {
+ this.xmlAttributeName = xmlAttributeName;
+ }
+
+ public String getXmlElementName()
+ {
+ return xmlElementName;
+ }
+
+ public void setXmlElementName(String xmlElementName)
+ {
+ this.xmlElementName = xmlElementName;
+ }
+
+ public boolean getXmlWildcard()
+ {
+ return xmlWildcard;
+ }
+
+ public void setXmlWildcard(boolean xmlWildcard)
+ {
+ this.xmlWildcard = xmlWildcard;
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append("<variable-mapping>");
+
sb.append("<java-variable-name>").append(javaVariableName).append("</java-variable-name>");
+ if(dataMember)
+ {
+ sb.append("<data-member/>");
+ }
+ if (xmlElementName != null)
+ {
+
sb.append("<xml-element-name>").append(xmlElementName).append("</xml-element-name>");
+ }
+ else if (xmlAttributeName != null)
+ {
+
sb.append("<xml-attribute-name>").append(xmlAttributeName).append("</xml-attribute-name>");
+ }
+ else if (xmlWildcard)
+ {
+ sb.append("<xml-wildcard/>");
+ }
+ sb.append("</variable-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlMessageMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlMessageMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlMessageMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,116 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-import java.io.Serializable;
-
-import javax.xml.namespace.QName;
-
-// $Id$
-
-/**
- * Created by IntelliJ IDEA.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class WsdlMessageMapping implements Serializable
-{
- private static final long serialVersionUID = -3212852147033081838L;
-
- // The parent <method-param-parts-mapping> element
- private MethodParamPartsMapping methodParamPartsMapping;
- // The required <wsdl-message> element
- private QName wsdlMessage;
- // The required <wsdl-message-part-name> element
- private String wsdlMessagePartName;
- // The required <parameter-mode> element
- private String parameterMode;
- // The optional <soap-header> element
- private boolean soapHeader;
-
- public WsdlMessageMapping(MethodParamPartsMapping methodParamPartsMapping)
- {
- this.methodParamPartsMapping = methodParamPartsMapping;
- }
-
- public MethodParamPartsMapping getMethodParamPartsMapping()
- {
- return methodParamPartsMapping;
- }
-
- public String getParameterMode()
- {
- return parameterMode;
- }
-
- public void setParameterMode(String parameterMode)
- {
- if ("IN".equals(parameterMode) == false &&
"OUT".equals(parameterMode) == false &&
"INOUT".equals(parameterMode) == false)
- throw new IllegalArgumentException("Invalid parameter mode: " +
parameterMode);
- this.parameterMode = parameterMode;
- }
-
- public boolean isSoapHeader()
- {
- return soapHeader;
- }
-
- public void setSoapHeader(boolean soapHeader)
- {
- this.soapHeader = soapHeader;
- }
-
- public QName getWsdlMessage()
- {
- return wsdlMessage;
- }
-
- public void setWsdlMessage(QName wsdlMessage)
- {
- this.wsdlMessage = wsdlMessage;
- }
-
- public String getWsdlMessagePartName()
- {
- return wsdlMessagePartName;
- }
-
- public void setWsdlMessagePartName(String wsdlMessagePartName)
- {
- this.wsdlMessagePartName = wsdlMessagePartName;
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
- sb.append(" <wsdl-message-mapping> <wsdl-message xmlns:");
-
sb.append(wsdlMessage.getPrefix()).append("='").append(wsdlMessage.getNamespaceURI()).append("'>");
-
sb.append(wsdlMessage.getPrefix()).append(":").append(wsdlMessage.getLocalPart()).append("</wsdl-message>");
-
sb.append("<wsdl-message-part-name>").append(wsdlMessagePartName).append("</wsdl-message-part-name>");
-
sb.append("<parameter-mode>").append(parameterMode).append("</parameter-mode>");
- if (soapHeader)
- sb.append("<soap-header/>");
- sb.append("</wsdl-message-mapping>");
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlMessageMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlMessageMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlMessageMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlMessageMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,116 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+// $Id$
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class WsdlMessageMapping implements Serializable
+{
+ private static final long serialVersionUID = -3212852147033081838L;
+
+ // The parent <method-param-parts-mapping> element
+ private MethodParamPartsMapping methodParamPartsMapping;
+ // The required <wsdl-message> element
+ private QName wsdlMessage;
+ // The required <wsdl-message-part-name> element
+ private String wsdlMessagePartName;
+ // The required <parameter-mode> element
+ private String parameterMode;
+ // The optional <soap-header> element
+ private boolean soapHeader;
+
+ public WsdlMessageMapping(MethodParamPartsMapping methodParamPartsMapping)
+ {
+ this.methodParamPartsMapping = methodParamPartsMapping;
+ }
+
+ public MethodParamPartsMapping getMethodParamPartsMapping()
+ {
+ return methodParamPartsMapping;
+ }
+
+ public String getParameterMode()
+ {
+ return parameterMode;
+ }
+
+ public void setParameterMode(String parameterMode)
+ {
+ if ("IN".equals(parameterMode) == false &&
"OUT".equals(parameterMode) == false &&
"INOUT".equals(parameterMode) == false)
+ throw new IllegalArgumentException("Invalid parameter mode: " +
parameterMode);
+ this.parameterMode = parameterMode;
+ }
+
+ public boolean isSoapHeader()
+ {
+ return soapHeader;
+ }
+
+ public void setSoapHeader(boolean soapHeader)
+ {
+ this.soapHeader = soapHeader;
+ }
+
+ public QName getWsdlMessage()
+ {
+ return wsdlMessage;
+ }
+
+ public void setWsdlMessage(QName wsdlMessage)
+ {
+ this.wsdlMessage = wsdlMessage;
+ }
+
+ public String getWsdlMessagePartName()
+ {
+ return wsdlMessagePartName;
+ }
+
+ public void setWsdlMessagePartName(String wsdlMessagePartName)
+ {
+ this.wsdlMessagePartName = wsdlMessagePartName;
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+ sb.append(" <wsdl-message-mapping> <wsdl-message xmlns:");
+
sb.append(wsdlMessage.getPrefix()).append("='").append(wsdlMessage.getNamespaceURI()).append("'>");
+
sb.append(wsdlMessage.getPrefix()).append(":").append(wsdlMessage.getLocalPart()).append("</wsdl-message>");
+
sb.append("<wsdl-message-part-name>").append(wsdlMessagePartName).append("</wsdl-message-part-name>");
+
sb.append("<parameter-mode>").append(parameterMode).append("</parameter-mode>");
+ if (soapHeader)
+ sb.append("<soap-header/>");
+ sb.append("</wsdl-message-mapping>");
+ return sb.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlReturnValueMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlReturnValueMapping.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlReturnValueMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,101 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jaxrpcmapping;
-
-// $Id$
-
-import java.io.Serializable;
-
-import javax.xml.namespace.QName;
-
-/**
- * XML mapping of the
java-wsdl-mapping/service-endpoint-interface-mapping/service-endpoint-method-mapping/wsdl-return-value-mapping
element.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-May-2004
- */
-public class WsdlReturnValueMapping implements Serializable
-{
- private static final long serialVersionUID = -6910106650463959774L;
-
- // The parent <service-endpoint-method-mapping> element
- private ServiceEndpointMethodMapping serviceEndpointMethodMapping;
-
- // The required <method-return-value> element
- private String methodReturnValue;
- // The required <wsdl-message> element
- private QName wsdlMessage;
- // The optional <wsdl-message> element
- private String wsdlMessagePartName;
-
- public WsdlReturnValueMapping(ServiceEndpointMethodMapping
serviceEndpointMethodMapping)
- {
- this.serviceEndpointMethodMapping = serviceEndpointMethodMapping;
- }
-
- public ServiceEndpointMethodMapping getServiceEndpointMethodMapping()
- {
- return serviceEndpointMethodMapping;
- }
-
- public String getMethodReturnValue()
- {
- return methodReturnValue;
- }
-
- public void setMethodReturnValue(String methodReturnValue)
- {
- this.methodReturnValue = methodReturnValue;
- }
-
- public QName getWsdlMessage()
- {
- return wsdlMessage;
- }
-
- public void setWsdlMessage(QName wsdlMessage)
- {
- this.wsdlMessage = wsdlMessage;
- }
-
- public String getWsdlMessagePartName()
- {
- return wsdlMessagePartName;
- }
-
- public void setWsdlMessagePartName(String wsdlMessagePartName)
- {
- this.wsdlMessagePartName = wsdlMessagePartName;
- }
-
- public String serialize()
- {
- StringBuffer sb = new StringBuffer();
-
sb.append("<wsdl-return-value-mapping><method-return-value>").append(methodReturnValue).append("</method-return-value>");
- sb.append("<wsdl-message
xmlns:").append(wsdlMessage.getPrefix()).append("='").append(wsdlMessage.getNamespaceURI());
-
sb.append("'>").append(wsdlMessage.getPrefix()).append(":").append(wsdlMessage.getLocalPart()).append("</wsdl-message>");
-
sb.append("<wsdl-message-part-name>").append(wsdlMessagePartName).append("</wsdl-message-part-name>");
- sb.append("</wsdl-return-value-mapping>");
-
- return sb.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlReturnValueMapping.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlReturnValueMapping.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlReturnValueMapping.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlReturnValueMapping.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,101 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jaxrpcmapping;
+
+// $Id$
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * XML mapping of the
java-wsdl-mapping/service-endpoint-interface-mapping/service-endpoint-method-mapping/wsdl-return-value-mapping
element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-May-2004
+ */
+public class WsdlReturnValueMapping implements Serializable
+{
+ private static final long serialVersionUID = -6910106650463959774L;
+
+ // The parent <service-endpoint-method-mapping> element
+ private ServiceEndpointMethodMapping serviceEndpointMethodMapping;
+
+ // The required <method-return-value> element
+ private String methodReturnValue;
+ // The required <wsdl-message> element
+ private QName wsdlMessage;
+ // The optional <wsdl-message> element
+ private String wsdlMessagePartName;
+
+ public WsdlReturnValueMapping(ServiceEndpointMethodMapping
serviceEndpointMethodMapping)
+ {
+ this.serviceEndpointMethodMapping = serviceEndpointMethodMapping;
+ }
+
+ public ServiceEndpointMethodMapping getServiceEndpointMethodMapping()
+ {
+ return serviceEndpointMethodMapping;
+ }
+
+ public String getMethodReturnValue()
+ {
+ return methodReturnValue;
+ }
+
+ public void setMethodReturnValue(String methodReturnValue)
+ {
+ this.methodReturnValue = methodReturnValue;
+ }
+
+ public QName getWsdlMessage()
+ {
+ return wsdlMessage;
+ }
+
+ public void setWsdlMessage(QName wsdlMessage)
+ {
+ this.wsdlMessage = wsdlMessage;
+ }
+
+ public String getWsdlMessagePartName()
+ {
+ return wsdlMessagePartName;
+ }
+
+ public void setWsdlMessagePartName(String wsdlMessagePartName)
+ {
+ this.wsdlMessagePartName = wsdlMessagePartName;
+ }
+
+ public String serialize()
+ {
+ StringBuffer sb = new StringBuffer();
+
sb.append("<wsdl-return-value-mapping><method-return-value>").append(methodReturnValue).append("</method-return-value>");
+ sb.append("<wsdl-message
xmlns:").append(wsdlMessage.getPrefix()).append("='").append(wsdlMessage.getNamespaceURI());
+
sb.append("'>").append(wsdlMessage.getPrefix()).append(":").append(wsdlMessage.getLocalPart()).append("</wsdl-message>");
+
sb.append("<wsdl-message-part-name>").append(wsdlMessagePartName).append("</wsdl-message-part-name>");
+ sb.append("</wsdl-return-value-mapping>");
+
+ return sb.toString();
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181 (from rev
1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainFactory.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,164 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jsr181;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A JBossXB factory for jsr181 the HandlerChain annotation
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Oct-2005
- */
-public class HandlerChainFactory implements ObjectModelFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(HandlerChainFactory.class);
-
- public HandlerChainFactory()
- {
- }
-
- /**
- * This method is called on the factory by the object model builder when the parsing
starts.
- *
- * @return the root of the object model.
- */
- public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- HandlerChainsMetaData handlerConfigMetaData = new
HandlerChainsMetaData(HandlerType.ENDPOINT);
- return handlerConfigMetaData;
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
- {
- return root;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(HandlerChainsMetaData handlerConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- if ("handler-chain".equals(localName))
- return new HandlerChainMetaData(handlerConfig);
- else
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(HandlerChainsMetaData handlerConfig, HandlerChainMetaData
handlerChain, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- handlerConfig.addHandlerChain(handlerChain);
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(HandlerChainMetaData chainConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- if ("handler".equals(localName))
- return new UnifiedHandlerMetaData(chainConfig);
- else
- return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(HandlerChainMetaData handlerConfig, UnifiedHandlerMetaData
handler, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- handlerConfig.addHandler(handler);
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- if ("init-param".equals(localName))
- return new HandlerInitParam();
- else return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(UnifiedHandlerMetaData handler, HandlerInitParam param,
UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- handler.addInitParam(param);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(HandlerChainMetaData handlerChain, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("HandlerChainMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("protocol-bindings"))
- handlerChain.setProtocolBindings(value);
- else if (localName.equals("service-name-pattern"))
- handlerChain.setServiceNamePattern(navigator.resolveQName(value));
- else if (localName.equals("port-name-pattern"))
- handlerChain.setPortNamePattern(navigator.resolveQName(value));
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("UnifiedHandlerMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("handler-name"))
- handler.setHandlerName(value);
- else if (localName.equals("handler-class"))
- handler.setHandlerClass(value);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("param-name"))
- param.setParamName(value);
- else if (localName.equals("param-value"))
- param.setParamValue(value);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainFactory.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,164 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jsr181;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A JBossXB factory for jsr181 the HandlerChain annotation
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Oct-2005
+ */
+public class HandlerChainFactory implements ObjectModelFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HandlerChainFactory.class);
+
+ public HandlerChainFactory()
+ {
+ }
+
+ /**
+ * This method is called on the factory by the object model builder when the parsing
starts.
+ *
+ * @return the root of the object model.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ HandlerChainsMetaData handlerConfigMetaData = new
HandlerChainsMetaData(HandlerType.ENDPOINT);
+ return handlerConfigMetaData;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(HandlerChainsMetaData handlerConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("handler-chain".equals(localName))
+ return new HandlerChainMetaData(handlerConfig);
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(HandlerChainsMetaData handlerConfig, HandlerChainMetaData
handlerChain, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handlerConfig.addHandlerChain(handlerChain);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(HandlerChainMetaData chainConfig, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("handler".equals(localName))
+ return new UnifiedHandlerMetaData(chainConfig);
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(HandlerChainMetaData handlerConfig, UnifiedHandlerMetaData
handler, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handlerConfig.addHandler(handler);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("init-param".equals(localName))
+ return new HandlerInitParam();
+ else return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(UnifiedHandlerMetaData handler, HandlerInitParam param,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handler.addInitParam(param);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(HandlerChainMetaData handlerChain, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("HandlerChainMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("protocol-bindings"))
+ handlerChain.setProtocolBindings(value);
+ else if (localName.equals("service-name-pattern"))
+ handlerChain.setServiceNamePattern(navigator.resolveQName(value));
+ else if (localName.equals("port-name-pattern"))
+ handlerChain.setPortNamePattern(navigator.resolveQName(value));
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedHandlerMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("handler-name"))
+ handler.setHandlerName(value);
+ else if (localName.equals("handler-class"))
+ handler.setHandlerClass(value);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("param-name"))
+ param.setParamName(value);
+ else if (localName.equals("param-value"))
+ param.setParamValue(value);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,103 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.jsr181;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-
-/**
- * XML Binding element for handler-config/handler-chain elements
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Oct-2005
- */
-public class HandlerChainMetaData
-{
- // provide logging
- private static final Logger log = Logger.getLogger(HandlerChainMetaData.class);
-
- // The parent element
- private HandlerChainsMetaData handlerChainsMetaData;
-
- private String protocolBindings;
- private QName serviceNamePattern;
- private QName portNamePattern;
- private ArrayList<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
-
- public HandlerChainMetaData(HandlerChainsMetaData handlerConfig)
- {
- this.handlerChainsMetaData = handlerConfig;
- }
-
- public HandlerChainsMetaData getHandlerChainsMetaData()
- {
- return handlerChainsMetaData;
- }
-
- public void addHandler(UnifiedHandlerMetaData handlerMetaData)
- {
- handlers.add(handlerMetaData);
- }
-
- public List<UnifiedHandlerMetaData> getHandlers()
- {
- return handlers;
- }
-
- public QName getPortNamePattern()
- {
- return portNamePattern;
- }
-
- public void setPortNamePattern(QName portNamePattern)
- {
- this.portNamePattern = portNamePattern;
- }
-
- public String getProtocolBindings()
- {
- return protocolBindings;
- }
-
- public void setProtocolBindings(String protocolBindings)
- {
- this.protocolBindings = protocolBindings;
- }
-
- public QName getServiceNamePattern()
- {
- return serviceNamePattern;
- }
-
- public void setServiceNamePattern(QName serviceNamePattern)
- {
- this.serviceNamePattern = serviceNamePattern;
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.jsr181;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+
+/**
+ * XML Binding element for handler-config/handler-chain elements
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Oct-2005
+ */
+public class HandlerChainMetaData
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(HandlerChainMetaData.class);
+
+ // The parent element
+ private HandlerChainsMetaData handlerChainsMetaData;
+
+ private String protocolBindings;
+ private QName serviceNamePattern;
+ private QName portNamePattern;
+ private ArrayList<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
+
+ public HandlerChainMetaData(HandlerChainsMetaData handlerConfig)
+ {
+ this.handlerChainsMetaData = handlerConfig;
+ }
+
+ public HandlerChainsMetaData getHandlerChainsMetaData()
+ {
+ return handlerChainsMetaData;
+ }
+
+ public void addHandler(UnifiedHandlerMetaData handlerMetaData)
+ {
+ handlers.add(handlerMetaData);
+ }
+
+ public List<UnifiedHandlerMetaData> getHandlers()
+ {
+ return handlers;
+ }
+
+ public QName getPortNamePattern()
+ {
+ return portNamePattern;
+ }
+
+ public void setPortNamePattern(QName portNamePattern)
+ {
+ this.portNamePattern = portNamePattern;
+ }
+
+ public String getProtocolBindings()
+ {
+ return protocolBindings;
+ }
+
+ public void setProtocolBindings(String protocolBindings)
+ {
+ this.protocolBindings = protocolBindings;
+ }
+
+ public QName getServiceNamePattern()
+ {
+ return serviceNamePattern;
+ }
+
+ public void setServiceNamePattern(QName serviceNamePattern)
+ {
+ this.serviceNamePattern = serviceNamePattern;
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainsMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainsMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainsMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,66 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-// $Id$
-package org.jboss.ws.common.metadata.jsr181;
-
-//$Id$
-
-import java.util.ArrayList;
-
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-
-/**
- * XML Binding root element for JSR-181 HandlerChain
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Oct-2005
- */
-public class HandlerChainsMetaData
-{
- // The required handler type
- private HandlerType handlerType;
- // The required <handler-chain> elements
- private ArrayList<HandlerChainMetaData> handlerChains = new
ArrayList<HandlerChainMetaData>();
-
- public HandlerChainsMetaData(HandlerType handlerType)
- {
- this.handlerType = handlerType;
- }
-
- public HandlerType getHandlerType()
- {
- return handlerType;
- }
-
-
- public void addHandlerChain(HandlerChainMetaData handlerChain)
- {
- handlerChains.add(handlerChain);
- }
-
- public HandlerChainMetaData[] getHandlerChains()
- {
- HandlerChainMetaData[] array = new HandlerChainMetaData[handlerChains.size()];
- handlerChains.toArray(array);
- return array;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainsMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainsMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jsr181/HandlerChainsMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr181/HandlerChainsMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+// $Id$
+package org.jboss.ws.core.metadata.jsr181;
+
+//$Id$
+
+import java.util.ArrayList;
+
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * XML Binding root element for JSR-181 HandlerChain
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-Oct-2005
+ */
+public class HandlerChainsMetaData
+{
+ // The required handler type
+ private HandlerType handlerType;
+ // The required <handler-chain> elements
+ private ArrayList<HandlerChainMetaData> handlerChains = new
ArrayList<HandlerChainMetaData>();
+
+ public HandlerChainsMetaData(HandlerType handlerType)
+ {
+ this.handlerType = handlerType;
+ }
+
+ public HandlerType getHandlerType()
+ {
+ return handlerType;
+ }
+
+
+ public void addHandlerChain(HandlerChainMetaData handlerChain)
+ {
+ handlerChains.add(handlerChain);
+ }
+
+ public HandlerChainMetaData[] getHandlerChains()
+ {
+ HandlerChainMetaData[] array = new HandlerChainMetaData[handlerChains.size()];
+ handlerChains.toArray(array);
+ return array;
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm (from rev
1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ClientEndpointMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ClientEndpointMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ClientEndpointMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,170 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.config.WSConfigFactory;
-import org.jboss.ws.common.metadata.config.jaxrpc.WSConfigRootJAXRPC;
-import org.jboss.ws.common.metadata.config.jaxws.WSConfigRootJAXWS;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-
-/**
- * Client side endpoint meta data.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2005
- */
-public class ClientEndpointMetaData extends EndpointMetaData
-{
- // provide logging
- private static Logger log = Logger.getLogger(ClientEndpointMetaData.class);
-
- public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName
interfaceQName, Type type)
- {
- super(service, qname, interfaceQName, type);
- }
-
- public void setConfigName(String configName)
- {
- super.setConfigName(configName);
- endpointConfig = null;
- }
-
- public void setConfigFile(String configFile)
- {
- super.setConfigFile(configFile);
- endpointConfig = null;
- }
-
- @Override
- public Object getEndpointConfig()
- {
- if (endpointConfig == null)
- {
- String configName = getConfigName();
- if (configName == null)
- {
- configName = "Standard Client";
- setConfigName(configName);
- }
-
- String configFile = getConfigFile();
- if (configFile == null)
- {
- if (getType() == Type.JAXRPC)
- {
- configFile = "META-INF/standard-jaxrpc-client-config.xml";
- }
- else
- {
- configFile = "META-INF/standard-jaxws-client-config.xml";
- }
- setConfigFile(configFile);
- }
-
- log.debug("getClientConfig: [name=" + configName + ",url=" +
configFile + "]");
-
- URL configURL = null;
- try
- {
- configURL = new URL(configFile);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try to get the URL as resource
- if (configURL == null)
- {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- configURL = cl.getResource(configFile);
- if (configURL == null)
- throw new WSException("Cannot get resource: " + configFile);
- }
-
- // Get the config root
- Object wsConfig;
- try
- {
- WSConfigFactory factory = WSConfigFactory.newInstance();
- wsConfig = factory.parseWithObjectModelFactory(configURL);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot parse client config", ex);
- }
-
- // Get the client config
- if (wsConfig instanceof WSConfigRootJAXRPC)
- {
- endpointConfig =
((WSConfigRootJAXRPC)wsConfig).getClientConfigByName(configName);
- if (endpointConfig == null)
- throw new WSException("Cannot obtain client config: " +
configName);
- }
- else
- {
- endpointConfig =
((WSConfigRootJAXWS)wsConfig).getClientConfigByName(configName);
- if (endpointConfig == null)
- throw new WSException("Cannot obtain client config: " +
configName);
- }
- }
-
- return endpointConfig;
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
- buffer.append("\n type=" + getType());
- buffer.append("\n qname=" + getQName());
- buffer.append("\n address=" + getEndpointAddress());
- buffer.append("\n binding=" + getBindingId());
- buffer.append("\n seiName=" + getServiceEndpointInterfaceName());
- buffer.append("\n configFile=" + getConfigFile());
- buffer.append("\n configName=" + getConfigName());
- buffer.append("\n authMethod=" + getAuthMethod());
- buffer.append("\n properties=" + getProperties());
-
- for (OperationMetaData opMetaData : getOperations())
- {
- buffer.append("\n" + opMetaData);
- }
- for (HandlerMetaData hdlMetaData : getHandlerMetaData(HandlerType.ALL))
- {
- buffer.append("\n" + hdlMetaData);
- }
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ClientEndpointMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ClientEndpointMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ClientEndpointMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ClientEndpointMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.config.WSConfigFactory;
+import org.jboss.ws.core.metadata.config.jaxrpc.WSConfigRootJAXRPC;
+import org.jboss.ws.core.metadata.config.jaxws.WSConfigRootJAXWS;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * Client side endpoint meta data.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2005
+ */
+public class ClientEndpointMetaData extends EndpointMetaData
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ClientEndpointMetaData.class);
+
+ public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName
interfaceQName, Type type)
+ {
+ super(service, qname, interfaceQName, type);
+ }
+
+ public void setConfigName(String configName)
+ {
+ super.setConfigName(configName);
+ endpointConfig = null;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ super.setConfigFile(configFile);
+ endpointConfig = null;
+ }
+
+ @Override
+ public Object getEndpointConfig()
+ {
+ if (endpointConfig == null)
+ {
+ String configName = getConfigName();
+ if (configName == null)
+ {
+ configName = "Standard Client";
+ setConfigName(configName);
+ }
+
+ String configFile = getConfigFile();
+ if (configFile == null)
+ {
+ if (getType() == Type.JAXRPC)
+ {
+ configFile = "META-INF/standard-jaxrpc-client-config.xml";
+ }
+ else
+ {
+ configFile = "META-INF/standard-jaxws-client-config.xml";
+ }
+ setConfigFile(configFile);
+ }
+
+ log.debug("getClientConfig: [name=" + configName + ",url=" +
configFile + "]");
+
+ URL configURL = null;
+ try
+ {
+ configURL = new URL(configFile);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try to get the URL as resource
+ if (configURL == null)
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ configURL = cl.getResource(configFile);
+ if (configURL == null)
+ throw new WSException("Cannot get resource: " + configFile);
+ }
+
+ // Get the config root
+ Object wsConfig;
+ try
+ {
+ WSConfigFactory factory = WSConfigFactory.newInstance();
+ wsConfig = factory.parseWithObjectModelFactory(configURL);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException("Cannot parse client config", ex);
+ }
+
+ // Get the client config
+ if (wsConfig instanceof WSConfigRootJAXRPC)
+ {
+ endpointConfig =
((WSConfigRootJAXRPC)wsConfig).getClientConfigByName(configName);
+ if (endpointConfig == null)
+ throw new WSException("Cannot obtain client config: " +
configName);
+ }
+ else
+ {
+ endpointConfig =
((WSConfigRootJAXWS)wsConfig).getClientConfigByName(configName);
+ if (endpointConfig == null)
+ throw new WSException("Cannot obtain client config: " +
configName);
+ }
+ }
+
+ return endpointConfig;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
+ buffer.append("\n type=" + getType());
+ buffer.append("\n qname=" + getQName());
+ buffer.append("\n address=" + getEndpointAddress());
+ buffer.append("\n binding=" + getBindingId());
+ buffer.append("\n seiName=" + getServiceEndpointInterfaceName());
+ buffer.append("\n configFile=" + getConfigFile());
+ buffer.append("\n configName=" + getConfigName());
+ buffer.append("\n authMethod=" + getAuthMethod());
+ buffer.append("\n properties=" + getProperties());
+
+ for (OperationMetaData opMetaData : getOperations())
+ {
+ buffer.append("\n" + opMetaData);
+ }
+ for (HandlerMetaData hdlMetaData : getHandlerMetaData(HandlerType.ALL))
+ {
+ buffer.append("\n" + hdlMetaData);
+ }
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/EndpointMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/EndpointMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/EndpointMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,590 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.ws.Service.Mode;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.Style;
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.common.jaxrpc.Use;
-import org.jboss.ws.common.jaxrpc.encoding.JBossXBDeserializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.JBossXBSerializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.SOAPArrayDeserializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.SOAPArraySerializerFactory;
-import org.jboss.ws.common.metadata.config.WSCommonConfig;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
-import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
-
-/**
- * A Service component describes a set of endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2005
- */
-public abstract class EndpointMetaData extends ExtensibleMetaData
-{
- // provide logging
- private static Logger log = Logger.getLogger(EndpointMetaData.class);
-
- public enum Type
- {
- JAXRPC, JAXWS
- }
-
- // The parent meta data.
- private ServiceMetaData serviceMetaData;
-
- // The REQUIRED endpoint config
- protected WSCommonConfig endpointConfig;
-
- // The REQUIRED name
- private QName portName;
- // The REQUIRED binding id
- private String bindingId;
- // The REQUIRED name of the WSDL interface/portType
- private QName interfaceQName;
- // The REQUIRED config-name
- private String configName;
- // The REQUIRED config-file
- private String configFile;
- // The endpoint address
- private String endpointAddress;
- // The endpoint interface name
- private String seiName;
- // The endpoint interface
- private Class seiClass;
- // The optional authentication method
- private String authMethod;
- // Arbitrary properties given by <call-property>
- private Properties properties;
- // The SOAPBinding style
- private Style style;
- // The SOAPBinding use
- private Use use;
- // The SOAPBinding parameter style
- private ParameterStyle parameterStyle;
- // The JAXWS ServiceMode
- private Mode serviceMode;
- // Whether the endpoint was deployed from annotations
- private Type type;
- // The list of service meta data
- private List<OperationMetaData> operations = new
ArrayList<OperationMetaData>();
- // The optional handlers
- private List<HandlerMetaData> handlers = new
ArrayList<HandlerMetaData>();
- // True if the handlers are initialized
- private boolean handlersInitialized;
- // Maps the java method to the operation meta data
- private Map<Method, OperationMetaData> opMetaDataCache = new HashMap<Method,
OperationMetaData>();
-
- // JAX-WS default is false
- private boolean mtomEnabled = false;
-
- public EndpointMetaData(ServiceMetaData service, QName qname, QName interfaceQName,
Type type)
- {
- this.serviceMetaData = service;
- this.portName = qname;
- this.interfaceQName = interfaceQName;
- this.type = type;
-
- // The default binding
- this.bindingId = Constants.SOAP11HTTP_BINDING;
- }
-
- public ServiceMetaData getServiceMetaData()
- {
- return serviceMetaData;
- }
-
- public QName getQName()
- {
- return portName;
- }
-
- public QName getInterfaceQName()
- {
- return interfaceQName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- this.endpointConfig = null;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- this.endpointConfig = null;
- }
-
- public abstract Object getEndpointConfig();
-
- public String getEndpointAddress()
- {
- return endpointAddress;
- }
-
- public void setEndpointAddress(String endpointAddress)
- {
- this.endpointAddress = endpointAddress;
- }
-
- public String getBindingId()
- {
- return bindingId;
- }
-
- public void setBindingId(String bindingId)
- {
- if (!Constants.SOAP11HTTP_BINDING.equals(bindingId) &&
!Constants.SOAP12HTTP_BINDING.equals(bindingId))
- throw new WSException("Unsupported binding: " + bindingId);
- this.bindingId = bindingId;
- }
-
- public String getServiceEndpointInterfaceName()
- {
- return seiName;
- }
-
- public void setServiceEndpointInterfaceName(String seiName)
- {
- this.seiName = seiName;
- this.seiClass = null;
-
- UnifiedMetaData wsMetaData = serviceMetaData.getUnifiedMetaData();
- if (wsMetaData.isEagerInitialized())
- {
- if (UnifiedMetaData.isFinalRelease() == false)
- log.warn("Set SEI name after eager initialization", new
IllegalStateException());
-
- // reinitialize
- initializeInternal();
- }
- }
-
- /** Get the class loader associated with the endpoint meta data */
- public ClassLoader getClassLoader()
- {
- ClassLoader classLoader =
getServiceMetaData().getUnifiedMetaData().getClassLoader();
- return classLoader;
- }
-
- /**
- * Load the service endpoint interface.
- * It should only be cached during eager initialization.
- */
- public Class getServiceEndpointInterface()
- {
- Class tmpClass = seiClass;
- if (tmpClass == null && seiName != null)
- {
- try
- {
- ClassLoader classLoader = getClassLoader();
- tmpClass = classLoader.loadClass(seiName);
- if (serviceMetaData.getUnifiedMetaData().isEagerInitialized())
- {
- log.warn("Loading SEI after eager initialization");
- seiClass = tmpClass;
- }
- }
- catch (ClassNotFoundException ex)
- {
- throw new WSException("Cannot load service endpoint interface: " +
seiName, ex);
- }
- }
- return tmpClass;
- }
-
- public Use getEncodingStyle()
- {
- if (use == null)
- {
- use = Use.getDefaultUse();
- log.debug("Using default encoding style: " + use);
- }
- return use;
- }
-
- public void setEncodingStyle(Use value)
- {
- if (value != null && use != null && !use.equals(value))
- throw new WSException("Mixed encoding styles not supported");
-
- log.trace("setEncodingStyle: " + value);
- this.use = value;
- }
-
- public Style getStyle()
- {
- if (style == null)
- {
- style = Style.getDefaultStyle();
- log.debug("Using default style: " + style);
- }
- return style;
- }
-
- public void setStyle(Style value)
- {
- if (value != null && style != null && !style.equals(value))
- throw new WSException("Mixed styles not supported");
-
- log.trace("setStyle: " + value);
- this.style = value;
- }
-
- public ParameterStyle getParameterStyle()
- {
- if (parameterStyle == null)
- {
- parameterStyle = ParameterStyle.WRAPPED;
- log.debug("Using default parameter style: " + parameterStyle);
- }
- return parameterStyle;
- }
-
- public void setParameterStyle(ParameterStyle value)
- {
- if (value != null && parameterStyle != null &&
!parameterStyle.equals(value))
- throw new WSException("Mixed SOAP parameter styles not supported");
-
- log.debug("setParameterStyle: " + value);
- this.parameterStyle = value;
- }
-
- public Mode getServiceMode()
- {
- return serviceMode;
- }
-
- public void setServiceMode(Mode serviceMode)
- {
- this.serviceMode = serviceMode;
- }
-
- public Type getType()
- {
- return type;
- }
-
- public boolean isMtomEnabled() {
- return mtomEnabled;
- }
-
- public void setMtomEnabled(boolean mtomEnabled) {
- this.mtomEnabled = mtomEnabled;
- }
-
- public String getAuthMethod()
- {
- return authMethod;
- }
-
- public void setAuthMethod(String authMethod)
- {
- this.authMethod = authMethod;
- }
-
- public Properties getProperties()
- {
- return properties;
- }
-
- public void setProperties(Properties properties)
- {
- this.properties = properties;
- }
-
- public List<OperationMetaData> getOperations()
- {
- return new ArrayList<OperationMetaData>(operations);
- }
-
- public OperationMetaData getOperation(QName xmlName)
- {
- OperationMetaData opMetaData = null;
- for (OperationMetaData aux : operations)
- {
- QName opQName = aux.getQName();
- String javaName = aux.getJavaName();
- if (opQName.equals(xmlName) &&
!javaName.endsWith(Constants.ASYNC_METHOD_SUFFIX))
- {
- if (opMetaData == null)
- {
- opMetaData = aux;
- }
- else
- {
- throw new WSException("Cannot uniquely indentify operation: " +
xmlName);
- }
- }
- }
-
- if (opMetaData == null && getStyle() == Style.DOCUMENT)
- {
- for (OperationMetaData auxOperation : operations)
- {
- ParameterMetaData paramMetaData = null;
- for (ParameterMetaData auxParam : auxOperation.getParameters())
- {
- ParameterMode mode = auxParam.getMode();
- if (auxParam.isInHeader() == false && mode == ParameterMode.IN)
- {
- paramMetaData = auxParam;
- break;
- }
- }
- if (paramMetaData != null &&
paramMetaData.getXmlName().equals(xmlName))
- {
- if (opMetaData == null)
- {
- opMetaData = auxOperation;
- }
- else
- {
- throw new WSException("Cannot uniquely indentify operation: "
+ xmlName);
- }
- }
- }
- }
-
- return opMetaData;
- }
-
- public OperationMetaData getOperation(Method method)
- {
- if (opMetaDataCache.size() == 0)
- {
- // This can happen when the SEI mapping was not found
- log.warn("Access to empty operation meta data cache,
reinitializing");
- initializeInternal();
- }
-
- OperationMetaData opMetaData = opMetaDataCache.get(method);
- if (opMetaData == null)
- {
- for (OperationMetaData aux : operations)
- {
- boolean doesMatch = aux.getJavaMethod().equals(method);
-
- // fallback for async methods
- if(!doesMatch &&
method.getName().endsWith(Constants.ASYNC_METHOD_SUFFIX))
- {
- String name = method.getName();
- name = name.substring(0, name.length()-5);
- doesMatch = aux.getJavaName().equals(name);
- }
-
- if (doesMatch)
- {
- opMetaDataCache.put(method, aux);
- opMetaData = aux;
- break;
- }
-
- }
- }
- return opMetaData;
- }
-
- public void addOperation(OperationMetaData opMetaData)
- {
- operations.add(opMetaData);
- }
-
- public void clearOperations()
- {
- operations.clear();
- }
-
- public void addHandlers(List<HandlerMetaData> configHandlers)
- {
- handlers.addAll(configHandlers);
- }
-
- public void addHandler(HandlerMetaData handler)
- {
- handlers.add(handler);
- }
-
- public void clearHandlers()
- {
- handlers.clear();
- handlersInitialized = false;
- }
-
- public List<HandlerMetaData> getHandlerMetaData(HandlerType type)
- {
- List<HandlerMetaData> typeHandlers = new ArrayList<HandlerMetaData>();
- for (HandlerMetaData hmd : handlers)
- {
- if (hmd.getHandlerType() == type || type == HandlerType.ALL)
- typeHandlers.add(hmd);
- }
- return typeHandlers;
- }
-
- public boolean isHandlersInitialized()
- {
- return handlersInitialized;
- }
-
- public void setHandlersInitialized(boolean flag)
- {
- this.handlersInitialized = flag;
- }
-
- public void validate()
- {
- for (HandlerMetaData handler : handlers)
- handler.validate();
-
- for (OperationMetaData opMetaData : operations)
- opMetaData.validate();
- }
-
- /**
- * @see UnifiedMetaData#eagerInitialize()
- */
- public void eagerInitialize()
- {
- initializeInternal();
- }
-
- private void initializeInternal()
- {
- // reset sei class
- seiClass = null;
-
- // Initialize handlers
- for (HandlerMetaData handler : handlers)
- handler.eagerInitialize();
-
- eagerInitializeOperations();
- eagerInitializeTypes();
- }
-
- private void eagerInitializeOperations()
- {
- seiClass = getServiceEndpointInterface();
- if (seiClass != null)
- {
- List<Method> unsynchronizedMethods = new ArrayList<Method>();
- unsynchronizedMethods.addAll(Arrays.asList(seiClass.getMethods()));
-
- for (OperationMetaData opMetaData : operations)
- {
- opMetaData.eagerInitialize(unsynchronizedMethods);
- Method method = opMetaData.getJavaMethod();
- if (method != null)
- {
- opMetaDataCache.put(method, opMetaData);
- unsynchronizedMethods.remove(method);
- }
- }
- }
- }
-
- private void eagerInitializeTypes()
- {
- TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
- for (TypeMappingMetaData tmMetaData :
serviceMetaData.getTypesMetaData().getTypeMappings())
- {
- String javaTypeName = tmMetaData.getJavaTypeName();
- QName xmlType = tmMetaData.getXmlType();
- if (xmlType != null)
- {
- List<Class> registeredTypes = typeMapping.getJavaTypes(xmlType);
-
- boolean registered = false;
- for (Class current : registeredTypes) {
- if (current.getName().equals(javaTypeName))
- {
- registered = true;
- break;
- }
- }
-
- if (registered == false)
- {
- try
- {
- ClassLoader classLoader = getClassLoader();
- Class javaType = JavaUtils.loadJavaType(javaTypeName, classLoader);
-
- if (JavaUtils.isPrimitive(javaTypeName))
- javaType = JavaUtils.getWrapperType(javaType);
-
- if (getEncodingStyle() == Use.ENCODED && javaType.isArray())
- {
- typeMapping.register(javaType, xmlType, new
SOAPArraySerializerFactory(), new SOAPArrayDeserializerFactory());
- }
- else
- {
- if (getType() == Type.JAXWS)
- {
- typeMapping.register(javaType, xmlType, new
JAXBSerializerFactory(), new JAXBDeserializerFactory());
- }
- else
- {
- typeMapping.register(javaType, xmlType, new
JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
- }
- }
- }
- catch (ClassNotFoundException e)
- {
- log.warn("Cannot load class for type: " + xmlType +
"," + javaTypeName);
- }
- }
- }
- }
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/EndpointMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/EndpointMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/EndpointMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/EndpointMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,590 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.ws.Service.Mode;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
+import org.jboss.ws.core.binding.JBossXBSerializerFactory;
+import org.jboss.ws.core.binding.SOAPArrayDeserializerFactory;
+import org.jboss.ws.core.binding.SOAPArraySerializerFactory;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
+import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
+import org.jboss.ws.core.metadata.config.WSCommonConfig;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.utils.JavaUtils;
+
+/**
+ * A Service component describes a set of endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2005
+ */
+public abstract class EndpointMetaData extends ExtensibleMetaData
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(EndpointMetaData.class);
+
+ public enum Type
+ {
+ JAXRPC, JAXWS
+ }
+
+ // The parent meta data.
+ private ServiceMetaData serviceMetaData;
+
+ // The REQUIRED endpoint config
+ protected WSCommonConfig endpointConfig;
+
+ // The REQUIRED name
+ private QName portName;
+ // The REQUIRED binding id
+ private String bindingId;
+ // The REQUIRED name of the WSDL interface/portType
+ private QName interfaceQName;
+ // The REQUIRED config-name
+ private String configName;
+ // The REQUIRED config-file
+ private String configFile;
+ // The endpoint address
+ private String endpointAddress;
+ // The endpoint interface name
+ private String seiName;
+ // The endpoint interface
+ private Class seiClass;
+ // The optional authentication method
+ private String authMethod;
+ // Arbitrary properties given by <call-property>
+ private Properties properties;
+ // The SOAPBinding style
+ private Style style;
+ // The SOAPBinding use
+ private Use use;
+ // The SOAPBinding parameter style
+ private ParameterStyle parameterStyle;
+ // The JAXWS ServiceMode
+ private Mode serviceMode;
+ // Whether the endpoint was deployed from annotations
+ private Type type;
+ // The list of service meta data
+ private List<OperationMetaData> operations = new
ArrayList<OperationMetaData>();
+ // The optional handlers
+ private List<HandlerMetaData> handlers = new
ArrayList<HandlerMetaData>();
+ // True if the handlers are initialized
+ private boolean handlersInitialized;
+ // Maps the java method to the operation meta data
+ private Map<Method, OperationMetaData> opMetaDataCache = new HashMap<Method,
OperationMetaData>();
+
+ // JAX-WS default is false
+ private boolean mtomEnabled = false;
+
+ public EndpointMetaData(ServiceMetaData service, QName qname, QName interfaceQName,
Type type)
+ {
+ this.serviceMetaData = service;
+ this.portName = qname;
+ this.interfaceQName = interfaceQName;
+ this.type = type;
+
+ // The default binding
+ this.bindingId = Constants.SOAP11HTTP_BINDING;
+ }
+
+ public ServiceMetaData getServiceMetaData()
+ {
+ return serviceMetaData;
+ }
+
+ public QName getQName()
+ {
+ return portName;
+ }
+
+ public QName getInterfaceQName()
+ {
+ return interfaceQName;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ this.endpointConfig = null;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ this.endpointConfig = null;
+ }
+
+ public abstract Object getEndpointConfig();
+
+ public String getEndpointAddress()
+ {
+ return endpointAddress;
+ }
+
+ public void setEndpointAddress(String endpointAddress)
+ {
+ this.endpointAddress = endpointAddress;
+ }
+
+ public String getBindingId()
+ {
+ return bindingId;
+ }
+
+ public void setBindingId(String bindingId)
+ {
+ if (!Constants.SOAP11HTTP_BINDING.equals(bindingId) &&
!Constants.SOAP12HTTP_BINDING.equals(bindingId))
+ throw new WSException("Unsupported binding: " + bindingId);
+ this.bindingId = bindingId;
+ }
+
+ public String getServiceEndpointInterfaceName()
+ {
+ return seiName;
+ }
+
+ public void setServiceEndpointInterfaceName(String seiName)
+ {
+ this.seiName = seiName;
+ this.seiClass = null;
+
+ UnifiedMetaData wsMetaData = serviceMetaData.getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized())
+ {
+ if (UnifiedMetaData.isFinalRelease() == false)
+ log.warn("Set SEI name after eager initialization", new
IllegalStateException());
+
+ // reinitialize
+ initializeInternal();
+ }
+ }
+
+ /** Get the class loader associated with the endpoint meta data */
+ public ClassLoader getClassLoader()
+ {
+ ClassLoader classLoader =
getServiceMetaData().getUnifiedMetaData().getClassLoader();
+ return classLoader;
+ }
+
+ /**
+ * Load the service endpoint interface.
+ * It should only be cached during eager initialization.
+ */
+ public Class getServiceEndpointInterface()
+ {
+ Class tmpClass = seiClass;
+ if (tmpClass == null && seiName != null)
+ {
+ try
+ {
+ ClassLoader classLoader = getClassLoader();
+ tmpClass = classLoader.loadClass(seiName);
+ if (serviceMetaData.getUnifiedMetaData().isEagerInitialized())
+ {
+ log.warn("Loading SEI after eager initialization");
+ seiClass = tmpClass;
+ }
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSException("Cannot load service endpoint interface: " +
seiName, ex);
+ }
+ }
+ return tmpClass;
+ }
+
+ public Use getEncodingStyle()
+ {
+ if (use == null)
+ {
+ use = Use.getDefaultUse();
+ log.debug("Using default encoding style: " + use);
+ }
+ return use;
+ }
+
+ public void setEncodingStyle(Use value)
+ {
+ if (value != null && use != null && !use.equals(value))
+ throw new WSException("Mixed encoding styles not supported");
+
+ log.trace("setEncodingStyle: " + value);
+ this.use = value;
+ }
+
+ public Style getStyle()
+ {
+ if (style == null)
+ {
+ style = Style.getDefaultStyle();
+ log.debug("Using default style: " + style);
+ }
+ return style;
+ }
+
+ public void setStyle(Style value)
+ {
+ if (value != null && style != null && !style.equals(value))
+ throw new WSException("Mixed styles not supported");
+
+ log.trace("setStyle: " + value);
+ this.style = value;
+ }
+
+ public ParameterStyle getParameterStyle()
+ {
+ if (parameterStyle == null)
+ {
+ parameterStyle = ParameterStyle.WRAPPED;
+ log.debug("Using default parameter style: " + parameterStyle);
+ }
+ return parameterStyle;
+ }
+
+ public void setParameterStyle(ParameterStyle value)
+ {
+ if (value != null && parameterStyle != null &&
!parameterStyle.equals(value))
+ throw new WSException("Mixed SOAP parameter styles not supported");
+
+ log.debug("setParameterStyle: " + value);
+ this.parameterStyle = value;
+ }
+
+ public Mode getServiceMode()
+ {
+ return serviceMode;
+ }
+
+ public void setServiceMode(Mode serviceMode)
+ {
+ this.serviceMode = serviceMode;
+ }
+
+ public Type getType()
+ {
+ return type;
+ }
+
+ public boolean isMtomEnabled() {
+ return mtomEnabled;
+ }
+
+ public void setMtomEnabled(boolean mtomEnabled) {
+ this.mtomEnabled = mtomEnabled;
+ }
+
+ public String getAuthMethod()
+ {
+ return authMethod;
+ }
+
+ public void setAuthMethod(String authMethod)
+ {
+ this.authMethod = authMethod;
+ }
+
+ public Properties getProperties()
+ {
+ return properties;
+ }
+
+ public void setProperties(Properties properties)
+ {
+ this.properties = properties;
+ }
+
+ public List<OperationMetaData> getOperations()
+ {
+ return new ArrayList<OperationMetaData>(operations);
+ }
+
+ public OperationMetaData getOperation(QName xmlName)
+ {
+ OperationMetaData opMetaData = null;
+ for (OperationMetaData aux : operations)
+ {
+ QName opQName = aux.getQName();
+ String javaName = aux.getJavaName();
+ if (opQName.equals(xmlName) &&
!javaName.endsWith(Constants.ASYNC_METHOD_SUFFIX))
+ {
+ if (opMetaData == null)
+ {
+ opMetaData = aux;
+ }
+ else
+ {
+ throw new WSException("Cannot uniquely indentify operation: " +
xmlName);
+ }
+ }
+ }
+
+ if (opMetaData == null && getStyle() == Style.DOCUMENT)
+ {
+ for (OperationMetaData auxOperation : operations)
+ {
+ ParameterMetaData paramMetaData = null;
+ for (ParameterMetaData auxParam : auxOperation.getParameters())
+ {
+ ParameterMode mode = auxParam.getMode();
+ if (auxParam.isInHeader() == false && mode == ParameterMode.IN)
+ {
+ paramMetaData = auxParam;
+ break;
+ }
+ }
+ if (paramMetaData != null &&
paramMetaData.getXmlName().equals(xmlName))
+ {
+ if (opMetaData == null)
+ {
+ opMetaData = auxOperation;
+ }
+ else
+ {
+ throw new WSException("Cannot uniquely indentify operation: "
+ xmlName);
+ }
+ }
+ }
+ }
+
+ return opMetaData;
+ }
+
+ public OperationMetaData getOperation(Method method)
+ {
+ if (opMetaDataCache.size() == 0)
+ {
+ // This can happen when the SEI mapping was not found
+ log.warn("Access to empty operation meta data cache,
reinitializing");
+ initializeInternal();
+ }
+
+ OperationMetaData opMetaData = opMetaDataCache.get(method);
+ if (opMetaData == null)
+ {
+ for (OperationMetaData aux : operations)
+ {
+ boolean doesMatch = aux.getJavaMethod().equals(method);
+
+ // fallback for async methods
+ if(!doesMatch &&
method.getName().endsWith(Constants.ASYNC_METHOD_SUFFIX))
+ {
+ String name = method.getName();
+ name = name.substring(0, name.length()-5);
+ doesMatch = aux.getJavaName().equals(name);
+ }
+
+ if (doesMatch)
+ {
+ opMetaDataCache.put(method, aux);
+ opMetaData = aux;
+ break;
+ }
+
+ }
+ }
+ return opMetaData;
+ }
+
+ public void addOperation(OperationMetaData opMetaData)
+ {
+ operations.add(opMetaData);
+ }
+
+ public void clearOperations()
+ {
+ operations.clear();
+ }
+
+ public void addHandlers(List<HandlerMetaData> configHandlers)
+ {
+ handlers.addAll(configHandlers);
+ }
+
+ public void addHandler(HandlerMetaData handler)
+ {
+ handlers.add(handler);
+ }
+
+ public void clearHandlers()
+ {
+ handlers.clear();
+ handlersInitialized = false;
+ }
+
+ public List<HandlerMetaData> getHandlerMetaData(HandlerType type)
+ {
+ List<HandlerMetaData> typeHandlers = new ArrayList<HandlerMetaData>();
+ for (HandlerMetaData hmd : handlers)
+ {
+ if (hmd.getHandlerType() == type || type == HandlerType.ALL)
+ typeHandlers.add(hmd);
+ }
+ return typeHandlers;
+ }
+
+ public boolean isHandlersInitialized()
+ {
+ return handlersInitialized;
+ }
+
+ public void setHandlersInitialized(boolean flag)
+ {
+ this.handlersInitialized = flag;
+ }
+
+ public void validate()
+ {
+ for (HandlerMetaData handler : handlers)
+ handler.validate();
+
+ for (OperationMetaData opMetaData : operations)
+ opMetaData.validate();
+ }
+
+ /**
+ * @see UnifiedMetaData#eagerInitialize()
+ */
+ public void eagerInitialize()
+ {
+ initializeInternal();
+ }
+
+ private void initializeInternal()
+ {
+ // reset sei class
+ seiClass = null;
+
+ // Initialize handlers
+ for (HandlerMetaData handler : handlers)
+ handler.eagerInitialize();
+
+ eagerInitializeOperations();
+ eagerInitializeTypes();
+ }
+
+ private void eagerInitializeOperations()
+ {
+ seiClass = getServiceEndpointInterface();
+ if (seiClass != null)
+ {
+ List<Method> unsynchronizedMethods = new ArrayList<Method>();
+ unsynchronizedMethods.addAll(Arrays.asList(seiClass.getMethods()));
+
+ for (OperationMetaData opMetaData : operations)
+ {
+ opMetaData.eagerInitialize(unsynchronizedMethods);
+ Method method = opMetaData.getJavaMethod();
+ if (method != null)
+ {
+ opMetaDataCache.put(method, opMetaData);
+ unsynchronizedMethods.remove(method);
+ }
+ }
+ }
+ }
+
+ private void eagerInitializeTypes()
+ {
+ TypeMappingImpl typeMapping = serviceMetaData.getTypeMapping();
+ for (TypeMappingMetaData tmMetaData :
serviceMetaData.getTypesMetaData().getTypeMappings())
+ {
+ String javaTypeName = tmMetaData.getJavaTypeName();
+ QName xmlType = tmMetaData.getXmlType();
+ if (xmlType != null)
+ {
+ List<Class> registeredTypes = typeMapping.getJavaTypes(xmlType);
+
+ boolean registered = false;
+ for (Class current : registeredTypes) {
+ if (current.getName().equals(javaTypeName))
+ {
+ registered = true;
+ break;
+ }
+ }
+
+ if (registered == false)
+ {
+ try
+ {
+ ClassLoader classLoader = getClassLoader();
+ Class javaType = JavaUtils.loadJavaType(javaTypeName, classLoader);
+
+ if (JavaUtils.isPrimitive(javaTypeName))
+ javaType = JavaUtils.getWrapperType(javaType);
+
+ if (getEncodingStyle() == Use.ENCODED && javaType.isArray())
+ {
+ typeMapping.register(javaType, xmlType, new
SOAPArraySerializerFactory(), new SOAPArrayDeserializerFactory());
+ }
+ else
+ {
+ if (getType() == Type.JAXWS)
+ {
+ typeMapping.register(javaType, xmlType, new
JAXBSerializerFactory(), new JAXBDeserializerFactory());
+ }
+ else
+ {
+ typeMapping.register(javaType, xmlType, new
JBossXBSerializerFactory(), new JBossXBDeserializerFactory());
+ }
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Cannot load class for type: " + xmlType +
"," + javaTypeName);
+ }
+ }
+ }
+ }
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ExtensibleMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ExtensibleMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ExtensibleMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,29 +0,0 @@
-package org.jboss.ws.common.metadata.umdm;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * Base class for UMD elements that are extensible.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 21-Mar-2006
- */
-public abstract class ExtensibleMetaData {
-
- private Map<String, MetaDataExtension> extensions = new HashMap<String,
MetaDataExtension>();
-
- public Map<String, MetaDataExtension> getExtensions() {
- return extensions;
- }
-
- public void addExtension(MetaDataExtension ext) {
- getExtensions().put(ext.getExtensionNameSpace(), ext);
- }
-
- public MetaDataExtension getExtension(String namespace) {
- return getExtensions().get(namespace);
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ExtensibleMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ExtensibleMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ExtensibleMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ExtensibleMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,29 @@
+package org.jboss.ws.core.metadata.umdm;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * Base class for UMD elements that are extensible.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 21-Mar-2006
+ */
+public abstract class ExtensibleMetaData {
+
+ private Map<String, MetaDataExtension> extensions = new HashMap<String,
MetaDataExtension>();
+
+ public Map<String, MetaDataExtension> getExtensions() {
+ return extensions;
+ }
+
+ public void addExtension(MetaDataExtension ext) {
+ getExtensions().put(ext.getExtensionNameSpace(), ext);
+ }
+
+ public MetaDataExtension getExtension(String namespace) {
+ return getExtensions().get(namespace);
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/FaultMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/FaultMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/FaultMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,183 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
-
-/**
- * A Fault component describes a fault that a given operation supports.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author jason.greene(a)jboss.com
- * @since 12-May-2005
- */
-public class FaultMetaData
-{
- // provide logging
- private final Logger log = Logger.getLogger(FaultMetaData.class);
-
- // The parent operation
- private OperationMetaData opMetaData;
-
- private QName xmlName;
- private QName xmlType;
- private String javaTypeName;
- private String faultBeanName;
- private Class javaType;
- private Class faultBean;
-
- public FaultMetaData(OperationMetaData operation, QName xmlName, QName xmlType, String
javaTypeName)
- {
- this(operation, xmlName, javaTypeName);
- setXmlType(xmlType);
- }
-
- public FaultMetaData(OperationMetaData operation, QName xmlName, String javaTypeName)
- {
- if (xmlName == null)
- throw new IllegalArgumentException("Invalid null xmlName argument");
- if (javaTypeName == null)
- throw new IllegalArgumentException("Invalid null javaTypeName argument,
for: " + xmlName);
-
- this.opMetaData = operation;
- this.xmlName = xmlName;
- this.javaTypeName = javaTypeName;
- }
-
- public OperationMetaData getOperationMetaData()
- {
- return opMetaData;
- }
-
- public QName getXmlName()
- {
- return xmlName;
- }
-
- public QName getXmlType()
- {
- return xmlType;
- }
-
- public void setXmlType(QName xmlType)
- {
- if (xmlType == null)
- throw new IllegalArgumentException("Invalid null xmlType argument, for:
" + xmlName);
-
- this.xmlType = xmlType;
- }
-
- public String getJavaTypeName()
- {
- return javaTypeName;
- }
-
- /** Load the java type.
- * It should only be cached during eager initialization.
- */
- public Class getJavaType()
- {
- Class tmpJavaType = javaType;
- if (tmpJavaType == null && javaTypeName != null)
- {
- try
- {
- ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- tmpJavaType = JavaUtils.loadJavaType(javaTypeName, loader);
-
- if
(opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().isEagerInitialized())
- {
- log.warn("Loading java type after eager initialization");
- javaType = tmpJavaType;
- }
- }
- catch (ClassNotFoundException ex)
- {
- throw new WSException("Cannot load java type: " + javaTypeName,
ex);
- }
- }
- return tmpJavaType;
- }
-
- public String getFaultBeanName()
- {
- return faultBeanName;
- }
-
- public void setFaultBeanName(String faultBeanName)
- {
- this.faultBeanName = faultBeanName;
- }
-
- public Class getFaultBean()
- {
- Class tmpFaultBean = faultBean;
- if (tmpFaultBean == null && faultBeanName != null)
- {
- try
- {
- ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- tmpFaultBean = JavaUtils.loadJavaType(faultBeanName, loader);
- }
- catch (ClassNotFoundException ex)
- {
- throw new WSException("Cannot load fault bean: " + faultBeanName,
ex);
- }
- }
- return tmpFaultBean;
- }
-
- public void validate()
- {
- // nothing to do
- }
-
- public void eagerInitialize()
- {
- ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- new DynamicWrapperGenerator(loader).generate(this);
-
- // Initialize the cache
- javaType = getJavaType();
- if (javaType == null)
- throw new WSException("Cannot load java type: " + javaTypeName);
-
- faultBean = getFaultBean();
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nFaultMetaData");
- buffer.append("\n xmlName=" + xmlName);
- buffer.append("\n xmlType=" + xmlType);
- buffer.append("\n javaType=" + javaTypeName);
- buffer.append("\n faultBean=" + faultBeanName);
- return buffer.toString();
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/FaultMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/FaultMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/FaultMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/FaultMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,183 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
+import org.jboss.ws.core.utils.JavaUtils;
+
+/**
+ * A Fault component describes a fault that a given operation supports.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author jason.greene(a)jboss.com
+ * @since 12-May-2005
+ */
+public class FaultMetaData
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(FaultMetaData.class);
+
+ // The parent operation
+ private OperationMetaData opMetaData;
+
+ private QName xmlName;
+ private QName xmlType;
+ private String javaTypeName;
+ private String faultBeanName;
+ private Class javaType;
+ private Class faultBean;
+
+ public FaultMetaData(OperationMetaData operation, QName xmlName, QName xmlType, String
javaTypeName)
+ {
+ this(operation, xmlName, javaTypeName);
+ setXmlType(xmlType);
+ }
+
+ public FaultMetaData(OperationMetaData operation, QName xmlName, String javaTypeName)
+ {
+ if (xmlName == null)
+ throw new IllegalArgumentException("Invalid null xmlName argument");
+ if (javaTypeName == null)
+ throw new IllegalArgumentException("Invalid null javaTypeName argument,
for: " + xmlName);
+
+ this.opMetaData = operation;
+ this.xmlName = xmlName;
+ this.javaTypeName = javaTypeName;
+ }
+
+ public OperationMetaData getOperationMetaData()
+ {
+ return opMetaData;
+ }
+
+ public QName getXmlName()
+ {
+ return xmlName;
+ }
+
+ public QName getXmlType()
+ {
+ return xmlType;
+ }
+
+ public void setXmlType(QName xmlType)
+ {
+ if (xmlType == null)
+ throw new IllegalArgumentException("Invalid null xmlType argument, for:
" + xmlName);
+
+ this.xmlType = xmlType;
+ }
+
+ public String getJavaTypeName()
+ {
+ return javaTypeName;
+ }
+
+ /** Load the java type.
+ * It should only be cached during eager initialization.
+ */
+ public Class getJavaType()
+ {
+ Class tmpJavaType = javaType;
+ if (tmpJavaType == null && javaTypeName != null)
+ {
+ try
+ {
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ tmpJavaType = JavaUtils.loadJavaType(javaTypeName, loader);
+
+ if
(opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().isEagerInitialized())
+ {
+ log.warn("Loading java type after eager initialization");
+ javaType = tmpJavaType;
+ }
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSException("Cannot load java type: " + javaTypeName,
ex);
+ }
+ }
+ return tmpJavaType;
+ }
+
+ public String getFaultBeanName()
+ {
+ return faultBeanName;
+ }
+
+ public void setFaultBeanName(String faultBeanName)
+ {
+ this.faultBeanName = faultBeanName;
+ }
+
+ public Class getFaultBean()
+ {
+ Class tmpFaultBean = faultBean;
+ if (tmpFaultBean == null && faultBeanName != null)
+ {
+ try
+ {
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ tmpFaultBean = JavaUtils.loadJavaType(faultBeanName, loader);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSException("Cannot load fault bean: " + faultBeanName,
ex);
+ }
+ }
+ return tmpFaultBean;
+ }
+
+ public void validate()
+ {
+ // nothing to do
+ }
+
+ public void eagerInitialize()
+ {
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ new DynamicWrapperGenerator(loader).generate(this);
+
+ // Initialize the cache
+ javaType = getJavaType();
+ if (javaType == null)
+ throw new WSException("Cannot load java type: " + javaTypeName);
+
+ faultBean = getFaultBean();
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nFaultMetaData");
+ buffer.append("\n xmlName=" + xmlName);
+ buffer.append("\n xmlType=" + xmlType);
+ buffer.append("\n javaType=" + javaTypeName);
+ buffer.append("\n faultBean=" + faultBeanName);
+ return buffer.toString();
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,204 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id:HandlerMetaData.java 915 2006-09-08 08:40:45Z thomas.diesler(a)jboss.com $
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-
-/**
- * The common metdata data for a handler element
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public abstract class HandlerMetaData implements Serializable
-{
- // provide logging
- private final Logger log = Logger.getLogger(HandlerMetaData.class);
-
- public enum HandlerType
- {
- PRE, ENDPOINT, POST, ALL
- };
-
- private transient EndpointMetaData epMetaData;
-
- // The required <handler-name> element
- private String handlerName;
- // The required <handler-class> element
- private String handlerClassName;
- // The required handler type
- private HandlerType handlerType;
- // The optional <soap-header> elements
- private Set<QName> soapHeaders = new HashSet<QName>();
- // The optional <init-param> elements
- private List<HandlerInitParam> initParams = new
ArrayList<HandlerInitParam>();
- // The cached handler class
- private Class handlerClass;
-
- public HandlerMetaData(EndpointMetaData epMetaData, HandlerType type)
- {
- this.epMetaData = epMetaData;
- this.handlerType = type;
- }
-
- public void setEndpointMetaData(EndpointMetaData epMetaData)
- {
- this.epMetaData = epMetaData;
- }
-
- public EndpointMetaData getEndpointMetaData()
- {
- return epMetaData;
- }
-
- public void setHandlerName(String value)
- {
- this.handlerName = value;
- }
-
- public String getHandlerName()
- {
- return handlerName;
- }
-
- public void setHandlerClassName(String handlerClass)
- {
- this.handlerClassName = handlerClass;
- }
-
- public String getHandlerClassName()
- {
- return handlerClassName;
- }
-
- public Class getHandlerClass()
- {
- if (handlerClassName == null)
- throw new IllegalStateException("Handler class name cannot be null");
-
- Class localClass = handlerClass;
- if (localClass == null)
- {
- try
- {
- ClassLoader loader = epMetaData.getClassLoader();
- localClass = loader.loadClass(handlerClassName);
- }
- catch (ClassNotFoundException ex)
- {
- throw new WSException("Cannot load handler: " + handlerClassName,
ex);
- }
- }
- return localClass;
- }
-
- public HandlerType getHandlerType()
- {
- return handlerType;
- }
-
- public void setSoapHeaders(Set<QName> soapHeaders)
- {
- this.soapHeaders = soapHeaders;
- }
-
- public Set<QName> getSoapHeaders()
- {
- return soapHeaders;
- }
-
- public void seiInitParams(List<HandlerInitParam> initParams)
- {
- this.initParams = initParams;
- }
-
- public List<HandlerInitParam> getInitParams()
- {
- return initParams;
- }
-
- public void validate()
- {
- List<String> securityHandlers = new ArrayList<String>();
-
securityHandlers.add(org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerInbound.class.getName());
-
securityHandlers.add(org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerOutbound.class.getName());
-
securityHandlers.add(org.jboss.ws.extras.security.jaxws.WSSecurityHandlerInbound.class.getName());
-
securityHandlers.add(org.jboss.ws.extras.security.jaxws.WSSecurityHandlerOutbound.class.getName());
-
- if (securityHandlers.contains(handlerClassName))
- {
- if (epMetaData.getServiceMetaData().getSecurityConfiguration() == null)
- log.warn("WS-Security requires security configuration");
- }
- }
-
- public void eagerInitialize()
- {
- handlerClass = getHandlerClass();
- }
-
- public static class HandlerInitParam implements Serializable
- {
- private static final long serialVersionUID = -8687875291620457318L;
-
- // The required <handler-name> element
- private String paramName;
- // The required <handler-class> element
- private String paramValue;
-
- public String getParamName()
- {
- return paramName;
- }
-
- public void setParamName(String paramName)
- {
- this.paramName = paramName;
- }
-
- public String getParamValue()
- {
- return paramValue;
- }
-
- public void setParamValue(String paramValue)
- {
- this.paramValue = paramValue;
- }
-
- public String toString()
- {
- return "[name=" + paramName + ",value=" + paramValue +
"]";
- }
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,204 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id:HandlerMetaData.java 915 2006-09-08 08:40:45Z thomas.diesler(a)jboss.com $
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+
+/**
+ * The common metdata data for a handler element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public abstract class HandlerMetaData implements Serializable
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(HandlerMetaData.class);
+
+ public enum HandlerType
+ {
+ PRE, ENDPOINT, POST, ALL
+ };
+
+ private transient EndpointMetaData epMetaData;
+
+ // The required <handler-name> element
+ private String handlerName;
+ // The required <handler-class> element
+ private String handlerClassName;
+ // The required handler type
+ private HandlerType handlerType;
+ // The optional <soap-header> elements
+ private Set<QName> soapHeaders = new HashSet<QName>();
+ // The optional <init-param> elements
+ private List<HandlerInitParam> initParams = new
ArrayList<HandlerInitParam>();
+ // The cached handler class
+ private Class handlerClass;
+
+ public HandlerMetaData(EndpointMetaData epMetaData, HandlerType type)
+ {
+ this.epMetaData = epMetaData;
+ this.handlerType = type;
+ }
+
+ public void setEndpointMetaData(EndpointMetaData epMetaData)
+ {
+ this.epMetaData = epMetaData;
+ }
+
+ public EndpointMetaData getEndpointMetaData()
+ {
+ return epMetaData;
+ }
+
+ public void setHandlerName(String value)
+ {
+ this.handlerName = value;
+ }
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public void setHandlerClassName(String handlerClass)
+ {
+ this.handlerClassName = handlerClass;
+ }
+
+ public String getHandlerClassName()
+ {
+ return handlerClassName;
+ }
+
+ public Class getHandlerClass()
+ {
+ if (handlerClassName == null)
+ throw new IllegalStateException("Handler class name cannot be null");
+
+ Class localClass = handlerClass;
+ if (localClass == null)
+ {
+ try
+ {
+ ClassLoader loader = epMetaData.getClassLoader();
+ localClass = loader.loadClass(handlerClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSException("Cannot load handler: " + handlerClassName,
ex);
+ }
+ }
+ return localClass;
+ }
+
+ public HandlerType getHandlerType()
+ {
+ return handlerType;
+ }
+
+ public void setSoapHeaders(Set<QName> soapHeaders)
+ {
+ this.soapHeaders = soapHeaders;
+ }
+
+ public Set<QName> getSoapHeaders()
+ {
+ return soapHeaders;
+ }
+
+ public void seiInitParams(List<HandlerInitParam> initParams)
+ {
+ this.initParams = initParams;
+ }
+
+ public List<HandlerInitParam> getInitParams()
+ {
+ return initParams;
+ }
+
+ public void validate()
+ {
+ List<String> securityHandlers = new ArrayList<String>();
+
securityHandlers.add(org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerInbound.class.getName());
+
securityHandlers.add(org.jboss.ws.extras.security.jaxrpc.WSSecurityHandlerOutbound.class.getName());
+
securityHandlers.add(org.jboss.ws.extras.security.jaxws.WSSecurityHandlerInbound.class.getName());
+
securityHandlers.add(org.jboss.ws.extras.security.jaxws.WSSecurityHandlerOutbound.class.getName());
+
+ if (securityHandlers.contains(handlerClassName))
+ {
+ if (epMetaData.getServiceMetaData().getSecurityConfiguration() == null)
+ log.warn("WS-Security requires security configuration");
+ }
+ }
+
+ public void eagerInitialize()
+ {
+ handlerClass = getHandlerClass();
+ }
+
+ public static class HandlerInitParam implements Serializable
+ {
+ private static final long serialVersionUID = -8687875291620457318L;
+
+ // The required <handler-name> element
+ private String paramName;
+ // The required <handler-class> element
+ private String paramValue;
+
+ public String getParamName()
+ {
+ return paramName;
+ }
+
+ public void setParamName(String paramName)
+ {
+ this.paramName = paramName;
+ }
+
+ public String getParamValue()
+ {
+ return paramValue;
+ }
+
+ public void setParamValue(String paramValue)
+ {
+ this.paramValue = paramValue;
+ }
+
+ public String toString()
+ {
+ return "[name=" + paramName + ",value=" + paramValue +
"]";
+ }
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXRPC.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaDataJAXRPC.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-//$Id:HandlerMetaDataJAXRPC.java 915 2006-09-08 08:40:45Z thomas.diesler(a)jboss.com $
-
-import java.util.HashSet;
-import java.util.Set;
-
-
-/**
- * The JAXRPC metdata data for a handler element
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class HandlerMetaDataJAXRPC extends HandlerMetaData
-{
- private static final long serialVersionUID = -5232305815202943509L;
-
- // The optional <soap-role> elements
- private Set<String> soapRoles = new HashSet<String>();
- // The optional <port-name> elements
- private Set<String> portNames = new HashSet<String>();
-
- public HandlerMetaDataJAXRPC(EndpointMetaData epMetaData, HandlerType type)
- {
- super(epMetaData, type);
- }
-
- public void setSoapRoles(Set<String> soapRoles)
- {
- this.soapRoles = soapRoles;
- }
-
- public Set<String> getSoapRoles()
- {
- return soapRoles;
- }
-
- public void setPortNames(Set<String> portNames)
- {
- this.portNames = portNames;
- }
-
- public Set<String> getPortNames()
- {
- return portNames;
- }
-
- public String toString()
- {
- StringBuffer buffer = new StringBuffer("\nHandlerMetaDataJAXRPC:");
- buffer.append("\n type=" + getHandlerType());
- buffer.append("\n name=" + getHandlerName());
- buffer.append("\n class=" + getHandlerClassName());
- buffer.append("\n params=" + getInitParams());
- buffer.append("\n headers=" + getSoapHeaders());
- buffer.append("\n roles=" + getSoapRoles());
- buffer.append("\n ports=" + getPortNames());
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXRPC.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaDataJAXRPC.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaDataJAXRPC.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXRPC.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+//$Id:HandlerMetaDataJAXRPC.java 915 2006-09-08 08:40:45Z thomas.diesler(a)jboss.com $
+
+import java.util.HashSet;
+import java.util.Set;
+
+
+/**
+ * The JAXRPC metdata data for a handler element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class HandlerMetaDataJAXRPC extends HandlerMetaData
+{
+ private static final long serialVersionUID = -5232305815202943509L;
+
+ // The optional <soap-role> elements
+ private Set<String> soapRoles = new HashSet<String>();
+ // The optional <port-name> elements
+ private Set<String> portNames = new HashSet<String>();
+
+ public HandlerMetaDataJAXRPC(EndpointMetaData epMetaData, HandlerType type)
+ {
+ super(epMetaData, type);
+ }
+
+ public void setSoapRoles(Set<String> soapRoles)
+ {
+ this.soapRoles = soapRoles;
+ }
+
+ public Set<String> getSoapRoles()
+ {
+ return soapRoles;
+ }
+
+ public void setPortNames(Set<String> portNames)
+ {
+ this.portNames = portNames;
+ }
+
+ public Set<String> getPortNames()
+ {
+ return portNames;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer("\nHandlerMetaDataJAXRPC:");
+ buffer.append("\n type=" + getHandlerType());
+ buffer.append("\n name=" + getHandlerName());
+ buffer.append("\n class=" + getHandlerClassName());
+ buffer.append("\n params=" + getInitParams());
+ buffer.append("\n headers=" + getSoapHeaders());
+ buffer.append("\n roles=" + getSoapRoles());
+ buffer.append("\n ports=" + getPortNames());
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXWS.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaDataJAXWS.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,94 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-//$Id$
-
-import javax.xml.namespace.QName;
-
-
-/**
- * The JAXWS metdata data for a handler element
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class HandlerMetaDataJAXWS extends HandlerMetaData
-{
- private static final long serialVersionUID = 7631133188974299826L;
-
- // The JAXWS protocol bindings
- private String protocolBindings;
- // The JAXWS service name pattern
- private QName serviceNamePattern;
- // The JAXWS port name pattern
- private QName portNamePattern;
-
- public HandlerMetaDataJAXWS(EndpointMetaData epMetaData, HandlerType type)
- {
- super(epMetaData, type);
- }
-
- public QName getPortNamePattern()
- {
- return portNamePattern;
- }
-
- public void setPortNamePattern(QName portNamePattern)
- {
- this.portNamePattern = portNamePattern;
- }
-
- public String getProtocolBindings()
- {
- return protocolBindings;
- }
-
- public void setProtocolBindings(String protocolBindings)
- {
- this.protocolBindings = protocolBindings;
- }
-
- public QName getServiceNamePattern()
- {
- return serviceNamePattern;
- }
-
- public void setServiceNamePattern(QName serviceNamePattern)
- {
- this.serviceNamePattern = serviceNamePattern;
- }
-
- public String toString()
- {
- StringBuffer buffer = new StringBuffer("\nHandlerMetaDataJAXWS:");
- buffer.append("\n type=" + getHandlerType());
- buffer.append("\n name=" + getHandlerName());
- buffer.append("\n class=" + getHandlerClass());
- buffer.append("\n params=" + getInitParams());
- buffer.append("\n protocols=" + getProtocolBindings());
- buffer.append("\n services=" + getServiceNamePattern());
- buffer.append("\n ports=" + getPortNamePattern());
- return buffer.toString();
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXWS.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaDataJAXWS.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/HandlerMetaDataJAXWS.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/HandlerMetaDataJAXWS.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+//$Id$
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * The JAXWS metdata data for a handler element
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class HandlerMetaDataJAXWS extends HandlerMetaData
+{
+ private static final long serialVersionUID = 7631133188974299826L;
+
+ // The JAXWS protocol bindings
+ private String protocolBindings;
+ // The JAXWS service name pattern
+ private QName serviceNamePattern;
+ // The JAXWS port name pattern
+ private QName portNamePattern;
+
+ public HandlerMetaDataJAXWS(EndpointMetaData epMetaData, HandlerType type)
+ {
+ super(epMetaData, type);
+ }
+
+ public QName getPortNamePattern()
+ {
+ return portNamePattern;
+ }
+
+ public void setPortNamePattern(QName portNamePattern)
+ {
+ this.portNamePattern = portNamePattern;
+ }
+
+ public String getProtocolBindings()
+ {
+ return protocolBindings;
+ }
+
+ public void setProtocolBindings(String protocolBindings)
+ {
+ this.protocolBindings = protocolBindings;
+ }
+
+ public QName getServiceNamePattern()
+ {
+ return serviceNamePattern;
+ }
+
+ public void setServiceNamePattern(QName serviceNamePattern)
+ {
+ this.serviceNamePattern = serviceNamePattern;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer("\nHandlerMetaDataJAXWS:");
+ buffer.append("\n type=" + getHandlerType());
+ buffer.append("\n name=" + getHandlerName());
+ buffer.append("\n class=" + getHandlerClass());
+ buffer.append("\n params=" + getInitParams());
+ buffer.append("\n protocols=" + getProtocolBindings());
+ buffer.append("\n services=" + getServiceNamePattern());
+ buffer.append("\n ports=" + getPortNamePattern());
+ return buffer.toString();
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/MetaDataExtension.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/MetaDataExtension.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/MetaDataExtension.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-/**
- * Operation metaData extension.
- *
- * @author Heiko Braun, <heiko(a)openj.net>
- * @since 17-Mar-2006
- */
-public abstract class MetaDataExtension
-{
- private String extensionNameSpace;
-
- public MetaDataExtension(String extensionNameSpace)
- {
- this.extensionNameSpace = extensionNameSpace;
- }
-
- public String getExtensionNameSpace()
- {
- return extensionNameSpace;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/MetaDataExtension.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/MetaDataExtension.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/MetaDataExtension.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/MetaDataExtension.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+/**
+ * Operation metaData extension.
+ *
+ * @author Heiko Braun, <heiko(a)openj.net>
+ * @since 17-Mar-2006
+ */
+public abstract class MetaDataExtension
+{
+ private String extensionNameSpace;
+
+ public MetaDataExtension(String extensionNameSpace)
+ {
+ this.extensionNameSpace = extensionNameSpace;
+ }
+
+ public String getExtensionNameSpace()
+ {
+ return extensionNameSpace;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/OperationMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/OperationMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/OperationMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,521 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.jws.soap.SOAPBinding.ParameterStyle;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.Style;
-import org.jboss.ws.common.jaxrpc.Use;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.w3c.dom.Element;
-
-/**
- * An Operation component describes an operation that a given interface supports.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
- * @since 12-May-2004
- */
-public class OperationMetaData extends ExtensibleMetaData
-{
- // provide logging
- private final Logger log = Logger.getLogger(OperationMetaData.class);
-
- // The parent interface
- private EndpointMetaData epMetaData;
-
- private QName qname;
- private QName responseName;
- private String javaName;
- private Method javaMethod;
- private boolean oneWay;
- private String soapAction;
- private List<ParameterMetaData> parameters = new
ArrayList<ParameterMetaData>();
- private List<FaultMetaData> faults = new ArrayList<FaultMetaData>();
- private ParameterMetaData returnParam;
-
- public OperationMetaData(QName qname, String javaName)
- {
- UnifiedMetaData umd = new UnifiedMetaData();
- ServiceMetaData smd = new ServiceMetaData(umd, new
QName("mock-service"));
- ServerEndpointMetaData epmd = new ServerEndpointMetaData(smd, new
QName("mock-endpoint"), new QName("mock-interface"), Type.JAXRPC);
- initOperationMetaData(epmd, qname, javaName);
- }
-
- public OperationMetaData(EndpointMetaData epMetaData, QName qname, String javaName)
- {
- log.trace("new OperationMetaData: [xmlName=" + qname +
",javaName=" + javaName + "]");
- initOperationMetaData(epMetaData, qname, javaName);
- }
-
- private void initOperationMetaData(EndpointMetaData epMetaData, QName qname, String
javaName)
- {
- this.epMetaData = epMetaData;
- this.qname = qname;
- this.javaName = javaName;
-
- if (qname == null)
- throw new IllegalArgumentException("Invalid null qname argument");
- if (javaName == null)
- throw new IllegalArgumentException("Invalid null javaName argument, for:
" + qname);
-
- String nsURI = qname.getNamespaceURI();
- String localPart = qname.getLocalPart();
- this.responseName = new QName(nsURI, localPart + "Response");
- }
-
- public EndpointMetaData getEndpointMetaData()
- {
- return epMetaData;
- }
-
- public QName getQName()
- {
- return qname;
- }
-
- public QName getResponseName()
- {
- return responseName;
- }
-
- public String getSOAPAction()
- {
- return soapAction;
- }
-
- public void setSOAPAction(String soapAction)
- {
- this.soapAction = soapAction;
- }
-
- public Style getStyle()
- {
- return epMetaData.getStyle();
- }
-
- public Use getUse()
- {
- return epMetaData.getEncodingStyle();
- }
-
- public ParameterStyle getParameterStyle()
- {
- return epMetaData.getParameterStyle();
- }
-
- public boolean isRPCLiteral()
- {
- return getStyle() == Style.RPC && getUse() == Use.LITERAL;
- }
-
- public boolean isRPCEncoded()
- {
- return getStyle() == Style.RPC && getUse() == Use.ENCODED;
- }
-
- public boolean isDocumentBare()
- {
- return getStyle() == Style.DOCUMENT && getParameterStyle() ==
ParameterStyle.BARE;
- }
-
- public boolean isDocumentWrapped()
- {
- return getStyle() == Style.DOCUMENT && getParameterStyle() ==
ParameterStyle.WRAPPED;
- }
-
- public String getJavaName()
- {
- return javaName;
- }
-
- public Method getJavaMethod()
- {
- Method tmpMethod = javaMethod;
- Class seiClass = epMetaData.getServiceEndpointInterface();
- if (tmpMethod == null && seiClass != null)
- {
- for (Method method : seiClass.getMethods())
- {
- if (isJavaMethod(method))
- {
- tmpMethod = method;
-
- UnifiedMetaData wsMetaData =
epMetaData.getServiceMetaData().getUnifiedMetaData();
- if (wsMetaData.isEagerInitialized())
- {
- if (UnifiedMetaData.isFinalRelease() == false)
- log.warn("Loading java method after eager initialization",
new IllegalStateException());
-
- javaMethod = method;
- }
-
- break;
- }
- }
-
- if (tmpMethod == null)
- throw new WSException("Cannot find java method: " + javaName);
- }
- return tmpMethod;
- }
-
- public boolean isJavaMethod(Method method)
- {
- boolean isJavaMethod = method.equals(javaMethod);
- if (isJavaMethod == false)
- {
- String methodName = method.getName();
- if (javaName.equals(methodName))
- {
- log.trace("Found java method: " + method);
-
- // compare params by java type name
- if (matchParameters(method, true))
- {
- log.debug("Found best matching java method: " + method);
- isJavaMethod = true;
- }
-
- // compare params by assignability
- if (!isJavaMethod && matchParameters(method, false))
- {
- log.debug("Found possible matching java method: " + method);
- isJavaMethod = true;
- }
- }
- }
-
- if (log.isTraceEnabled())
- log.trace("Synchronized java method:\n" + method + "\nwith:
" + toString());
-
- return isJavaMethod;
- }
-
- private boolean matchParameters(Method method, boolean exact)
- {
- Class[] paramTypes = method.getParameterTypes();
- Set<Integer> matches = new HashSet<Integer>(paramTypes.length);
-
- for (ParameterMetaData param : getParameters())
- {
- if (param.matchParameter(method, matches, exact) == false)
- return false;
- }
-
- // We should have an entry for every parameter index if we match
- if (matches.size() != paramTypes.length)
- return false;
-
- ParameterMetaData returnMetaData = getReturnParameter();
- if (returnMetaData != null)
- {
- return returnMetaData.matchParameter(method, matches, exact);
- }
-
- return true;
- }
-
- /** Return true if this is a generic message style destination that takes a
org.w3c.dom.Element
- */
- public boolean isMessageEndpoint()
- {
- boolean isMessageEndpoint = false;
- if (parameters.size() == 1)
- {
- ParameterMetaData inParam = parameters.get(0);
- if (JavaUtils.isAssignableFrom(Element.class, inParam.getJavaType()))
- {
- isMessageEndpoint = true;
- }
- }
- return isMessageEndpoint;
- }
-
- public boolean isOneWay()
- {
- return oneWay;
- }
-
- public void setOneWay(boolean oneWay)
- {
- this.oneWay = oneWay;
- assertOneWayOperation();
- }
-
- public ParameterMetaData getParameter(QName xmlName)
- {
- ParameterMetaData paramMetaData = null;
- for (int i = 0; paramMetaData == null && i < parameters.size(); i++)
- {
- ParameterMetaData aux = parameters.get(i);
- if (xmlName.equals(aux.getXmlName()))
- paramMetaData = aux;
- }
- return paramMetaData;
- }
-
- /** Get the IN or INOUT parameter list */
- public List<ParameterMetaData> getInputParameters()
- {
- List<ParameterMetaData> retList = new ArrayList<ParameterMetaData>();
- for (ParameterMetaData paramMetaData : parameters)
- {
- ParameterMode mode = paramMetaData.getMode();
- if (mode == ParameterMode.IN || mode == ParameterMode.INOUT)
- retList.add(paramMetaData);
- }
- return retList;
- }
-
- /** Get the OUT or INOUT parameter list */
- public List<ParameterMetaData> getOutputParameters()
- {
- List<ParameterMetaData> retList = new ArrayList<ParameterMetaData>();
- for (ParameterMetaData paramMetaData : parameters)
- {
- ParameterMode mode = paramMetaData.getMode();
- if (mode == ParameterMode.OUT || mode == ParameterMode.INOUT)
- retList.add(paramMetaData);
- }
- return retList;
- }
-
- /** Get the non header parameter list */
- public List<ParameterMetaData> getNonHeaderParameters()
- {
- List<ParameterMetaData> retList = new ArrayList<ParameterMetaData>();
- for (ParameterMetaData paramMetaData : parameters)
- {
- if (paramMetaData.isInHeader() == false)
- retList.add(paramMetaData);
- }
- return retList;
- }
-
- public List<ParameterMetaData> getParameters()
- {
- return new ArrayList<ParameterMetaData>(parameters);
- }
-
- public void addParameter(ParameterMetaData pmd)
- {
- log.trace("addParameter: [xmlName=" + pmd.getXmlName() +
",xmlType=" + pmd.getXmlType() + "]");
- parameters.add(pmd);
- assertOneWayOperation();
- }
-
- public void removeAllParameters()
- {
- parameters.clear();
- }
-
- public ParameterMetaData getReturnParameter()
- {
- return returnParam;
- }
-
- public void setReturnParameter(ParameterMetaData returnParam)
- {
- log.trace("setReturnParameter: " + returnParam);
- returnParam.setMode(ParameterMode.OUT);
- returnParam.setIndex(-1);
- this.returnParam = returnParam;
- assertOneWayOperation();
- }
-
- public List<FaultMetaData> getFaults()
- {
- return new ArrayList<FaultMetaData>(faults);
- }
-
- public FaultMetaData getFault(QName xmlName)
- {
- FaultMetaData faultMetaData = null;
- for (int i = 0; faultMetaData == null && i < faults.size(); i++)
- {
- FaultMetaData aux = faults.get(i);
- if (aux.getXmlName().equals(xmlName))
- faultMetaData = aux;
- }
- return faultMetaData;
- }
-
- public FaultMetaData getFault(Class javaType)
- {
- FaultMetaData faultMetaData = null;
- for (FaultMetaData aux : faults)
- {
- if (aux.getJavaType().equals(javaType))
- {
- faultMetaData = aux;
- break;
- }
- }
- return faultMetaData;
- }
-
- public void addFault(FaultMetaData fault)
- {
- log.trace("addFault: " + fault);
- faults.add(fault);
- assertOneWayOperation();
- }
-
- // A JSR-181 processor is REQUIRED to report an error if an
- // operation marked @Oneway has a return value, declares any checked exceptions or has
any
- // INOUT or OUT parameters.
- private void assertOneWayOperation()
- {
- if (oneWay)
- {
- if (returnParam != null)
- throw new WSException("OneWay operations cannot have a return
parameter");
-
- if (faults.size() > 0)
- throw new WSException("OneWay operations cannot have checked
exceptions");
-
- for (ParameterMetaData paramMetaData : parameters)
- {
- if (paramMetaData.getMode() != ParameterMode.IN)
- throw new WSException("OneWay operations cannot have INOUT or OUT
parameters");
- }
- }
- }
-
- public void assertDocumentBare()
- {
- if (isDocumentBare())
- {
- int in = 0;
- int out = 0;
-
- for (ParameterMetaData paramMetaData : parameters)
- {
- if (paramMetaData.isInHeader())
- continue;
-
- ParameterMode mode = paramMetaData.getMode();
- if (mode != ParameterMode.OUT)
- in++;
- if (mode != ParameterMode.IN)
- out++;
- }
-
- if (returnParam != null && !returnParam.isInHeader())
- out++;
-
- if (in > 1 || out > (oneWay ? 0 : 1))
- throw new WSException("The body of a document/literal bare message
requires at most 1 input and at most 1 output (or 0 if oneway). method: " + javaName
+ " in: "
- + in + " out: " + out);
- }
- }
-
- public void validate()
- {
- for (ParameterMetaData parameter : parameters)
- parameter.validate();
-
- for (FaultMetaData fault : faults)
- fault.validate();
- }
-
- /**
- * @see UnifiedMetaData#eagerInitialize()
- */
- public void eagerInitialize(List<Method> unsynchronizedMethods)
- {
- // reset java method
- javaMethod = null;
-
- for (ParameterMetaData parameter : parameters)
- parameter.eagerInitialize();
-
- if (returnParam != null)
- returnParam.eagerInitialize();
-
- for (FaultMetaData fault : faults)
- fault.eagerInitialize();
-
- // Method initialization
- for (Method method : unsynchronizedMethods)
- {
- if (isJavaMethod(method))
- {
- javaMethod = method;
- break;
- }
- }
-
- // Report unsynchronized java method
- if (javaMethod == null)
- {
- StringBuilder errMsg = new StringBuilder("Cannot synchronize to any of
these methods:");
- for (Method method : unsynchronizedMethods)
- {
- errMsg.append("\n" + method);
- }
- errMsg.append("\n" + toString());
- throw new IllegalStateException(errMsg.toString());
- }
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nOperationMetaData:");
- buffer.append("\n qname=" + qname);
- buffer.append("\n javaName=" + javaName);
- buffer.append("\n style=" + getStyle() + "/" + getUse());
- if (getStyle() == Style.DOCUMENT)
- {
- buffer.append("/" + getParameterStyle());
- }
- buffer.append("\n oneWay=" + oneWay);
- buffer.append("\n soapAction=" + soapAction);
- for (ParameterMetaData param : parameters)
- {
- buffer.append(param);
- }
- if (returnParam != null)
- {
- buffer.append(returnParam.toString());
- }
- for (FaultMetaData fault : faults)
- {
- buffer.append(fault);
- }
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/OperationMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/OperationMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/OperationMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/OperationMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,521 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jws.soap.SOAPBinding.ParameterStyle;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.w3c.dom.Element;
+
+/**
+ * An Operation component describes an operation that a given interface supports.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 12-May-2004
+ */
+public class OperationMetaData extends ExtensibleMetaData
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(OperationMetaData.class);
+
+ // The parent interface
+ private EndpointMetaData epMetaData;
+
+ private QName qname;
+ private QName responseName;
+ private String javaName;
+ private Method javaMethod;
+ private boolean oneWay;
+ private String soapAction;
+ private List<ParameterMetaData> parameters = new
ArrayList<ParameterMetaData>();
+ private List<FaultMetaData> faults = new ArrayList<FaultMetaData>();
+ private ParameterMetaData returnParam;
+
+ public OperationMetaData(QName qname, String javaName)
+ {
+ UnifiedMetaData umd = new UnifiedMetaData();
+ ServiceMetaData smd = new ServiceMetaData(umd, new
QName("mock-service"));
+ ServerEndpointMetaData epmd = new ServerEndpointMetaData(smd, new
QName("mock-endpoint"), new QName("mock-interface"), Type.JAXRPC);
+ initOperationMetaData(epmd, qname, javaName);
+ }
+
+ public OperationMetaData(EndpointMetaData epMetaData, QName qname, String javaName)
+ {
+ log.trace("new OperationMetaData: [xmlName=" + qname +
",javaName=" + javaName + "]");
+ initOperationMetaData(epMetaData, qname, javaName);
+ }
+
+ private void initOperationMetaData(EndpointMetaData epMetaData, QName qname, String
javaName)
+ {
+ this.epMetaData = epMetaData;
+ this.qname = qname;
+ this.javaName = javaName;
+
+ if (qname == null)
+ throw new IllegalArgumentException("Invalid null qname argument");
+ if (javaName == null)
+ throw new IllegalArgumentException("Invalid null javaName argument, for:
" + qname);
+
+ String nsURI = qname.getNamespaceURI();
+ String localPart = qname.getLocalPart();
+ this.responseName = new QName(nsURI, localPart + "Response");
+ }
+
+ public EndpointMetaData getEndpointMetaData()
+ {
+ return epMetaData;
+ }
+
+ public QName getQName()
+ {
+ return qname;
+ }
+
+ public QName getResponseName()
+ {
+ return responseName;
+ }
+
+ public String getSOAPAction()
+ {
+ return soapAction;
+ }
+
+ public void setSOAPAction(String soapAction)
+ {
+ this.soapAction = soapAction;
+ }
+
+ public Style getStyle()
+ {
+ return epMetaData.getStyle();
+ }
+
+ public Use getUse()
+ {
+ return epMetaData.getEncodingStyle();
+ }
+
+ public ParameterStyle getParameterStyle()
+ {
+ return epMetaData.getParameterStyle();
+ }
+
+ public boolean isRPCLiteral()
+ {
+ return getStyle() == Style.RPC && getUse() == Use.LITERAL;
+ }
+
+ public boolean isRPCEncoded()
+ {
+ return getStyle() == Style.RPC && getUse() == Use.ENCODED;
+ }
+
+ public boolean isDocumentBare()
+ {
+ return getStyle() == Style.DOCUMENT && getParameterStyle() ==
ParameterStyle.BARE;
+ }
+
+ public boolean isDocumentWrapped()
+ {
+ return getStyle() == Style.DOCUMENT && getParameterStyle() ==
ParameterStyle.WRAPPED;
+ }
+
+ public String getJavaName()
+ {
+ return javaName;
+ }
+
+ public Method getJavaMethod()
+ {
+ Method tmpMethod = javaMethod;
+ Class seiClass = epMetaData.getServiceEndpointInterface();
+ if (tmpMethod == null && seiClass != null)
+ {
+ for (Method method : seiClass.getMethods())
+ {
+ if (isJavaMethod(method))
+ {
+ tmpMethod = method;
+
+ UnifiedMetaData wsMetaData =
epMetaData.getServiceMetaData().getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized())
+ {
+ if (UnifiedMetaData.isFinalRelease() == false)
+ log.warn("Loading java method after eager initialization",
new IllegalStateException());
+
+ javaMethod = method;
+ }
+
+ break;
+ }
+ }
+
+ if (tmpMethod == null)
+ throw new WSException("Cannot find java method: " + javaName);
+ }
+ return tmpMethod;
+ }
+
+ public boolean isJavaMethod(Method method)
+ {
+ boolean isJavaMethod = method.equals(javaMethod);
+ if (isJavaMethod == false)
+ {
+ String methodName = method.getName();
+ if (javaName.equals(methodName))
+ {
+ log.trace("Found java method: " + method);
+
+ // compare params by java type name
+ if (matchParameters(method, true))
+ {
+ log.debug("Found best matching java method: " + method);
+ isJavaMethod = true;
+ }
+
+ // compare params by assignability
+ if (!isJavaMethod && matchParameters(method, false))
+ {
+ log.debug("Found possible matching java method: " + method);
+ isJavaMethod = true;
+ }
+ }
+ }
+
+ if (log.isTraceEnabled())
+ log.trace("Synchronized java method:\n" + method + "\nwith:
" + toString());
+
+ return isJavaMethod;
+ }
+
+ private boolean matchParameters(Method method, boolean exact)
+ {
+ Class[] paramTypes = method.getParameterTypes();
+ Set<Integer> matches = new HashSet<Integer>(paramTypes.length);
+
+ for (ParameterMetaData param : getParameters())
+ {
+ if (param.matchParameter(method, matches, exact) == false)
+ return false;
+ }
+
+ // We should have an entry for every parameter index if we match
+ if (matches.size() != paramTypes.length)
+ return false;
+
+ ParameterMetaData returnMetaData = getReturnParameter();
+ if (returnMetaData != null)
+ {
+ return returnMetaData.matchParameter(method, matches, exact);
+ }
+
+ return true;
+ }
+
+ /** Return true if this is a generic message style destination that takes a
org.w3c.dom.Element
+ */
+ public boolean isMessageEndpoint()
+ {
+ boolean isMessageEndpoint = false;
+ if (parameters.size() == 1)
+ {
+ ParameterMetaData inParam = parameters.get(0);
+ if (JavaUtils.isAssignableFrom(Element.class, inParam.getJavaType()))
+ {
+ isMessageEndpoint = true;
+ }
+ }
+ return isMessageEndpoint;
+ }
+
+ public boolean isOneWay()
+ {
+ return oneWay;
+ }
+
+ public void setOneWay(boolean oneWay)
+ {
+ this.oneWay = oneWay;
+ assertOneWayOperation();
+ }
+
+ public ParameterMetaData getParameter(QName xmlName)
+ {
+ ParameterMetaData paramMetaData = null;
+ for (int i = 0; paramMetaData == null && i < parameters.size(); i++)
+ {
+ ParameterMetaData aux = parameters.get(i);
+ if (xmlName.equals(aux.getXmlName()))
+ paramMetaData = aux;
+ }
+ return paramMetaData;
+ }
+
+ /** Get the IN or INOUT parameter list */
+ public List<ParameterMetaData> getInputParameters()
+ {
+ List<ParameterMetaData> retList = new ArrayList<ParameterMetaData>();
+ for (ParameterMetaData paramMetaData : parameters)
+ {
+ ParameterMode mode = paramMetaData.getMode();
+ if (mode == ParameterMode.IN || mode == ParameterMode.INOUT)
+ retList.add(paramMetaData);
+ }
+ return retList;
+ }
+
+ /** Get the OUT or INOUT parameter list */
+ public List<ParameterMetaData> getOutputParameters()
+ {
+ List<ParameterMetaData> retList = new ArrayList<ParameterMetaData>();
+ for (ParameterMetaData paramMetaData : parameters)
+ {
+ ParameterMode mode = paramMetaData.getMode();
+ if (mode == ParameterMode.OUT || mode == ParameterMode.INOUT)
+ retList.add(paramMetaData);
+ }
+ return retList;
+ }
+
+ /** Get the non header parameter list */
+ public List<ParameterMetaData> getNonHeaderParameters()
+ {
+ List<ParameterMetaData> retList = new ArrayList<ParameterMetaData>();
+ for (ParameterMetaData paramMetaData : parameters)
+ {
+ if (paramMetaData.isInHeader() == false)
+ retList.add(paramMetaData);
+ }
+ return retList;
+ }
+
+ public List<ParameterMetaData> getParameters()
+ {
+ return new ArrayList<ParameterMetaData>(parameters);
+ }
+
+ public void addParameter(ParameterMetaData pmd)
+ {
+ log.trace("addParameter: [xmlName=" + pmd.getXmlName() +
",xmlType=" + pmd.getXmlType() + "]");
+ parameters.add(pmd);
+ assertOneWayOperation();
+ }
+
+ public void removeAllParameters()
+ {
+ parameters.clear();
+ }
+
+ public ParameterMetaData getReturnParameter()
+ {
+ return returnParam;
+ }
+
+ public void setReturnParameter(ParameterMetaData returnParam)
+ {
+ log.trace("setReturnParameter: " + returnParam);
+ returnParam.setMode(ParameterMode.OUT);
+ returnParam.setIndex(-1);
+ this.returnParam = returnParam;
+ assertOneWayOperation();
+ }
+
+ public List<FaultMetaData> getFaults()
+ {
+ return new ArrayList<FaultMetaData>(faults);
+ }
+
+ public FaultMetaData getFault(QName xmlName)
+ {
+ FaultMetaData faultMetaData = null;
+ for (int i = 0; faultMetaData == null && i < faults.size(); i++)
+ {
+ FaultMetaData aux = faults.get(i);
+ if (aux.getXmlName().equals(xmlName))
+ faultMetaData = aux;
+ }
+ return faultMetaData;
+ }
+
+ public FaultMetaData getFault(Class javaType)
+ {
+ FaultMetaData faultMetaData = null;
+ for (FaultMetaData aux : faults)
+ {
+ if (aux.getJavaType().equals(javaType))
+ {
+ faultMetaData = aux;
+ break;
+ }
+ }
+ return faultMetaData;
+ }
+
+ public void addFault(FaultMetaData fault)
+ {
+ log.trace("addFault: " + fault);
+ faults.add(fault);
+ assertOneWayOperation();
+ }
+
+ // A JSR-181 processor is REQUIRED to report an error if an
+ // operation marked @Oneway has a return value, declares any checked exceptions or has
any
+ // INOUT or OUT parameters.
+ private void assertOneWayOperation()
+ {
+ if (oneWay)
+ {
+ if (returnParam != null)
+ throw new WSException("OneWay operations cannot have a return
parameter");
+
+ if (faults.size() > 0)
+ throw new WSException("OneWay operations cannot have checked
exceptions");
+
+ for (ParameterMetaData paramMetaData : parameters)
+ {
+ if (paramMetaData.getMode() != ParameterMode.IN)
+ throw new WSException("OneWay operations cannot have INOUT or OUT
parameters");
+ }
+ }
+ }
+
+ public void assertDocumentBare()
+ {
+ if (isDocumentBare())
+ {
+ int in = 0;
+ int out = 0;
+
+ for (ParameterMetaData paramMetaData : parameters)
+ {
+ if (paramMetaData.isInHeader())
+ continue;
+
+ ParameterMode mode = paramMetaData.getMode();
+ if (mode != ParameterMode.OUT)
+ in++;
+ if (mode != ParameterMode.IN)
+ out++;
+ }
+
+ if (returnParam != null && !returnParam.isInHeader())
+ out++;
+
+ if (in > 1 || out > (oneWay ? 0 : 1))
+ throw new WSException("The body of a document/literal bare message
requires at most 1 input and at most 1 output (or 0 if oneway). method: " + javaName
+ " in: "
+ + in + " out: " + out);
+ }
+ }
+
+ public void validate()
+ {
+ for (ParameterMetaData parameter : parameters)
+ parameter.validate();
+
+ for (FaultMetaData fault : faults)
+ fault.validate();
+ }
+
+ /**
+ * @see UnifiedMetaData#eagerInitialize()
+ */
+ public void eagerInitialize(List<Method> unsynchronizedMethods)
+ {
+ // reset java method
+ javaMethod = null;
+
+ for (ParameterMetaData parameter : parameters)
+ parameter.eagerInitialize();
+
+ if (returnParam != null)
+ returnParam.eagerInitialize();
+
+ for (FaultMetaData fault : faults)
+ fault.eagerInitialize();
+
+ // Method initialization
+ for (Method method : unsynchronizedMethods)
+ {
+ if (isJavaMethod(method))
+ {
+ javaMethod = method;
+ break;
+ }
+ }
+
+ // Report unsynchronized java method
+ if (javaMethod == null)
+ {
+ StringBuilder errMsg = new StringBuilder("Cannot synchronize to any of
these methods:");
+ for (Method method : unsynchronizedMethods)
+ {
+ errMsg.append("\n" + method);
+ }
+ errMsg.append("\n" + toString());
+ throw new IllegalStateException(errMsg.toString());
+ }
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nOperationMetaData:");
+ buffer.append("\n qname=" + qname);
+ buffer.append("\n javaName=" + javaName);
+ buffer.append("\n style=" + getStyle() + "/" + getUse());
+ if (getStyle() == Style.DOCUMENT)
+ {
+ buffer.append("/" + getParameterStyle());
+ }
+ buffer.append("\n oneWay=" + oneWay);
+ buffer.append("\n soapAction=" + soapAction);
+ for (ParameterMetaData param : parameters)
+ {
+ buffer.append(param);
+ }
+ if (returnParam != null)
+ {
+ buffer.append(returnParam.toString());
+ }
+ for (FaultMetaData fault : faults)
+ {
+ buffer.append(fault);
+ }
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ParameterMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ParameterMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ParameterMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,476 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter.AccessorFactory;
-import org.jboss.ws.common.utils.HolderUtils;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
-import org.jboss.ws.core.metadata.acessor.ReflectiveMethodAccessor;
-import org.jboss.ws.extras.xop.jaxws.ReflectiveXOPScanner;
-
-/**
- * A request/response parameter that a given operation supports.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
- * @since 12-May-2005
- */
-public class ParameterMetaData
-{
- // provide logging
- private final Logger log = Logger.getLogger(ParameterMetaData.class);
-
- // The parent operation
- private OperationMetaData opMetaData;
-
- private QName xmlName;
- private String partName;
- private QName xmlType;
- private String javaTypeName;
- private Class javaType;
- private ParameterMode mode;
- private Set<String> mimeTypes;
- private boolean inHeader;
- private boolean isSwA;
- private boolean isXOP;
- private List<WrappedParameter> wrappedParameters;
- private int index;
-
- // SOAP-ENC:Array
- private boolean soapArrayParam;
- private QName soapArrayCompType;
- private AccessorFactoryCreator accessorFactoryCreator =
ReflectiveMethodAccessor.FACTORY_CREATOR;
-
- public static interface AccessorFactoryCreator
- {
- public AccessorFactory create(ParameterMetaData parameter);
- }
-
- private static final List<String> messageTypes = new ArrayList<String>();
- static
- {
- messageTypes.add("javax.xml.soap.SOAPElement");
- messageTypes.add("org.w3c.dom.Element");
- }
-
- public ParameterMetaData(OperationMetaData opMetaData, QName xmlName, QName xmlType,
String javaTypeName)
- {
- this(opMetaData, xmlName, javaTypeName);
- setXmlType(xmlType);
- }
-
- public ParameterMetaData(OperationMetaData opMetaData, QName xmlName, String
javaTypeName)
- {
- if (xmlName == null)
- throw new IllegalArgumentException("Invalid null xmlName argument");
-
- // Remove the prefixes
- if (xmlName.getNamespaceURI().length() > 0)
- xmlName = new QName(xmlName.getNamespaceURI(), xmlName.getLocalPart());
-
- this.xmlName = xmlName;
- this.opMetaData = opMetaData;
- this.mode = ParameterMode.IN;
- this.partName = xmlName.getLocalPart();
- this.javaTypeName = javaTypeName;
- }
-
- private static boolean matchParameter(Method method, int index, Class expectedType,
Set<Integer> matches, boolean exact, boolean holder)
- {
- Class returnType = method.getReturnType();
- Type[] parameters = method.getGenericParameterTypes();
-
- if (index == -1 && matchTypes(returnType, expectedType, exact, false))
- return true;
-
- if (index < parameters.length && matchTypes(parameters[index],
expectedType, exact, holder))
- {
- matches.add(index);
- return true;
- }
-
- return false;
- }
-
- private static boolean matchTypes(Type actualType, Class expectedType, boolean exact,
boolean holder)
- {
- if (holder && HolderUtils.isHolderType(actualType) == false)
- return false;
-
- Type valueType = (holder ? HolderUtils.getValueType(actualType) : actualType);
- Class valueClass = JavaUtils.erasure(valueType);
- boolean matched = (exact ? valueClass.getName().equals(expectedType.getName()) :
JavaUtils.isAssignableFrom(valueClass, expectedType));
-
- return matched;
- }
-
- public OperationMetaData getOperationMetaData()
- {
- return opMetaData;
- }
-
- public QName getXmlName()
- {
- return xmlName;
- }
-
- public QName getXmlType()
- {
- return xmlType;
- }
-
- public void setXmlType(QName xmlType)
- {
- if (xmlType == null)
- throw new IllegalArgumentException("Invalid null xmlType");
-
- // Remove potential prefix
- if (xmlType.getNamespaceURI().length() > 0)
- this.xmlType = new QName(xmlType.getNamespaceURI(), xmlType.getLocalPart());
- else this.xmlType = xmlType;
-
- // Special case to identify attachments
- if (Constants.NS_ATTACHMENT_MIME_TYPE.equals(xmlType.getNamespaceURI()))
- {
- String mimeType = convertXmlTypeToMimeType(xmlType);
- setMimeTypes(mimeType);
- this.isSwA = true;
- }
- }
-
- public String getJavaTypeName()
- {
- return javaTypeName;
- }
-
- public void setJavaTypeName(String typeName)
- {
- // Warn if this is called after eager initialization
- UnifiedMetaData wsMetaData =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData();
- if (wsMetaData.isEagerInitialized() && UnifiedMetaData.isFinalRelease() ==
false)
- log.warn("Set java type name after eager initialization", new
IllegalStateException());
-
- javaTypeName = typeName;
- javaType = null;
- }
-
- /** Load the java type.
- * It should only be cached during eager initialization.
- */
- public Class getJavaType()
- {
- Class tmpJavaType = javaType;
- if (tmpJavaType == null && javaTypeName != null)
- {
- try
- {
- ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
- tmpJavaType = JavaUtils.loadJavaType(javaTypeName, loader);
-
- UnifiedMetaData wsMetaData =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData();
- if (wsMetaData.isEagerInitialized())
- {
- // This should not happen, see the warning in setJavaTypeName
- javaType = tmpJavaType;
- }
- }
- catch (ClassNotFoundException ex)
- {
- throw new WSException("Cannot load java type: " + javaTypeName,
ex);
- }
- }
- return tmpJavaType;
- }
-
- public ParameterMode getMode()
- {
- return mode;
- }
-
- public void setMode(String mode)
- {
- if ("IN".equals(mode))
- setMode(ParameterMode.IN);
- else if ("INOUT".equals(mode))
- setMode(ParameterMode.INOUT);
- else if ("OUT".equals(mode))
- setMode(ParameterMode.OUT);
- else throw new IllegalArgumentException("Invalid mode: " + mode);
- }
-
- public void setMode(ParameterMode mode)
- {
- this.mode = mode;
- }
-
- public Set<String> getMimeTypes()
- {
- return mimeTypes;
- }
-
- public void setMimeTypes(String mimeStr)
- {
- mimeTypes = new HashSet<String>();
- StringTokenizer st = new StringTokenizer(mimeStr, ",");
- while (st.hasMoreTokens())
- mimeTypes.add(st.nextToken().trim());
- }
-
- public boolean isInHeader()
- {
- return inHeader;
- }
-
- public void setInHeader(boolean inHeader)
- {
- this.inHeader = inHeader;
- }
-
- public boolean isSwA()
- {
- return isSwA;
- }
-
- public void setSwA(boolean isSwA)
- {
- this.isSwA = isSwA;
- }
-
- public boolean isXOP()
- {
- return isXOP;
- }
-
- public void setXOP(boolean isXOP)
- {
- this.isXOP = isXOP;
- }
-
- public boolean isSOAPArrayParam()
- {
- return soapArrayParam;
- }
-
- public void setSOAPArrayParam(boolean soapArrayParam)
- {
- this.soapArrayParam = soapArrayParam;
- }
-
- public QName getSOAPArrayCompType()
- {
- return soapArrayCompType;
- }
-
- public void setSOAPArrayCompType(QName xmlType)
- {
- this.soapArrayCompType = xmlType;
- }
-
- public boolean isMessageType()
- {
- return messageTypes.contains(javaTypeName);
- }
-
- public static boolean isMessageType(String javaTypeName)
- {
- return messageTypes.contains(javaTypeName);
- }
-
- /** Converts a proprietary JBossWS attachment xml type to the MIME type that it
represents.
- */
- private String convertXmlTypeToMimeType(QName xmlType)
- {
- StringBuilder mimeName = new StringBuilder(xmlType.getLocalPart());
- int pos = mimeName.indexOf("_");
- if (pos == -1)
- throw new IllegalArgumentException("Invalid mime type: " + xmlType);
-
- mimeName.setCharAt(pos, '/');
- return mimeName.toString();
- }
-
- public int getIndex()
- {
- return index;
- }
-
- public void setIndex(int index)
- {
- this.index = index;
- }
-
- public List<WrappedParameter> getWrappedParameters()
- {
- return wrappedParameters;
- }
-
- public void setWrappedParameters(List<WrappedParameter> wrappedParameters)
- {
- this.wrappedParameters = wrappedParameters;
- }
-
- public String getPartName()
- {
- return partName;
- }
-
- public void setPartName(String partName)
- {
- this.partName = partName;
- }
-
- public void validate()
- {
- // nothing to do
- }
-
- /**
- * @see UnifiedMetaData#eagerInitialize()
- */
- public void eagerInitialize()
- {
- // reset java type
- javaType = null;
-
- if (getOperationMetaData().isDocumentWrapped() && isMessageType() ==
false)
- {
- new DynamicWrapperGenerator(getClassLoader()).generate(this);
-
- // Initialize accessors
- AccessorFactory factory = accessorFactoryCreator.create(this);
- for (WrappedParameter wrapped : wrappedParameters)
- wrapped.setAccessor(factory.create(wrapped));
- }
-
- javaType = getJavaType();
- if (javaType == null)
- throw new WSException("Cannot load java type: " + javaTypeName);
-
- // check if the JavaType is an mtom parameter
- // TODO: this should only apply to JAX-WS and needs to happen outside UMD
- ReflectiveXOPScanner scanner = new ReflectiveXOPScanner();
- String mimeType = scanner.scan(javaType);
- if(mimeType!=null)
- {
- log.debug("MTOM parameter found: " + xmlName);
- setXOP(true);
- }
- }
-
-
- private ClassLoader getClassLoader()
- {
- ClassLoader loader =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().getClassLoader();
- if (loader == null)
- throw new WSException("ClassLoader not available");
- return loader;
- }
-
- public boolean matchParameter(Method method, Set<Integer> matches, boolean
exact)
- {
- ClassLoader loader =
getOperationMetaData().getEndpointMetaData().getClassLoader();
- List<WrappedParameter> wrappedParameters = getWrappedParameters();
- Class wrapperType = getJavaType();
-
- // Standard type
- if (wrappedParameters == null)
- return matchParameter(method, getIndex(), getJavaType(), matches, exact, mode !=
ParameterMode.IN);
-
- // Wrapped type
- for (WrappedParameter wrapped : wrappedParameters)
- {
- String typeName = wrapped.getType();
-
- try
- {
- Class type = (typeName != null) ? JavaUtils.loadJavaType(typeName, loader) :
ParameterWrapping.getWrappedType(wrapped.getVariable(), wrapperType);
- if (type == null)
- return false;
- if (!matchParameter(method, wrapped.getIndex(), type, matches, exact,
wrapped.isHolder()))
- return false;
- }
- catch (Exception ex)
- {
- log.debug("Invalid wrapper type:" + typeName, ex);
- return false;
- }
- }
-
- return true;
- }
-
- public void setAccessorFactoryCreator(AccessorFactoryCreator accessorFactoryCreator)
- {
- this.accessorFactoryCreator = accessorFactoryCreator;
- }
-
- public String toString()
- {
- boolean isReturn = (opMetaData.getReturnParameter() == this);
- StringBuilder buffer = new StringBuilder("\n" + (isReturn ?
"ReturnMetaData:" : "ParameterMetaData:"));
- buffer.append("\n xmlName=" + getXmlName());
- buffer.append("\n partName=" + getPartName());
- buffer.append("\n xmlType=" + getXmlType());
- buffer.append("\n javaType=" + getJavaTypeName());
- buffer.append("\n mode=" + getMode());
- buffer.append("\n inHeader=" + isInHeader());
- buffer.append("\n index=" + index);
-
- if (soapArrayParam)
- buffer.append("\n soapArrayCompType=" + soapArrayCompType);
-
- if (isSwA())
- {
- buffer.append("\n isSwA=" + isSwA());
- buffer.append("\n mimeTypes=" + getMimeTypes());
- }
-
- if (wrappedParameters != null)
- buffer.append("\n wrappedParameters=" + wrappedParameters);
-
- if (isXOP())
- {
- buffer.append("\n isXOP=" + isXOP());
- buffer.append("\n mimeTypes=" + getMimeTypes());
- }
-
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ParameterMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ParameterMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ParameterMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ParameterMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,476 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
+import org.jboss.ws.core.metadata.acessor.ReflectiveMethodAccessor;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter.AccessorFactory;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.extras.xop.jaxws.ReflectiveXOPScanner;
+
+/**
+ * A request/response parameter that a given operation supports.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 12-May-2005
+ */
+public class ParameterMetaData
+{
+ // provide logging
+ private final Logger log = Logger.getLogger(ParameterMetaData.class);
+
+ // The parent operation
+ private OperationMetaData opMetaData;
+
+ private QName xmlName;
+ private String partName;
+ private QName xmlType;
+ private String javaTypeName;
+ private Class javaType;
+ private ParameterMode mode;
+ private Set<String> mimeTypes;
+ private boolean inHeader;
+ private boolean isSwA;
+ private boolean isXOP;
+ private List<WrappedParameter> wrappedParameters;
+ private int index;
+
+ // SOAP-ENC:Array
+ private boolean soapArrayParam;
+ private QName soapArrayCompType;
+ private AccessorFactoryCreator accessorFactoryCreator =
ReflectiveMethodAccessor.FACTORY_CREATOR;
+
+ public static interface AccessorFactoryCreator
+ {
+ public AccessorFactory create(ParameterMetaData parameter);
+ }
+
+ private static final List<String> messageTypes = new ArrayList<String>();
+ static
+ {
+ messageTypes.add("javax.xml.soap.SOAPElement");
+ messageTypes.add("org.w3c.dom.Element");
+ }
+
+ public ParameterMetaData(OperationMetaData opMetaData, QName xmlName, QName xmlType,
String javaTypeName)
+ {
+ this(opMetaData, xmlName, javaTypeName);
+ setXmlType(xmlType);
+ }
+
+ public ParameterMetaData(OperationMetaData opMetaData, QName xmlName, String
javaTypeName)
+ {
+ if (xmlName == null)
+ throw new IllegalArgumentException("Invalid null xmlName argument");
+
+ // Remove the prefixes
+ if (xmlName.getNamespaceURI().length() > 0)
+ xmlName = new QName(xmlName.getNamespaceURI(), xmlName.getLocalPart());
+
+ this.xmlName = xmlName;
+ this.opMetaData = opMetaData;
+ this.mode = ParameterMode.IN;
+ this.partName = xmlName.getLocalPart();
+ this.javaTypeName = javaTypeName;
+ }
+
+ private static boolean matchParameter(Method method, int index, Class expectedType,
Set<Integer> matches, boolean exact, boolean holder)
+ {
+ Class returnType = method.getReturnType();
+ Type[] parameters = method.getGenericParameterTypes();
+
+ if (index == -1 && matchTypes(returnType, expectedType, exact, false))
+ return true;
+
+ if (index < parameters.length && matchTypes(parameters[index],
expectedType, exact, holder))
+ {
+ matches.add(index);
+ return true;
+ }
+
+ return false;
+ }
+
+ private static boolean matchTypes(Type actualType, Class expectedType, boolean exact,
boolean holder)
+ {
+ if (holder && HolderUtils.isHolderType(actualType) == false)
+ return false;
+
+ Type valueType = (holder ? HolderUtils.getValueType(actualType) : actualType);
+ Class valueClass = JavaUtils.erasure(valueType);
+ boolean matched = (exact ? valueClass.getName().equals(expectedType.getName()) :
JavaUtils.isAssignableFrom(valueClass, expectedType));
+
+ return matched;
+ }
+
+ public OperationMetaData getOperationMetaData()
+ {
+ return opMetaData;
+ }
+
+ public QName getXmlName()
+ {
+ return xmlName;
+ }
+
+ public QName getXmlType()
+ {
+ return xmlType;
+ }
+
+ public void setXmlType(QName xmlType)
+ {
+ if (xmlType == null)
+ throw new IllegalArgumentException("Invalid null xmlType");
+
+ // Remove potential prefix
+ if (xmlType.getNamespaceURI().length() > 0)
+ this.xmlType = new QName(xmlType.getNamespaceURI(), xmlType.getLocalPart());
+ else this.xmlType = xmlType;
+
+ // Special case to identify attachments
+ if (Constants.NS_ATTACHMENT_MIME_TYPE.equals(xmlType.getNamespaceURI()))
+ {
+ String mimeType = convertXmlTypeToMimeType(xmlType);
+ setMimeTypes(mimeType);
+ this.isSwA = true;
+ }
+ }
+
+ public String getJavaTypeName()
+ {
+ return javaTypeName;
+ }
+
+ public void setJavaTypeName(String typeName)
+ {
+ // Warn if this is called after eager initialization
+ UnifiedMetaData wsMetaData =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized() && UnifiedMetaData.isFinalRelease() ==
false)
+ log.warn("Set java type name after eager initialization", new
IllegalStateException());
+
+ javaTypeName = typeName;
+ javaType = null;
+ }
+
+ /** Load the java type.
+ * It should only be cached during eager initialization.
+ */
+ public Class getJavaType()
+ {
+ Class tmpJavaType = javaType;
+ if (tmpJavaType == null && javaTypeName != null)
+ {
+ try
+ {
+ ClassLoader loader = opMetaData.getEndpointMetaData().getClassLoader();
+ tmpJavaType = JavaUtils.loadJavaType(javaTypeName, loader);
+
+ UnifiedMetaData wsMetaData =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData();
+ if (wsMetaData.isEagerInitialized())
+ {
+ // This should not happen, see the warning in setJavaTypeName
+ javaType = tmpJavaType;
+ }
+ }
+ catch (ClassNotFoundException ex)
+ {
+ throw new WSException("Cannot load java type: " + javaTypeName,
ex);
+ }
+ }
+ return tmpJavaType;
+ }
+
+ public ParameterMode getMode()
+ {
+ return mode;
+ }
+
+ public void setMode(String mode)
+ {
+ if ("IN".equals(mode))
+ setMode(ParameterMode.IN);
+ else if ("INOUT".equals(mode))
+ setMode(ParameterMode.INOUT);
+ else if ("OUT".equals(mode))
+ setMode(ParameterMode.OUT);
+ else throw new IllegalArgumentException("Invalid mode: " + mode);
+ }
+
+ public void setMode(ParameterMode mode)
+ {
+ this.mode = mode;
+ }
+
+ public Set<String> getMimeTypes()
+ {
+ return mimeTypes;
+ }
+
+ public void setMimeTypes(String mimeStr)
+ {
+ mimeTypes = new HashSet<String>();
+ StringTokenizer st = new StringTokenizer(mimeStr, ",");
+ while (st.hasMoreTokens())
+ mimeTypes.add(st.nextToken().trim());
+ }
+
+ public boolean isInHeader()
+ {
+ return inHeader;
+ }
+
+ public void setInHeader(boolean inHeader)
+ {
+ this.inHeader = inHeader;
+ }
+
+ public boolean isSwA()
+ {
+ return isSwA;
+ }
+
+ public void setSwA(boolean isSwA)
+ {
+ this.isSwA = isSwA;
+ }
+
+ public boolean isXOP()
+ {
+ return isXOP;
+ }
+
+ public void setXOP(boolean isXOP)
+ {
+ this.isXOP = isXOP;
+ }
+
+ public boolean isSOAPArrayParam()
+ {
+ return soapArrayParam;
+ }
+
+ public void setSOAPArrayParam(boolean soapArrayParam)
+ {
+ this.soapArrayParam = soapArrayParam;
+ }
+
+ public QName getSOAPArrayCompType()
+ {
+ return soapArrayCompType;
+ }
+
+ public void setSOAPArrayCompType(QName xmlType)
+ {
+ this.soapArrayCompType = xmlType;
+ }
+
+ public boolean isMessageType()
+ {
+ return messageTypes.contains(javaTypeName);
+ }
+
+ public static boolean isMessageType(String javaTypeName)
+ {
+ return messageTypes.contains(javaTypeName);
+ }
+
+ /** Converts a proprietary JBossWS attachment xml type to the MIME type that it
represents.
+ */
+ private String convertXmlTypeToMimeType(QName xmlType)
+ {
+ StringBuilder mimeName = new StringBuilder(xmlType.getLocalPart());
+ int pos = mimeName.indexOf("_");
+ if (pos == -1)
+ throw new IllegalArgumentException("Invalid mime type: " + xmlType);
+
+ mimeName.setCharAt(pos, '/');
+ return mimeName.toString();
+ }
+
+ public int getIndex()
+ {
+ return index;
+ }
+
+ public void setIndex(int index)
+ {
+ this.index = index;
+ }
+
+ public List<WrappedParameter> getWrappedParameters()
+ {
+ return wrappedParameters;
+ }
+
+ public void setWrappedParameters(List<WrappedParameter> wrappedParameters)
+ {
+ this.wrappedParameters = wrappedParameters;
+ }
+
+ public String getPartName()
+ {
+ return partName;
+ }
+
+ public void setPartName(String partName)
+ {
+ this.partName = partName;
+ }
+
+ public void validate()
+ {
+ // nothing to do
+ }
+
+ /**
+ * @see UnifiedMetaData#eagerInitialize()
+ */
+ public void eagerInitialize()
+ {
+ // reset java type
+ javaType = null;
+
+ if (getOperationMetaData().isDocumentWrapped() && isMessageType() ==
false)
+ {
+ new DynamicWrapperGenerator(getClassLoader()).generate(this);
+
+ // Initialize accessors
+ AccessorFactory factory = accessorFactoryCreator.create(this);
+ for (WrappedParameter wrapped : wrappedParameters)
+ wrapped.setAccessor(factory.create(wrapped));
+ }
+
+ javaType = getJavaType();
+ if (javaType == null)
+ throw new WSException("Cannot load java type: " + javaTypeName);
+
+ // check if the JavaType is an mtom parameter
+ // TODO: this should only apply to JAX-WS and needs to happen outside UMD
+ ReflectiveXOPScanner scanner = new ReflectiveXOPScanner();
+ String mimeType = scanner.scan(javaType);
+ if(mimeType!=null)
+ {
+ log.debug("MTOM parameter found: " + xmlName);
+ setXOP(true);
+ }
+ }
+
+
+ private ClassLoader getClassLoader()
+ {
+ ClassLoader loader =
opMetaData.getEndpointMetaData().getServiceMetaData().getUnifiedMetaData().getClassLoader();
+ if (loader == null)
+ throw new WSException("ClassLoader not available");
+ return loader;
+ }
+
+ public boolean matchParameter(Method method, Set<Integer> matches, boolean
exact)
+ {
+ ClassLoader loader =
getOperationMetaData().getEndpointMetaData().getClassLoader();
+ List<WrappedParameter> wrappedParameters = getWrappedParameters();
+ Class wrapperType = getJavaType();
+
+ // Standard type
+ if (wrappedParameters == null)
+ return matchParameter(method, getIndex(), getJavaType(), matches, exact, mode !=
ParameterMode.IN);
+
+ // Wrapped type
+ for (WrappedParameter wrapped : wrappedParameters)
+ {
+ String typeName = wrapped.getType();
+
+ try
+ {
+ Class type = (typeName != null) ? JavaUtils.loadJavaType(typeName, loader) :
ParameterWrapping.getWrappedType(wrapped.getVariable(), wrapperType);
+ if (type == null)
+ return false;
+ if (!matchParameter(method, wrapped.getIndex(), type, matches, exact,
wrapped.isHolder()))
+ return false;
+ }
+ catch (Exception ex)
+ {
+ log.debug("Invalid wrapper type:" + typeName, ex);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public void setAccessorFactoryCreator(AccessorFactoryCreator accessorFactoryCreator)
+ {
+ this.accessorFactoryCreator = accessorFactoryCreator;
+ }
+
+ public String toString()
+ {
+ boolean isReturn = (opMetaData.getReturnParameter() == this);
+ StringBuilder buffer = new StringBuilder("\n" + (isReturn ?
"ReturnMetaData:" : "ParameterMetaData:"));
+ buffer.append("\n xmlName=" + getXmlName());
+ buffer.append("\n partName=" + getPartName());
+ buffer.append("\n xmlType=" + getXmlType());
+ buffer.append("\n javaType=" + getJavaTypeName());
+ buffer.append("\n mode=" + getMode());
+ buffer.append("\n inHeader=" + isInHeader());
+ buffer.append("\n index=" + index);
+
+ if (soapArrayParam)
+ buffer.append("\n soapArrayCompType=" + soapArrayCompType);
+
+ if (isSwA())
+ {
+ buffer.append("\n isSwA=" + isSwA());
+ buffer.append("\n mimeTypes=" + getMimeTypes());
+ }
+
+ if (wrappedParameters != null)
+ buffer.append("\n wrappedParameters=" + wrappedParameters);
+
+ if (isXOP())
+ {
+ buffer.append("\n isXOP=" + isXOP());
+ buffer.append("\n mimeTypes=" + getMimeTypes());
+ }
+
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServerEndpointMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServerEndpointMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServerEndpointMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,300 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.management.ObjectName;
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.config.WSCommonConfig;
-import org.jboss.ws.common.metadata.config.WSConfigFactory;
-import org.jboss.ws.common.metadata.config.jaxrpc.WSConfigRootJAXRPC;
-import org.jboss.ws.common.metadata.config.jaxws.WSConfigRootJAXWS;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.core.server.ServiceEndpoint;
-
-/**
- * Client side endpoint meta data.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
- * @since 12-May-2005
- */
-public class ServerEndpointMetaData extends EndpointMetaData
-{
- // provide logging
- private static Logger log = Logger.getLogger(ServerEndpointMetaData.class);
-
- public static final String SEPID_DOMAIN = "jboss.ws";
- public static final String SEPID_PROPERTY_CONTEXT = "context";
- public static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
-
- // The REQUIRED link name
- private String linkName;
- // Legacy JSR-109 port component name
- private String portComponentName;
- // The endpoint implementation bean
- private String implName;
- // The unique service endpointID
- private ObjectName sepID;
- // The HTTP context root
- private String contextRoot;
- // The HTTP virtual hosts
- private String[] virtualHosts;
- // The HTTP url parttern
- private String urlPattern;
- // The optional transport guarantee
- private String transportGuarantee;
- // The bean that registers with the ServiceEndpointManager
- private String managedEndpointBean = ServiceEndpoint.class.getName();
-
- public ServerEndpointMetaData(ServiceMetaData service, QName qname, QName
interfaceQName, Type type)
- {
- super(service, qname, interfaceQName, type);
- }
-
- public void setConfigName(String configName)
- {
- super.setConfigName(configName);
- endpointConfig = null;
- }
-
- public void setConfigFile(String configFile)
- {
- super.setConfigFile(configFile);
- endpointConfig = null;
- }
-
- public String getLinkName()
- {
- return linkName;
- }
-
- public void setLinkName(String linkName)
- {
- this.linkName = linkName;
- }
-
- public String getPortComponentName()
- {
- return portComponentName;
- }
-
- public void setPortComponentName(String portComponentName)
- {
- this.portComponentName = portComponentName;
- }
-
- public String getServiceEndpointImplName()
- {
- return implName;
- }
-
- public void setServiceEndpointImplName(String endpointImpl)
- {
- this.implName = endpointImpl;
- }
-
- public ObjectName getServiceEndpointID()
- {
- return sepID;
- }
-
- public void setServiceEndpointID(ObjectName endpointID)
- {
- this.sepID = endpointID;
- }
-
- public String getContextRoot()
- {
- return contextRoot;
- }
-
- public void setContextRoot(String contextRoot)
- {
- if (contextRoot != null && contextRoot.startsWith("/") == false)
- throw new IllegalArgumentException("context root should start with
'/'");
-
- this.contextRoot = contextRoot;
- }
-
- public String[] getVirtualHosts()
- {
- return virtualHosts;
- }
-
- public void setVirtualHosts(String[] virtualHosts)
- {
- this.virtualHosts = virtualHosts;
- }
-
- public String getURLPattern()
- {
- return urlPattern;
- }
-
- public void setURLPattern(String urlPattern)
- {
- if (urlPattern != null && urlPattern.startsWith("/") == false)
- throw new IllegalArgumentException("url pattern should start with
'/'");
-
- this.urlPattern = urlPattern;
- }
-
- public String getTransportGuarantee()
- {
- return transportGuarantee;
- }
-
- public void setTransportGuarantee(String transportGuarantee)
- {
- this.transportGuarantee = transportGuarantee;
- }
-
- public String getManagedEndpointBean()
- {
- return managedEndpointBean;
- }
-
- public void setManagedEndpointBean(String managedEndpointBean)
- {
- this.managedEndpointBean = managedEndpointBean;
- }
-
- @Override
- public WSCommonConfig getEndpointConfig()
- {
- if (endpointConfig == null)
- {
- String configName = getConfigName();
- if (configName == null)
- {
- configName = "Standard Endpoint";
- setConfigName(configName);
- }
-
- String configFile = getConfigFile();
- if (configFile == null)
- {
- if (getType() == Type.JAXRPC)
- {
- configFile = "META-INF/standard-jaxrpc-endpoint-config.xml";
- }
- else
- {
- configFile = "META-INF/standard-jaxws-endpoint-config.xml";
- }
- setConfigFile(configFile);
- }
-
- log.debug("getEndpointConfig: [name=" + configName + ",url="
+ configFile + "]");
-
- URL configURL = null;
- try
- {
- configURL = new URL(configFile);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try to get the URL as resource
- if (configURL == null)
- {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- configURL = cl.getResource(configFile);
- if (configURL == null)
- throw new WSException("Cannot get resource: " + configFile);
- }
-
- // Get the config root
- Object wsConfig;
- try
- {
- WSConfigFactory factory = WSConfigFactory.newInstance();
- wsConfig = factory.parseWithObjectModelFactory(configURL);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WSException("Cannot parse client config", ex);
- }
-
- // Get the endpoint config
- if (wsConfig instanceof WSConfigRootJAXRPC)
- {
- endpointConfig =
((WSConfigRootJAXRPC)wsConfig).getEndpointConfigByName(configName);
- if (endpointConfig == null)
- throw new WSException("Cannot obtain endpoint config: " +
configName);
- }
- else
- {
- endpointConfig =
((WSConfigRootJAXWS)wsConfig).getEndpointConfigByName(configName);
- if (endpointConfig == null)
- throw new WSException("Cannot obtain endpoint config: " +
configName);
- }
- }
- return endpointConfig;
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nServerEndpointMetaData:");
- buffer.append("\n type=" + getType());
- buffer.append("\n qname=" + getQName());
- buffer.append("\n id=" + getServiceEndpointID().getCanonicalName());
- buffer.append("\n address=" + getEndpointAddress());
- buffer.append("\n binding=" + getBindingId());
- buffer.append("\n linkName=" + getLinkName());
- buffer.append("\n implName=" + getServiceEndpointImplName());
- buffer.append("\n seiName=" + getServiceEndpointInterfaceName());
- buffer.append("\n serviceMode=" + getServiceMode());
- buffer.append("\n portComponentName=" + getPortComponentName());
- buffer.append("\n contextRoot=" + getContextRoot());
- buffer.append("\n urlPattern=" + getURLPattern());
- buffer.append("\n configFile=" + getConfigFile());
- buffer.append("\n configName=" + getConfigName());
- buffer.append("\n authMethod=" + getAuthMethod());
- buffer.append("\n transportGuarantee=" + getTransportGuarantee());
- buffer.append("\n properties=" + getProperties());
-
- for (OperationMetaData opMetaData : getOperations())
- {
- buffer.append("\n" + opMetaData);
- }
- for (HandlerMetaData hdlMetaData : getHandlerMetaData(HandlerType.ALL))
- {
- buffer.append("\n" + hdlMetaData);
- }
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServerEndpointMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServerEndpointMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServerEndpointMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServerEndpointMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,300 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.config.WSCommonConfig;
+import org.jboss.ws.core.metadata.config.WSConfigFactory;
+import org.jboss.ws.core.metadata.config.jaxrpc.WSConfigRootJAXRPC;
+import org.jboss.ws.core.metadata.config.jaxws.WSConfigRootJAXWS;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.server.ServiceEndpoint;
+
+/**
+ * Client side endpoint meta data.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 12-May-2005
+ */
+public class ServerEndpointMetaData extends EndpointMetaData
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServerEndpointMetaData.class);
+
+ public static final String SEPID_DOMAIN = "jboss.ws";
+ public static final String SEPID_PROPERTY_CONTEXT = "context";
+ public static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
+
+ // The REQUIRED link name
+ private String linkName;
+ // Legacy JSR-109 port component name
+ private String portComponentName;
+ // The endpoint implementation bean
+ private String implName;
+ // The unique service endpointID
+ private ObjectName sepID;
+ // The HTTP context root
+ private String contextRoot;
+ // The HTTP virtual hosts
+ private String[] virtualHosts;
+ // The HTTP url parttern
+ private String urlPattern;
+ // The optional transport guarantee
+ private String transportGuarantee;
+ // The bean that registers with the ServiceEndpointManager
+ private String managedEndpointBean = ServiceEndpoint.class.getName();
+
+ public ServerEndpointMetaData(ServiceMetaData service, QName qname, QName
interfaceQName, Type type)
+ {
+ super(service, qname, interfaceQName, type);
+ }
+
+ public void setConfigName(String configName)
+ {
+ super.setConfigName(configName);
+ endpointConfig = null;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ super.setConfigFile(configFile);
+ endpointConfig = null;
+ }
+
+ public String getLinkName()
+ {
+ return linkName;
+ }
+
+ public void setLinkName(String linkName)
+ {
+ this.linkName = linkName;
+ }
+
+ public String getPortComponentName()
+ {
+ return portComponentName;
+ }
+
+ public void setPortComponentName(String portComponentName)
+ {
+ this.portComponentName = portComponentName;
+ }
+
+ public String getServiceEndpointImplName()
+ {
+ return implName;
+ }
+
+ public void setServiceEndpointImplName(String endpointImpl)
+ {
+ this.implName = endpointImpl;
+ }
+
+ public ObjectName getServiceEndpointID()
+ {
+ return sepID;
+ }
+
+ public void setServiceEndpointID(ObjectName endpointID)
+ {
+ this.sepID = endpointID;
+ }
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot)
+ {
+ if (contextRoot != null && contextRoot.startsWith("/") == false)
+ throw new IllegalArgumentException("context root should start with
'/'");
+
+ this.contextRoot = contextRoot;
+ }
+
+ public String[] getVirtualHosts()
+ {
+ return virtualHosts;
+ }
+
+ public void setVirtualHosts(String[] virtualHosts)
+ {
+ this.virtualHosts = virtualHosts;
+ }
+
+ public String getURLPattern()
+ {
+ return urlPattern;
+ }
+
+ public void setURLPattern(String urlPattern)
+ {
+ if (urlPattern != null && urlPattern.startsWith("/") == false)
+ throw new IllegalArgumentException("url pattern should start with
'/'");
+
+ this.urlPattern = urlPattern;
+ }
+
+ public String getTransportGuarantee()
+ {
+ return transportGuarantee;
+ }
+
+ public void setTransportGuarantee(String transportGuarantee)
+ {
+ this.transportGuarantee = transportGuarantee;
+ }
+
+ public String getManagedEndpointBean()
+ {
+ return managedEndpointBean;
+ }
+
+ public void setManagedEndpointBean(String managedEndpointBean)
+ {
+ this.managedEndpointBean = managedEndpointBean;
+ }
+
+ @Override
+ public WSCommonConfig getEndpointConfig()
+ {
+ if (endpointConfig == null)
+ {
+ String configName = getConfigName();
+ if (configName == null)
+ {
+ configName = "Standard Endpoint";
+ setConfigName(configName);
+ }
+
+ String configFile = getConfigFile();
+ if (configFile == null)
+ {
+ if (getType() == Type.JAXRPC)
+ {
+ configFile = "META-INF/standard-jaxrpc-endpoint-config.xml";
+ }
+ else
+ {
+ configFile = "META-INF/standard-jaxws-endpoint-config.xml";
+ }
+ setConfigFile(configFile);
+ }
+
+ log.debug("getEndpointConfig: [name=" + configName + ",url="
+ configFile + "]");
+
+ URL configURL = null;
+ try
+ {
+ configURL = new URL(configFile);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try to get the URL as resource
+ if (configURL == null)
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ configURL = cl.getResource(configFile);
+ if (configURL == null)
+ throw new WSException("Cannot get resource: " + configFile);
+ }
+
+ // Get the config root
+ Object wsConfig;
+ try
+ {
+ WSConfigFactory factory = WSConfigFactory.newInstance();
+ wsConfig = factory.parseWithObjectModelFactory(configURL);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WSException("Cannot parse client config", ex);
+ }
+
+ // Get the endpoint config
+ if (wsConfig instanceof WSConfigRootJAXRPC)
+ {
+ endpointConfig =
((WSConfigRootJAXRPC)wsConfig).getEndpointConfigByName(configName);
+ if (endpointConfig == null)
+ throw new WSException("Cannot obtain endpoint config: " +
configName);
+ }
+ else
+ {
+ endpointConfig =
((WSConfigRootJAXWS)wsConfig).getEndpointConfigByName(configName);
+ if (endpointConfig == null)
+ throw new WSException("Cannot obtain endpoint config: " +
configName);
+ }
+ }
+ return endpointConfig;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nServerEndpointMetaData:");
+ buffer.append("\n type=" + getType());
+ buffer.append("\n qname=" + getQName());
+ buffer.append("\n id=" + getServiceEndpointID().getCanonicalName());
+ buffer.append("\n address=" + getEndpointAddress());
+ buffer.append("\n binding=" + getBindingId());
+ buffer.append("\n linkName=" + getLinkName());
+ buffer.append("\n implName=" + getServiceEndpointImplName());
+ buffer.append("\n seiName=" + getServiceEndpointInterfaceName());
+ buffer.append("\n serviceMode=" + getServiceMode());
+ buffer.append("\n portComponentName=" + getPortComponentName());
+ buffer.append("\n contextRoot=" + getContextRoot());
+ buffer.append("\n urlPattern=" + getURLPattern());
+ buffer.append("\n configFile=" + getConfigFile());
+ buffer.append("\n configName=" + getConfigName());
+ buffer.append("\n authMethod=" + getAuthMethod());
+ buffer.append("\n transportGuarantee=" + getTransportGuarantee());
+ buffer.append("\n properties=" + getProperties());
+
+ for (OperationMetaData opMetaData : getOperations())
+ {
+ buffer.append("\n" + opMetaData);
+ }
+ for (HandlerMetaData hdlMetaData : getHandlerMetaData(HandlerType.ALL))
+ {
+ buffer.append("\n" + hdlMetaData);
+ }
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServiceMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServiceMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServiceMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,416 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.TypeMappingRegistry;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.common.jaxrpc.TypeMappingRegistryImpl;
-import org.jboss.ws.common.jaxrpc.Use;
-import org.jboss.ws.common.jbossxb.SchemaBindingBuilder;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-
-/**
- * A Service component describes a set of endpoints.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2005
- */
-public class ServiceMetaData
-{
- // provide logging
- private static final Logger log = Logger.getLogger(ServiceMetaData.class);
-
- // The parent meta data.
- private UnifiedMetaData wsMetaData;
-
- // The service endpoints
- private Map<QName, EndpointMetaData> endpoints = new LinkedHashMap<QName,
EndpointMetaData>();
-
- private QName serviceName;
- private String wsdName;
- private String wsdlFile;
- private String jaxrpcMappingFile;
- private String wsdlPublishLocation;
-
- // The type mapping that is maintained by this service
- private TypesMetaData types;
- private TypeMappingRegistry tmRegistry = new TypeMappingRegistryImpl();
- private SchemaBinding schemaBinding;
-
- // Arbitrary properties given by <call-property>
- private Properties properties;
-
- // derived cached encoding style
- private Use encStyle;
-
- // The security configuration
- private WSSecurityConfiguration securityConfiguration;
-
- public ServiceMetaData(UnifiedMetaData wsMetaData, QName serviceName)
- {
- this.wsMetaData = wsMetaData;
- this.serviceName = serviceName;
- this.types = new TypesMetaData(this);
- }
-
- public UnifiedMetaData getUnifiedMetaData()
- {
- return wsMetaData;
- }
-
- public void setServiceName(QName serviceName)
- {
- this.serviceName = serviceName;
- }
-
- public QName getServiceName()
- {
- return serviceName;
- }
-
- public String getWebserviceDescriptionName()
- {
- return wsdName;
- }
-
- public void setWebserviceDescriptionName(String wsdName)
- {
- this.wsdName = wsdName;
- }
-
- public String getWsdlFile()
- {
- return wsdlFile;
- }
-
- public void setWsdlFile(String wsdlFile)
- {
- this.wsdlFile = wsdlFile;
- }
-
- public String getWsdlPublishLocation()
- {
- return wsdlPublishLocation;
- }
-
- public void setWsdlPublishLocation(String wsdlPublishLocation)
- {
- this.wsdlPublishLocation = wsdlPublishLocation;
- }
-
- public Properties getProperties()
- {
- return properties;
- }
-
- public void setProperties(Properties properties)
- {
- this.properties = properties;
- }
-
- public TypesMetaData getTypesMetaData()
- {
- return types;
- }
-
- public List<EndpointMetaData> getEndpoints()
- {
- return new ArrayList<EndpointMetaData>(endpoints.values());
- }
-
- public EndpointMetaData getEndpoint(QName portName)
- {
- return endpoints.get(portName);
- }
-
- public EndpointMetaData getEndpointByServiceEndpointInterface(String seiName)
- {
- EndpointMetaData epMetaData = null;
- for (EndpointMetaData epmd : endpoints.values())
- {
- if (seiName.equals(epmd.getServiceEndpointInterfaceName()))
- {
- if (epMetaData != null)
- {
- // The CTS uses Service.getPort(Class) with multiple endpoints
implementing the same SEI
- log.warn("Multiple possible endpoints implementing SEI: " +
seiName);
- }
- epMetaData = epmd;
- }
- }
- return epMetaData;
- }
-
- public void addEndpoint(EndpointMetaData epMetaData)
- {
- QName portName = epMetaData.getQName();
-
- // This happends when we have multiple port components in sharing the same wsdl
port
- // The EndpointMetaData name is the wsdl port, so we cannot have multiple meta data
for the same port.
- if (endpoints.get(portName) != null)
- throw new WSException("EndpointMetaData name must be unique: " +
portName);
-
- endpoints.put(portName, epMetaData);
- }
-
- public String getJaxrpcMappingFile()
- {
- return jaxrpcMappingFile;
- }
-
- public void setJaxrpcMappingFile(String jaxrpcMappingFile)
- {
- this.jaxrpcMappingFile = jaxrpcMappingFile;
- }
-
- public JavaWsdlMapping getJavaWsdlMapping()
- {
- JavaWsdlMapping javaWsdlMapping =
(JavaWsdlMapping)wsMetaData.getMappingDefinition(jaxrpcMappingFile);
- if (javaWsdlMapping == null && jaxrpcMappingFile != null)
- {
- URL mappingLocation = null;
- try
- {
- mappingLocation = new URL(jaxrpcMappingFile);
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- if (mappingLocation == null)
- {
- mappingLocation =
wsMetaData.getClassLoader().getResource(jaxrpcMappingFile);
- }
-
- if (mappingLocation == null)
- throw new IllegalArgumentException("Cannot find jaxrpc-mapping.xml in
deployment: " + jaxrpcMappingFile);
-
- try
- {
- JavaWsdlMappingFactory mappingFactory =
JavaWsdlMappingFactory.newInstance();
- javaWsdlMapping = mappingFactory.parse(mappingLocation);
- wsMetaData.addMappingDefinition(jaxrpcMappingFile, javaWsdlMapping);
- }
- catch (IOException e)
- {
- throw new WSException("Cannot parse jaxrpc-mapping.xml", e);
- }
- }
- return javaWsdlMapping;
- }
-
- /**
- * Get the wsdl definition that corresponds to the wsdl-file element.
- */
- public WSDLDefinitions getWsdlDefinitions()
- {
- WSDLDefinitions wsdlDefinitions =
(WSDLDefinitions)wsMetaData.getWSDLDefinition(wsdlFile);
- if (wsdlDefinitions == null && wsdlFile != null)
- {
- URL wsdlLocation = getWsdlLocation();
- if (wsdlLocation == null)
- throw new IllegalArgumentException("Cannot find wsdl in deployment:
" + wsdlFile);
-
- WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
- wsdlDefinitions = factory.parse(wsdlLocation);
- wsMetaData.addWSDLDefinition(wsdlFile, wsdlDefinitions);
- }
- return wsdlDefinitions;
- }
-
- public URL getWsdlLocation()
- {
- URL wsdlLocation = null;
- if (wsdlFile != null)
- {
- try
- {
- wsdlLocation = new URL(wsdlFile);
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- if (wsdlLocation == null)
- {
- wsdlLocation = wsMetaData.getClassLoader().getResource(wsdlFile);
- }
- }
- return wsdlLocation;
- }
-
- public TypeMappingImpl getTypeMapping()
- {
- Use encStyle = getEncodingStyle();
- TypeMappingImpl typeMapping =
(TypeMappingImpl)tmRegistry.getTypeMapping(encStyle.toURI());
- if (typeMapping == null)
- throw new WSException("No type mapping for encoding style: " +
encStyle);
-
- return typeMapping;
- }
-
- public WSSecurityConfiguration getSecurityConfiguration()
- {
- return securityConfiguration;
- }
-
- public void setSecurityConfiguration(WSSecurityConfiguration securityConfiguration)
- {
- this.securityConfiguration = securityConfiguration;
- }
-
- public Use getEncodingStyle()
- {
- if (encStyle == null)
- {
- if (endpoints.size() > 0)
- {
- for (EndpointMetaData epMetaData : endpoints.values())
- {
- if (encStyle == null)
- {
- encStyle = epMetaData.getEncodingStyle();
- }
- else if (encStyle.equals(epMetaData.getEncodingStyle()) == false)
- {
- throw new WSException("Conflicting encoding styles not
supported");
- }
- }
- }
- else
- {
- encStyle = Use.LITERAL;
- }
- }
- return encStyle;
- }
-
- public SchemaBinding getSchemaBinding()
- {
- JavaWsdlMapping wsdlMapping = getJavaWsdlMapping();
- if (schemaBinding == null && getEncodingStyle() == Use.LITERAL &&
wsdlMapping != null)
- {
- JBossXSModel xsModel = types.getSchemaModel();
- SchemaBindingBuilder bindingBuilder = new SchemaBindingBuilder();
- schemaBinding = bindingBuilder.buildSchemaBinding(xsModel, wsdlMapping);
- }
- return schemaBinding;
- }
-
- public void validate()
- {
- // Validate that there is at least one handler configured
- // if we have a security configuration
- if (securityConfiguration != null)
- {
- int handlerCount = 0;
- for (EndpointMetaData epMetaData : endpoints.values())
- {
- handlerCount += epMetaData.getHandlerMetaData(HandlerType.ALL).size();
- }
- if (handlerCount == 0)
- log.warn("WS-Security requires a security handler to be
configured");
- }
-
- // Validate endpoints
- for (EndpointMetaData epMetaData : endpoints.values())
- epMetaData.validate();
- }
-
- /**
- * @see UnifiedMetaData#eagerInitialize()
- */
- public void eagerInitialize()
- {
- // Initialize all wsdl definitions and schema objects
- WSDLDefinitions definitions = getWsdlDefinitions();
- if (definitions != null)
- {
- WSDLTypes types = definitions.getWsdlTypes();
- if (types != null)
- {
- JBossXSModel model = WSDLUtils.getSchemaModel(types);
- if (model != null)
- model.eagerInitialize();
- }
- }
-
- // Initialize jaxrpc-mapping data
- getJavaWsdlMapping();
-
- // Initialize endpoints
- for (EndpointMetaData epMetaData : endpoints.values())
- epMetaData.eagerInitialize();
-
- // Initialize schema binding
- getSchemaBinding();
- }
-
- /** Assert that the given namespace is the WSDL's target namespace */
- public void assertTargetNamespace(String targetNS)
- {
- if (getServiceName().getNamespaceURI().equals(targetNS) == false)
- throw new WSException("Requested namespace is not WSDL target namespace:
" + targetNS);
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nServiceMetaData:");
- buffer.append("\n qname=" + serviceName);
- buffer.append("\n wsdName=" + wsdName);
- buffer.append("\n wsdlFile=" + wsdlFile);
- buffer.append("\n jaxrpcFile=" + jaxrpcMappingFile);
- buffer.append("\n publishLocation=" + wsdlPublishLocation);
- buffer.append("\n properties=" + properties);
- buffer.append("\n" + types);
- buffer.append("\n");
- for (EndpointMetaData epMetaData : endpoints.values())
- {
- buffer.append(epMetaData);
- }
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServiceMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServiceMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServiceMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/ServiceMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,416 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.TypeMappingRegistry;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.binding.jbossxb.SchemaBindingBuilder;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
+import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+
+/**
+ * A Service component describes a set of endpoints.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2005
+ */
+public class ServiceMetaData
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ServiceMetaData.class);
+
+ // The parent meta data.
+ private UnifiedMetaData wsMetaData;
+
+ // The service endpoints
+ private Map<QName, EndpointMetaData> endpoints = new LinkedHashMap<QName,
EndpointMetaData>();
+
+ private QName serviceName;
+ private String wsdName;
+ private String wsdlFile;
+ private String jaxrpcMappingFile;
+ private String wsdlPublishLocation;
+
+ // The type mapping that is maintained by this service
+ private TypesMetaData types;
+ private TypeMappingRegistry tmRegistry = new TypeMappingRegistryImpl();
+ private SchemaBinding schemaBinding;
+
+ // Arbitrary properties given by <call-property>
+ private Properties properties;
+
+ // derived cached encoding style
+ private Use encStyle;
+
+ // The security configuration
+ private WSSecurityConfiguration securityConfiguration;
+
+ public ServiceMetaData(UnifiedMetaData wsMetaData, QName serviceName)
+ {
+ this.wsMetaData = wsMetaData;
+ this.serviceName = serviceName;
+ this.types = new TypesMetaData(this);
+ }
+
+ public UnifiedMetaData getUnifiedMetaData()
+ {
+ return wsMetaData;
+ }
+
+ public void setServiceName(QName serviceName)
+ {
+ this.serviceName = serviceName;
+ }
+
+ public QName getServiceName()
+ {
+ return serviceName;
+ }
+
+ public String getWebserviceDescriptionName()
+ {
+ return wsdName;
+ }
+
+ public void setWebserviceDescriptionName(String wsdName)
+ {
+ this.wsdName = wsdName;
+ }
+
+ public String getWsdlFile()
+ {
+ return wsdlFile;
+ }
+
+ public void setWsdlFile(String wsdlFile)
+ {
+ this.wsdlFile = wsdlFile;
+ }
+
+ public String getWsdlPublishLocation()
+ {
+ return wsdlPublishLocation;
+ }
+
+ public void setWsdlPublishLocation(String wsdlPublishLocation)
+ {
+ this.wsdlPublishLocation = wsdlPublishLocation;
+ }
+
+ public Properties getProperties()
+ {
+ return properties;
+ }
+
+ public void setProperties(Properties properties)
+ {
+ this.properties = properties;
+ }
+
+ public TypesMetaData getTypesMetaData()
+ {
+ return types;
+ }
+
+ public List<EndpointMetaData> getEndpoints()
+ {
+ return new ArrayList<EndpointMetaData>(endpoints.values());
+ }
+
+ public EndpointMetaData getEndpoint(QName portName)
+ {
+ return endpoints.get(portName);
+ }
+
+ public EndpointMetaData getEndpointByServiceEndpointInterface(String seiName)
+ {
+ EndpointMetaData epMetaData = null;
+ for (EndpointMetaData epmd : endpoints.values())
+ {
+ if (seiName.equals(epmd.getServiceEndpointInterfaceName()))
+ {
+ if (epMetaData != null)
+ {
+ // The CTS uses Service.getPort(Class) with multiple endpoints
implementing the same SEI
+ log.warn("Multiple possible endpoints implementing SEI: " +
seiName);
+ }
+ epMetaData = epmd;
+ }
+ }
+ return epMetaData;
+ }
+
+ public void addEndpoint(EndpointMetaData epMetaData)
+ {
+ QName portName = epMetaData.getQName();
+
+ // This happends when we have multiple port components in sharing the same wsdl
port
+ // The EndpointMetaData name is the wsdl port, so we cannot have multiple meta data
for the same port.
+ if (endpoints.get(portName) != null)
+ throw new WSException("EndpointMetaData name must be unique: " +
portName);
+
+ endpoints.put(portName, epMetaData);
+ }
+
+ public String getJaxrpcMappingFile()
+ {
+ return jaxrpcMappingFile;
+ }
+
+ public void setJaxrpcMappingFile(String jaxrpcMappingFile)
+ {
+ this.jaxrpcMappingFile = jaxrpcMappingFile;
+ }
+
+ public JavaWsdlMapping getJavaWsdlMapping()
+ {
+ JavaWsdlMapping javaWsdlMapping =
(JavaWsdlMapping)wsMetaData.getMappingDefinition(jaxrpcMappingFile);
+ if (javaWsdlMapping == null && jaxrpcMappingFile != null)
+ {
+ URL mappingLocation = null;
+ try
+ {
+ mappingLocation = new URL(jaxrpcMappingFile);
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ if (mappingLocation == null)
+ {
+ mappingLocation =
wsMetaData.getClassLoader().getResource(jaxrpcMappingFile);
+ }
+
+ if (mappingLocation == null)
+ throw new IllegalArgumentException("Cannot find jaxrpc-mapping.xml in
deployment: " + jaxrpcMappingFile);
+
+ try
+ {
+ JavaWsdlMappingFactory mappingFactory =
JavaWsdlMappingFactory.newInstance();
+ javaWsdlMapping = mappingFactory.parse(mappingLocation);
+ wsMetaData.addMappingDefinition(jaxrpcMappingFile, javaWsdlMapping);
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Cannot parse jaxrpc-mapping.xml", e);
+ }
+ }
+ return javaWsdlMapping;
+ }
+
+ /**
+ * Get the wsdl definition that corresponds to the wsdl-file element.
+ */
+ public WSDLDefinitions getWsdlDefinitions()
+ {
+ WSDLDefinitions wsdlDefinitions =
(WSDLDefinitions)wsMetaData.getWSDLDefinition(wsdlFile);
+ if (wsdlDefinitions == null && wsdlFile != null)
+ {
+ URL wsdlLocation = getWsdlLocation();
+ if (wsdlLocation == null)
+ throw new IllegalArgumentException("Cannot find wsdl in deployment:
" + wsdlFile);
+
+ WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
+ wsdlDefinitions = factory.parse(wsdlLocation);
+ wsMetaData.addWSDLDefinition(wsdlFile, wsdlDefinitions);
+ }
+ return wsdlDefinitions;
+ }
+
+ public URL getWsdlLocation()
+ {
+ URL wsdlLocation = null;
+ if (wsdlFile != null)
+ {
+ try
+ {
+ wsdlLocation = new URL(wsdlFile);
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ if (wsdlLocation == null)
+ {
+ wsdlLocation = wsMetaData.getClassLoader().getResource(wsdlFile);
+ }
+ }
+ return wsdlLocation;
+ }
+
+ public TypeMappingImpl getTypeMapping()
+ {
+ Use encStyle = getEncodingStyle();
+ TypeMappingImpl typeMapping =
(TypeMappingImpl)tmRegistry.getTypeMapping(encStyle.toURI());
+ if (typeMapping == null)
+ throw new WSException("No type mapping for encoding style: " +
encStyle);
+
+ return typeMapping;
+ }
+
+ public WSSecurityConfiguration getSecurityConfiguration()
+ {
+ return securityConfiguration;
+ }
+
+ public void setSecurityConfiguration(WSSecurityConfiguration securityConfiguration)
+ {
+ this.securityConfiguration = securityConfiguration;
+ }
+
+ public Use getEncodingStyle()
+ {
+ if (encStyle == null)
+ {
+ if (endpoints.size() > 0)
+ {
+ for (EndpointMetaData epMetaData : endpoints.values())
+ {
+ if (encStyle == null)
+ {
+ encStyle = epMetaData.getEncodingStyle();
+ }
+ else if (encStyle.equals(epMetaData.getEncodingStyle()) == false)
+ {
+ throw new WSException("Conflicting encoding styles not
supported");
+ }
+ }
+ }
+ else
+ {
+ encStyle = Use.LITERAL;
+ }
+ }
+ return encStyle;
+ }
+
+ public SchemaBinding getSchemaBinding()
+ {
+ JavaWsdlMapping wsdlMapping = getJavaWsdlMapping();
+ if (schemaBinding == null && getEncodingStyle() == Use.LITERAL &&
wsdlMapping != null)
+ {
+ JBossXSModel xsModel = types.getSchemaModel();
+ SchemaBindingBuilder bindingBuilder = new SchemaBindingBuilder();
+ schemaBinding = bindingBuilder.buildSchemaBinding(xsModel, wsdlMapping);
+ }
+ return schemaBinding;
+ }
+
+ public void validate()
+ {
+ // Validate that there is at least one handler configured
+ // if we have a security configuration
+ if (securityConfiguration != null)
+ {
+ int handlerCount = 0;
+ for (EndpointMetaData epMetaData : endpoints.values())
+ {
+ handlerCount += epMetaData.getHandlerMetaData(HandlerType.ALL).size();
+ }
+ if (handlerCount == 0)
+ log.warn("WS-Security requires a security handler to be
configured");
+ }
+
+ // Validate endpoints
+ for (EndpointMetaData epMetaData : endpoints.values())
+ epMetaData.validate();
+ }
+
+ /**
+ * @see UnifiedMetaData#eagerInitialize()
+ */
+ public void eagerInitialize()
+ {
+ // Initialize all wsdl definitions and schema objects
+ WSDLDefinitions definitions = getWsdlDefinitions();
+ if (definitions != null)
+ {
+ WSDLTypes types = definitions.getWsdlTypes();
+ if (types != null)
+ {
+ JBossXSModel model = WSDLUtils.getSchemaModel(types);
+ if (model != null)
+ model.eagerInitialize();
+ }
+ }
+
+ // Initialize jaxrpc-mapping data
+ getJavaWsdlMapping();
+
+ // Initialize endpoints
+ for (EndpointMetaData epMetaData : endpoints.values())
+ epMetaData.eagerInitialize();
+
+ // Initialize schema binding
+ getSchemaBinding();
+ }
+
+ /** Assert that the given namespace is the WSDL's target namespace */
+ public void assertTargetNamespace(String targetNS)
+ {
+ if (getServiceName().getNamespaceURI().equals(targetNS) == false)
+ throw new WSException("Requested namespace is not WSDL target namespace:
" + targetNS);
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nServiceMetaData:");
+ buffer.append("\n qname=" + serviceName);
+ buffer.append("\n wsdName=" + wsdName);
+ buffer.append("\n wsdlFile=" + wsdlFile);
+ buffer.append("\n jaxrpcFile=" + jaxrpcMappingFile);
+ buffer.append("\n publishLocation=" + wsdlPublishLocation);
+ buffer.append("\n properties=" + properties);
+ buffer.append("\n" + types);
+ buffer.append("\n");
+ for (EndpointMetaData epMetaData : endpoints.values())
+ {
+ buffer.append(epMetaData);
+ }
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypeMappingMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypeMappingMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypeMappingMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,110 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.util.Arrays;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-
-/**
- * Type mapping meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2005
- */
-public class TypeMappingMetaData
-{
- // The parent meta data.
- private TypesMetaData typesMetaData;
-
- private QName xmlType;
- private String javaTypeName;
- private String qnameScope;
-
- // List of allowed qname scopes
- public static final String QNAME_SCOPE_SIMPLE_TYPE = "simpleType";
- public static final String QNAME_SCOPE_COMPLEX_TYPE = "complexType";
- public static final String QNAME_SCOPE_ELEMENT = "element";
- private static List<String> allowedScopes = Arrays.asList(new String[] {
QNAME_SCOPE_COMPLEX_TYPE, QNAME_SCOPE_SIMPLE_TYPE, QNAME_SCOPE_ELEMENT });
-
- public TypeMappingMetaData(TypesMetaData typesMetaData, QName xmlType, String
javaTypeName)
- {
- if (xmlType == null)
- throw new IllegalArgumentException("Invalid null xmlType");
- if (javaTypeName == null)
- throw new IllegalArgumentException("Invalid null javaTypeName");
-
- this.typesMetaData = typesMetaData;
- this.javaTypeName = javaTypeName;
- this.xmlType = xmlType;
- this.qnameScope = QNAME_SCOPE_COMPLEX_TYPE;
- }
-
- public TypesMetaData getTypesMetaData()
- {
- return typesMetaData;
- }
-
- public String getJavaTypeName()
- {
- return javaTypeName;
- }
-
- public QName getXmlType()
- {
- return xmlType;
- }
-
- public String getQNameScope()
- {
- return qnameScope;
- }
-
- public void setQNameScope(String qnameScope)
- {
- if (allowedScopes.contains(qnameScope) == false)
- throw new IllegalArgumentException("Invalid qname scope: " +
qnameScope);
-
- this.qnameScope = qnameScope;
- }
-
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- public boolean equals(Object obj)
- {
- if (obj instanceof TypeMappingMetaData == false) return false;
- TypeMappingMetaData other = (TypeMappingMetaData)obj;
- return toString().equals(other.toString());
- }
-
- public String toString()
- {
- return "[" + qnameScope + "=" + xmlType +
",javaType=" + javaTypeName + "]";
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypeMappingMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypeMappingMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypeMappingMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypeMappingMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,110 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * Type mapping meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2005
+ */
+public class TypeMappingMetaData
+{
+ // The parent meta data.
+ private TypesMetaData typesMetaData;
+
+ private QName xmlType;
+ private String javaTypeName;
+ private String qnameScope;
+
+ // List of allowed qname scopes
+ public static final String QNAME_SCOPE_SIMPLE_TYPE = "simpleType";
+ public static final String QNAME_SCOPE_COMPLEX_TYPE = "complexType";
+ public static final String QNAME_SCOPE_ELEMENT = "element";
+ private static List<String> allowedScopes = Arrays.asList(new String[] {
QNAME_SCOPE_COMPLEX_TYPE, QNAME_SCOPE_SIMPLE_TYPE, QNAME_SCOPE_ELEMENT });
+
+ public TypeMappingMetaData(TypesMetaData typesMetaData, QName xmlType, String
javaTypeName)
+ {
+ if (xmlType == null)
+ throw new IllegalArgumentException("Invalid null xmlType");
+ if (javaTypeName == null)
+ throw new IllegalArgumentException("Invalid null javaTypeName");
+
+ this.typesMetaData = typesMetaData;
+ this.javaTypeName = javaTypeName;
+ this.xmlType = xmlType;
+ this.qnameScope = QNAME_SCOPE_COMPLEX_TYPE;
+ }
+
+ public TypesMetaData getTypesMetaData()
+ {
+ return typesMetaData;
+ }
+
+ public String getJavaTypeName()
+ {
+ return javaTypeName;
+ }
+
+ public QName getXmlType()
+ {
+ return xmlType;
+ }
+
+ public String getQNameScope()
+ {
+ return qnameScope;
+ }
+
+ public void setQNameScope(String qnameScope)
+ {
+ if (allowedScopes.contains(qnameScope) == false)
+ throw new IllegalArgumentException("Invalid qname scope: " +
qnameScope);
+
+ this.qnameScope = qnameScope;
+ }
+
+ public int hashCode()
+ {
+ return toString().hashCode();
+ }
+
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof TypeMappingMetaData == false) return false;
+ TypeMappingMetaData other = (TypeMappingMetaData)obj;
+ return toString().equals(other.toString());
+ }
+
+ public String toString()
+ {
+ return "[" + qnameScope + "=" + xmlType +
",javaType=" + javaTypeName + "]";
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypesMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypesMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypesMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,193 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-
-/**
- * Types meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2005
- */
-public class TypesMetaData
-{
- // provide logging
- private static final Logger log = Logger.getLogger(TypesMetaData.class);
-
- // The parent meta data.
- private ServiceMetaData serviceMetaData;
- // The list of type meta data
- private List<TypeMappingMetaData> typeList = new
ArrayList<TypeMappingMetaData>();
-
- private JBossXSModel schemaModel;
-
- public TypesMetaData(ServiceMetaData serviceMetaData)
- {
- this.serviceMetaData = serviceMetaData;
- }
-
- public ServiceMetaData getServiceMetaData()
- {
- return serviceMetaData;
- }
-
- public JBossXSModel getSchemaModel()
- {
- return schemaModel;
- }
-
- public void setSchemaModel(JBossXSModel model)
- {
- this.schemaModel = model;
- }
-
- public void addSchemaModel(JBossXSModel model)
- {
- if (this.schemaModel == null)
- {
- this.schemaModel = model;
- }
- else
- {
- this.schemaModel.merge(model);
- }
- }
-
- public List<TypeMappingMetaData> getTypeMappings()
- {
- return new ArrayList<TypeMappingMetaData>(typeList);
- }
-
- public void addTypeMapping(TypeMappingMetaData tmMetaData)
- {
- if (typeList.contains(tmMetaData) == false)
- {
- log.trace("Add type mapping: " + tmMetaData);
- typeList.add(tmMetaData);
- }
- }
-
- public TypeMappingMetaData getTypeMappingByXMLType(QName xmlType)
- {
- TypeMappingMetaData tmMetaData = null;
- for (TypeMappingMetaData aux : typeList)
- {
- boolean isElementScope =
TypeMappingMetaData.QNAME_SCOPE_ELEMENT.equals(aux.getQNameScope());
- if (aux.getXmlType().equals(xmlType) && isElementScope == false)
- {
- if (tmMetaData != null)
- {
- log.error(tmMetaData + "\n" + aux);
- throw new WSException("Ambiguous type mappping for: " +
xmlType);
- }
- tmMetaData = aux;
- }
- }
-
- if (tmMetaData == null && schemaModel != null)
- {
- // Simple types are not neccessary mapped in jaxrpc-mapping.xml, lazily add the
mapping here
- XSTypeDefinition xsType = schemaModel.getTypeDefinition(xmlType.getLocalPart(),
xmlType.getNamespaceURI());
- if (xsType instanceof XSSimpleTypeDefinition)
- {
- XSSimpleTypeDefinition xsSimpleType = (XSSimpleTypeDefinition)xsType;
- String javaTypeName = null;
-
- // <simpleType name="FooStringListType">
- // <list itemType="string"/>
- // </simpleType>
- if (xsSimpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST)
- {
- XSSimpleTypeDefinition itemType = xsSimpleType.getItemType();
- QName xmlBaseType = new QName(itemType.getNamespace(),
itemType.getName());
- javaTypeName = new LiteralTypeMapping().getJavaTypeName(xmlBaseType);
- if (javaTypeName != null)
- {
- javaTypeName += "[]";
- }
- }
-
- // <simpleType name="FooIType">
- // <restriction base="normalizedString">
- // <pattern value="\d{3}-[A-Z0-9]{5}"/>
- // </restriction>
- // </simpleType>
- XSTypeDefinition xsBaseType = xsType.getBaseType();
- while (javaTypeName == null && xsBaseType != null)
- {
- QName xmlBaseType = new QName(xsBaseType.getNamespace(),
xsBaseType.getName());
- javaTypeName = new LiteralTypeMapping().getJavaTypeName(xmlBaseType);
- xsBaseType = xsBaseType.getBaseType();
- }
-
- if (javaTypeName != null)
- {
- tmMetaData = new TypeMappingMetaData(this, xmlType, javaTypeName);
- tmMetaData.setQNameScope(TypeMappingMetaData.QNAME_SCOPE_SIMPLE_TYPE);
- log.debug("Adding a simpleType without jaxrpc-mapping: " +
tmMetaData);
- addTypeMapping(tmMetaData);
- }
- else
- {
- log.warn("Cannot obtain javaTypeName for xmlType: " + xmlType);
- }
- }
- }
-
- return tmMetaData;
- }
-
- public TypeMappingMetaData getTypeMappingByJavaType(String javaTypeName)
- {
- TypeMappingMetaData tmMetaData = null;
- for (TypeMappingMetaData aux : typeList)
- {
- if (aux.getJavaTypeName().equals(javaTypeName))
- tmMetaData = aux;
- }
- return tmMetaData;
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nTypesMetaData: ");
- for (TypeMappingMetaData tmd : typeList)
- {
- buffer.append("\n " + tmd);
- }
- buffer.append("\n" + (schemaModel != null ? schemaModel.serialize() :
"<schema/>"));
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypesMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypesMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypesMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/TypesMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,193 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.xerces.xs.XSSimpleTypeDefinition;
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+
+/**
+ * Types meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2005
+ */
+public class TypesMetaData
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(TypesMetaData.class);
+
+ // The parent meta data.
+ private ServiceMetaData serviceMetaData;
+ // The list of type meta data
+ private List<TypeMappingMetaData> typeList = new
ArrayList<TypeMappingMetaData>();
+
+ private JBossXSModel schemaModel;
+
+ public TypesMetaData(ServiceMetaData serviceMetaData)
+ {
+ this.serviceMetaData = serviceMetaData;
+ }
+
+ public ServiceMetaData getServiceMetaData()
+ {
+ return serviceMetaData;
+ }
+
+ public JBossXSModel getSchemaModel()
+ {
+ return schemaModel;
+ }
+
+ public void setSchemaModel(JBossXSModel model)
+ {
+ this.schemaModel = model;
+ }
+
+ public void addSchemaModel(JBossXSModel model)
+ {
+ if (this.schemaModel == null)
+ {
+ this.schemaModel = model;
+ }
+ else
+ {
+ this.schemaModel.merge(model);
+ }
+ }
+
+ public List<TypeMappingMetaData> getTypeMappings()
+ {
+ return new ArrayList<TypeMappingMetaData>(typeList);
+ }
+
+ public void addTypeMapping(TypeMappingMetaData tmMetaData)
+ {
+ if (typeList.contains(tmMetaData) == false)
+ {
+ log.trace("Add type mapping: " + tmMetaData);
+ typeList.add(tmMetaData);
+ }
+ }
+
+ public TypeMappingMetaData getTypeMappingByXMLType(QName xmlType)
+ {
+ TypeMappingMetaData tmMetaData = null;
+ for (TypeMappingMetaData aux : typeList)
+ {
+ boolean isElementScope =
TypeMappingMetaData.QNAME_SCOPE_ELEMENT.equals(aux.getQNameScope());
+ if (aux.getXmlType().equals(xmlType) && isElementScope == false)
+ {
+ if (tmMetaData != null)
+ {
+ log.error(tmMetaData + "\n" + aux);
+ throw new WSException("Ambiguous type mappping for: " +
xmlType);
+ }
+ tmMetaData = aux;
+ }
+ }
+
+ if (tmMetaData == null && schemaModel != null)
+ {
+ // Simple types are not neccessary mapped in jaxrpc-mapping.xml, lazily add the
mapping here
+ XSTypeDefinition xsType = schemaModel.getTypeDefinition(xmlType.getLocalPart(),
xmlType.getNamespaceURI());
+ if (xsType instanceof XSSimpleTypeDefinition)
+ {
+ XSSimpleTypeDefinition xsSimpleType = (XSSimpleTypeDefinition)xsType;
+ String javaTypeName = null;
+
+ // <simpleType name="FooStringListType">
+ // <list itemType="string"/>
+ // </simpleType>
+ if (xsSimpleType.getVariety() == XSSimpleTypeDefinition.VARIETY_LIST)
+ {
+ XSSimpleTypeDefinition itemType = xsSimpleType.getItemType();
+ QName xmlBaseType = new QName(itemType.getNamespace(),
itemType.getName());
+ javaTypeName = new LiteralTypeMapping().getJavaTypeName(xmlBaseType);
+ if (javaTypeName != null)
+ {
+ javaTypeName += "[]";
+ }
+ }
+
+ // <simpleType name="FooIType">
+ // <restriction base="normalizedString">
+ // <pattern value="\d{3}-[A-Z0-9]{5}"/>
+ // </restriction>
+ // </simpleType>
+ XSTypeDefinition xsBaseType = xsType.getBaseType();
+ while (javaTypeName == null && xsBaseType != null)
+ {
+ QName xmlBaseType = new QName(xsBaseType.getNamespace(),
xsBaseType.getName());
+ javaTypeName = new LiteralTypeMapping().getJavaTypeName(xmlBaseType);
+ xsBaseType = xsBaseType.getBaseType();
+ }
+
+ if (javaTypeName != null)
+ {
+ tmMetaData = new TypeMappingMetaData(this, xmlType, javaTypeName);
+ tmMetaData.setQNameScope(TypeMappingMetaData.QNAME_SCOPE_SIMPLE_TYPE);
+ log.debug("Adding a simpleType without jaxrpc-mapping: " +
tmMetaData);
+ addTypeMapping(tmMetaData);
+ }
+ else
+ {
+ log.warn("Cannot obtain javaTypeName for xmlType: " + xmlType);
+ }
+ }
+ }
+
+ return tmMetaData;
+ }
+
+ public TypeMappingMetaData getTypeMappingByJavaType(String javaTypeName)
+ {
+ TypeMappingMetaData tmMetaData = null;
+ for (TypeMappingMetaData aux : typeList)
+ {
+ if (aux.getJavaTypeName().equals(javaTypeName))
+ tmMetaData = aux;
+ }
+ return tmMetaData;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nTypesMetaData: ");
+ for (TypeMappingMetaData tmd : typeList)
+ {
+ buffer.append("\n " + tmd);
+ }
+ buffer.append("\n" + (schemaModel != null ? schemaModel.serialize() :
"<schema/>"));
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/UnifiedMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/UnifiedMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/UnifiedMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,219 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.umdm;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.server.ServiceEndpointManager;
-
-/**
- * The top level meta data.
- *
- * <h4>Thread safety</h4>
- * <p>A <code>UnifiedMetaData</code> instance may be shared accross
threads provided that the following conditions are met:
- * <ol>
- * <li>{@link #eagerInitialize() eagerInitialize()} is called from a single thread
on startup</li>
- * <li>Multi-thread access is limited to read-only calls</li>
- * </ol></p>
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
- * @since 12-May-2005
- */
-public class UnifiedMetaData
-{
- // provide logging
- private static Logger log = Logger.getLogger(UnifiedMetaData.class);
-
- // The canonical deployment name
- private String deploymentName;
- // The modules class loader
- private ClassLoader classLoader;
- // The optional security domain
- private String securityDomain;
- // The implementation version
- private static String implementationVersion;
- // True if this is a final release
- private static boolean isFinalRelease;
- // Map<String, WSDLDefinitions> the wsdl-file to the wsdl Document
- // Note the same wsdl can be used in multiple webservice descriptions
- Map<String, WSDLDefinitions> wsdlMap = new HashMap<String,
WSDLDefinitions>();
- // Maps the jaxrpc-mapping-file to {@link JavaWsdlMapping} object
- // Note the same jaxrpc-mapping.xml can be used in multiple webservice descriptions
- Map<String, JavaWsdlMapping> jaxrpcMap = new HashMap<String,
JavaWsdlMapping>();
- // The list of service meta data
- private List<ServiceMetaData> services = new
ArrayList<ServiceMetaData>();
- // Used by eager initialization
- private boolean eagerInitialized;
- // Used by validate
- private boolean validated;
-
- public UnifiedMetaData()
- {
- this.classLoader = Thread.currentThread().getContextClassLoader();
- }
-
- public ClassLoader getClassLoader()
- {
- if (classLoader == null)
- throw new IllegalStateException ("Class loader not available");
-
- return classLoader;
- }
-
- public void setClassLoader(ClassLoader classLoader)
- {
- this.classLoader = classLoader;
- }
-
- public String getDeploymentName()
- {
- return deploymentName;
- }
-
- public void setDeploymentName(String deploymentName)
- {
- this.deploymentName = deploymentName;
- }
-
- public String getSecurityDomain()
- {
- return securityDomain;
- }
-
- public void setSecurityDomain(String domain)
- {
- String prefix = "java:/jaas/";
- if (domain != null && domain.startsWith(prefix))
- domain = domain.substring(prefix.length());
-
- this.securityDomain = domain;
- }
-
- public List<ServiceMetaData> getServices()
- {
- return new ArrayList<ServiceMetaData>(services);
- }
-
- public void addService(ServiceMetaData serviceMetaData)
- {
- services.add(serviceMetaData);
- }
-
- public void addWSDLDefinition(String wsdlFile, WSDLDefinitions wsdlDefinitions)
- {
- wsdlMap.put(wsdlFile, wsdlDefinitions);
- }
-
- public WSDLDefinitions getWSDLDefinition(String wsdlFile)
- {
- return wsdlMap.get(wsdlFile);
- }
-
- public void addMappingDefinition(String jaxrpcFile, JavaWsdlMapping javaWsdlMapping)
- {
- jaxrpcMap.put(jaxrpcFile, javaWsdlMapping);
- }
-
- public JavaWsdlMapping getMappingDefinition(String jaxrpcFile)
- {
- return jaxrpcMap.get(jaxrpcFile);
- }
-
- public void validate()
- {
- if (validated == false)
- {
- for (ServiceMetaData service : services)
- {
- service.validate();
- }
- validated = true;
- }
- }
-
- public boolean isEagerInitialized()
- {
- return eagerInitialized;
- }
-
- /**
- * Eagerly initialize all cache values that are normally lazy-loaded. This
- * allows for concurrent read-only access to a
<code>UnifiedMetaData</code>
- * instance. This method, however, must be called from a single thread.
- */
- public void eagerInitialize()
- {
- if (eagerInitialized == false)
- {
- log.debug("Eagerly initialize the meta data model");
- for (ServiceMetaData service : services)
- {
- service.eagerInitialize();
- }
- eagerInitialized = true;
- }
- }
-
- public static String getImplementationVersion()
- {
- if (implementationVersion == null)
- {
- implementationVersion =
ServiceEndpointManager.class.getPackage().getImplementationVersion();
- if (implementationVersion != null)
- isFinalRelease = new
StringTokenizer(implementationVersion).nextToken().endsWith(".GA");
- }
- return implementationVersion;
- }
-
- public static boolean isFinalRelease()
- {
- getImplementationVersion();
- return isFinalRelease;
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nUnifiedMetaData: ");
- buffer.append("\n implementation: " + getImplementationVersion());
- buffer.append("\n deploymentName: " + getDeploymentName());
- buffer.append("\n securityDomain: " + getSecurityDomain());
- //buffer.append("\n resourceLoader: " + resourceLoader);
- //buffer.append("\n classLoader: " + classLoader);
- buffer.append("\n");
-
- for (ServiceMetaData serviceMetaData : services)
- {
- buffer.append(serviceMetaData);
- }
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/UnifiedMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/UnifiedMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/UnifiedMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/UnifiedMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,219 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.umdm;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.server.ServiceEndpointManager;
+
+/**
+ * The top level meta data.
+ *
+ * <h4>Thread safety</h4>
+ * <p>A <code>UnifiedMetaData</code> instance may be shared accross
threads provided that the following conditions are met:
+ * <ol>
+ * <li>{@link #eagerInitialize() eagerInitialize()} is called from a single thread
on startup</li>
+ * <li>Multi-thread access is limited to read-only calls</li>
+ * </ol></p>
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 12-May-2005
+ */
+public class UnifiedMetaData
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(UnifiedMetaData.class);
+
+ // The canonical deployment name
+ private String deploymentName;
+ // The modules class loader
+ private ClassLoader classLoader;
+ // The optional security domain
+ private String securityDomain;
+ // The implementation version
+ private static String implementationVersion;
+ // True if this is a final release
+ private static boolean isFinalRelease;
+ // Map<String, WSDLDefinitions> the wsdl-file to the wsdl Document
+ // Note the same wsdl can be used in multiple webservice descriptions
+ Map<String, WSDLDefinitions> wsdlMap = new HashMap<String,
WSDLDefinitions>();
+ // Maps the jaxrpc-mapping-file to {@link JavaWsdlMapping} object
+ // Note the same jaxrpc-mapping.xml can be used in multiple webservice descriptions
+ Map<String, JavaWsdlMapping> jaxrpcMap = new HashMap<String,
JavaWsdlMapping>();
+ // The list of service meta data
+ private List<ServiceMetaData> services = new
ArrayList<ServiceMetaData>();
+ // Used by eager initialization
+ private boolean eagerInitialized;
+ // Used by validate
+ private boolean validated;
+
+ public UnifiedMetaData()
+ {
+ this.classLoader = Thread.currentThread().getContextClassLoader();
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ if (classLoader == null)
+ throw new IllegalStateException ("Class loader not available");
+
+ return classLoader;
+ }
+
+ public void setClassLoader(ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ public String getDeploymentName()
+ {
+ return deploymentName;
+ }
+
+ public void setDeploymentName(String deploymentName)
+ {
+ this.deploymentName = deploymentName;
+ }
+
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+ public void setSecurityDomain(String domain)
+ {
+ String prefix = "java:/jaas/";
+ if (domain != null && domain.startsWith(prefix))
+ domain = domain.substring(prefix.length());
+
+ this.securityDomain = domain;
+ }
+
+ public List<ServiceMetaData> getServices()
+ {
+ return new ArrayList<ServiceMetaData>(services);
+ }
+
+ public void addService(ServiceMetaData serviceMetaData)
+ {
+ services.add(serviceMetaData);
+ }
+
+ public void addWSDLDefinition(String wsdlFile, WSDLDefinitions wsdlDefinitions)
+ {
+ wsdlMap.put(wsdlFile, wsdlDefinitions);
+ }
+
+ public WSDLDefinitions getWSDLDefinition(String wsdlFile)
+ {
+ return wsdlMap.get(wsdlFile);
+ }
+
+ public void addMappingDefinition(String jaxrpcFile, JavaWsdlMapping javaWsdlMapping)
+ {
+ jaxrpcMap.put(jaxrpcFile, javaWsdlMapping);
+ }
+
+ public JavaWsdlMapping getMappingDefinition(String jaxrpcFile)
+ {
+ return jaxrpcMap.get(jaxrpcFile);
+ }
+
+ public void validate()
+ {
+ if (validated == false)
+ {
+ for (ServiceMetaData service : services)
+ {
+ service.validate();
+ }
+ validated = true;
+ }
+ }
+
+ public boolean isEagerInitialized()
+ {
+ return eagerInitialized;
+ }
+
+ /**
+ * Eagerly initialize all cache values that are normally lazy-loaded. This
+ * allows for concurrent read-only access to a
<code>UnifiedMetaData</code>
+ * instance. This method, however, must be called from a single thread.
+ */
+ public void eagerInitialize()
+ {
+ if (eagerInitialized == false)
+ {
+ log.debug("Eagerly initialize the meta data model");
+ for (ServiceMetaData service : services)
+ {
+ service.eagerInitialize();
+ }
+ eagerInitialized = true;
+ }
+ }
+
+ public static String getImplementationVersion()
+ {
+ if (implementationVersion == null)
+ {
+ implementationVersion =
ServiceEndpointManager.class.getPackage().getImplementationVersion();
+ if (implementationVersion != null)
+ isFinalRelease = new
StringTokenizer(implementationVersion).nextToken().endsWith(".GA");
+ }
+ return implementationVersion;
+ }
+
+ public static boolean isFinalRelease()
+ {
+ getImplementationVersion();
+ return isFinalRelease;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nUnifiedMetaData: ");
+ buffer.append("\n implementation: " + getImplementationVersion());
+ buffer.append("\n deploymentName: " + getDeploymentName());
+ buffer.append("\n securityDomain: " + getSecurityDomain());
+ //buffer.append("\n resourceLoader: " + resourceLoader);
+ //buffer.append("\n classLoader: " + classLoader);
+ buffer.append("\n");
+
+ for (ServiceMetaData serviceMetaData : services)
+ {
+ buffer.append(serviceMetaData);
+ }
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/WrappedParameter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/WrappedParameter.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/WrappedParameter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,138 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.umdm;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.common.utils.JavaUtils;
-
-/**
- * WrappedParameter represents a document/literal wrapped parameter.
- *
- * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
- * @version $Revision$
- */
-public class WrappedParameter
-{
- public static final int RETURN = -1;
- private QName name;
- private String type;
- private String[] typeArguments;
- private String variable;
- private boolean holder = false;
- private int index = -2;
- private Accessor accessor;
-
- public static interface AccessorFactory
- {
- public Accessor create(WrappedParameter parameter);
- }
-
- public static interface Accessor
- {
- public void set(Object bean, Object value);
- public Object get(Object bean);
- }
-
- public WrappedParameter(QName name, String type, String variable, int index)
- {
- this.setName(name);
- this.setType(type);
- this.setVariable(variable);
- this.setIndex(index);
- }
-
- public Accessor accessor()
- {
- return accessor;
- }
-
- public void setName(QName name)
- {
- this.name = name;
- }
-
- public QName getName()
- {
- return name;
- }
-
- public void setType(String type)
- {
- this.type = type;
- }
-
- public String getType()
- {
- return type;
- }
-
- public void setTypeArguments(String[] typeArguments)
- {
- this.typeArguments = typeArguments;
- }
-
- public String[] getTypeArguments()
- {
- return typeArguments;
- }
-
- public void setVariable(String variable)
- {
- this.variable = variable;
- }
-
- public String getVariable()
- {
- return variable;
- }
-
- public void setHolder(boolean holder)
- {
- this.holder = holder;
- }
-
- public boolean isHolder()
- {
- return holder;
- }
-
- public void setIndex(int index)
- {
- this.index = index;
- }
-
- public int getIndex()
- {
- return index;
- }
-
- void setAccessor(Accessor accessor)
- {
- this.accessor = accessor;
- }
-
- public String toString()
- {
- return "[name = " + getName() + ", type = " + getType() +
", typeArgs = " + JavaUtils.printArray(getTypeArguments()) + ", variable =
" + getVariable() + ", index = " + getIndex() + "]";
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/WrappedParameter.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/WrappedParameter.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/WrappedParameter.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/umdm/WrappedParameter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.umdm;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.core.utils.JavaUtils;
+
+/**
+ * WrappedParameter represents a document/literal wrapped parameter.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class WrappedParameter
+{
+ public static final int RETURN = -1;
+ private QName name;
+ private String type;
+ private String[] typeArguments;
+ private String variable;
+ private boolean holder = false;
+ private int index = -2;
+ private Accessor accessor;
+
+ public static interface AccessorFactory
+ {
+ public Accessor create(WrappedParameter parameter);
+ }
+
+ public static interface Accessor
+ {
+ public void set(Object bean, Object value);
+ public Object get(Object bean);
+ }
+
+ public WrappedParameter(QName name, String type, String variable, int index)
+ {
+ this.setName(name);
+ this.setType(type);
+ this.setVariable(variable);
+ this.setIndex(index);
+ }
+
+ public Accessor accessor()
+ {
+ return accessor;
+ }
+
+ public void setName(QName name)
+ {
+ this.name = name;
+ }
+
+ public QName getName()
+ {
+ return name;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setTypeArguments(String[] typeArguments)
+ {
+ this.typeArguments = typeArguments;
+ }
+
+ public String[] getTypeArguments()
+ {
+ return typeArguments;
+ }
+
+ public void setVariable(String variable)
+ {
+ this.variable = variable;
+ }
+
+ public String getVariable()
+ {
+ return variable;
+ }
+
+ public void setHolder(boolean holder)
+ {
+ this.holder = holder;
+ }
+
+ public boolean isHolder()
+ {
+ return holder;
+ }
+
+ public void setIndex(int index)
+ {
+ this.index = index;
+ }
+
+ public int getIndex()
+ {
+ return index;
+ }
+
+ void setAccessor(Accessor accessor)
+ {
+ this.accessor = accessor;
+ }
+
+ public String toString()
+ {
+ return "[name = " + getName() + ", type = " + getType() +
", typeArgs = " + JavaUtils.printArray(getTypeArguments()) + ", variable =
" + getVariable() + ", index = " + getIndex() + "]";
+ }
+}
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices (from
rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/PortComponentMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/PortComponentMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/PortComponentMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,194 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-// $Id$
-package org.jboss.ws.common.metadata.webservices;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-
-/**
- * XML Binding and ws4ee meta-data element for
- * <code>webservices/webservice-description/port-component</code>
- * <p/>
- * A port component is the equivalent of an ordinary Axis service (and
- * as such it constitutes the building blocks for jaxrpc services).
- * <p/>
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class PortComponentMetaData
-{
- /**
- * The index of the webservice-description in webservices.xml
- */
- public static final String PARAMETER_WEBSERVICE_ID = "webserviceID";
-
- // provide logging
- private static final Logger log = Logger.getLogger(PortComponentMetaData.class);
-
- // The parent <webservice-description> element
- private WebserviceDescriptionMetaData webserviceDescription;
-
- /** The required <port-component-name> element
- * This name bears no relationship to the WSDL port name.
- * This name must be unique amongst all port component names in a module.
- */
- private String portComponentName;
- // The required <wsdl-port> element
- private QName wsdlPort;
- // The required <service-endpoint-interface> element
- private String serviceEndpointInterface;
- // The required <ejb-link> or <servlet-link> in the
<service-impl-bean> element
- private String ejbLink;
- private String servletLink;
- // The optional <handler> elements
- private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
-
- // The HTTP context root
- private String contextRoot;
-
- /** Construct a new PortComponentMetaData for a given WebserviceDescriptionMetaData
- */
- public PortComponentMetaData(WebserviceDescriptionMetaData webserviceDescription)
- {
- this.webserviceDescription = webserviceDescription;
- }
-
- public WebserviceDescriptionMetaData getWebserviceDescription()
- {
- return webserviceDescription;
- }
-
- public String getPortComponentName()
- {
- return portComponentName;
- }
-
- public void setPortComponentName(String portComponentName)
- {
- this.portComponentName = portComponentName;
- }
-
- public QName getWsdlPort()
- {
- return wsdlPort;
- }
-
- public void setWsdlPort(QName wsdlPort)
- {
- if (wsdlPort.getNamespaceURI().length() == 0)
- log.warn("<wsdl-port> element in webservices.xml not namespace
qualified: " + wsdlPort);
-
- this.wsdlPort = wsdlPort;
- }
-
- public String getEjbLink()
- {
- return ejbLink;
- }
-
- public void setEjbLink(String ejbLink)
- {
- this.ejbLink = ejbLink;
- }
-
- public String getServletLink()
- {
- return servletLink;
- }
-
- public void setServletLink(String servletLink)
- {
- this.servletLink = servletLink;
- }
-
- public String getServiceEndpointInterface()
- {
- return serviceEndpointInterface;
- }
-
- public void setServiceEndpointInterface(String serviceEndpointInterface)
- {
- this.serviceEndpointInterface = serviceEndpointInterface;
- }
-
- public void addHandler(UnifiedHandlerMetaData handler)
- {
- handlers.add(handler);
- }
-
- public UnifiedHandlerMetaData[] getHandlers()
- {
- UnifiedHandlerMetaData[] array = new UnifiedHandlerMetaData[handlers.size()];
- handlers.toArray(array);
- return array;
- }
-
- public String getContextRoot()
- {
- return contextRoot;
- }
-
- public void setContextRoot(String contextRoot)
- {
- this.contextRoot = contextRoot;
- }
-
- /**
- * Serialize as a String
- *
- * @return
- */
- public String serialize()
- {
- StringBuilder builder = new StringBuilder("<port-component>
<port-component-name>");
- builder.append(portComponentName +
"</port-component-name><wsdl-port>impl:");
- builder.append(wsdlPort.getLocalPart() +
"</wsdl-port><service-endpoint-interface>");
- builder.append(serviceEndpointInterface);
- builder.append("</service-endpoint-interface>");
- builder.append("<service-impl-bean>");
- if (ejbLink != null)
- {
- builder.append("<ejb-link>");
- builder.append(ejbLink);
- builder.append("</ejb-link>");
-
- }
- else
- {
- builder.append("<servlet-link>");
- builder.append(servletLink);
- builder.append("</servlet-link>");
- }
- builder.append("</service-impl-bean>");
- builder.append("</port-component>");
- return builder.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/PortComponentMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/PortComponentMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/PortComponentMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/PortComponentMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.core.metadata.webservices;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+
+/**
+ * XML Binding and ws4ee meta-data element for
+ * <code>webservices/webservice-description/port-component</code>
+ * <p/>
+ * A port component is the equivalent of an ordinary Axis service (and
+ * as such it constitutes the building blocks for jaxrpc services).
+ * <p/>
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class PortComponentMetaData
+{
+ /**
+ * The index of the webservice-description in webservices.xml
+ */
+ public static final String PARAMETER_WEBSERVICE_ID = "webserviceID";
+
+ // provide logging
+ private static final Logger log = Logger.getLogger(PortComponentMetaData.class);
+
+ // The parent <webservice-description> element
+ private WebserviceDescriptionMetaData webserviceDescription;
+
+ /** The required <port-component-name> element
+ * This name bears no relationship to the WSDL port name.
+ * This name must be unique amongst all port component names in a module.
+ */
+ private String portComponentName;
+ // The required <wsdl-port> element
+ private QName wsdlPort;
+ // The required <service-endpoint-interface> element
+ private String serviceEndpointInterface;
+ // The required <ejb-link> or <servlet-link> in the
<service-impl-bean> element
+ private String ejbLink;
+ private String servletLink;
+ // The optional <handler> elements
+ private List<UnifiedHandlerMetaData> handlers = new
ArrayList<UnifiedHandlerMetaData>();
+
+ // The HTTP context root
+ private String contextRoot;
+
+ /** Construct a new PortComponentMetaData for a given WebserviceDescriptionMetaData
+ */
+ public PortComponentMetaData(WebserviceDescriptionMetaData webserviceDescription)
+ {
+ this.webserviceDescription = webserviceDescription;
+ }
+
+ public WebserviceDescriptionMetaData getWebserviceDescription()
+ {
+ return webserviceDescription;
+ }
+
+ public String getPortComponentName()
+ {
+ return portComponentName;
+ }
+
+ public void setPortComponentName(String portComponentName)
+ {
+ this.portComponentName = portComponentName;
+ }
+
+ public QName getWsdlPort()
+ {
+ return wsdlPort;
+ }
+
+ public void setWsdlPort(QName wsdlPort)
+ {
+ if (wsdlPort.getNamespaceURI().length() == 0)
+ log.warn("<wsdl-port> element in webservices.xml not namespace
qualified: " + wsdlPort);
+
+ this.wsdlPort = wsdlPort;
+ }
+
+ public String getEjbLink()
+ {
+ return ejbLink;
+ }
+
+ public void setEjbLink(String ejbLink)
+ {
+ this.ejbLink = ejbLink;
+ }
+
+ public String getServletLink()
+ {
+ return servletLink;
+ }
+
+ public void setServletLink(String servletLink)
+ {
+ this.servletLink = servletLink;
+ }
+
+ public String getServiceEndpointInterface()
+ {
+ return serviceEndpointInterface;
+ }
+
+ public void setServiceEndpointInterface(String serviceEndpointInterface)
+ {
+ this.serviceEndpointInterface = serviceEndpointInterface;
+ }
+
+ public void addHandler(UnifiedHandlerMetaData handler)
+ {
+ handlers.add(handler);
+ }
+
+ public UnifiedHandlerMetaData[] getHandlers()
+ {
+ UnifiedHandlerMetaData[] array = new UnifiedHandlerMetaData[handlers.size()];
+ handlers.toArray(array);
+ return array;
+ }
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot)
+ {
+ this.contextRoot = contextRoot;
+ }
+
+ /**
+ * Serialize as a String
+ *
+ * @return
+ */
+ public String serialize()
+ {
+ StringBuilder builder = new StringBuilder("<port-component>
<port-component-name>");
+ builder.append(portComponentName +
"</port-component-name><wsdl-port>impl:");
+ builder.append(wsdlPort.getLocalPart() +
"</wsdl-port><service-endpoint-interface>");
+ builder.append(serviceEndpointInterface);
+ builder.append("</service-endpoint-interface>");
+ builder.append("<service-impl-bean>");
+ if (ejbLink != null)
+ {
+ builder.append("<ejb-link>");
+ builder.append(ejbLink);
+ builder.append("</ejb-link>");
+
+ }
+ else
+ {
+ builder.append("<servlet-link>");
+ builder.append(servletLink);
+ builder.append("</servlet-link>");
+ }
+ builder.append("</service-impl-bean>");
+ builder.append("</port-component>");
+ return builder.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebserviceDescriptionMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebserviceDescriptionMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebserviceDescriptionMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,176 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.webservices;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-
-/**
- * XML Binding element for <code>webservices/webservice-description</code>
- *
- * @author Thomas.Diesler(a)jboss.org
- * @version $Revision$
- * @since 15-April-2004
- */
-public class WebserviceDescriptionMetaData
-{
- // provide logging
- private static final Logger log =
Logger.getLogger(WebserviceDescriptionMetaData.class);
-
- // The parent <webservices> element
- private WebservicesMetaData webservices;
-
- // The required <webservice-description-name> element
- private String webserviceDescriptionName;
- // The required <wsdl-file> element
- private String wsdlFile;
- // The required <jaxrpc-mapping-file> element
- private String jaxrpcMappingFile;
- // The required <port-component> elements
- private ArrayList<PortComponentMetaData> portComponents = new
ArrayList<PortComponentMetaData>();
-
- public WebserviceDescriptionMetaData(WebservicesMetaData webservices)
- {
- this.webservices = webservices;
- }
-
- public WebservicesMetaData getWebservices()
- {
- return webservices;
- }
-
- public void addPortComponent(PortComponentMetaData portComponent)
- {
- portComponents.add(portComponent);
- }
-
- public PortComponentMetaData[] getPortComponents()
- {
- PortComponentMetaData[] array = new PortComponentMetaData[portComponents.size()];
- portComponents.toArray(array);
- return array;
- }
-
- /**
- * Get the QNames of the port components to be declared
- * in the namespaces
- *
- * @return
- */
- public Collection getPortComponentQNames()
- {
- //TODO:Check if there is just one QName that drives all portcomponents
- //or each port component can have a distinct QName (namespace/prefix)
- //Maintain uniqueness of the QName
- Map map = new HashMap();
- Iterator iter = portComponents.iterator();
- while (iter != null && iter.hasNext())
- {
- PortComponentMetaData pcm = (PortComponentMetaData)iter.next();
- QName qname = pcm.getWsdlPort();
- map.put(qname.getPrefix(), qname);
- }
- return map.values();
- }
-
- /**
- * Lookup a PortComponentMetaData by wsdl-port local part
- *
- * @param name - the wsdl-port local part
- * @return PortComponentMetaData if found, null otherwise
- */
- public PortComponentMetaData getPortComponentByWsdlPort(String name)
- {
- ArrayList pcNames = new ArrayList();
- Iterator it = portComponents.iterator();
- while (it.hasNext())
- {
- PortComponentMetaData pc = (PortComponentMetaData)it.next();
- String wsdlPortName = pc.getWsdlPort().getLocalPart();
- if (wsdlPortName.equals(name))
- {
- return pc;
- }
- pcNames.add(wsdlPortName);
- }
-
- log.error("Cannot get port component name '" + name + "', we
have: " + pcNames);
- return null;
- }
-
- public String getWebserviceDescriptionName()
- {
- return webserviceDescriptionName;
- }
-
- public void setWebserviceDescriptionName(String webserviceDescriptionName)
- {
- this.webserviceDescriptionName = webserviceDescriptionName;
- }
-
- public String getWsdlFile()
- {
- return wsdlFile;
- }
-
- public void setWsdlFile(String wsdlFile)
- {
- this.wsdlFile = wsdlFile;
- }
-
- public String getJaxrpcMappingFile()
- {
- return jaxrpcMappingFile;
- }
-
- public void setJaxrpcMappingFile(String jaxrpcMappingFile)
- {
- this.jaxrpcMappingFile = jaxrpcMappingFile;
- }
-
- /**
- * Serialize as a String
- *
- * @return
- */
- public String serialize()
- {
- StringBuilder buffer = new StringBuilder("<webservice-description>
<webservice-description-name>");
- buffer.append(this.webserviceDescriptionName);
- buffer.append("</webservice-description-name>");
- buffer.append("<wsdl-file>" + wsdlFile +
"</wsdl-file>");
- buffer.append("<jaxrpc-mapping-file>" + jaxrpcMappingFile +
"</jaxrpc-mapping-file>");
- for (PortComponentMetaData pm : portComponents)
- buffer.append(pm.serialize());
- buffer.append("</webservice-description>");
- return buffer.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebserviceDescriptionMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebserviceDescriptionMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebserviceDescriptionMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebserviceDescriptionMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,176 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.webservices;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+
+/**
+ * XML Binding element for <code>webservices/webservice-description</code>
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @version $Revision$
+ * @since 15-April-2004
+ */
+public class WebserviceDescriptionMetaData
+{
+ // provide logging
+ private static final Logger log =
Logger.getLogger(WebserviceDescriptionMetaData.class);
+
+ // The parent <webservices> element
+ private WebservicesMetaData webservices;
+
+ // The required <webservice-description-name> element
+ private String webserviceDescriptionName;
+ // The required <wsdl-file> element
+ private String wsdlFile;
+ // The required <jaxrpc-mapping-file> element
+ private String jaxrpcMappingFile;
+ // The required <port-component> elements
+ private ArrayList<PortComponentMetaData> portComponents = new
ArrayList<PortComponentMetaData>();
+
+ public WebserviceDescriptionMetaData(WebservicesMetaData webservices)
+ {
+ this.webservices = webservices;
+ }
+
+ public WebservicesMetaData getWebservices()
+ {
+ return webservices;
+ }
+
+ public void addPortComponent(PortComponentMetaData portComponent)
+ {
+ portComponents.add(portComponent);
+ }
+
+ public PortComponentMetaData[] getPortComponents()
+ {
+ PortComponentMetaData[] array = new PortComponentMetaData[portComponents.size()];
+ portComponents.toArray(array);
+ return array;
+ }
+
+ /**
+ * Get the QNames of the port components to be declared
+ * in the namespaces
+ *
+ * @return
+ */
+ public Collection getPortComponentQNames()
+ {
+ //TODO:Check if there is just one QName that drives all portcomponents
+ //or each port component can have a distinct QName (namespace/prefix)
+ //Maintain uniqueness of the QName
+ Map map = new HashMap();
+ Iterator iter = portComponents.iterator();
+ while (iter != null && iter.hasNext())
+ {
+ PortComponentMetaData pcm = (PortComponentMetaData)iter.next();
+ QName qname = pcm.getWsdlPort();
+ map.put(qname.getPrefix(), qname);
+ }
+ return map.values();
+ }
+
+ /**
+ * Lookup a PortComponentMetaData by wsdl-port local part
+ *
+ * @param name - the wsdl-port local part
+ * @return PortComponentMetaData if found, null otherwise
+ */
+ public PortComponentMetaData getPortComponentByWsdlPort(String name)
+ {
+ ArrayList pcNames = new ArrayList();
+ Iterator it = portComponents.iterator();
+ while (it.hasNext())
+ {
+ PortComponentMetaData pc = (PortComponentMetaData)it.next();
+ String wsdlPortName = pc.getWsdlPort().getLocalPart();
+ if (wsdlPortName.equals(name))
+ {
+ return pc;
+ }
+ pcNames.add(wsdlPortName);
+ }
+
+ log.error("Cannot get port component name '" + name + "', we
have: " + pcNames);
+ return null;
+ }
+
+ public String getWebserviceDescriptionName()
+ {
+ return webserviceDescriptionName;
+ }
+
+ public void setWebserviceDescriptionName(String webserviceDescriptionName)
+ {
+ this.webserviceDescriptionName = webserviceDescriptionName;
+ }
+
+ public String getWsdlFile()
+ {
+ return wsdlFile;
+ }
+
+ public void setWsdlFile(String wsdlFile)
+ {
+ this.wsdlFile = wsdlFile;
+ }
+
+ public String getJaxrpcMappingFile()
+ {
+ return jaxrpcMappingFile;
+ }
+
+ public void setJaxrpcMappingFile(String jaxrpcMappingFile)
+ {
+ this.jaxrpcMappingFile = jaxrpcMappingFile;
+ }
+
+ /**
+ * Serialize as a String
+ *
+ * @return
+ */
+ public String serialize()
+ {
+ StringBuilder buffer = new StringBuilder("<webservice-description>
<webservice-description-name>");
+ buffer.append(this.webserviceDescriptionName);
+ buffer.append("</webservice-description-name>");
+ buffer.append("<wsdl-file>" + wsdlFile +
"</wsdl-file>");
+ buffer.append("<jaxrpc-mapping-file>" + jaxrpcMappingFile +
"</jaxrpc-mapping-file>");
+ for (PortComponentMetaData pm : portComponents)
+ buffer.append(pm.serialize());
+ buffer.append("</webservice-description>");
+ return buffer.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesFactory.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,213 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.webservices;
-
-// $Id$
-
-import java.net.URL;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerInitParam;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * A JBossXB factory for {@link WebservicesMetaData}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 16-Apr-2004
- */
-public class WebservicesFactory implements ObjectModelFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WebservicesFactory.class);
-
- // The URL to the webservices.xml descriptor
- private URL descriptorURL;
-
- public WebservicesFactory(URL descriptorURL)
- {
- this.descriptorURL = descriptorURL;
- }
-
- /**
- * This method is called on the factory by the object model builder when the parsing
starts.
- *
- * @return the root of the object model.
- */
- public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- WebservicesMetaData webservicesMetaData = new WebservicesMetaData(descriptorURL);
- return webservicesMetaData;
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
- {
- return root;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WebservicesMetaData webservices, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- if ("webservice-description".equals(localName))
- return new WebserviceDescriptionMetaData(webservices);
- else return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(WebservicesMetaData webservices, WebserviceDescriptionMetaData
webserviceDescription, UnmarshallingContext navigator, String namespaceURI,
- String localName)
- {
- webservices.addWebserviceDescription(webserviceDescription);
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(WebserviceDescriptionMetaData webserviceDescription,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
- {
- if ("port-component".equals(localName))
- return new PortComponentMetaData(webserviceDescription);
- else return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(WebserviceDescriptionMetaData webserviceDescription,
PortComponentMetaData portComponent, UnmarshallingContext navigator, String namespaceURI,
- String localName)
- {
- webserviceDescription.addPortComponent(portComponent);
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(PortComponentMetaData portComponent, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- if ("handler".equals(localName))
- return new UnifiedHandlerMetaData(null);
- else return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(PortComponentMetaData portComponent, UnifiedHandlerMetaData
handler, UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- portComponent.addHandler(handler);
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- if ("init-param".equals(localName))
- return new HandlerInitParam();
- else return null;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(UnifiedHandlerMetaData handler, HandlerInitParam param,
UnmarshallingContext navigator, String namespaceURI, String localName)
- {
- handler.addInitParam(param);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(WebserviceDescriptionMetaData webserviceDescription,
UnmarshallingContext navigator, String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("WebserviceDescriptionMetaData setValue: nuri=" +
namespaceURI + " localName=" + localName + " value=" + value);
-
- if (localName.equals("webservice-description-name"))
- webserviceDescription.setWebserviceDescriptionName(value);
- else if (localName.equals("wsdl-file"))
- webserviceDescription.setWsdlFile(value);
- else if (localName.equals("jaxrpc-mapping-file"))
- webserviceDescription.setJaxrpcMappingFile(value);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(PortComponentMetaData portComponent, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("PortComponentMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("port-component-name"))
- portComponent.setPortComponentName(value);
- else if (localName.equals("wsdl-port"))
- portComponent.setWsdlPort(navigator.resolveQName(value));
- else if (localName.equals("service-endpoint-interface"))
- portComponent.setServiceEndpointInterface(value);
- else if (localName.equals("ejb-link"))
- portComponent.setEjbLink(value);
- else if (localName.equals("servlet-link"))
- portComponent.setServletLink(value);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("UnifiedHandlerMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("handler-name"))
- handler.setHandlerName(value);
- else if (localName.equals("handler-class"))
- handler.setHandlerClass(value);
- else if (localName.equals("soap-header"))
- handler.addSoapHeader(navigator.resolveQName(value));
- else if (localName.equals("soap-role"))
- handler.addSoapRole(value);
- else if (localName.equals("port-name"))
- handler.addPortName(value);
- }
-
- /**
- * Called when a new simple child element with text value was read from the XML
content.
- */
- public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
- {
- if (log.isTraceEnabled())
- log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
-
- if (localName.equals("param-name"))
- param.setParamName(value);
- else if (localName.equals("param-value"))
- param.setParamValue(value);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesFactory.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,213 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.webservices;
+
+// $Id$
+
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * A JBossXB factory for {@link WebservicesMetaData}
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-Apr-2004
+ */
+public class WebservicesFactory implements ObjectModelFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WebservicesFactory.class);
+
+ // The URL to the webservices.xml descriptor
+ private URL descriptorURL;
+
+ public WebservicesFactory(URL descriptorURL)
+ {
+ this.descriptorURL = descriptorURL;
+ }
+
+ /**
+ * This method is called on the factory by the object model builder when the parsing
starts.
+ *
+ * @return the root of the object model.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ WebservicesMetaData webservicesMetaData = new WebservicesMetaData(descriptorURL);
+ return webservicesMetaData;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WebservicesMetaData webservices, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("webservice-description".equals(localName))
+ return new WebserviceDescriptionMetaData(webservices);
+ else return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(WebservicesMetaData webservices, WebserviceDescriptionMetaData
webserviceDescription, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
+ {
+ webservices.addWebserviceDescription(webserviceDescription);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(WebserviceDescriptionMetaData webserviceDescription,
UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("port-component".equals(localName))
+ return new PortComponentMetaData(webserviceDescription);
+ else return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(WebserviceDescriptionMetaData webserviceDescription,
PortComponentMetaData portComponent, UnmarshallingContext navigator, String namespaceURI,
+ String localName)
+ {
+ webserviceDescription.addPortComponent(portComponent);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(PortComponentMetaData portComponent, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("handler".equals(localName))
+ return new UnifiedHandlerMetaData(null);
+ else return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(PortComponentMetaData portComponent, UnifiedHandlerMetaData
handler, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ portComponent.addHandler(handler);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("init-param".equals(localName))
+ return new HandlerInitParam();
+ else return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(UnifiedHandlerMetaData handler, HandlerInitParam param,
UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ handler.addInitParam(param);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(WebserviceDescriptionMetaData webserviceDescription,
UnmarshallingContext navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("WebserviceDescriptionMetaData setValue: nuri=" +
namespaceURI + " localName=" + localName + " value=" + value);
+
+ if (localName.equals("webservice-description-name"))
+ webserviceDescription.setWebserviceDescriptionName(value);
+ else if (localName.equals("wsdl-file"))
+ webserviceDescription.setWsdlFile(value);
+ else if (localName.equals("jaxrpc-mapping-file"))
+ webserviceDescription.setJaxrpcMappingFile(value);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(PortComponentMetaData portComponent, UnmarshallingContext
navigator, String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("PortComponentMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("port-component-name"))
+ portComponent.setPortComponentName(value);
+ else if (localName.equals("wsdl-port"))
+ portComponent.setWsdlPort(navigator.resolveQName(value));
+ else if (localName.equals("service-endpoint-interface"))
+ portComponent.setServiceEndpointInterface(value);
+ else if (localName.equals("ejb-link"))
+ portComponent.setEjbLink(value);
+ else if (localName.equals("servlet-link"))
+ portComponent.setServletLink(value);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(UnifiedHandlerMetaData handler, UnmarshallingContext navigator,
String namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedHandlerMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("handler-name"))
+ handler.setHandlerName(value);
+ else if (localName.equals("handler-class"))
+ handler.setHandlerClass(value);
+ else if (localName.equals("soap-header"))
+ handler.addSoapHeader(navigator.resolveQName(value));
+ else if (localName.equals("soap-role"))
+ handler.addSoapRole(value);
+ else if (localName.equals("port-name"))
+ handler.addPortName(value);
+ }
+
+ /**
+ * Called when a new simple child element with text value was read from the XML
content.
+ */
+ public void setValue(HandlerInitParam param, UnmarshallingContext navigator, String
namespaceURI, String localName, String value)
+ {
+ if (log.isTraceEnabled())
+ log.trace("UnifiedInitParamMetaData setValue: nuri=" + namespaceURI +
" localName=" + localName + " value=" + value);
+
+ if (localName.equals("param-name"))
+ param.setParamName(value);
+ else if (localName.equals("param-value"))
+ param.setParamValue(value);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesMetaData.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,109 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-// $Id$
-package org.jboss.ws.common.metadata.webservices;
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.common.Constants;
-
-// $Id$
-
-/**
- * XML Binding root element for <code>webservices.xml</code>
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class WebservicesMetaData
-{
- // The required <webservice-description> elements
- private ArrayList<WebserviceDescriptionMetaData> webserviceDescriptions = new
ArrayList<WebserviceDescriptionMetaData>();
-
- // The URL to the webservices.xml descriptor
- private URL descriptorURL;
-
- public WebservicesMetaData()
- {
- }
-
- public WebservicesMetaData(URL descriptorURL)
- {
- this.descriptorURL = descriptorURL;
- }
-
- public URL getDescriptorURL()
- {
- return descriptorURL;
- }
-
- public void addWebserviceDescription(WebserviceDescriptionMetaData
webserviceDescription)
- {
- webserviceDescriptions.add(webserviceDescription);
- }
-
- public WebserviceDescriptionMetaData[] getWebserviceDescriptions()
- {
- WebserviceDescriptionMetaData[] array = new
WebserviceDescriptionMetaData[webserviceDescriptions.size()];
- webserviceDescriptions.toArray(array);
- return array;
- }
-
- //Serialize as a String
- public String serialize()
- {
- StringBuilder buffer = new StringBuilder();
- //Construct the webservices.xml definitions
- List qnames = new ArrayList();
- Iterator iter = webserviceDescriptions.iterator();
- while (iter != null && iter.hasNext())
- {
- WebserviceDescriptionMetaData wmd = (WebserviceDescriptionMetaData)iter.next();
- qnames.addAll(wmd.getPortComponentQNames());
- }
- createHeader(buffer, qnames);
- for (WebserviceDescriptionMetaData wm : webserviceDescriptions)
- buffer.append(wm.serialize());
- buffer.append("</webservices>");
- return buffer.toString();
- }
-
- private void createHeader(StringBuilder buf, List qnames)
- {
- buf.append("<webservices
xmlns='http://java.sun.com/xml/ns/j2ee'");
- buf.append(" xmlns:xsi='" + Constants.NS_SCHEMA_XSI +
"'");
- //Lets append the port type namespaces
- Iterator iter = qnames.iterator();
- while (iter != null && iter.hasNext())
- {
- QName qn = (QName)iter.next();
- buf.append("
xmlns:").append(qn.getPrefix()).append("='").append(qn.getNamespaceURI()).append("'");
- }
- buf.append("
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'");
- buf.append(" version='1.1' >");
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesMetaData.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesMetaData.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/webservices/WebservicesMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+// $Id$
+package org.jboss.ws.core.metadata.webservices;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.Constants;
+
+// $Id$
+
+/**
+ * XML Binding root element for <code>webservices.xml</code>
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class WebservicesMetaData
+{
+ // The required <webservice-description> elements
+ private ArrayList<WebserviceDescriptionMetaData> webserviceDescriptions = new
ArrayList<WebserviceDescriptionMetaData>();
+
+ // The URL to the webservices.xml descriptor
+ private URL descriptorURL;
+
+ public WebservicesMetaData()
+ {
+ }
+
+ public WebservicesMetaData(URL descriptorURL)
+ {
+ this.descriptorURL = descriptorURL;
+ }
+
+ public URL getDescriptorURL()
+ {
+ return descriptorURL;
+ }
+
+ public void addWebserviceDescription(WebserviceDescriptionMetaData
webserviceDescription)
+ {
+ webserviceDescriptions.add(webserviceDescription);
+ }
+
+ public WebserviceDescriptionMetaData[] getWebserviceDescriptions()
+ {
+ WebserviceDescriptionMetaData[] array = new
WebserviceDescriptionMetaData[webserviceDescriptions.size()];
+ webserviceDescriptions.toArray(array);
+ return array;
+ }
+
+ //Serialize as a String
+ public String serialize()
+ {
+ StringBuilder buffer = new StringBuilder();
+ //Construct the webservices.xml definitions
+ List qnames = new ArrayList();
+ Iterator iter = webserviceDescriptions.iterator();
+ while (iter != null && iter.hasNext())
+ {
+ WebserviceDescriptionMetaData wmd = (WebserviceDescriptionMetaData)iter.next();
+ qnames.addAll(wmd.getPortComponentQNames());
+ }
+ createHeader(buffer, qnames);
+ for (WebserviceDescriptionMetaData wm : webserviceDescriptions)
+ buffer.append(wm.serialize());
+ buffer.append("</webservices>");
+ return buffer.toString();
+ }
+
+ private void createHeader(StringBuilder buf, List qnames)
+ {
+ buf.append("<webservices
xmlns='http://java.sun.com/xml/ns/j2ee'");
+ buf.append(" xmlns:xsi='" + Constants.NS_SCHEMA_XSI +
"'");
+ //Lets append the port type namespaces
+ Iterator iter = qnames.iterator();
+ while (iter != null && iter.hasNext())
+ {
+ QName qn = (QName)iter.next();
+ buf.append("
xmlns:").append(qn.getPrefix()).append("='").append(qn.getNamespaceURI()).append("'");
+ }
+ buf.append("
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'");
+ buf.append(" version='1.1' >");
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/DOMTypes.java (from
rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/DOMTypes.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/DOMTypes.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/DOMTypes.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.util.NotImplementedException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * A DOM Element based schema representation. Care should be taken to ensure
+ * thread safety.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class DOMTypes extends WSDLTypes
+{
+ /*
+ * Perhaps we should consider moving this to JDOM, or some other DOM
+ * framework that supports concurrent readers. For now callers must
+ * synchronize properly.
+ *
+ * Also could use a cached StAX pool.
+ */
+ private Element element;
+
+ public DOMTypes(Document doc)
+ {
+ this.element = doc.createElementNS(null, "types");
+ }
+
+ public Element getElement()
+ {
+ return element;
+ }
+
+ public QName getXMLType(QName name)
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/Extendable.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/Extendable.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/Extendable.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/Extendable.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,86 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+
+/**
+ * An abstract base class of a WSDL extendable element.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public abstract class Extendable implements Serializable
+{
+ // provide logging
+ private Logger log = Logger.getLogger(getClass());
+
+ private Map features = new LinkedHashMap();
+ private Map properties = new LinkedHashMap();
+
+ public WSDLFeature[] getFeatures()
+ {
+ WSDLFeature[] arr = new WSDLFeature[features.size()];
+ new ArrayList(features.values()).toArray(arr);
+ return arr;
+ }
+
+ public void addFeature(WSDLFeature feature)
+ {
+ log.trace("addFeature: " + feature);
+ String uri = feature.getURI();
+ features.put(uri, feature);
+ }
+
+ public WSDLFeature getFeature(String uri)
+ {
+ WSDLFeature feature = (WSDLFeature)features.get(uri);
+ return feature;
+ }
+
+ public WSDLProperty[] getProperties()
+ {
+ WSDLProperty[] arr = new WSDLProperty[properties.size()];
+ new ArrayList(properties.values()).toArray(arr);
+ return arr;
+ }
+
+ public void addProperty(WSDLProperty property)
+ {
+ log.trace("addProperty: " + property);
+ String uri = property.getURI();
+ properties.put(uri, property);
+ }
+
+ public WSDLProperty getProperty(String uri)
+ {
+ WSDLProperty property = (WSDLProperty)properties.get(uri);
+ return property;
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/NCName.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/NCName.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/NCName.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/NCName.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+// $Id$
+
+
+/**
+ * The value space of the wsdls:NCName type is the subset of the value space of the
wsdls:Token type
+ * consisting of tokens that do not contain the space (#x20) and ':' characters.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class NCName implements Serializable
+{
+ private static final long serialVersionUID = -4997456323552864649L;
+
+ private String name;
+
+ public NCName(QName qname)
+ {
+ this(qname != null ? qname.getLocalPart() : null);
+ }
+
+ public NCName(String name)
+ {
+ if (name == null || name.indexOf(':') >= 0 || name.indexOf(' ')
>= 0)
+ throw new IllegalArgumentException("Illegal NCName: " + name);
+
+ this.name = name;
+ }
+
+ public boolean equals(Object obj)
+ {
+ if (obj instanceof NCName)
+ return name.equals(((NCName)obj).name);
+ if (obj instanceof String)
+ return name.equals(((String)obj));
+
+ return false;
+ }
+
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+
+ public String toString()
+ {
+ return name;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBinding.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBinding.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBinding.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBinding.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,185 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+
+/**
+ * A Binding component describes a concrete message format and transmission protocol
which may be used
+ * to define an endpoint (see 2.14 Endpoint [p.62] ). That is, a Binding component
defines the
+ * implementation details necessary to accessing the service.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLBinding implements Serializable
+{
+ private static final long serialVersionUID = -7699953670233209811L;
+
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDLBinding.class);
+
+ // The parent WSDL definitions element.
+ private WSDLDefinitions wsdlDefinitions;
+
+ /** The REQUIRED name attribute information item together with the targetNamespace
attribute information item
+ * of the definitions element information item forms the QName of the binding.*/
+ private NCName name;
+
+ /** Derived QName identifier.
+ */
+ private QName qname;
+
+ /** The OPTIONAL interface attribute information item refers, by QName, to an
Interface component. */
+ private QName interfaceName;
+
+ /** The REQUIRED type attribute information item identifies the kind of binding
details contained in the Binding
+ * component. See wsdl20-bindings for valid values. */
+ private String type;
+
+ /** The set of Binding Fault components corresponding to the fault element
+ * information items in [children], if any.*/
+ private ArrayList<WSDLBindingFault> faults = new
ArrayList<WSDLBindingFault>();
+
+ /** The set of Binding Operation components corresponding to the operation element
+ * information items in [children], if any.*/
+ private ArrayList<WSDLBindingOperation> operations = new
ArrayList<WSDLBindingOperation>();
+
+ public WSDLBinding(WSDLDefinitions wsdlDefinitions)
+ {
+ log.trace("new WSDLBinding");
+ this.wsdlDefinitions = wsdlDefinitions;
+ }
+
+ public WSDLDefinitions getWsdlDefinitions()
+ {
+ return wsdlDefinitions;
+ }
+
+ public NCName getName()
+ {
+ return name;
+ }
+
+ public void setName(NCName name)
+ {
+ log.trace("setName: " + name);
+ this.name = name;
+ }
+
+ public QName getQName()
+ {
+ if (qname == null)
+ {
+ String tnsURI = wsdlDefinitions.getTargetNamespace();
+ qname = new QName(tnsURI, name.toString());
+ }
+ return qname;
+ }
+
+
+ public void setQName(QName qname)
+ {
+ log.trace("setQName: " + qname);
+ this.qname = qname;
+ }
+
+ public QName getInterfaceName()
+ {
+ return interfaceName;
+ }
+
+ public void setInterfaceName(QName interfaceName)
+ {
+ log.trace("setInterfaceName: " + name);
+ this.interfaceName = interfaceName;
+ }
+
+ public WSDLInterface getInterface()
+ {
+ WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(new
NCName(interfaceName.getLocalPart()));
+ if (wsdlInterface == null)
+ throw new WSException("Cannot get interface for name: " +
interfaceName);
+ return wsdlInterface;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public WSDLBindingFault[] getFaults()
+ {
+ WSDLBindingFault[] arr = new WSDLBindingFault[faults.size()];
+ faults.toArray(arr);
+ return arr;
+ }
+
+ public void addFault(WSDLBindingFault fault)
+ {
+ faults.add(fault);
+ }
+
+ public WSDLBindingOperation[] getOperations()
+ {
+ WSDLBindingOperation[] arr = new WSDLBindingOperation[operations.size()];
+ operations.toArray(arr);
+ return arr;
+ }
+
+ public WSDLBindingOperation getOperationByRef(QName qname)
+ {
+ WSDLBindingOperation wsdlBindingOperation = null;
+ for (WSDLBindingOperation aux : operations)
+ {
+ if (aux.getRef().equals(qname))
+ {
+ if (wsdlBindingOperation != null)
+ log.warn("Multiple binding operations reference: " + qname);
+ wsdlBindingOperation = aux;
+ }
+ }
+
+ if (wsdlBindingOperation == null)
+ log.warn("Cannot obtain binding operation for ref: " + qname);
+
+ return wsdlBindingOperation;
+ }
+
+ public void addOperation(WSDLBindingOperation operation)
+ {
+ operations.add(operation);
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingFault.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingFault.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingFault.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingFault.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * A Binding Fault component describes a concrete binding of a particular fault within an
interface to a
+ * particular concrete message format. A particular fault of an interface is uniquely
identified by the target
+ * namespace of the interface and the name of the fault within that interface.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLBindingFault implements Serializable
+{
+ private static final long serialVersionUID = 6306975072558524200L;
+
+ // The parent WSDL binding
+ private WSDLBinding wsdlBinding;
+
+ /** An REQUIRED Interface Fault component in the {faults} property of the Interface
+ * component identified by the {interface} property of the parent Binding component.
This is the
+ * Interface Fault component for which binding information is being specified.*/
+ private QName ref;
+
+ public WSDLBindingFault(WSDLBinding wsdlBinding)
+ {
+ this.wsdlBinding = wsdlBinding;
+ }
+
+ public WSDLBinding getWsdlBinding()
+ {
+ return wsdlBinding;
+ }
+
+ public QName getRef()
+ {
+ return ref;
+ }
+
+ public void setRef(QName ref)
+ {
+ this.ref = ref;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingMessageReference.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingMessageReference.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingMessageReference.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingMessageReference.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * A Binding Message Reference component describes a concrete binding of a
+ * particular message participating in an operation to a particular concrete
+ * message format.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public abstract class WSDLBindingMessageReference
+{
+ // The parent WSDL binding operation
+ private WSDLBindingOperation wsdlBindingOperation;
+ private NCName messageLabel;
+ private List<WSDLSOAPHeader> soapHeaders = new
ArrayList<WSDLSOAPHeader>();
+ private List<WSDLMIMEPart> mimeParts = new ArrayList<WSDLMIMEPart>();
+
+ public WSDLBindingMessageReference(WSDLBindingOperation wsdlBindingOperation)
+ {
+ this.wsdlBindingOperation = wsdlBindingOperation;
+ }
+
+ public WSDLBindingOperation getWsdlBindingOperation()
+ {
+ return wsdlBindingOperation;
+ }
+
+ /**
+ * Gets the property that identifies the role that the message for which
+ * binding details are being specified. The role is part of the {message
+ * exchange pattern} of the Interface Operation component being bound by the
+ * containing Binding Operation component.
+ */
+ public NCName getMessageLabel()
+ {
+ return messageLabel;
+ }
+
+ /**
+ * Sets the property that identifies the role that the message for which
+ * binding details are being specified. The role is part of the {message
+ * exchange pattern} of the Interface Operation component being bound by the
+ * containing Binding Operation component.
+ */
+ public void setMessageLabel(NCName messageLabel)
+ {
+ this.messageLabel = messageLabel;
+ }
+
+ /**
+ * Gets the list of SOAP headers associated with this message reference.
+ *
+ * @return a list of soap headers
+ */
+ public List<WSDLSOAPHeader> getSoapHeaders()
+ {
+ return soapHeaders;
+ }
+
+ /**
+ * Sets the list of SOAP headers associated with this message reference.
+ *
+ * @param soapHeaders The soapHeaders to set.
+ */
+ public void setSoapHeaders(List<WSDLSOAPHeader> soapHeaders)
+ {
+ this.soapHeaders = soapHeaders;
+ }
+
+ /**
+ * Adds a SOAP header to the SOAP header list that is associated with this
+ * message reference.
+ *
+ * @param soapHeader the SOAP header to add
+ */
+ public void addSoapHeader(WSDLSOAPHeader soapHeader)
+ {
+ this.soapHeaders.add(soapHeader);
+ }
+
+ /**
+ * Adds a MIME part to this message reference. This is only used for WSDL 1.1.
+ *
+ * @param mimePart the mime part to add
+ */
+ public void addMimePart(WSDLMIMEPart mimePart)
+ {
+ this.mimeParts.add(mimePart);
+ }
+
+ /**
+ * Returns a list of mime parts on this message
+ *
+ * @return
+ */
+ public Collection<WSDLMIMEPart> getMimeParts()
+ {
+ return mimeParts;
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperation.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperation.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperation.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperation.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,146 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.Constants;
+
+/**
+ * The Binding Operation component describes the concrete message format(s) and protocol
interaction(s)
+ * associated with a particular interface operation for a given endpoint. A particular
operation of an interface
+ * is uniquely identified by the target namespace of the interface and the name of the
operation within that
+ * interface.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLBindingOperation implements Comparable, Serializable
+{
+ private static final long serialVersionUID = -1986624862746844610L;
+
+ // The parent WSDL binding
+ private WSDLBinding wsdlBinding;
+
+ /** An Interface Operation component in the {operations} property of the Interface
component
+ * identified by the {interface} property of the parent Binding component.
+ * This is the Interface Operation component for which binding information is being
specified.*/
+ private QName ref;
+
+ /** WSDL-1.1, style attribute from the soap:binding element */
+ private String encodingStyle = Constants.URI_LITERAL_ENC;
+ /** WSDL-1.1, soapAction attribute from the soap:operation element */
+ private String soapAction;
+
+ /** A OPTIONAL set of Binding Message Reference components */
+ private List<WSDLBindingOperationInput> inputs = new
ArrayList<WSDLBindingOperationInput>();
+ /** A OPTIONAL set of Binding Message Reference components */
+ private List<WSDLBindingOperationOutput> outputs = new
ArrayList<WSDLBindingOperationOutput>();
+
+ public WSDLBindingOperation(WSDLBinding wsdlBinding)
+ {
+ this.wsdlBinding = wsdlBinding;
+ }
+
+ public WSDLBinding getWsdlBinding()
+ {
+ return wsdlBinding;
+ }
+
+ public QName getRef()
+ {
+ return ref;
+ }
+
+ public void setRef(QName ref)
+ {
+ this.ref = ref;
+ }
+
+ public String getEncodingStyle()
+ {
+ return encodingStyle;
+ }
+
+ public void setEncodingStyle(String encodingStyle)
+ {
+ this.encodingStyle = encodingStyle;
+ }
+
+
+ public String getSOAPAction()
+ {
+ return soapAction;
+ }
+
+ public void setSOAPAction(String soapAction)
+ {
+ this.soapAction = soapAction;
+ }
+
+ public WSDLBindingOperationInput[] getInputs()
+ {
+ WSDLBindingOperationInput[] arr = new WSDLBindingOperationInput[inputs.size()];
+ inputs.toArray(arr);
+ return arr;
+ }
+
+ public void addInput(WSDLBindingOperationInput input)
+ {
+ inputs.add(input);
+ }
+
+ public WSDLBindingOperationOutput[] getOutputs()
+ {
+ WSDLBindingOperationOutput[] arr = new WSDLBindingOperationOutput[outputs.size()];
+ outputs.toArray(arr);
+ return arr;
+ }
+
+ public void addOutput(WSDLBindingOperationOutput output)
+ {
+ outputs.add(output);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(T)
+ */
+ public int compareTo(Object obj)
+ {
+ int c = -1;
+ if (obj instanceof WSDLBindingOperation)
+ {
+ WSDLBindingOperation w = (WSDLBindingOperation)obj;
+ String oname = w.getRef().getLocalPart();
+ String myname = ref.getLocalPart();
+ c = myname.compareTo(oname);
+ }
+ return c;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationInput.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperationInput.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperationInput.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationInput.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * A Binding Message Reference component describes a concrete binding of a particular
message
+ * participating in an operation to a particular concrete message format.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 10-Oct-2004
+ */
+public class WSDLBindingOperationInput extends WSDLBindingMessageReference implements
Serializable
+{
+ private static final long serialVersionUID = -3945310906418557565L;
+
+ public WSDLBindingOperationInput(WSDLBindingOperation wsdlBindingOperation)
+ {
+ super(wsdlBindingOperation);
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationOutput.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperationOutput.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperationOutput.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationOutput.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * A Binding Message Reference component describes a concrete binding of a particular
message
+ * participating in an operation to a particular concrete message format.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 10-Oct-2004
+ */
+public class WSDLBindingOperationOutput extends WSDLBindingMessageReference implements
Serializable
+{
+ private static final long serialVersionUID = -999199387765793475L;
+
+ public WSDLBindingOperationOutput(WSDLBindingOperation wsdlBindingOperation)
+ {
+ super(wsdlBindingOperation);
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitions.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDefinitions.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDefinitions.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitions.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,298 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.wsdl.Definition;
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.Document;
+
+/**
+ * The top level Definitions component is just a container for two categories of
components;
+ * WSDL components and type system components. WSDL components are interfaces, bindings
and services.
+ *
+ * Type system components describe the constraints on a message�s content.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLDefinitions implements Serializable
+{
+ private static final long serialVersionUID = 1643422922694990226L;
+
+ // provide logging
+ private final Logger log = Logger.getLogger(WSDLDefinitions.class);
+
+ /** The REQUIRED targetNamespace attribute information item defines the namespace
affiliation of top-level
+ * components defined in this definitions element information item. Interfaces,
Bindings and Services
+ * are top-level components. */
+ private String targetNamespace;
+ /** The REQUIRED wsdl namespace. For WSDL-2.0 it is
http://www.w3.org/2003/11/wsdl,
+ * for WSDL-1.1 it is
http://schemas.xmlsoap.org/wsdl/ */
+ private String wsdlNamespace;
+ /** Zero or more import element information items */
+ private List<WSDLImport> imports = new ArrayList<WSDLImport>();
+ /** Zero or more include element information items */
+ private List<WSDLInclude> includes = new ArrayList<WSDLInclude>();
+ /** Types element information item */
+ private WSDLTypes types;
+ /** Zero or more interface element information items */
+ private Map<NCName, WSDLInterface> interfaces = new LinkedHashMap<NCName,
WSDLInterface>();
+ /** Zero or more binding element information items */
+ private Map<NCName, WSDLBinding> bindings = new LinkedHashMap<NCName,
WSDLBinding>();
+ /** Zero or more service element information items */
+ private Map<NCName, WSDLService> services = new LinkedHashMap<NCName,
WSDLService>();
+
+ // Zero or more namespace definitions
+ // [TODO] What is this doing here?
+ private NamespaceRegistry namespaces = new NamespaceRegistry();
+
+ // The original wsdl4j definition if we have wsdl-1.1
+ private Definition wsdlOneOneDefinition;
+ // The WSDL document
+ private Document wsdlDocument;
+
+ public WSDLDefinitions() {}
+
+ /** Set the wsdl4j definition if we have wsdl-1.1 */
+ public void setWsdlOneOneDefinition(Definition wsdlDefinition)
+ {
+ this.wsdlOneOneDefinition = wsdlDefinition;
+ }
+
+ /**
+ * Get the wsdl4j definition if we have wsdl-1.1.
+ *
+ * Note: This object is NOT THREAD-SAFE
+ */
+ public Definition getWsdlOneOneDefinition()
+ {
+ return wsdlOneOneDefinition;
+ }
+
+ public Document getWsdlDocument()
+ {
+ return wsdlDocument;
+ }
+
+ public void setWsdlDocument(Document wsdlDocument)
+ {
+ this.wsdlDocument = wsdlDocument;
+ }
+
+ /** Register the given namespaceURI/prefix combination */
+ public String registerNamespaceURI(String nsURI, String prefix)
+ {
+ String pre = namespaces.getPrefix(nsURI);
+ if (pre == null || pre == "")
+ {
+ pre = namespaces.registerURI(nsURI, prefix);
+ log.trace("registerNamespaceURI: " + pre + "=" + nsURI);
+ }
+ return pre;
+ }
+
+ /** Register a QName and return a QName that is guarantied to have a prefix */
+ public QName registerQName(QName qname)
+ {
+ return namespaces.registerQName(qname);
+ }
+
+ /** Get the prefix for a given namespaceURI */
+ public String getPrefix(String namespaceURI)
+ {
+ return namespaces.getPrefix(namespaceURI);
+ }
+
+ /** Get the namespaceURI for a given prefix */
+ public String getNamespaceURI(String prefix)
+ {
+ return namespaces.getNamespaceURI(prefix);
+ }
+
+ /** Get the prefix for the target namespace */
+ public String getTargetPrefix()
+ {
+ return namespaces.getPrefix(targetNamespace);
+ }
+
+ /** Get an iterator for registered namespace URIs */
+ public Iterator getRegisteredNamespaceURIs()
+ {
+ return namespaces.getRegisteredURIs();
+ }
+
+ /** Get an iterator for registered prefixs */
+ public Iterator getRegisteredPrefix()
+ {
+ return namespaces.getRegisteredPrefixes();
+ }
+
+ public String getTargetNamespace()
+ {
+ return targetNamespace;
+ }
+
+ public void setTargetNamespace(String namespaceURI)
+ {
+ if(namespaceURI == null)
+ throw new IllegalArgumentException("Illegal Null
Argument:namespaceURI");
+
+ log.trace("setTargetNamespace: " + namespaceURI);
+ this.targetNamespace = namespaceURI;
+ }
+
+ public String getWsdlNamespace()
+ {
+ return wsdlNamespace;
+ }
+
+ public void setWsdlNamespace(String namespaceURI)
+ {
+ if (Constants.NS_WSDL11.equals(namespaceURI) == false &&
Constants.NS_WSDL20.equals(namespaceURI) == false)
+ throw new IllegalArgumentException("Invalid default namespace: " +
namespaceURI);
+
+ this.wsdlNamespace = namespaceURI;
+ }
+
+ public WSDLImport[] getImports()
+ {
+ WSDLImport[] arr = new WSDLImport[imports.size()];
+ imports.toArray(arr);
+ return arr;
+ }
+
+ public void addImport(WSDLImport anImport)
+ {
+ imports.add(anImport);
+ }
+
+ public WSDLInclude[] getIncludes()
+ {
+ WSDLInclude[] arr = new WSDLInclude[includes.size()];
+ includes.toArray(arr);
+ return arr;
+ }
+
+ public void addInclude(WSDLInclude include)
+ {
+ includes.add(include);
+ }
+
+ public WSDLTypes getWsdlTypes()
+ {
+ return types;
+ }
+
+ public void setWsdlTypes(WSDLTypes types)
+ {
+ this.types = types;
+ this.types.setWSDLDefintiions(this);
+ }
+
+ public WSDLInterface getInterface(NCName ncName)
+ {
+ return interfaces.get(ncName);
+ }
+
+ public WSDLInterface[] getInterfaces()
+ {
+ WSDLInterface[] arr = new WSDLInterface[interfaces.size()];
+ new ArrayList<WSDLInterface>(interfaces.values()).toArray(arr);
+ return arr;
+ }
+
+ public void addInterface(WSDLInterface wsdlInterface)
+ {
+ interfaces.put(wsdlInterface.getName(), wsdlInterface);
+ }
+
+ public WSDLBinding[] getBindings()
+ {
+ WSDLBinding[] arr = new WSDLBinding[bindings.size()];
+ new ArrayList<WSDLBinding>(bindings.values()).toArray(arr);
+ return arr;
+ }
+
+ public WSDLBinding getBinding(NCName ncName)
+ {
+ return bindings.get(ncName);
+ }
+
+ public WSDLBinding getBindingByInterfaceName(QName qname)
+ {
+ WSDLBinding wsdlBinding = null;
+ for (WSDLBinding aux : bindings.values())
+ {
+ if (aux.getInterfaceName().equals(qname))
+ {
+ if (wsdlBinding != null)
+ log.warn("Multiple WSDL bindings referrence the same interface:
" + qname);
+
+ wsdlBinding = aux;
+ }
+ }
+ return wsdlBinding;
+ }
+
+ public void addBinding(WSDLBinding binding)
+ {
+ bindings.put(binding.getName(), binding);
+ }
+
+ public WSDLService[] getServices()
+ {
+ WSDLService[] arr = new WSDLService[services.size()];
+ new ArrayList<WSDLService>(services.values()).toArray(arr);
+ return arr;
+ }
+
+ public void addService(WSDLService service)
+ {
+ services.put(service.getName(), service);
+ }
+
+ public WSDLService getService(NCName name)
+ {
+ return services.get(name);
+ }
+
+ /** Unregister the given namespaceURI/prefix combination */
+ public void unRegisterNamespaceURI(String namespaceURI, String prefix)
+ {
+ String pre = namespaces.getPrefix(namespaceURI);
+ if(pre != null && pre.equals(prefix))
+ namespaces.removePrefixMapping(prefix);
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDocumentation.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDocumentation.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDocumentation.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDocumentation.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+/**
+ * Represents a WSDL Document element that can be embedded in other WSDL elements
+ * such as Fault
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ */
+public class WSDLDocumentation implements Serializable
+{
+ private static final long serialVersionUID = -5931204963635014975L;
+
+ protected String documentContent = "";
+
+ public WSDLDocumentation(String str)
+ {
+ this.documentContent = str;
+ }
+
+ public String getContent()
+ {
+ return this.documentContent;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLEndpoint.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLEndpoint.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLEndpoint.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLEndpoint.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,166 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+
+/**
+ * An Endpoint component defines the particulars of a specific endpoint at which a given
service is available.
+ * Endpoint components are local to a given Service component; they cannot be referred to
by QName.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLEndpoint extends Extendable
+{
+ private static final long serialVersionUID = 4991302339046047865L;
+
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDLEndpoint.class);
+
+ // The parent service
+ private WSDLService wsdlService;
+
+ /** The REQUIRED name attribute information item together with the targetNamespace
attribute information item
+ * of the definitions element information item forms the QName of the endpoint. */
+ private NCName name;
+
+ /** Derived QName identifier.
+ */
+ private QName qname;
+
+ /** The REQUIRED binding attribute information item refers, by QName, to a Binding
component */
+ private QName binding;
+
+ /** The OPTIONAL address attribute information item specifies the address of the
endpoint. */
+ private String address;
+
+ public WSDLEndpoint(WSDLService wsdlService)
+ {
+ log.trace("new WSDLEndpoint");
+ this.wsdlService = wsdlService;
+ }
+
+ public WSDLService getWsdlService()
+ {
+ return wsdlService;
+ }
+
+ /** Get the WSDLInteraface associated to this endpoint
+ *
+ * @return A WSDLInterface or null
+ */
+ public WSDLInterface getInterface()
+ {
+ WSDLInterface wsdlInterface = null;
+
+ WSDLDefinitions wsdlDefinitions = wsdlService.getWsdlDefinitions();
+ if (wsdlService.getInterfaceName() != null)
+ {
+ QName qname = wsdlService.getInterfaceName();
+ wsdlInterface = wsdlDefinitions.getInterface(new NCName(qname));
+ }
+ else
+ {
+ WSDLBinding wsdlBinding = wsdlDefinitions.getBinding(new NCName(binding));
+ if (wsdlBinding == null)
+ throw new WSException("Cannot obtain the binding: " + binding);
+
+ if (wsdlBinding.getInterfaceName() != null)
+ {
+ QName qname = wsdlBinding.getInterfaceName();
+ wsdlInterface = wsdlDefinitions.getInterface(new NCName(qname));
+ }
+ }
+
+ if (wsdlInterface == null)
+ throw new WSException("Cannot obtain the interface associated with this
endpoint: " + name);
+
+ return wsdlInterface;
+ }
+
+ /** Get the WSDLInterafceOperation for the given opName
+ *
+ * @param opName the operation name
+ * @return A WSDLOperation or null
+ */
+ public WSDLInterfaceOperation getInterfaceOperation(NCName opName)
+ {
+ WSDLInterface wsdlInterface = getInterface();
+ WSDLInterfaceOperation wsdlInterfaceOperation =
wsdlInterface.getWSDLInterfaceOperation(opName);
+ return wsdlInterfaceOperation;
+ }
+
+ public NCName getName()
+ {
+ return name;
+ }
+
+ public void setName(NCName name)
+ {
+ log.trace("setName: " + name);
+ this.name = name;
+ }
+
+ public QName getQName()
+ {
+ if (qname == null)
+ {
+ String tnsURI = wsdlService.getWsdlDefinitions().getTargetNamespace();
+ qname = new QName(tnsURI, name.toString());
+ }
+ return qname;
+ }
+
+
+ public void setQName(QName qname)
+ {
+ log.trace("setQName: " + qname);
+ this.qname = qname;
+ }
+
+ public QName getBinding()
+ {
+ return binding;
+ }
+
+ public void setBinding(QName binding)
+ {
+ log.trace("setBinding: " + binding);
+ this.binding = binding;
+ }
+
+ public String getAddress()
+ {
+ return address;
+ }
+
+ public void setAddress(String address)
+ {
+ this.address = address;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLException.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLException.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLException.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLException.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,93 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+/**
+ * An exception that may occur during WSDL processing.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLException extends RuntimeException
+{
+ /**
+ * Constructs a new exception with <code>null</code> as its detail
message.
+ * The cause is not initialized, and may subsequently be initialized by a
+ * call to {@link #initCause}.
+ */
+ public WSDLException()
+ {
+ }
+
+ /**
+ * Constructs a new exception with the specified detail message. The
+ * cause is not initialized, and may subsequently be initialized by
+ * a call to {@link #initCause}.
+ *
+ * @param message the detail message. The detail message is saved for
+ * later retrieval by the {@link #getMessage()} method.
+ */
+ public WSDLException(String message)
+ {
+ super(message);
+ }
+
+ /**
+ * Constructs a new exception with the specified cause and a detail
+ * message of <tt>(cause==null ? null : cause.toString())</tt> (which
+ * typically contains the class and detail message of <tt>cause</tt>).
+ * This constructor is useful for exceptions that are little more than
+ * wrappers for other throwables (for example, {@link
+ * java.security.PrivilegedActionException}).
+ *
+ * @param cause the cause (which is saved for later retrieval by the
+ * {@link #getCause()} method). (A <tt>null</tt> value is
+ * permitted, and indicates that the cause is nonexistent or
+ * unknown.)
+ * @since 1.4
+ */
+ public WSDLException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ /**
+ * Constructs a new exception with the specified detail message and
+ * cause. <p>Note that the detail message associated with
+ * <code>cause</code> is <i>not</i> automatically incorporated
in
+ * this exception's detail message.
+ *
+ * @param message the detail message (which is saved for later retrieval
+ * by the {@link #getMessage()} method).
+ * @param cause the cause (which is saved for later retrieval by the
+ * {@link #getCause()} method). (A <tt>null</tt> value is
+ * permitted, and indicates that the cause is nonexistent or
+ * unknown.)
+ * @since 1.4
+ */
+ public WSDLException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLFeature.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLFeature.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLFeature.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLFeature.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,84 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+// $Id$
+
+/**
+ * A feature component describes an abstract piece of functionality typically associated
with the exchange of
+ * messages between communicating parties. Although WSDL poses no constraints on the
potential scope of
+ * such features, examples might include "reliability", "security",
"correlation", and "routing". The presence
+ * of a feature component in a WSDL description indicates that the service supports the
feature and may
+ * require a requester agent that interacts with the service to use that feature. Each
Feature is identified by its
+ * URI.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLFeature implements Serializable
+{
+ private static final long serialVersionUID = 8096857958254222743L;
+
+ /** A REQUIRED uri attribute information item */
+ private String uri;
+ /** An OPTIONAL required attribute information item */
+ private boolean required;
+
+ public WSDLFeature(String uri)
+ {
+ if (uri == null)
+ throw new IllegalArgumentException("Illegal feature URI: " + uri);
+
+ this.uri = uri;
+ }
+
+ public WSDLFeature(String uri, boolean required)
+ {
+ if (uri == null)
+ throw new IllegalArgumentException("Illegal feature URI: " + uri);
+
+ this.uri = uri;
+ this.required = required;
+ }
+
+ public String getURI()
+ {
+ return uri;
+ }
+
+ public boolean isRequired()
+ {
+ return required;
+ }
+
+ public void setRequired(boolean required)
+ {
+ this.required = required;
+ }
+
+ public String toString()
+ {
+ return uri;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLImport.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLImport.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLImport.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLImport.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,90 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+
+// $Id$
+
+/**
+ * The WSDL import element information item, like the include element information item
(see 4.1 Including Descriptions [p.73] )
+ * also allows for the separation of the different components of a WSDL description into
independent descriptions,
+ * but in this case with different target namespaces, which can be imported as needed.
This technique helps writing
+ * clearer WSDL descriptions by separating the definitions according to their level of
abstraction, and maximizes reusability.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLImport implements Serializable
+{
+ private static final long serialVersionUID = -2641009286158029207L;
+
+ // The parent WSDL definitions
+ private WSDLDefinitions wsdlDefinitions;
+
+ /** The REQUIRED namespace attribute information item is of type xs:anyURI . Its
actual value indicates that the
+ * containing WSDL document MAY contain qualified references to WSDL definitions in
that namespace
+ * (via one or more prefixes declared with namespace declarations in the normal way).
This value MUST
+ * NOT match the actual value of the enclosing WSDL document targetNamespace
attribute
+ * information item. If the import statement results in the import of a WSDL document
then the actual value
+ * of the namespace attribute information item MUST be identical to the actual value
of the imported
+ * WSDL document's targetNamespace attribute information item. */
+ private String namespace;
+
+ /** The OPTIONAL location attribute information item is of type xs:anyURI . Its actual
value is the location of
+ * some information about the namespace identified by the namespace attribute
information item.
+ * The location attribute information item is optional. This allows WSDL components to
be constructed
+ * from information other than serialized XML 1.0. It also allows the development of
WSDL processors that
+ * have a priori (i.e., built-in) knowledge of certain namespaces. */
+ private String location;
+
+ public WSDLImport(WSDLDefinitions wsdlDefinitions)
+ {
+ this.wsdlDefinitions = wsdlDefinitions;
+ }
+
+ public WSDLDefinitions getWsdlDefinitions()
+ {
+ return wsdlDefinitions;
+ }
+
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ public void setNamespace(String namespace)
+ {
+ this.namespace = namespace;
+ }
+
+ public String getLocation()
+ {
+ return location;
+ }
+
+ public void setLocation(String location)
+ {
+ this.location = location;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInclude.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInclude.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInclude.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInclude.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+
+// $Id$
+
+
+/**
+ * The WSDL include element information item allows for the separation of different
components of a
+ * service definition, belonging the same target namespace, into independent WSDL
documents which can be
+ * merged as needed.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLInclude implements Serializable
+{
+ private static final long serialVersionUID = 1210980063899094649L;
+
+ // The parent WSDL definitions
+ private WSDLDefinitions wsdlDefinitions;
+
+ /** A location attribute information item is of type xs:anyURI . Its actual value is
the location of some
+ * information about the namespace identified by the targetNamespace attribute
information item of the
+ * containing definitions element information item.*/
+ private String location;
+
+ public WSDLInclude(WSDLDefinitions wsdlDefinitions)
+ {
+ this.wsdlDefinitions = wsdlDefinitions;
+ }
+
+ public WSDLDefinitions getWsdlDefinitions()
+ {
+ return wsdlDefinitions;
+ }
+
+ public String getLocation()
+ {
+ return location;
+ }
+
+ public void setLocation(String location)
+ {
+ this.location = location;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterface.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterface.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterface.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterface.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,194 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+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,
+ * and an interface is a set of operations. Thus, an interface defines the design of the
application.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+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.
+ private WSDLDefinitions wsdlDefinitions;
+
+ /** The REQUIRED name attribute information item together with the targetNamespace
attribute information item
+ * of the [parent] definitions element information item forms the QName of the
interface.
+ */
+ private NCName name;
+
+ /** Derived QName identifier.
+ */
+ private QName qname;
+
+ /** The OPTIONAL extends attribute information item lists the interfaces that this
interface derives from.
+ */
+ private QName[] extendList;
+
+ /** The OPTIONAL styleDefault attribute information item indicates the default style
used to construct the
+ * {element} properties of {message references} of all operations contained within the
[owner] interface
+ */
+ private String styleDefault;
+
+ /** Zero or more operation element information items */
+ private Map operations = new LinkedHashMap();
+ /** Zero or more fault element information items */
+ private Map faults = new LinkedHashMap();
+
+ /** Construct a WSDL interface for a given WSDL definition */
+ public WSDLInterface(WSDLDefinitions wsdlDefinitions)
+ {
+ log.trace("new WSDLInterface");
+ this.wsdlDefinitions = wsdlDefinitions;
+ }
+
+ /** Get a WSDLOperation for a given name
+ *
+ * @param name The name of the operation
+ * @return A WSDLOperation or null
+ */
+ public WSDLInterfaceOperation getWSDLInterfaceOperation(NCName name)
+ {
+ return (WSDLInterfaceOperation)operations.get(name);
+ }
+
+ public WSDLDefinitions getWsdlDefinitions()
+ {
+ return wsdlDefinitions;
+ }
+
+ public NCName getName()
+ {
+ return name;
+ }
+
+ public void setName(NCName name)
+ {
+ log.trace("setName: " + name);
+ this.name = name;
+ }
+
+ public QName getQName()
+ {
+ if (qname == null)
+ {
+ String tnsURI = wsdlDefinitions.getTargetNamespace();
+ qname = new QName(tnsURI, name.toString());
+ }
+ return qname;
+ }
+
+
+ public void setQName(QName qname)
+ {
+ log.trace("setQName: " + qname);
+ this.qname = qname;
+ }
+
+ public QName[] getExtendList()
+ {
+ return extendList;
+ }
+
+ public void setExtendList(QName[] extendList)
+ {
+ this.extendList = extendList;
+ }
+
+ public String getStyleDefault()
+ {
+ return styleDefault;
+ }
+
+ public void setStyleDefault(String styleDefault)
+ {
+ this.styleDefault = styleDefault;
+ }
+
+ public WSDLInterfaceOperation[] getOperations()
+ {
+ WSDLInterfaceOperation[] arr = new WSDLInterfaceOperation[operations.size()];
+ new ArrayList(operations.values()).toArray(arr);
+ return arr;
+ }
+
+ public WSDLInterfaceOperation[] getSortedOperations()
+ {
+ WSDLInterfaceOperation[] arr = new WSDLInterfaceOperation[operations.size()];
+ new ArrayList(operations.values()).toArray(arr);
+ Arrays.sort(arr);
+ return arr;
+ }
+
+ public WSDLInterfaceOperation getOperation(NCName opName)
+ {
+ WSDLInterfaceOperation operation = (WSDLInterfaceOperation)operations.get(opName);
+ return operation;
+ }
+
+ public void addOperation(WSDLInterfaceOperation operation)
+ {
+ operations.put(operation.getName(), operation);
+ }
+
+ public WSDLInterfaceFault[] getFaults()
+ {
+ WSDLInterfaceFault[] arr = new WSDLInterfaceFault[faults.size()];
+ new ArrayList(faults.values()).toArray(arr);
+ return arr;
+ }
+
+ public WSDLInterfaceFault getFault(NCName fName)
+ {
+ WSDLInterfaceFault fault = (WSDLInterfaceFault)faults.get(fName);
+ return fault;
+ }
+
+ public void addFault(WSDLInterfaceFault fault)
+ {
+ faults.put(fault.getName(), fault);
+ }
+
+ public boolean containsInterfaceOperation(NCName name)
+ {
+ return operations.containsKey(name);
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceFault.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceFault.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceFault.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceFault.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,104 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * An Interface Fault component describes a fault that MAY occur during invocation of an
operation of the
+ * interface. The Interface Fault component declares an abstract fault by naming it and
indicating the
+ * contents of the fault message. When and how the fault message flows is indicated by
the Interface
+ * Operation component 2.4 Interface Operation [p.22] .
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLInterfaceFault implements Serializable
+{
+ private static final long serialVersionUID = 7820459380133521551L;
+
+ // The parent interface.
+ private WSDLInterface wsdlInterface;
+
+ /** The REQUIRED name attribute information item identifies a given fault element
information item inside a given
+ * interface element information item.
+ */
+ private NCName name;
+ /** The OPTIONAL element attribute information item refers, by QName, to an element
declaration component.
+ */
+ private QName element;
+
+ protected WSDLDocumentation documentationElement = null;
+
+ public WSDLInterfaceFault(WSDLInterface wsdlInterface)
+ {
+ this.wsdlInterface = wsdlInterface;
+ }
+
+ public WSDLInterface getWsdlInterface()
+ {
+ return wsdlInterface;
+ }
+
+ public NCName getName()
+ {
+ return name;
+ }
+
+ public void setName(NCName name)
+ {
+ this.name = name;
+ }
+
+ public QName getElement()
+ {
+ return element;
+ }
+
+ public void setElement(QName element)
+ {
+ this.element = element;
+ }
+
+ public WSDLDocumentation getDocumentation()
+ {
+ return this.documentationElement;
+ }
+
+ public void setDocumentation(WSDLDocumentation doc)
+ {
+ this.documentationElement = doc;
+ }
+
+ /** Get the xmlType for this interface fault.
+ */
+ public QName getXmlType()
+ {
+ WSDLDefinitions wsdlDefinitions = wsdlInterface.getWsdlDefinitions();
+ WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
+ return wsdlTypes.getXMLType(element);
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceMessageReference.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceMessageReference.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceMessageReference.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceMessageReference.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,246 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id: WSDLInterfaceOperationPart.java 275 2006-05-04 21:36:29Z
+// jason.greene(a)jboss.com $
+
+import java.util.Collection;
+import java.util.LinkedHashMap;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+
+/**
+ * A Message Reference component associates a defined type with a message
+ * exchanged in an operation. By default, the type system is based upon the XML
+ * Infoset
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 10-Oct-2004
+ */
+public abstract class WSDLInterfaceMessageReference extends Extendable implements
Comparable
+{
+ // provide logging
+ protected Logger log = Logger.getLogger(getClass());
+
+ // The parent interface operation
+ private WSDLInterfaceOperation wsdlOperation;
+
+ /**
+ * The OPTIONAL messageLabel attribute information item identifies the role
+ * of this message in the message exchange pattern of the given operation
+ * element information item.
+ */
+ private NCName messageLabel;
+
+ /**
+ * The OPTIONAL element attribute information item is the element declaration
+ * from the {element declarations} property resolved by the value of the
+ * element attribute information item, otherwise empty.
+ */
+ private QName element;
+
+ /**
+ * Used mainly for WSDL 1.1 compatibility, indicates rpc parts.
+ * Although, this could be used to represent WSDL 2.0 RPC style.
+ */
+ private LinkedHashMap<String, WSDLRPCPart> childParts = new
LinkedHashMap<String, WSDLRPCPart>();
+
+ /**
+ * Used for WSDL 1.1
+ */
+ private String partName;
+
+ /**
+ * Used for WSDL 1.1
+ */
+ private QName messageName;
+
+ public WSDLInterfaceMessageReference(WSDLInterfaceOperation wsdlOperation)
+ {
+ log.trace("New part for wsdlOperation: " + wsdlOperation.getName());
+ this.wsdlOperation = wsdlOperation;
+ }
+
+ public WSDLInterfaceOperation getWsdlOperation()
+ {
+ return wsdlOperation;
+ }
+
+ public NCName getMessageLabel()
+ {
+ return messageLabel;
+ }
+
+ public void setMessageLabel(NCName messageLabel)
+ {
+ log.trace("setMessageLabel: " + messageLabel);
+ this.messageLabel = messageLabel;
+ }
+
+ public QName getElement()
+ {
+ return element;
+ }
+
+ public void setElement(QName element)
+ {
+ log.trace("setElement: " + element);
+ this.element = element;
+ }
+
+ /**
+ * Get the xmlType for this operation part.
+ */
+ public QName getXMLType()
+ {
+ QName xmlType = null;
+
+ // First try to read it from the schema
+ WSDLDefinitions wsdlDefinitions =
wsdlOperation.getWsdlInterface().getWsdlDefinitions();
+ WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
+ xmlType = wsdlTypes.getXMLType(element);
+
+ // Fall back to the property
+ if (xmlType == null)
+ {
+ WSDLProperty property = getProperty(Constants.WSDL_PROPERTY_RPC_XMLTYPE);
+ if (property != null)
+ {
+ String qnameRef = property.getValue();
+ int colIndex = qnameRef.indexOf(':');
+ String prefix = qnameRef.substring(0, colIndex);
+ String localPart = qnameRef.substring(colIndex + 1);
+ String nsURI = wsdlDefinitions.getNamespaceURI(prefix);
+ xmlType = new QName(nsURI, localPart, prefix);
+ }
+ }
+
+ if (xmlType == null)
+ throw new WSException("Cannot obtain xmlType for element: " +
element);
+
+ return xmlType;
+ }
+
+ /**
+ * Gets the child parts associated with this message reference. This is only
+ * used for RPC style, and currently only supported by WSDL 1.1.
+ *
+ * @return the list of rpc parts that make up the message
+ */
+ public Collection<WSDLRPCPart> getChildParts()
+ {
+ return childParts.values();
+ }
+
+ /**
+ * Gets the child part associated with this message reference by part name.
+ * This is only used for RPC style, and currently only supported by WSDL 1.1.
+ *
+ * @param name the part name
+ * @return the part or null if not found
+ */
+ public WSDLRPCPart getChildPart(String name)
+ {
+ return childParts.get(name);
+ }
+
+ /**
+ * Adds a child part to this mesage reference. This is only used for RPC
+ * style, and currently only supported by WSDL 1.1.
+ *
+ * @param childPart the list of rpc parts that make up the message
+ */
+ public void addChildPart(WSDLRPCPart childPart)
+ {
+ this.childParts.put(childPart.getName(), childPart);
+ }
+
+ /**
+ * Removes a speficied child part. This is This is only used for RPC
+ * style, and currently only supported by WSDL 1.1.
+ *
+ * @param name the name of the part
+ */
+ public void removeChildPart(String name)
+ {
+ this.childParts.remove(name);
+ }
+
+ /**
+ * Gets the WSDL 1.1 part name.
+ *
+ * @return the part name
+ */
+ public String getPartName()
+ {
+ return partName;
+ }
+
+ /**
+ * Sets the WSDL 1.1 message name.
+ *
+ * @param messageName The part name
+ */
+ public void setMessageName(QName messageName)
+ {
+ this.messageName = messageName;
+ }
+
+ /**
+ * Gets the WSDL 1.1 message name.
+ *
+ * @return the message name
+ */
+ public QName getMessageName()
+ {
+ return messageName;
+ }
+
+ /**
+ * Sets the WSDL 1.1 part name.
+ *
+ * @param partName The part name
+ */
+ public void setPartName(String partName)
+ {
+ this.partName = partName;
+ }
+
+ public int compareTo(Object o)
+ {
+ int c = -1;
+ if (o instanceof WSDLInterfaceMessageReference)
+ {
+ WSDLInterfaceMessageReference w = (WSDLInterfaceMessageReference) o;
+ String oname = w.getElement().getLocalPart();
+ String myname = getElement().getLocalPart();
+ c = myname.compareTo(oname);
+ }
+ return c;
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperation.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperation.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperation.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperation.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,284 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+
+// $Id$
+
+/**
+ * An Interface Operation component describes an operation that a given interface
supports. An operation is
+ * an interaction with the service consisting of a set (ordinary and fault) messages
exchanged between the
+ * service and the other roles involved in the interaction, in particular the service
requester. The sequencing
+ * and cardinality of the messages involved in a particular interaction is governed by
the message exchange
+ * pattern used by the operation (see {message exchange pattern} property).
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLInterfaceOperation extends Extendable implements Comparable
+{
+ private static final long serialVersionUID = -5014918078197942626L;
+
+ // The parent interface
+ private WSDLInterface wsdlInterface;
+
+ /** The REQUIRED name attribute information item identifies a given operation element
information item inside a
+ * given interface element information item.
+ */
+ private NCName name;
+
+ /** The OPTIONAL pattern attribute information item identifies the message exchange
pattern a given operation uses.
+ */
+ private String pattern;
+
+ /** The OPTIONAL style attribute information item indicates the rules that were used
to construct the {element}
+ * properties of the Message Reference components which are members of the {message
references}
+ * property of the [owner] operation.
+ */
+ private String style = Constants.URI_STYLE_RPC;
+
+ /** The OPTIONAL safe attribute information item indicates whether the operation is
safe or not.
+ */
+ private boolean safe;
+
+ /** Zero or more input element information items */
+ private Map<QName, WSDLInterfaceOperationInput> inputs = new
LinkedHashMap<QName, WSDLInterfaceOperationInput>();
+ /** Zero or more output element information items */
+ private Map<QName, WSDLInterfaceOperationOutput> outputs = new
LinkedHashMap<QName, WSDLInterfaceOperationOutput>();
+ /** Zero or more infault element information items */
+ private ArrayList<WSDLInterfaceOperationInfault> infaults = new
ArrayList<WSDLInterfaceOperationInfault>();
+ /** Zero or more outfault element information items */
+ private ArrayList<WSDLInterfaceOperationOutfault> outfaults = new
ArrayList<WSDLInterfaceOperationOutfault>();
+ /** Zero or more signature items */
+ private LinkedHashMap<String, WSDLRPCSignatureItem> rpcSignatureItems = new
LinkedHashMap<String, WSDLRPCSignatureItem>();
+
+ public WSDLInterfaceOperation(WSDLInterface wsdlInterface)
+ {
+ this.wsdlInterface = wsdlInterface;
+ }
+
+ public WSDLInterface getWsdlInterface()
+ {
+ return wsdlInterface;
+ }
+
+ public NCName getName()
+ {
+ return name;
+ }
+
+ public void setName(NCName name)
+ {
+ this.name = name;
+ }
+
+ public QName getQName()
+ {
+ String nsURI = wsdlInterface.getQName().getNamespaceURI();
+ return new QName(nsURI, name.toString());
+ }
+
+ public String getPattern()
+ {
+ return pattern;
+ }
+
+ public void setPattern(String pattern)
+ {
+ this.pattern = pattern;
+ }
+
+ public String getStyle()
+ {
+ return style;
+ }
+
+ public void setStyle(String style)
+ {
+ this.style = style;
+ }
+
+ public boolean isSafe()
+ {
+ return safe;
+ }
+
+ public void setSafe(boolean safe)
+ {
+ this.safe = safe;
+ }
+
+ public WSDLInterfaceOperationInput[] getInputs()
+ {
+ WSDLInterfaceOperationInput[] arr = new
WSDLInterfaceOperationInput[inputs.size()];
+ new ArrayList<WSDLInterfaceOperationInput>(inputs.values()).toArray(arr);
+ return arr;
+ }
+
+ public void addInput(WSDLInterfaceOperationInput input)
+ {
+ QName xmlName = input.getElement();
+ if (inputs.get(xmlName) != null)
+ throw new WSException("Attempt to map multiple operation inputs to: "
+ xmlName);
+ inputs.put(xmlName, input);
+ }
+
+ public WSDLInterfaceOperationInput getInput(QName qname)
+ {
+ WSDLInterfaceOperationInput opInput =
(WSDLInterfaceOperationInput)inputs.get(qname);
+ return opInput;
+ }
+
+ public void removeInput(QName element)
+ {
+ inputs.remove(element);
+ }
+
+ public WSDLInterfaceOperationInput getInputByPartName(String partName)
+ {
+ WSDLInterfaceOperationInput opInput = null;
+ for (WSDLInterfaceOperationInput auxInput : inputs.values())
+ {
+ WSDLProperty property =
auxInput.getProperty(Constants.WSDL_PROPERTY_PART_NAME);
+ if (property != null && property.getValue().equals(partName))
+ opInput = auxInput;
+ }
+ return opInput;
+ }
+
+ public WSDLInterfaceOperationOutput[] getOutputs()
+ {
+ WSDLInterfaceOperationOutput[] arr = new
WSDLInterfaceOperationOutput[outputs.size()];
+ new ArrayList<WSDLInterfaceOperationOutput>(outputs.values()).toArray(arr);
+ return arr;
+ }
+
+ public void addOutput(WSDLInterfaceOperationOutput output)
+ {
+ QName xmlName = output.getElement();
+ if (outputs.get(xmlName) != null)
+ throw new WSException("Attempt to map multiple operation outputs to: "
+ xmlName);
+ outputs.put(xmlName, output);
+ }
+
+ public WSDLInterfaceOperationOutput getOutput(QName qname)
+ {
+ WSDLInterfaceOperationOutput opOutput =
(WSDLInterfaceOperationOutput)outputs.get(qname);
+ return opOutput;
+ }
+
+ public WSDLInterfaceOperationOutput getOutputByPartName(String partName)
+ {
+ WSDLInterfaceOperationOutput opOutput = null;
+ for (WSDLInterfaceOperationOutput auxOutput : outputs.values())
+ {
+ WSDLProperty property =
auxOutput.getProperty(Constants.WSDL_PROPERTY_PART_NAME);
+ if (property != null && property.getValue().equals(partName))
+ opOutput = auxOutput;
+ }
+ return opOutput;
+ }
+
+ public WSDLInterfaceOperationInfault[] getInfaults()
+ {
+ WSDLInterfaceOperationInfault[] arr = new
WSDLInterfaceOperationInfault[infaults.size()];
+ infaults.toArray(arr);
+ return arr;
+ }
+
+ public void addInfault(WSDLInterfaceOperationInfault infault)
+ {
+ infaults.add(infault);
+ }
+
+ public WSDLInterfaceOperationOutfault[] getOutfaults()
+ {
+ WSDLInterfaceOperationOutfault[] arr = new
WSDLInterfaceOperationOutfault[outfaults.size()];
+ outfaults.toArray(arr);
+ return arr;
+ }
+
+ public void addOutfault(WSDLInterfaceOperationOutfault outfault)
+ {
+ outfaults.add(outfault);
+ }
+
+ public Collection<WSDLRPCSignatureItem> getRpcSignatureItems()
+ {
+ return rpcSignatureItems.values();
+ }
+
+
+ public void addRpcSignatureItem(WSDLRPCSignatureItem item)
+ {
+ if (item.getDirection() != Direction.RETURN)
+ item.setPosition(rpcSignatureItems.size());
+ rpcSignatureItems.put(item.getName(), item);
+ }
+
+ public WSDLRPCSignatureItem getRpcSignatureitem(String name)
+ {
+ return rpcSignatureItems.get(name);
+ }
+
+ /**
+ * Attempts to locate a binding operation for this interface operation.
+ *
+ * @return the binding operation, or null if not found;
+ */
+ public WSDLBindingOperation getBindingOperation()
+ {
+ WSDLInterface wsdlInterface = getWsdlInterface();
+ WSDLBinding binding =
wsdlInterface.getWsdlDefinitions().getBindingByInterfaceName(wsdlInterface.getQName());
+ if (binding == null)
+ return null;
+
+ WSDLBindingOperation bindingOperation = binding.getOperationByRef(getQName());
+ if (bindingOperation == null)
+ return null;
+
+ return bindingOperation;
+ }
+
+ public int compareTo(Object o)
+ {
+ int c = -1;
+ if (o instanceof WSDLInterfaceOperation)
+ {
+ WSDLInterfaceOperation w = (WSDLInterfaceOperation)o;
+ String oname = w.getName().toString();
+ String myname = name.toString();
+ c = myname.compareTo(oname);
+ }
+ return c;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInfault.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationInfault.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationInfault.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInfault.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+/**
+ * A Fault Reference component associates a defined type, specified by an Interface Fault
component, to a
+ * fault message exchanged in an operation.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLInterfaceOperationInfault extends Extendable
+{
+ private static final long serialVersionUID = 1124693747462594773L;
+
+ // The parent interface operation
+ private WSDLInterfaceOperation wsdlInterfaceOperation;
+
+ /** A REQUIRED reference to an Interface Fault component in the {faults} property of
the parent
+ * Interface Operation component's parent Interface component. Identifying the
Interface Fault
+ * component therefore indirectly defines the actual content or payload of the fault
message.
+ */
+ private QName ref;
+
+ /** An OPTIONAL identifier of the message this fault relates to among those defined in
the {message exchange
+ * pattern} property of the Interface Operation component it is contained within. The
value of this
+ * property MUST match the name of a placeholder message defined by the message
exchange pattern.
+ */
+ private NCName messageLabel;
+
+ public WSDLInterfaceOperationInfault(WSDLInterfaceOperation wsdlInterfaceOperation)
+ {
+ this.wsdlInterfaceOperation = wsdlInterfaceOperation;
+ }
+
+ public WSDLInterfaceOperation getWsdlInterfaceOperation()
+ {
+ return wsdlInterfaceOperation;
+ }
+
+ public QName getRef()
+ {
+ return ref;
+ }
+
+ public void setRef(QName ref)
+ {
+ this.ref = ref;
+ }
+
+ public NCName getMessageLabel()
+ {
+ return messageLabel;
+ }
+
+ public void setMessageLabel(NCName messageLabel)
+ {
+ this.messageLabel = messageLabel;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInput.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationInput.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationInput.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInput.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+/**
+ * A Message Reference component associates a defined type with a message exchanged in an
operation. By
+ * default, the type system is based upon the XML Infoset
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLInterfaceOperationInput extends WSDLInterfaceMessageReference
+{
+ private static final long serialVersionUID = -4691488323709300920L;
+
+ public WSDLInterfaceOperationInput(WSDLInterfaceOperation wsdlOperation)
+ {
+ super(wsdlOperation);
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutfault.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationOutfault.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationOutfault.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutfault.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+/**
+ * A Fault Reference component associates a defined type, specified by an Interface Fault
component, to a
+ * fault message exchanged in an operation.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLInterfaceOperationOutfault extends Extendable
+{
+ private static final long serialVersionUID = 1365062002410904728L;
+
+ // The parent interface operation
+ private WSDLInterfaceOperation wsdlInterfaceOperation;
+
+ /** A REQUIRED reference to an Interface Fault component in the {faults} property of
the parent
+ * Interface Operation component's parent Interface component. Identifying the
Interface Fault
+ * component therefore indirectly defines the actual content or payload of the fault
message.
+ */
+ private QName ref;
+
+ /** An OPTIONAL identifier of the message this fault relates to among those defined in
the {message exchange
+ * pattern} property of the Interface Operation component it is contained within. The
value of this
+ * property MUST match the name of a placeholder message defined by the message
exchange pattern.
+ */
+ private NCName messageLabel;
+
+ public WSDLInterfaceOperationOutfault(WSDLInterfaceOperation wsdlInterfaceOperation)
+ {
+ this.wsdlInterfaceOperation = wsdlInterfaceOperation;
+ }
+
+ public WSDLInterfaceOperation getWsdlInterfaceOperation()
+ {
+ return wsdlInterfaceOperation;
+ }
+
+ public QName getRef()
+ {
+ return ref;
+ }
+
+ public void setRef(QName ref)
+ {
+ this.ref = ref;
+ }
+
+ public NCName getMessageLabel()
+ {
+ return messageLabel;
+ }
+
+ public void setMessageLabel(NCName messageLabel)
+ {
+ this.messageLabel = messageLabel;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutput.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationOutput.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationOutput.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutput.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+/**
+ * A Message Reference component associates a defined type with a message exchanged in an
operation. By
+ * default, the type system is based upon the XML Infoset
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLInterfaceOperationOutput extends WSDLInterfaceMessageReference
+{
+ private static final long serialVersionUID = 5096501821825901473L;
+
+ public WSDLInterfaceOperationOutput(WSDLInterfaceOperation wsdlOperation)
+ {
+ super(wsdlOperation);
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLMIMEPart.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLMIMEPart.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLMIMEPart.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLMIMEPart.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Represents a WSDL 1.1 MIME Multipart attachment.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSDLMIMEPart implements Serializable
+{
+ private static final long serialVersionUID = -3102495235178249853L;
+
+ private final String partName;
+ private final QName xmlType;
+ private final String mimeTypes;
+
+ public WSDLMIMEPart(String partName, QName xmlType, String mimeTypes)
+ {
+ this.mimeTypes = mimeTypes;
+ this.partName = partName;
+ this.xmlType = xmlType;
+ }
+
+ /**
+ * Returns the xml type of this attachment. Typically xsd:hexBinary
+ *
+ * @return the name of the header schema element
+ */
+ public QName getXmlType()
+ {
+ return xmlType;
+ }
+
+ /**
+ * Returns the name of the WSDL 1.1 part, if the output is WSDL 1.1
+ *
+ * @return the name of the part
+ */
+ public String getPartName()
+ {
+ return partName;
+ }
+
+ /**
+ * Returns a comma seperated list of allowed mime types.
+ *
+ * @return the mime types
+ */
+ public String getMimeTypes()
+ {
+ return mimeTypes;
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLProperty.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLProperty.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLProperty.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLProperty.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,117 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+// $Id$
+
+
+/**
+ * A "property" in the Features and Properties architecture represents a named
runtime value which affects
+ * the behaviour of some aspect of a Web service interaction, much like an environment
variable. For
+ * example, a reliable messaging SOAP module may specify a property to control the number
of retries in the
+ * case of network failure. WSDL documents may specify the value constraints for these
properties by
+ * referring to a Schema type, or by specifying a particular value. Properties, and hence
property values, can
+ * be shared amongst features/bindings/modules, and are named with URIs precisely to
allow this type of
+ * sharing.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLProperty implements Serializable
+{
+ private static final long serialVersionUID = -7528676719881753461L;
+
+ /** A REQUIRED uri attribute information item */
+ private String uri;
+ /** An OPTIONAL required attribute information item */
+ private boolean required;
+ /** The OPTIONAL value of the property, an ordered list of child information items,
as
+ * specified by the [children] property of element information items */
+ private String value;
+ /** A OPTIONAL type definition constraining the value of the property, or the token
+ * #value if the {value} property is not empty.*/
+ private QName constraint;
+
+ public WSDLProperty(String uri, String value)
+ {
+ if (uri == null)
+ throw new IllegalArgumentException("Illegal property URI: " + uri);
+
+ this.uri = uri;
+ this.value = value;
+ }
+
+ public WSDLProperty(String uri, boolean required, String value, QName constraint)
+ {
+ if (uri == null)
+ throw new IllegalArgumentException("Illegal property URI: " + uri);
+
+ this.uri = uri;
+ this.required = required;
+ this.value = value;
+ this.constraint = constraint;
+ }
+
+ public String getURI()
+ {
+ return uri;
+ }
+
+ public boolean isRequired()
+ {
+ return required;
+ }
+
+ public void setRequired(boolean required)
+ {
+ this.required = required;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public QName getConstraint()
+ {
+ return constraint;
+ }
+
+ public void setConstraint(QName constraint)
+ {
+ this.constraint = constraint;
+ }
+
+ public String toString()
+ {
+ return "[" + uri + "=" + value + "]";
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCPart.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLRPCPart.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLRPCPart.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCPart.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Represents a child part of a RPC style message reference. This is currently
+ * only used for WSDL 1.1 compatibility.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSDLRPCPart
+{
+ private final String name;
+ private final QName type;
+
+ public WSDLRPCPart(String name, QName type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
+ /**
+ * Gets the XML local name of this part.
+ *
+ * @return the XML local name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Gets the XML type of this part.
+ *
+ * @return the XML type
+ */
+ public QName getType()
+ {
+ return type;
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCSignatureItem.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLRPCSignatureItem.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLRPCSignatureItem.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCSignatureItem.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+
+/**
+ * Represents an individual item of a wrpc:signature
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSDLRPCSignatureItem
+{
+ public enum Direction {IN, OUT, INOUT, RETURN};
+
+ private Direction direction;
+ private final String name;
+ private int position;
+
+ public WSDLRPCSignatureItem(String name)
+ {
+ this.name = name;
+ this.direction = Direction.IN;
+ }
+
+ public WSDLRPCSignatureItem(String name, Direction direction)
+ {
+ this.direction = direction;
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Direction getDirection()
+ {
+ return direction;
+ }
+
+ public void setDirection(Direction direction)
+ {
+ this.direction = direction;
+ }
+
+ public void setPosition(int position)
+ {
+ this.position = position;
+ }
+
+ public int getPosition()
+ {
+ return position;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLSOAPHeader.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLSOAPHeader.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLSOAPHeader.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLSOAPHeader.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Represents a WSDL 2.0 SOAP Header Block. The presence of the SOAP Header
+ * Block component indicates that the service supports headers and MAY require a
+ * web service consumer/client to use the header. It may appear up to one time
+ * in the message.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class WSDLSOAPHeader implements Serializable
+{
+ private static final long serialVersionUID = -3102495235178249853L;
+
+ private final QName element;
+ private final String partName;
+ private boolean required = false;
+ private boolean mustUnderstand = false;
+ private boolean includeInSignature = false;
+
+ public WSDLSOAPHeader(QName element, String partName)
+ {
+ this.element = element;
+ this.partName = partName;
+ }
+
+ /**
+ * Returns the name of the header schema element that describes the header's
+ * contents.
+ *
+ * @return the name of the header schema element
+ */
+ public QName getElement()
+ {
+ return element;
+ }
+
+ /**
+ * Returns the name of the WSDL 1.1 part, if the output is WSDL 1.1
+ *
+ * @return the name of the part
+ */
+ public String getPartName()
+ {
+ return partName;
+ }
+
+ /**
+ * Indicates whether the resulting SOAP header has a mustUnderstand attribute
+ * set to true.
+ *
+ * @return the value of the SOAP mustUnderstand attribute
+ */
+ public boolean isMustUnderstand()
+ {
+ return mustUnderstand;
+ }
+
+ /**
+ * Specifies whether the resulting SOAP Header has a mustUnderstand attribute
+ * set to true.
+ *
+ * @param mustUnderstand the value of the SOAP mustUnderstand attribute
+ */
+ public void setMustUnderstand(boolean mustUnderstand)
+ {
+ this.mustUnderstand = mustUnderstand;
+ }
+
+ /**
+ * Indicates whether the resulting SOAP header must be present in the
+ * message.
+ *
+ * @return true if the header must be present, otherwise false
+ */
+ public boolean isRequired()
+ {
+ return required;
+ }
+
+ /**
+ * Specifies whether the resulting SOAP header is required to be present on
+ * the message.
+ *
+ * @param required true if the header must be present, otherwise false
+ */
+ public void setRequired(boolean required)
+ {
+ this.required = required;
+ }
+
+ /**
+ * Indicates the resulting WSDL should include this header as part of the
+ * interface message. This is currently only valid for WSDL 1.1, as WSDL 2.0
+ * does not have an equivalent way to specify this. This serves as a hint to
+ * binding tools that the header should be mapped to a Java parameter.
+ *
+ * @return whether the header should be part of the interface message
+ */
+ public boolean isIncludeInSignature()
+ {
+ return includeInSignature;
+ }
+
+ /**
+ * Speficies the resulting WSDL should include this header as part of the
+ * interface message. This is currently only valid for WSDL 1.1, as WSDL 2.0
+ * does not have an equivalent way to specify this. This serves as a hint to
+ * binding tools that the header should be mapped to a Java parameter.
+ *
+ * @param includeInSignature whether the header should be part of the
+ * interface message
+ */
+ public void setIncludeInSignature(boolean includeInSignature)
+ {
+ this.includeInSignature = includeInSignature;
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLService.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLService.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLService.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLService.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,139 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A Service component describes a set of endpoints (see 2.14 Endpoint [p.62] ) at which
a particular
+ * deployed implementation of the service is provided. The endpoints thus are in effect
alternate places at
+ * which the service is provided.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLService extends Extendable
+{
+ private static final long serialVersionUID = 1274166611190648479L;
+
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDLService.class);
+
+ // The parent WSDL definitions element.
+ private WSDLDefinitions wsdlDefinitions;
+
+ /** The REQUIRED name attribute information item together with the targetNamespace
attribute information item
+ * of the definitions element information item forms the QName of the service.*/
+ private NCName name;
+
+ /** Derived QName identifier.
+ */
+ private QName qname;
+
+ /** The interface attribute information item identifies the interface that the service
is an instance of. */
+ private QName interfaceName;
+
+ /** One or more endpoint element information items */
+ private ArrayList<WSDLEndpoint> endpoints = new
ArrayList<WSDLEndpoint>();
+
+ public WSDLService(WSDLDefinitions wsdlDefinitions)
+ {
+ log.trace("new WSDLService");
+ this.wsdlDefinitions = wsdlDefinitions;
+ }
+
+ public WSDLDefinitions getWsdlDefinitions()
+ {
+ return wsdlDefinitions;
+ }
+
+ public NCName getName()
+ {
+ return name;
+ }
+
+ public void setName(NCName name)
+ {
+ log.trace("setName: " + name);
+ this.name = name;
+ }
+
+ public QName getQName()
+ {
+ if (qname == null)
+ {
+ String tnsURI = wsdlDefinitions.getTargetNamespace();
+ qname = new QName(tnsURI, name.toString());
+ }
+ return qname;
+ }
+
+
+ public void setQName(QName qname)
+ {
+ log.trace("setQName: " + qname);
+ this.qname = qname;
+ }
+
+ public QName getInterfaceName()
+ {
+ return interfaceName;
+ }
+
+ public void setInterfaceName(QName interfaceName)
+ {
+ this.interfaceName = interfaceName;
+ }
+
+ public WSDLEndpoint[] getEndpoints()
+ {
+ WSDLEndpoint[] arr = new WSDLEndpoint[endpoints.size()];
+ endpoints.toArray(arr);
+ return arr;
+ }
+
+ public void addEndpoint(WSDLEndpoint endpoint)
+ {
+ endpoints.add(endpoint);
+ }
+
+ /** Get an endpoint for the given name
+ */
+ public WSDLEndpoint getEndpoint(QName portName)
+ {
+ Iterator it = endpoints.iterator();
+ while (it.hasNext())
+ {
+ WSDLEndpoint wsdlEndpoint = (WSDLEndpoint)it.next();
+ if (portName.equals(wsdlEndpoint.getQName()))
+ return wsdlEndpoint;
+ }
+ return null;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLTypes.java (from
rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLTypes.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLTypes.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLTypes.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+//$Id$
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+
+/**
+ * WSDL types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public abstract class WSDLTypes implements Serializable
+{
+ private static final long serialVersionUID = 7919937323521372194L;
+
+ // provide logging
+ static private final Logger log = Logger.getLogger(WSDLTypes.class);
+
+ private WSDLDefinitions wsdlDefinitions;
+ private String namespace;
+
+ public abstract QName getXMLType(QName name);
+
+ public WSDLDefinitions getWsdlDefinitions()
+ {
+ return wsdlDefinitions;
+ }
+
+ void setWSDLDefintiions(WSDLDefinitions parent)
+ {
+ wsdlDefinitions = parent;
+ }
+
+ /**
+ * Gets the namespace associate with this types declaration. Currently this is used to
filter
+ * which WSDL file receives this types definition. Null means all files.
+ *
+ * @return the namespace associated with this type definition
+ */
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ public void setNamespace(String namespace)
+ {
+ this.namespace = namespace;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLUtils.java (from
rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,887 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+import java.util.StringTokenizer;
+
+import javax.ejb.SessionBean;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.holders.BigDecimalHolder;
+import javax.xml.rpc.holders.BigIntegerHolder;
+import javax.xml.rpc.holders.BooleanHolder;
+import javax.xml.rpc.holders.BooleanWrapperHolder;
+import javax.xml.rpc.holders.ByteArrayHolder;
+import javax.xml.rpc.holders.ByteHolder;
+import javax.xml.rpc.holders.ByteWrapperHolder;
+import javax.xml.rpc.holders.CalendarHolder;
+import javax.xml.rpc.holders.DoubleHolder;
+import javax.xml.rpc.holders.DoubleWrapperHolder;
+import javax.xml.rpc.holders.FloatHolder;
+import javax.xml.rpc.holders.FloatWrapperHolder;
+import javax.xml.rpc.holders.Holder;
+import javax.xml.rpc.holders.IntHolder;
+import javax.xml.rpc.holders.IntegerWrapperHolder;
+import javax.xml.rpc.holders.LongHolder;
+import javax.xml.rpc.holders.LongWrapperHolder;
+import javax.xml.rpc.holders.ObjectHolder;
+import javax.xml.rpc.holders.QNameHolder;
+import javax.xml.rpc.holders.ShortHolder;
+import javax.xml.rpc.holders.ShortWrapperHolder;
+import javax.xml.rpc.holders.StringHolder;
+
+import org.apache.xerces.xs.XSComplexTypeDefinition;
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.xb.binding.Util;
+
+/**
+ * Singleton utils class used for Java2WSDL and WSDL2Java operations
+ *
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Nov 3, 2004
+ */
+
+public class WSDLUtils
+{
+ private String newline = "\n";
+ private static WSDLUtils instance = new WSDLUtils();
+
+ private List wrapperlist = null;
+ private List primlist = null;
+
+ private final Map primitiveMap = new HashMap();
+
+ private final static Map<String,Class> schemaBasicTypes = new
HashMap<String,Class>();
+
+ private final static Map<Class,Class> holderTypes = new
HashMap<Class,Class>();
+ private final static Map<Class,Class> reverseHolderTypes = new
HashMap<Class,Class>();
+
+ // Skip these methods when generating wsdl operations
+ private List<String> ignoredMethods;
+
+ static
+ {
+ schemaBasicTypes.put("anyURI", java.net.URI.class);
+ schemaBasicTypes.put("boolean", Boolean.TYPE);
+ schemaBasicTypes.put("byte", Byte.TYPE);
+ schemaBasicTypes.put("decimal", java.math.BigDecimal.class);
+ schemaBasicTypes.put("double", Double.TYPE);
+ schemaBasicTypes.put("dateTime", Calendar.class);
+ schemaBasicTypes.put("float", Float.TYPE);
+ schemaBasicTypes.put("int", Integer.TYPE);
+ schemaBasicTypes.put("integer", BigInteger.class);
+ schemaBasicTypes.put("long", Long.TYPE);
+ schemaBasicTypes.put("QName", QName.class);
+ schemaBasicTypes.put("short", Short.TYPE);
+ schemaBasicTypes.put("String", String.class);
+ }
+
+ static
+ {
+ holderTypes.put(BigDecimal.class,BigDecimalHolder.class);
+ holderTypes.put(BigInteger.class,BigIntegerHolder.class);
+ holderTypes.put(boolean.class,BooleanHolder.class);
+ holderTypes.put(Boolean.class,BooleanWrapperHolder.class);
+ holderTypes.put(byte.class,ByteHolder.class);
+ holderTypes.put(Byte.class,ByteWrapperHolder.class);
+ holderTypes.put(Byte[].class,ByteArrayHolder.class);
+ holderTypes.put(Calendar.class,CalendarHolder.class);
+ holderTypes.put(double.class,DoubleHolder.class);
+ holderTypes.put(Double.class,DoubleWrapperHolder.class);
+ holderTypes.put(float.class, FloatHolder.class);
+ holderTypes.put(Float.class, FloatWrapperHolder.class);
+ holderTypes.put(int.class,IntHolder.class);
+ holderTypes.put(Integer.class,IntegerWrapperHolder.class);
+ holderTypes.put(long.class,LongHolder.class);
+ holderTypes.put(Long.class,LongWrapperHolder.class);
+ holderTypes.put(Object.class,ObjectHolder.class);
+ holderTypes.put(QName.class,QNameHolder.class);
+ holderTypes.put(short.class,ShortHolder.class);
+ holderTypes.put(Short.class,ShortWrapperHolder.class);
+ holderTypes.put(String.class,StringHolder.class);
+ }
+
+ static
+ {
+ reverseHolderTypes.put(BigDecimalHolder.class , BigDecimal.class);
+ reverseHolderTypes.put(BigIntegerHolder.class , BigInteger.class);
+ reverseHolderTypes.put(BooleanHolder.class , boolean.class);
+ reverseHolderTypes.put(BooleanWrapperHolder.class, Boolean.class);
+ reverseHolderTypes.put(ByteArrayHolder.class, Byte[].class);
+ reverseHolderTypes.put(ByteHolder.class, byte.class);
+ reverseHolderTypes.put(ByteWrapperHolder.class,Byte.class );
+ reverseHolderTypes.put(CalendarHolder.class,Calendar.class);
+ reverseHolderTypes.put(DoubleHolder.class,double.class );
+ reverseHolderTypes.put(DoubleWrapperHolder.class,Double.class);
+ reverseHolderTypes.put(FloatHolder.class,float.class);
+ reverseHolderTypes.put(FloatWrapperHolder.class, Float.class);
+ reverseHolderTypes.put(IntHolder.class,int.class );
+ reverseHolderTypes.put(IntegerWrapperHolder.class,Integer.class );
+ reverseHolderTypes.put(LongHolder.class, long.class);
+ reverseHolderTypes.put(LongWrapperHolder.class,Long.class);
+ reverseHolderTypes.put(ObjectHolder.class,Object.class);
+ reverseHolderTypes.put(QNameHolder.class,QName.class);
+ reverseHolderTypes.put(ShortHolder.class,short.class);
+ reverseHolderTypes.put(ShortWrapperHolder.class,Short.class);
+ reverseHolderTypes.put(StringHolder.class,String.class);
+ }
+
+
+ /**
+ * Singleton - Only way to get an instance
+ * @return
+ */
+ public static WSDLUtils getInstance()
+ {
+ return instance;
+ }
+
+ private WSDLUtils()
+ {
+ wrapperlist = new ArrayList();
+ primlist = new ArrayList();
+ populatePrimList();
+ populateWrapperList();
+ createPrimitiveMap();
+ }
+
+ /**
+ * Check if it is of Primitive Type
+ * @param str
+ * @return
+ */
+ public boolean isPrimitive(String str)
+ {
+ return primlist.contains(str);
+ }
+
+ /**
+ * Check if it is of Wrapper Type
+ * @param str
+ * @return
+ */
+ public boolean isWrapper(String str)
+ {
+ return wrapperlist.contains(str);
+ }
+
+ /**
+ * For the given complex type, check if its base type is the regular xsd type
(xsd:anyType)
+ * which can be ignored
+ * @param baseType
+ * @param t ComplexTypeDefinition
+ * @return true:ignorable, false-otherwise(user defined base type)
+ */
+ public boolean isBaseTypeIgnorable(XSTypeDefinition baseType, XSComplexTypeDefinition
t)
+ {
+ boolean bool = false;
+
+ //Check baseType is xsd:anyType
+ if (baseType != null)
+ {
+ if (baseType.getNamespace() == Constants.NS_SCHEMA_XSD &&
+ baseType.getName().equals("anyType"))
+ bool = true; //Ignore this baseType
+ }
+ if (XSComplexTypeDefinition.CONTENTTYPE_SIMPLE == t.getContentType())
+ {
+ bool = true; //ComplexType has a simplecontent
+ }
+
+ return bool;
+
+ }
+
+
+ /**
+ * Check if the class is a Java standard class
+ * @param cls
+ * @return true if class belongs to java.* or javax.* package
+ */
+ public boolean checkIgnoreClass(Class cls)
+ {
+ if(cls == null)
+ throw new IllegalArgumentException("Illegal null argument:cls");
+ //if (cls.isArray()) cls = cls.getComponentType();
+ if (!cls.isArray())
+ {
+ String pkgname = cls.getPackage() != null ? cls.getPackage().getName() : null;
+ if (pkgname != null && pkgname.startsWith("java")) return
true;
+
+ if (ParameterWrapping.WrapperType.class.isAssignableFrom(cls))
+ return true;
+
+ }
+ return false;
+ }
+
+
+ /** Check if this method should be ignored
+ */
+ public boolean checkIgnoreMethod(Method method)
+ {
+ String methodname = method.getName();
+ if (ignoredMethods == null)
+ {
+ ignoredMethods = new ArrayList<String>();
+ Method[] objMethods = Object.class.getMethods();
+ for (int i = 0; i < objMethods.length; i++)
+ {
+ ignoredMethods.add(objMethods[i].getName());
+ }
+ //Add the SessionBean Methods to the ignore list
+ Method[] sbMethods = SessionBean.class.getMethods();
+ for (int i = 0; i < sbMethods.length; i++)
+ {
+ ignoredMethods.add(sbMethods[i].getName());
+ }
+ }
+
+ boolean ignoreMethod = ignoredMethods.contains(methodname);
+
+ // FIXME: This code is a duplicate, it should read from the UMDM
+ if (method.getDeclaringClass().isAnnotationPresent(WebService.class) &&
method.isAnnotationPresent(WebMethod.class) == false)
+ ignoreMethod = true;
+
+ return ignoreMethod;
+ }
+
+
+ /**
+ * Chop "PortType" at the end of the String
+ * @param name
+ * @return
+ */
+ public String chopPortType(String name)
+ {
+ int index = name.lastIndexOf("PortType");
+ if (index > 0) return name.substring(0, index);
+
+ return name;
+ }
+
+ /**
+ * Chop chopstr at the end of the String
+ * @param name
+ * @param chopstr the string that is the key Eg: Fault
+ * @return
+ */
+ public String chop(String name, String chopstr)
+ {
+ int index = name.lastIndexOf(chopstr);
+ if (index > 0) return name.substring(0, index);
+
+ return name;
+ }
+
+ /**
+ * Given a packageName, start creating the package structure
+ * @param packageName
+ */
+ public File createPackage(String path, String packageName)
+ {
+ if(packageName == null )
+ throw new IllegalArgumentException("Illegal Null Argument:
packageName");
+ if(path == null)
+ throw new IllegalArgumentException("Illegal Null Argument: path");
+ String pac = packageName.replace('.', '/');
+ File dir = new File(path + "/" + pac);
+ dir.mkdirs();
+ return dir;
+ }
+
+ /**
+ * Create a file on the disk
+ * @param loc Location where the file has to be created
+ * @param fname File Name to which '.java' will be appended
+ * @return
+ * @throws IOException Problem creating the file
+ */
+ public File createPhysicalFile(File loc, String fname)
+ throws IOException
+ {
+ if(loc == null )
+ throw new IllegalArgumentException("Illegal Null Argument: loc");
+ if(fname == null)
+ throw new IllegalArgumentException("Illegal Null Argument: fname");
+ File sei = new File(loc.getAbsolutePath() + "/" + fname +
".java");
+ //Delete the sei if already exists
+ if (sei.exists()) sei.delete();
+ boolean boolCreate = sei.createNewFile();
+ if (!boolCreate)
+ throw new WSException("SEI " + fname + ".java cannot be
created");
+ return sei;
+ }
+
+
+ /**
+ * Create the basic template of a class
+ * @param pkgname Package Name
+ * @param fname File Name to which '.java' will be appended
+ * @param type XSDType to obtain base class info (if Complex Type)
+ * @param importList Strings representing imports
+ * @return
+ */
+ public StringBuilder createClassBasicStructure(String pkgname,
+ String fname,
+ XSTypeDefinition type,
+ List importList, String baseName)
+ {
+ StringBuilder buf = new StringBuilder();
+ writeJbossHeader(buf);
+ buf.append(newline);
+ buf.append("package " + pkgname + ";");
+ buf.append(newline);
+ buf.append(newline);
+ if (importList != null)
+ {
+ Iterator iter = importList.iterator();
+ while (iter.hasNext())
+ {
+ buf.append("import " + (String)iter.next() + ";");
+ buf.append(newline);
+ }
+ }
+ buf.append(newline);
+ 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
+ }
+ }
+
+ buf.append("public class " + fname);
+ if(baseName == null && baseType != null)
+ baseName = baseType.getName();
+ if(baseName != null)
+ buf.append(" extends " + baseName);
+ buf.append(newline);
+ buf.append("{");
+ buf.append(newline);
+
+ return buf;
+ }
+
+ /**
+ * Checks whether there exists a public field with the given name
+ * @param javaType Class Object
+ * @param name Field name to check
+ * @return true - if public field exists, false-otherwise
+ */
+ public boolean doesPublicFieldExist( Class javaType, String name)
+ {
+ Field fld = null;
+ try
+ {
+ fld = javaType.getField(name);
+ }
+ catch (SecurityException e)
+ {
+ throw e;
+ }
+ catch (NoSuchFieldException e)
+ {
+ return false;
+ }
+ int mod = fld.getModifiers();
+ if ((mod == Modifier.PUBLIC))
+ return true;
+ return false;
+ }
+
+
+ /**
+ * Ensure that the first alphabet is uppercase
+ * @param fname
+ * @return
+ */
+ public String firstLetterUpperCase(String fname)
+ {
+ if (fname == "" || fname == null)
+ throw new WSException("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;
+ }
+
+ /**
+ * Get the dimension of an array
+ * @param arr
+ * @return dimension of an array
+ */
+ public int getArrayDimension(Class arr)
+ {
+ if(arr == null || arr.isArray() == false)
+ throw new IllegalArgumentException("Illegal null or array arg:arr");
+ int counter = 0;
+ while(arr.isArray()) {
+ counter += 1;
+ arr = arr.getComponentType();
+ }
+ return counter;
+ }
+
+ /**
+ * Return the Jaxrpc holder that
+ * represents the class
+ * @param cls
+ * @return Jaxrpc Holder object if exists
+ */
+ public Class getHolder(Class cls)
+ {
+ return holderTypes.get(cls);
+ }
+
+ /**
+ * Return the Java class that is represented by
+ * the Jaxrpc holder
+ * @param cls The jaxrpc holder type
+ * @return Jaxrpc Holder object if exists
+ */
+ public Class getJavaTypeForHolder(Class cls)
+ {
+ if(Holder.class.isAssignableFrom(cls))
+ return HolderUtils.getValueType(cls);
+ else
+ return cls;
+ //return reverseHolderTypes.get(cls);
+ }
+
+
+ /**
+ * An input of "HelloObjArray" is converted into arrayOfHelloObj
+ * Applied in the input part for WSDL 1.1 Messages
+ * @param arrayStr
+ * @return
+ */
+
+ public String getMessagePartForArray(Class javaType)
+ {
+ StringBuilder sb = new StringBuilder();
+ while (javaType.isArray())
+ {
+ sb.append("arrayOf");
+ javaType = javaType.getComponentType();
+ }
+
+ sb.append(getJustClassName(javaType));
+ return sb.toString();
+ }
+
+ /**
+ * Given a class, strip out the package name
+ *
+ * @param cls
+ * @return just the classname
+ */
+
+ public static String getJustClassName(Class cls)
+ {
+ if (cls == null) return null;
+ if (cls.isArray())
+ {
+ Class c = cls.getComponentType();
+ return getJustClassName(c.getName());
+ }
+
+ return getJustClassName(cls.getName());
+ }
+
+ /**
+ * Given a FQN of a class, strip out the package name
+ *
+ * @param classname
+ * @return just the classname
+ */
+ public static String getJustClassName(String classname)
+ {
+ int index = classname.lastIndexOf(".");
+ if (index < 0)
+ index = 0;
+ else
+ index = index + 1;
+ return classname.substring(index);
+ }
+
+ /**
+ * From the list of fields defined by this class (not superclasses)
+ * get the fields that are relevant (public)
+ */
+ public Field[] getPublicFields(Class cls)
+ {
+ ArrayList list = new ArrayList();
+
+ Field[] fld = cls.getDeclaredFields();
+ for (int i = 0; i < fld.length; i++)
+ {
+ Field field = fld[i];
+ int mod = field.getModifiers();
+ if ((mod == Modifier.PUBLIC))
+ list.add(field);
+ }//end for
+
+ Field[] retarr = new Field[list.size()];
+ list.toArray(retarr);
+
+ return retarr;
+ }
+
+ /**
+ * From the list of fields defined by this class (not superclasses)
+ * get the fields that are relevant (public/protected)
+ *
+ * @param methods
+ * @return
+ */
+ public Method[] getPublicProtectedMethods(Method[] methods)
+ {
+ ArrayList list = new ArrayList();
+ int len = methods.length;
+
+ for (int i = 0; i < len; i++)
+ {
+ Method method = methods[i];
+ int mod = method.getModifiers();
+ if ((mod == Modifier.PUBLIC || mod == Modifier.PROTECTED))
+ list.add(method);
+ }//end for
+
+ Method[] retarr = new Method[list.size()];
+ list.toArray(retarr);
+ return retarr;
+ }
+
+ /**
+ * Given the XMLType, we will check if it is of basic schema
+ * types that are mapped to Java primitives and wrappers
+ * Jaxrpc 1.1 Section 5.3
+ * @param xmlType
+ * @return
+ */
+ public Class getJavaType(QName xmlType)
+ {
+ if (xmlType == null) return null;
+ String localPart = xmlType.getLocalPart();
+ return (Class)schemaBasicTypes.get(localPart);
+ }
+
+ /**
+ * Change the first character to uppercase
+ * @param str
+ * @return
+ */
+ public String getMixedCase(String str)
+ {
+ if (str == null || str.length() == 0)
+ throw new IllegalArgumentException("String passed to WSDLUtils.getMixedCase
is null");
+
+ if (str.length() == 1) return str.toUpperCase();
+ char[] charr = str.toCharArray();
+ charr[0] = Character.toUpperCase(charr[0]);
+ return new String(charr);
+ }
+
+
+
+ /**
+ * Given a QName, provide a string that is prefix:localpart
+ * @param qn
+ * @return formatted string
+ */
+ public String getFormattedString(QName qn)
+ {
+ if (qn == null)
+ throw new IllegalArgumentException(" QName passed is null");
+ StringBuilder sb = new StringBuilder();
+ String prefix = qn.getPrefix();
+ String localpart = qn.getLocalPart();
+ if (prefix == null || prefix == "") prefix = Constants.PREFIX_TNS;
+ sb.append(prefix + ":");
+ sb.append(localpart);
+
+ return sb.toString();
+ }
+
+ /**
+ * Return a QName given a formatted string
+ * @param formattedStr string that is prefix:localpart
+ * @return QName
+ */
+ public QName getQName( String formattedStr)
+ {
+ QName qn = null;
+ int ind = formattedStr.lastIndexOf(":");
+ if(ind < 0)
+ throw new IllegalArgumentException("Formatted String is not of format
prefix:localpart");
+ String prefix = formattedStr.substring(0,ind);
+ String nsuri = null;
+ if(Constants.PREFIX_XSD.equals(prefix)) nsuri = Constants.NS_SCHEMA_XSD;
+ if(nsuri == null)
+ qn = new QName( formattedStr.substring(ind+1) );
+ else
+ qn = new QName( nsuri,formattedStr.substring(ind+1),prefix);
+ return qn;
+ }
+
+
+ /**
+ * Return the primitive for a wrapper equivalent (Integer -> int)
+ * @param str
+ * @return
+ */
+ public String getPrimitive(String str)
+ {
+ return (String)primitiveMap.get(str);
+ }
+
+ /**
+ * Extracts the package name from the typeNS
+ * @param typeNS
+ * @return
+ */
+ public String getPackageName(String typeNS)
+ {
+ String pkgname = Util.xmlNamespaceToJavaPackage(typeNS);
+ int len = pkgname.length();
+ return pkgname;
+ }
+
+ public String getTypeNamespace(Class javaType)
+ {
+ return getTypeNamespace(javaType.getPackage().getName());
+ }
+
+ /**
+ * Extracts the typeNS given the package name
+ * Algorithm is based on the one specified in JAWS v2.0 spec
+ * @param packageName
+ * @return the type namespace
+ */
+ public String getTypeNamespace(String packageName)
+ {
+ StringBuilder sb = new StringBuilder("http://");
+
+ //Generate tokens with '.' as delimiter
+ StringTokenizer st = new StringTokenizer(packageName,".");
+
+ //Have a LIFO queue for the tokens
+ Stack<String> stk = new Stack<String>();
+ while(st != null && st.hasMoreTokens())
+ {
+ stk.push(st.nextToken());
+ }
+
+ String next;
+ while(!stk.isEmpty() && (next=stk.pop())!=null)
+ {
+ if(sb.toString().equals("http://") == false)
sb.append(".");
+ sb.append(next);
+ }
+
+ // trailing slash
+ sb.append("/");
+
+ return sb.toString();
+ }
+
+ /**
+ * Given WSDLDefinitions, detect the wsdl style
+ *
+ * @param wsdl
+ * @return Constants.RPC_LITERAL or Constants.DOCUMENT_LITERAL
+ */
+ public String getWSDLStyle(WSDLDefinitions wsdl)
+ {
+ WSDLInterface wi = wsdl.getInterfaces()[0];
+ WSDLInterfaceOperation wio = wi.getOperations()[0];
+ String style = wio.getStyle();
+ if(style == null || style.equals(Constants.URI_STYLE_RPC) ||
"rpc".equalsIgnoreCase(style))
+ return Constants.RPC_LITERAL;
+ else
+ return Constants.DOCUMENT_LITERAL;
+ }
+
+ public static JBossXSModel getSchemaModel(WSDLTypes types)
+ {
+ if (types instanceof XSModelTypes)
+ return ((XSModelTypes) types).getSchemaModel();
+
+ throw new WSException("WSDLTypes is not an XSModelTypes");
+ }
+
+ public static void addSchemaModel(WSDLTypes types, String namespace, JBossXSModel
model)
+ {
+ if (! (types instanceof XSModelTypes))
+ throw new WSException("WSDLTypes is not an XSModelTypes");
+
+ XSModelTypes modelTypes = (XSModelTypes) types;
+ modelTypes.addSchemaModel(namespace, model);
+ }
+
+ /**
+ * Checks whether the class is a standard jaxrpc holder
+ *
+ * @param cls a Class object
+ * @return true: A Standard jaxrpc holder
+ */
+ public boolean isStandardHolder(Class cls)
+ {
+ if(Holder.class.isAssignableFrom(cls) == false)
+ return false; //Not even a holder
+ //It is a holder. Is it a standard holder?
+ if(cls.getPackage().getName().startsWith("javax.xml.rpc"))
+ return true;
+ return false;
+ }
+
+ /**
+ * Write the JBoss License Header at the top of generated class source files
+ * @param buf
+ */
+ public void writeJbossHeader(StringBuilder buf)
+ {
+ buf.append("/*").append(newline);
+ buf.append(" * JBossWS WS-Tools Generated Source").append(newline);
+ buf.append(" *").append(newline);
+ buf.append(" * Generation Date: " + new Date() + newline);
+ buf.append(" *").append(newline);
+ buf.append(" * This generated source code represents a derivative work of the
input to").append(newline);
+ buf.append(" * the generator that produced it. Consult the input for the
copyright and").append(newline);
+ buf.append(" * terms of use that apply to this source
code.").append(newline);
+ buf.append(" */").append(newline);
+ }
+
+ protected void populatePrimList()
+ {
+ primlist.add("int");
+ primlist.add("boolean");
+ primlist.add("short");
+ primlist.add("byte");
+ primlist.add("long");
+ primlist.add("float");
+ primlist.add("double");
+ }
+
+ protected void populateWrapperList()
+ {
+ wrapperlist.add("java.lang.Integer");
+ wrapperlist.add("java.lang.Boolean");
+ wrapperlist.add("java.lang.Short");
+ wrapperlist.add("java.lang.Byte");
+ wrapperlist.add("java.lang.Long");
+ wrapperlist.add("java.lang.Float");
+ wrapperlist.add("java.lang.Double");
+ wrapperlist.add("java.lang.String");
+
+ wrapperlist.add("java.math.BigInteger");
+ wrapperlist.add("java.math.BigDecimal");
+ wrapperlist.add("java.util.Calendar");
+ wrapperlist.add("javax.xml.namespace.QName");
+ }
+
+ private void createPrimitiveMap()
+ {
+ primitiveMap.put("Integer", "int");
+ primitiveMap.put("Float", "float");
+ primitiveMap.put("Long", "long");
+ primitiveMap.put("Double", "double");
+ primitiveMap.put("Short", "short");
+ primitiveMap.put("Boolean", "boolean");
+ primitiveMap.put("Byte", "byte");
+ primitiveMap.put("java.lang.Integer", "int");
+ primitiveMap.put("java.lang.Float", "float");
+ primitiveMap.put("java.lang.Long", "long");
+ primitiveMap.put("java.lang.Double", "double");
+ primitiveMap.put("java.lang.Short", "short");
+ primitiveMap.put("java.lang.Boolean", "boolean");
+ primitiveMap.put("java.lang.Byte", "byte");
+ }
+
+ public static WSDLInterfaceOperationOutput getWsdl11Output(WSDLInterfaceOperation
operation)
+ {
+ WSDLInterfaceOperationOutput[] outputs = operation.getOutputs();
+ if (outputs == null)
+ return null;
+
+ switch (outputs.length)
+ {
+ case 0: return null;
+ case 1: return outputs[0];
+ }
+
+ throw new WSException("Only Request-Only and Request-Response MEPs are
allowed");
+ }
+
+ public static WSDLInterfaceOperationInput getWsdl11Input(WSDLInterfaceOperation
operation)
+ {
+ WSDLInterfaceOperationInput[] inputs = operation.getInputs();
+ if (inputs == null)
+ return null;
+
+ switch (inputs.length)
+ {
+ case 0: return null;
+ case 1: return inputs[0];
+ }
+
+ throw new WSException("Only Request-Only and Request-Response MEPs are
allowed");
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/XSModelTypes.java
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/XSModelTypes.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/XSModelTypes.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/XSModelTypes.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,110 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl;
+
+import javax.xml.namespace.QName;
+
+import org.apache.xerces.xs.XSElementDeclaration;
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+
+/**
+ * A JBossXSModel based type definition.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class XSModelTypes extends WSDLTypes
+{
+ private static final Logger log = Logger.getLogger(XSModelTypes.class);
+
+ private JBossXSModel schemaModel;
+
+ public XSModelTypes()
+ {
+ this.schemaModel = new JBossXSModel();
+ }
+
+ /**
+ * Add a schema model for a given namespaceURI
+ * @param nsURI the namespaceURI under which the model has been generated
+ * @param schema the Schema Model that needs to be added to existing schema
+ * model in WSDLTypes
+ * <dt>Warning:</dd>
+ * <p>Passing a null nsURI will replace the internal schema model
+ * held by WSDLTypes by the model passed as an argument.</p>
+ */
+ public void addSchemaModel(String nsURI, JBossXSModel schema)
+ {
+ if(nsURI == null)
+ {
+ log.trace("nsURI passed to addSchemaModel is null. Replacing Schema
Model");
+ schemaModel = schema;
+ }
+ else
+ schemaModel.merge(schema);
+ }
+
+ /**
+ * Return the global Schema Model
+ * @return
+ */
+ public JBossXSModel getSchemaModel()
+ {
+ return schemaModel;
+ }
+
+ /** Get the xmlType from a given element xmlName
+ */
+ public QName getXMLType(QName xmlName)
+ {
+ QName xmlType = null;
+ String nsURI = xmlName.getNamespaceURI();
+ String localPart = xmlName.getLocalPart();
+ XSElementDeclaration xsel = schemaModel.getElementDeclaration(localPart, nsURI);
+ if (xsel != null)
+ {
+ XSTypeDefinition xstype = xsel.getTypeDefinition();
+ if (xstype == null)
+ throw new WSException("Cannot obtain XSTypeDefinition for: " +
xmlName);
+
+ if (xstype.getAnonymous() == false)
+ {
+ xmlType = new QName(xstype.getNamespace(), xstype.getName());
+ }
+ else
+ {
+ xmlType = new QName(xstype.getNamespace(), ">" + localPart);
+ }
+ }
+ return xmlType;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("WSDLTypes:\n");
+ buffer.append(schemaModel != null ? schemaModel.serialize() :
"<schema/>");
+ return buffer.toString();
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema
(from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,259 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.xerces.xs.XSAttributeUse;
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.apache.xerces.xs.XSWildcard;
-
-/**
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 21, 2005
- */
-public class JBossXSComplexTypeDefinition
- extends JBossXSTypeDefinition
- implements XSComplexTypeDefinition
-{
- private boolean isAbstract;
- private XSSimpleTypeDefinition xsSimple;
- private XSParticle xspart;
- private XSObjectList annots;
-
- private String prefix;
-
- private List<XSAttributeUse> attList = new ArrayList<XSAttributeUse>();
-
- //Content Type
- private short contentType = XSComplexTypeDefinition.CONTENTTYPE_ELEMENT;
-
- private short deriveMethod = XSConstants.DERIVATION_NONE;
-
- public JBossXSComplexTypeDefinition( )
- {
- }
-
- public JBossXSComplexTypeDefinition(String name, String namespace)
- {
- super(name, namespace);
- }
-
- public JBossXSComplexTypeDefinition(XSComplexTypeDefinition xc)
- {
- super(xc.getName(),xc.getNamespace());
- setAnonymous(xc.getAnonymous());
- xspart = xc.getParticle();
- xsSimple = xc.getSimpleType();
- deriveMethod = xc.getDerivationMethod();
- this.baseType = new JBossXSTypeDefinition(xc.getBaseType());
- }
-
- /**
- * [derivation method]: either <code>DERIVATION_EXTENSION</code>,
- * <code>DERIVATION_RESTRICTION</code>, or
<code>DERIVATION_NONE</code>
- * (see <code>XSConstants</code>).
- */
- public short getDerivationMethod()
- {
- return deriveMethod;
- }
-
- /**
- * [abstract]: a boolean. Complex types for which <code>abstract</code>
is
- * true must not be used as the type definition for the validation of
- * element information items.
- */
- public boolean getAbstract()
- {
- return isAbstract;
- }
-
- /**
- * A set of attribute uses if it exists, otherwise an empty
- * <code>XSObjectList</code>.
- */
- public XSObjectList getAttributeUses()
- {
- JBossXSObjectList oblist = new JBossXSObjectList();
- for(XSAttributeUse xa:attList)
- {
- oblist.addItem(xa);
- }
- return oblist;
- }
-
- /**
- * An attribute wildcard if it exists, otherwise <code>null</code>.
- */
- public XSWildcard getAttributeWildcard()
- {
- return null;
- }
-
- /**
- * [content type]: one of empty (<code>CONTENTTYPE_EMPTY</code>), a
simple
- * type definition (<code>CONTENTTYPE_SIMPLE</code>), mixed (
- * <code>CONTENTTYPE_MIXED</code>), or element-only (
- * <code>CONTENTTYPE_ELEMENT</code>).
- */
- public short getContentType()
- {
- return contentType;
- }
-
- /**
- * A simple type definition corresponding to a simple content model,
- * otherwise <code>null</code>.
- */
- public XSSimpleTypeDefinition getSimpleType()
- {
- return xsSimple;
- }
-
- /**
- * A particle for a mixed or element-only content model, otherwise
- * <code>null</code>.
- */
- public XSParticle getParticle()
- {
- return xspart;
- }
-
- /**
- * [prohibited substitutions]: a subset of {extension, restriction}
- * @param restriction Extension or restriction constants (see
- * <code>XSConstants</code>).
- * @return True if <code>restriction</code> is a prohibited substitution,
- * otherwise false.
- */
- public boolean isProhibitedSubstitution(short restriction)
- {
- return false;
- }
-
- /**
- * [prohibited substitutions]: A subset of {extension, restriction} or
- * <code>DERIVATION_NONE</code> represented as a bit flag (see
- * <code>XSConstants</code>).
- */
- public short getProhibitedSubstitutions()
- {
- return 0;
- }
-
- /**
- * A set of [annotations] if it exists, otherwise an empty
- * <code>XSObjectList</code>.
- */
- public XSObjectList getAnnotations()
- {
- return annots;
- }
-
- /**
- * Get the type
- */
- @Override
- public short getType()
- {
- return XSTypeDefinition.COMPLEX_TYPE;
- }
-
- /**
- * Return whether this type definition is a simple type or complex type.
- */
- @Override
- public short getTypeCategory()
- {
- return XSTypeDefinition.COMPLEX_TYPE;
- }
-
- public void setAbstract(boolean anAbstract)
- {
- isAbstract = anAbstract;
- }
-
- public void setDerivationMethod(short deriveMethod)
- {
- this.deriveMethod = deriveMethod;
- }
-
- /**
- * A simple type definition corresponding to a simple content model,
- * otherwise <code>null</code>.
- */
- public void setSimpleType(XSSimpleTypeDefinition xsSimple)
- {
- this.xsSimple = xsSimple;
- }
-
- /**
- * A particle for a mixed or element-only content model, otherwise
- * <code>null</code>.
- */
- public void setParticle(XSParticle xspart)
- {
- this.xspart = xspart;
- }
-
- /**
- * A set of [annotations] if it exists, otherwise an empty
- * <code>XSObjectList</code>.
- */
- public void setAnnotations(XSObjectList annots)
- {
- this.annots = annots;
- }
-
- /**
- * @see XSComplexTypeDefinition.CONTENTTYPE_EMPTY
- * @see XSComplexTypeDefinition.CONTENTTYPE_SIMPLE
- * @see XSComplexTypeDefinition.CONTENTTYPE_MIXED
- * @see XSComplexTypeDefinition.CONTENTTYPE_ELEMENT
- *
- * @param contentType
- */
- public void setContentType(short contentType)
- {
- this.contentType = contentType;
- }
-
- //*********************************************************************
- // Custom Methods
- //*********************************************************************
- public void addXSAttributeUse(XSAttributeUse at)
- {
- attList.add(at);
- }
-
- public String toString()
- {
- return "";
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,259 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.xerces.xs.XSAttributeUse;
+import org.apache.xerces.xs.XSComplexTypeDefinition;
+import org.apache.xerces.xs.XSConstants;
+import org.apache.xerces.xs.XSObjectList;
+import org.apache.xerces.xs.XSParticle;
+import org.apache.xerces.xs.XSSimpleTypeDefinition;
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.apache.xerces.xs.XSWildcard;
+
+/**
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 21, 2005
+ */
+public class JBossXSComplexTypeDefinition
+ extends JBossXSTypeDefinition
+ implements XSComplexTypeDefinition
+{
+ private boolean isAbstract;
+ private XSSimpleTypeDefinition xsSimple;
+ private XSParticle xspart;
+ private XSObjectList annots;
+
+ private String prefix;
+
+ private List<XSAttributeUse> attList = new ArrayList<XSAttributeUse>();
+
+ //Content Type
+ private short contentType = XSComplexTypeDefinition.CONTENTTYPE_ELEMENT;
+
+ private short deriveMethod = XSConstants.DERIVATION_NONE;
+
+ public JBossXSComplexTypeDefinition( )
+ {
+ }
+
+ public JBossXSComplexTypeDefinition(String name, String namespace)
+ {
+ super(name, namespace);
+ }
+
+ public JBossXSComplexTypeDefinition(XSComplexTypeDefinition xc)
+ {
+ super(xc.getName(),xc.getNamespace());
+ setAnonymous(xc.getAnonymous());
+ xspart = xc.getParticle();
+ xsSimple = xc.getSimpleType();
+ deriveMethod = xc.getDerivationMethod();
+ this.baseType = new JBossXSTypeDefinition(xc.getBaseType());
+ }
+
+ /**
+ * [derivation method]: either <code>DERIVATION_EXTENSION</code>,
+ * <code>DERIVATION_RESTRICTION</code>, or
<code>DERIVATION_NONE</code>
+ * (see <code>XSConstants</code>).
+ */
+ public short getDerivationMethod()
+ {
+ return deriveMethod;
+ }
+
+ /**
+ * [abstract]: a boolean. Complex types for which <code>abstract</code>
is
+ * true must not be used as the type definition for the validation of
+ * element information items.
+ */
+ public boolean getAbstract()
+ {
+ return isAbstract;
+ }
+
+ /**
+ * A set of attribute uses if it exists, otherwise an empty
+ * <code>XSObjectList</code>.
+ */
+ public XSObjectList getAttributeUses()
+ {
+ JBossXSObjectList oblist = new JBossXSObjectList();
+ for(XSAttributeUse xa:attList)
+ {
+ oblist.addItem(xa);
+ }
+ return oblist;
+ }
+
+ /**
+ * An attribute wildcard if it exists, otherwise <code>null</code>.
+ */
+ public XSWildcard getAttributeWildcard()
+ {
+ return null;
+ }
+
+ /**
+ * [content type]: one of empty (<code>CONTENTTYPE_EMPTY</code>), a
simple
+ * type definition (<code>CONTENTTYPE_SIMPLE</code>), mixed (
+ * <code>CONTENTTYPE_MIXED</code>), or element-only (
+ * <code>CONTENTTYPE_ELEMENT</code>).
+ */
+ public short getContentType()
+ {
+ return contentType;
+ }
+
+ /**
+ * A simple type definition corresponding to a simple content model,
+ * otherwise <code>null</code>.
+ */
+ public XSSimpleTypeDefinition getSimpleType()
+ {
+ return xsSimple;
+ }
+
+ /**
+ * A particle for a mixed or element-only content model, otherwise
+ * <code>null</code>.
+ */
+ public XSParticle getParticle()
+ {
+ return xspart;
+ }
+
+ /**
+ * [prohibited substitutions]: a subset of {extension, restriction}
+ * @param restriction Extension or restriction constants (see
+ * <code>XSConstants</code>).
+ * @return True if <code>restriction</code> is a prohibited substitution,
+ * otherwise false.
+ */
+ public boolean isProhibitedSubstitution(short restriction)
+ {
+ return false;
+ }
+
+ /**
+ * [prohibited substitutions]: A subset of {extension, restriction} or
+ * <code>DERIVATION_NONE</code> represented as a bit flag (see
+ * <code>XSConstants</code>).
+ */
+ public short getProhibitedSubstitutions()
+ {
+ return 0;
+ }
+
+ /**
+ * A set of [annotations] if it exists, otherwise an empty
+ * <code>XSObjectList</code>.
+ */
+ public XSObjectList getAnnotations()
+ {
+ return annots;
+ }
+
+ /**
+ * Get the type
+ */
+ @Override
+ public short getType()
+ {
+ return XSTypeDefinition.COMPLEX_TYPE;
+ }
+
+ /**
+ * Return whether this type definition is a simple type or complex type.
+ */
+ @Override
+ public short getTypeCategory()
+ {
+ return XSTypeDefinition.COMPLEX_TYPE;
+ }
+
+ public void setAbstract(boolean anAbstract)
+ {
+ isAbstract = anAbstract;
+ }
+
+ public void setDerivationMethod(short deriveMethod)
+ {
+ this.deriveMethod = deriveMethod;
+ }
+
+ /**
+ * A simple type definition corresponding to a simple content model,
+ * otherwise <code>null</code>.
+ */
+ public void setSimpleType(XSSimpleTypeDefinition xsSimple)
+ {
+ this.xsSimple = xsSimple;
+ }
+
+ /**
+ * A particle for a mixed or element-only content model, otherwise
+ * <code>null</code>.
+ */
+ public void setParticle(XSParticle xspart)
+ {
+ this.xspart = xspart;
+ }
+
+ /**
+ * A set of [annotations] if it exists, otherwise an empty
+ * <code>XSObjectList</code>.
+ */
+ public void setAnnotations(XSObjectList annots)
+ {
+ this.annots = annots;
+ }
+
+ /**
+ * @see XSComplexTypeDefinition.CONTENTTYPE_EMPTY
+ * @see XSComplexTypeDefinition.CONTENTTYPE_SIMPLE
+ * @see XSComplexTypeDefinition.CONTENTTYPE_MIXED
+ * @see XSComplexTypeDefinition.CONTENTTYPE_ELEMENT
+ *
+ * @param contentType
+ */
+ public void setContentType(short contentType)
+ {
+ this.contentType = contentType;
+ }
+
+ //*********************************************************************
+ // Custom Methods
+ //*********************************************************************
+ public void addXSAttributeUse(XSAttributeUse at)
+ {
+ attList.add(at);
+ }
+
+ public String toString()
+ {
+ return "";
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,243 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import org.apache.xerces.xs.ShortList;
-import org.apache.xerces.xs.XSAnnotation;
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSException;
-import org.apache.xerces.xs.XSNamedMap;
-import org.apache.xerces.xs.XSTypeDefinition;
-
-
-/**
- * Represents an XS Element Declaration
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since May 3, 2005
- */
-public class JBossXSElementDeclaration
- extends JBossXSObject
- implements XSElementDeclaration
-{
- protected String targetNamespace = null;
- protected JBossXSTypeDefinition xstype = null;
- protected boolean nillable = false;
- private XSElementDeclaration xsed;
-
- /**
- * Sole Annotation object
- */
- protected XSAnnotation annotation = null;
-
- /**
- *
- */
- public JBossXSElementDeclaration()
- {
- super();
- }
-
- /**
- * @param name
- * @param namespace
- */
- public JBossXSElementDeclaration(String name, String namespace)
- {
- super(name, namespace);
- }
-
- /**
- * Create a new JBossXSElementDeclaration while
- * reading data from XSElementDeclaration.
- * @param xe
- */
- public JBossXSElementDeclaration(XSElementDeclaration xe)
- {
- if(xe == null)
- throw new IllegalArgumentException("Illegal Null Argument:xe");
-
- xsed = xe;
- name= xe.getName();
- namespace = xe.getNamespace();
- XSTypeDefinition xt = xe.getTypeDefinition();
- if(xt instanceof JBossXSTypeDefinition == false
- && xt instanceof XSComplexTypeDefinition)
- {
- xstype = new JBossXSComplexTypeDefinition((XSComplexTypeDefinition)xt);
- }
- else
- if(xt instanceof JBossXSTypeDefinition == false)
- {
- xstype = new JBossXSTypeDefinition(xt);
- }
- this.annotation = xe.getAnnotation();
- }
-
- public XSElementDeclaration getXSElementDeclaration()
- {
- return xsed;
- }
-
- /**
- * One of XSConstants.SCOPE_GLOBAL, XSConstants.SCOPE_LOCAL
- * or XSConstants.SCOPE_ABSENT
- */
- protected short scope = 0;
-
- protected XSComplexTypeDefinition enclosingCTDefinition;
-
- public XSTypeDefinition getTypeDefinition()
- {
- return this.xstype;
- }
-
- public void setTypeDefinition(XSTypeDefinition xst )
- {
- if(xst instanceof JBossXSTypeDefinition)
- this.xstype = (JBossXSTypeDefinition)xst ;
- else
- if(xst instanceof XSComplexTypeDefinition)
- this.xstype = new JBossXSComplexTypeDefinition((XSComplexTypeDefinition)xst);
- }
-
- /**
- * One of XSConstants.SCOPE_GLOBAL, XSConstants.SCOPE_LOCAL
- * or XSConstants.SCOPE_ABSENT
- * @return
- */
- public short getScope()
- {
- return this.scope;
- }
-
- public void setScope(short scope)
- {
- this.scope = scope;
- }
-
- public XSComplexTypeDefinition getEnclosingCTDefinition()
- {
- return this.enclosingCTDefinition;
- }
-
- public void setEnclosingCTDefinition( XSComplexTypeDefinition enclosingCTDefinition)
- {
- this.enclosingCTDefinition = enclosingCTDefinition;
- }
-
- public String getTargetNamespace()
- {
- return targetNamespace;
- }
-
- public void setTargetNamespace(String targetNamespace)
- {
- this.targetNamespace = targetNamespace;
- this.setNamespace( targetNamespace );
- }
-
- public short getConstraintType()
- {
- return 0;
- }
-
- public String getConstraintValue()
- {
- return null;
- }
-
- public Object getActualVC() throws XSException
- {
- return null;
- }
-
- public short getActualVCType() throws XSException
- {
- return 0;
- }
-
- public ShortList getItemValueTypes() throws XSException
- {
- return null;
- }
-
- public boolean getNillable()
- {
- return this.nillable;
- }
-
- public void setNillable(boolean nillable)
- {
- this.nillable = nillable;
- }
-
- public XSNamedMap getIdentityConstraints()
- {
- return null;
- }
-
- public XSElementDeclaration getSubstitutionGroupAffiliation()
- {
- return null;
- }
-
- public boolean isSubstitutionGroupExclusion(short i)
- {
- return false;
- }
-
- public short getSubstitutionGroupExclusions()
- {
- return 0;
- }
-
- public boolean isDisallowedSubstitution(short i)
- {
- return false;
- }
-
- public short getDisallowedSubstitutions()
- {
- return 0;
- }
-
- public boolean getAbstract()
- {
- return false;
- }
-
- public XSAnnotation getAnnotation()
- {
- return this.annotation;
- }
-
- /**
- * Get the type
- */
- @Override
- public short getType()
- {
- return XSConstants.ELEMENT_DECLARATION;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,243 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import org.apache.xerces.xs.ShortList;
+import org.apache.xerces.xs.XSAnnotation;
+import org.apache.xerces.xs.XSComplexTypeDefinition;
+import org.apache.xerces.xs.XSConstants;
+import org.apache.xerces.xs.XSElementDeclaration;
+import org.apache.xerces.xs.XSException;
+import org.apache.xerces.xs.XSNamedMap;
+import org.apache.xerces.xs.XSTypeDefinition;
+
+
+/**
+ * Represents an XS Element Declaration
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since May 3, 2005
+ */
+public class JBossXSElementDeclaration
+ extends JBossXSObject
+ implements XSElementDeclaration
+{
+ protected String targetNamespace = null;
+ protected JBossXSTypeDefinition xstype = null;
+ protected boolean nillable = false;
+ private XSElementDeclaration xsed;
+
+ /**
+ * Sole Annotation object
+ */
+ protected XSAnnotation annotation = null;
+
+ /**
+ *
+ */
+ public JBossXSElementDeclaration()
+ {
+ super();
+ }
+
+ /**
+ * @param name
+ * @param namespace
+ */
+ public JBossXSElementDeclaration(String name, String namespace)
+ {
+ super(name, namespace);
+ }
+
+ /**
+ * Create a new JBossXSElementDeclaration while
+ * reading data from XSElementDeclaration.
+ * @param xe
+ */
+ public JBossXSElementDeclaration(XSElementDeclaration xe)
+ {
+ if(xe == null)
+ throw new IllegalArgumentException("Illegal Null Argument:xe");
+
+ xsed = xe;
+ name= xe.getName();
+ namespace = xe.getNamespace();
+ XSTypeDefinition xt = xe.getTypeDefinition();
+ if(xt instanceof JBossXSTypeDefinition == false
+ && xt instanceof XSComplexTypeDefinition)
+ {
+ xstype = new JBossXSComplexTypeDefinition((XSComplexTypeDefinition)xt);
+ }
+ else
+ if(xt instanceof JBossXSTypeDefinition == false)
+ {
+ xstype = new JBossXSTypeDefinition(xt);
+ }
+ this.annotation = xe.getAnnotation();
+ }
+
+ public XSElementDeclaration getXSElementDeclaration()
+ {
+ return xsed;
+ }
+
+ /**
+ * One of XSConstants.SCOPE_GLOBAL, XSConstants.SCOPE_LOCAL
+ * or XSConstants.SCOPE_ABSENT
+ */
+ protected short scope = 0;
+
+ protected XSComplexTypeDefinition enclosingCTDefinition;
+
+ public XSTypeDefinition getTypeDefinition()
+ {
+ return this.xstype;
+ }
+
+ public void setTypeDefinition(XSTypeDefinition xst )
+ {
+ if(xst instanceof JBossXSTypeDefinition)
+ this.xstype = (JBossXSTypeDefinition)xst ;
+ else
+ if(xst instanceof XSComplexTypeDefinition)
+ this.xstype = new JBossXSComplexTypeDefinition((XSComplexTypeDefinition)xst);
+ }
+
+ /**
+ * One of XSConstants.SCOPE_GLOBAL, XSConstants.SCOPE_LOCAL
+ * or XSConstants.SCOPE_ABSENT
+ * @return
+ */
+ public short getScope()
+ {
+ return this.scope;
+ }
+
+ public void setScope(short scope)
+ {
+ this.scope = scope;
+ }
+
+ public XSComplexTypeDefinition getEnclosingCTDefinition()
+ {
+ return this.enclosingCTDefinition;
+ }
+
+ public void setEnclosingCTDefinition( XSComplexTypeDefinition enclosingCTDefinition)
+ {
+ this.enclosingCTDefinition = enclosingCTDefinition;
+ }
+
+ public String getTargetNamespace()
+ {
+ return targetNamespace;
+ }
+
+ public void setTargetNamespace(String targetNamespace)
+ {
+ this.targetNamespace = targetNamespace;
+ this.setNamespace( targetNamespace );
+ }
+
+ public short getConstraintType()
+ {
+ return 0;
+ }
+
+ public String getConstraintValue()
+ {
+ return null;
+ }
+
+ public Object getActualVC() throws XSException
+ {
+ return null;
+ }
+
+ public short getActualVCType() throws XSException
+ {
+ return 0;
+ }
+
+ public ShortList getItemValueTypes() throws XSException
+ {
+ return null;
+ }
+
+ public boolean getNillable()
+ {
+ return this.nillable;
+ }
+
+ public void setNillable(boolean nillable)
+ {
+ this.nillable = nillable;
+ }
+
+ public XSNamedMap getIdentityConstraints()
+ {
+ return null;
+ }
+
+ public XSElementDeclaration getSubstitutionGroupAffiliation()
+ {
+ return null;
+ }
+
+ public boolean isSubstitutionGroupExclusion(short i)
+ {
+ return false;
+ }
+
+ public short getSubstitutionGroupExclusions()
+ {
+ return 0;
+ }
+
+ public boolean isDisallowedSubstitution(short i)
+ {
+ return false;
+ }
+
+ public short getDisallowedSubstitutions()
+ {
+ return 0;
+ }
+
+ public boolean getAbstract()
+ {
+ return false;
+ }
+
+ public XSAnnotation getAnnotation()
+ {
+ return this.annotation;
+ }
+
+ /**
+ * Get the type
+ */
+ @Override
+ public short getType()
+ {
+ return XSConstants.ELEMENT_DECLARATION;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,176 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.xerces.xni.XMLResourceIdentifier;
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLInputSource;
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Entity Resolver for the default Xerces Reference parser
- * @author <a href="mailto:Anil.Saldhana@jboss.org">Anil
Saldhana</a>
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-Aug-2005
- */
-public class JBossXSEntityResolver implements XMLEntityResolver
-{
- // provide logging
- private static final Logger log = Logger.getLogger(JBossXSEntityResolver.class);
-
- private Map<String, URL> schemaLocationByNamespace = new HashMap<String,
URL>();
-
- private EntityResolver delegate;
-
- public JBossXSEntityResolver(EntityResolver resolver, Map<String, URL>
schemaLocationByNamespace)
- {
- this.schemaLocationByNamespace = schemaLocationByNamespace;
- this.delegate = resolver;
- }
-
- /**
- * Resolves an external parsed entity. If the entity cannot be
- * resolved, this method should return null.
- *
- * @param resourceIdentifier description of the resource to be resolved
- * @throws XNIException Thrown on general error.
- * @throws IOException Thrown if resolved entity stream cannot be
- * opened or some other i/o error occurs.
- */
- public XMLInputSource resolveEntity(XMLResourceIdentifier resId) throws XNIException,
IOException
- {
- log.trace("Resolve entity: " + resId);
-
- // First try the JBossEntityResolver
- String publicId = resId.getPublicId();
- String systemId = resId.getLiteralSystemId();
- String namespace = resId.getNamespace();
- try
- {
- String publicURI = (publicId != null ? publicId : namespace);
- InputSource inputSource = delegate.resolveEntity(publicURI, systemId);
- if (inputSource != null)
- {
- XMLInputSource source = getXMLInputSource(inputSource, resId);
- return source;
- }
- }
- catch (Exception ex)
- {
- log.trace(ex);
- }
-
- try
- {
- String expandedSysId = resId.getExpandedSystemId();
- if (expandedSysId != null)
- {
- log.trace("Use ExpandedSystemId: " + expandedSysId);
- return getXMLInputSource(new URL(expandedSysId), resId);
- }
- }
- catch (IOException e)
- {
- log.trace(e);
- }
-
- try
- {
- if (systemId != null)
- {
- log.trace("Use LiteralSystemId: " + systemId);
- return getXMLInputSource(new URL(systemId), resId);
- }
- }
- catch (IOException e)
- {
- log.trace(e);
- }
-
- // in case of a DOCTYPE declaration ew refer to systemId
- String namespaceURI = resId.getNamespace() != null ? resId.getNamespace() :
resId.getLiteralSystemId();
-
- // The schema parser will obviously know this schema already
- if (Constants.NS_SCHEMA_XSD.equals(namespaceURI))
- return null;
-
- try
- {
- URL url = schemaLocationByNamespace.get(namespaceURI);
- if (url != null)
- {
- log.trace("Use SchemaLocationByNamespace: " + url);
- return getXMLInputSource(url, resId);
- }
-
- // Delegate to JBoss Entity Resolver
- XMLInputSource source = getXMLInputSource(
- delegate.resolveEntity(null, namespaceURI), resId);
- if (source != null)
- return source;
- }
- catch (SAXException e)
- {
- log.trace(e);
- }
-
- try
- {
- log.trace("Use NamespaceURI: " + namespaceURI);
- return getXMLInputSource(new URL(namespaceURI), resId);
- }
- catch (IOException e)
- {
- log.trace(e);
- }
-
- log.trace("Cannot obtain XMLInputSource for: " + resId);
- return null;
- }
-
- private XMLInputSource getXMLInputSource(URL url, XMLResourceIdentifier resId) throws
IOException
- {
- InputStream inputStream = url.openStream();
- InputSource inputSource = new InputSource(inputStream);
- return getXMLInputSource(inputSource, resId);
- }
-
- private XMLInputSource getXMLInputSource(InputSource inputSource,
XMLResourceIdentifier resId)
- {
- String encoding = inputSource.getEncoding();
- InputStream byteStream = inputSource.getByteStream();
- return new XMLInputSource(resId.getPublicId(), resId.getExpandedSystemId(),
resId.getBaseSystemId(), byteStream, encoding);
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSEntityResolver.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,176 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.xerces.xni.XMLResourceIdentifier;
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLEntityResolver;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Entity Resolver for the default Xerces Reference parser
+ * @author <a href="mailto:Anil.Saldhana@jboss.org">Anil
Saldhana</a>
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-Aug-2005
+ */
+public class JBossXSEntityResolver implements XMLEntityResolver
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(JBossXSEntityResolver.class);
+
+ private Map<String, URL> schemaLocationByNamespace = new HashMap<String,
URL>();
+
+ private EntityResolver delegate;
+
+ public JBossXSEntityResolver(EntityResolver resolver, Map<String, URL>
schemaLocationByNamespace)
+ {
+ this.schemaLocationByNamespace = schemaLocationByNamespace;
+ this.delegate = resolver;
+ }
+
+ /**
+ * Resolves an external parsed entity. If the entity cannot be
+ * resolved, this method should return null.
+ *
+ * @param resourceIdentifier description of the resource to be resolved
+ * @throws XNIException Thrown on general error.
+ * @throws IOException Thrown if resolved entity stream cannot be
+ * opened or some other i/o error occurs.
+ */
+ public XMLInputSource resolveEntity(XMLResourceIdentifier resId) throws XNIException,
IOException
+ {
+ log.trace("Resolve entity: " + resId);
+
+ // First try the JBossEntityResolver
+ String publicId = resId.getPublicId();
+ String systemId = resId.getLiteralSystemId();
+ String namespace = resId.getNamespace();
+ try
+ {
+ String publicURI = (publicId != null ? publicId : namespace);
+ InputSource inputSource = delegate.resolveEntity(publicURI, systemId);
+ if (inputSource != null)
+ {
+ XMLInputSource source = getXMLInputSource(inputSource, resId);
+ return source;
+ }
+ }
+ catch (Exception ex)
+ {
+ log.trace(ex);
+ }
+
+ try
+ {
+ String expandedSysId = resId.getExpandedSystemId();
+ if (expandedSysId != null)
+ {
+ log.trace("Use ExpandedSystemId: " + expandedSysId);
+ return getXMLInputSource(new URL(expandedSysId), resId);
+ }
+ }
+ catch (IOException e)
+ {
+ log.trace(e);
+ }
+
+ try
+ {
+ if (systemId != null)
+ {
+ log.trace("Use LiteralSystemId: " + systemId);
+ return getXMLInputSource(new URL(systemId), resId);
+ }
+ }
+ catch (IOException e)
+ {
+ log.trace(e);
+ }
+
+ // in case of a DOCTYPE declaration ew refer to systemId
+ String namespaceURI = resId.getNamespace() != null ? resId.getNamespace() :
resId.getLiteralSystemId();
+
+ // The schema parser will obviously know this schema already
+ if (Constants.NS_SCHEMA_XSD.equals(namespaceURI))
+ return null;
+
+ try
+ {
+ URL url = schemaLocationByNamespace.get(namespaceURI);
+ if (url != null)
+ {
+ log.trace("Use SchemaLocationByNamespace: " + url);
+ return getXMLInputSource(url, resId);
+ }
+
+ // Delegate to JBoss Entity Resolver
+ XMLInputSource source = getXMLInputSource(
+ delegate.resolveEntity(null, namespaceURI), resId);
+ if (source != null)
+ return source;
+ }
+ catch (SAXException e)
+ {
+ log.trace(e);
+ }
+
+ try
+ {
+ log.trace("Use NamespaceURI: " + namespaceURI);
+ return getXMLInputSource(new URL(namespaceURI), resId);
+ }
+ catch (IOException e)
+ {
+ log.trace(e);
+ }
+
+ log.trace("Cannot obtain XMLInputSource for: " + resId);
+ return null;
+ }
+
+ private XMLInputSource getXMLInputSource(URL url, XMLResourceIdentifier resId) throws
IOException
+ {
+ InputStream inputStream = url.openStream();
+ InputSource inputSource = new InputSource(inputStream);
+ return getXMLInputSource(inputSource, resId);
+ }
+
+ private XMLInputSource getXMLInputSource(InputSource inputSource,
XMLResourceIdentifier resId)
+ {
+ String encoding = inputSource.getEncoding();
+ InputStream byteStream = inputSource.getByteStream();
+ return new XMLInputSource(resId.getPublicId(), resId.getExpandedSystemId(),
resId.getBaseSystemId(), byteStream, encoding);
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSErrorHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,116 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import org.apache.xerces.xni.XNIException;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLParseException;
-import org.jboss.logging.Logger;
-/**
- * Error Handler for the Xerces schema parser default implementation
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Aug 11, 2005
- */
-public class JBossXSErrorHandler implements XMLErrorHandler
-{
- private static final Logger log = Logger.getLogger(JBossXSErrorHandler.class);
-
- /**
- * Reports a warning. Warnings are non-fatal and can be safely ignored by most
applications.
- * @param domain - The domain of the warning. The domain can be any string but is
suggested to be a valid URI. The domain can be used to conveniently specify a web site
location of the relevent specification or document pertaining to this warning.
- * @param key - The warning key. This key can be any string and is implementation
dependent.
- * @param exception - Exception.
- * @throws XNIException Thrown to signal that the parser should stop parsing the
document.
- */
- public void warning(String domain, String key, XMLParseException xexp) throws
XNIException
- {
- log.trace(getFormattedString(domain,key,xexp));
- }
-
- /**
- * Reports an error. Errors are non-fatal and usually signify that the document is
invalid with respect to its grammar(s).
- * @param domain - The domain of the warning. The domain can be any string but is
suggested to be a valid URI. The domain can be used to conveniently specify a web site
location of the relevent specification or document pertaining to this warning.
- * @param key - The warning key. This key can be any string and is implementation
dependent.
- * @param exception - Exception.
- * @throws XNIException Thrown to signal that the parser should stop parsing the
document.
- */
- public void error(String domain, String key, XMLParseException xexp) throws
XNIException
- {
- if("src-include.2.1".equals(key))
- throw new XNIException("Parser should stop:",xexp);
- log.error(getFormattedString(domain,key,xexp));
- }
-
- /**
- * Report a fatal error. Fatal errors usually occur when the document is not
well-formed
- * and signifies that the parser cannot continue normal operation.
- * @param domain - The domain of the warning. The domain can be any string but is
suggested to be a valid URI. The domain can be used to conveniently specify a web site
location of the relevent specification or document pertaining to this warning.
- * @param key - The warning key. This key can be any string and is implementation
dependent.
- * @param exception - Exception.
- * @throws XNIException Thrown to signal that the parser should stop parsing the
document.
- */
- public void fatalError(String domain, String key, XMLParseException xexp) throws
XNIException
- {
- log.fatal(getFormattedString(domain,key,xexp));
- throw new XNIException("Parser should stop:",xexp);
- }
-
- /**
- * Get the name of the schema file in question
- *
- * @param xexp
- * @return
- */
- private String getFileName(XMLParseException xexp)
- {
- String fname = xexp.getExpandedSystemId();
- if (fname != null) {
- int index = fname.lastIndexOf('/');
- if (index != -1)
- fname = fname.substring(index + 1);
- }
- else
- {
- fname = "";
- }
-
- return fname;
- }
-
- /**
- * Return a formatted string that gives as much information
- * as possible to the user
- * @param domain
- * @param key
- * @param xexp
- * @return
- */
- private String getFormattedString(String domain, String key, XMLParseException xexp)
- {
- StringBuilder buf = new StringBuilder(getFileName(xexp));
- buf.append("[domain:");
-
buf.append(domain).append("]::[key=").append(key).append("]::");
- buf.append("Message=");
- buf.append(xexp.getLocalizedMessage());
- return buf.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSErrorHandler.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSErrorHandler.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,116 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import org.apache.xerces.xni.XNIException;
+import org.apache.xerces.xni.parser.XMLErrorHandler;
+import org.apache.xerces.xni.parser.XMLParseException;
+import org.jboss.logging.Logger;
+/**
+ * Error Handler for the Xerces schema parser default implementation
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Aug 11, 2005
+ */
+public class JBossXSErrorHandler implements XMLErrorHandler
+{
+ private static final Logger log = Logger.getLogger(JBossXSErrorHandler.class);
+
+ /**
+ * Reports a warning. Warnings are non-fatal and can be safely ignored by most
applications.
+ * @param domain - The domain of the warning. The domain can be any string but is
suggested to be a valid URI. The domain can be used to conveniently specify a web site
location of the relevent specification or document pertaining to this warning.
+ * @param key - The warning key. This key can be any string and is implementation
dependent.
+ * @param exception - Exception.
+ * @throws XNIException Thrown to signal that the parser should stop parsing the
document.
+ */
+ public void warning(String domain, String key, XMLParseException xexp) throws
XNIException
+ {
+ log.trace(getFormattedString(domain,key,xexp));
+ }
+
+ /**
+ * Reports an error. Errors are non-fatal and usually signify that the document is
invalid with respect to its grammar(s).
+ * @param domain - The domain of the warning. The domain can be any string but is
suggested to be a valid URI. The domain can be used to conveniently specify a web site
location of the relevent specification or document pertaining to this warning.
+ * @param key - The warning key. This key can be any string and is implementation
dependent.
+ * @param exception - Exception.
+ * @throws XNIException Thrown to signal that the parser should stop parsing the
document.
+ */
+ public void error(String domain, String key, XMLParseException xexp) throws
XNIException
+ {
+ if("src-include.2.1".equals(key))
+ throw new XNIException("Parser should stop:",xexp);
+ log.error(getFormattedString(domain,key,xexp));
+ }
+
+ /**
+ * Report a fatal error. Fatal errors usually occur when the document is not
well-formed
+ * and signifies that the parser cannot continue normal operation.
+ * @param domain - The domain of the warning. The domain can be any string but is
suggested to be a valid URI. The domain can be used to conveniently specify a web site
location of the relevent specification or document pertaining to this warning.
+ * @param key - The warning key. This key can be any string and is implementation
dependent.
+ * @param exception - Exception.
+ * @throws XNIException Thrown to signal that the parser should stop parsing the
document.
+ */
+ public void fatalError(String domain, String key, XMLParseException xexp) throws
XNIException
+ {
+ log.fatal(getFormattedString(domain,key,xexp));
+ throw new XNIException("Parser should stop:",xexp);
+ }
+
+ /**
+ * Get the name of the schema file in question
+ *
+ * @param xexp
+ * @return
+ */
+ private String getFileName(XMLParseException xexp)
+ {
+ String fname = xexp.getExpandedSystemId();
+ if (fname != null) {
+ int index = fname.lastIndexOf('/');
+ if (index != -1)
+ fname = fname.substring(index + 1);
+ }
+ else
+ {
+ fname = "";
+ }
+
+ return fname;
+ }
+
+ /**
+ * Return a formatted string that gives as much information
+ * as possible to the user
+ * @param domain
+ * @param key
+ * @param xexp
+ * @return
+ */
+ private String getFormattedString(String domain, String key, XMLParseException xexp)
+ {
+ StringBuilder buf = new StringBuilder(getFileName(xexp));
+ buf.append("[domain:");
+
buf.append(domain).append("]::[key=").append(key).append("]::");
+ buf.append("Message=");
+ buf.append(xexp.getLocalizedMessage());
+ return buf.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModel.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModel.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModel.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,745 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSAnnotation;
-import org.apache.xerces.xs.XSAttributeDeclaration;
-import org.apache.xerces.xs.XSAttributeGroupDefinition;
-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.XSModelGroupDefinition;
-import org.apache.xerces.xs.XSNamedMap;
-import org.apache.xerces.xs.XSNamespaceItem;
-import org.apache.xerces.xs.XSNamespaceItemList;
-import org.apache.xerces.xs.XSNotationDeclaration;
-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.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * Represents a schema model
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-
-public class JBossXSModel implements XSModel, Cloneable
-{
- // provide logging
- private static final Logger log = Logger.getLogger(JBossXSModel.class);
-
- private AnonymousMapper anonymousMapper = new AnonymousMapper();
-
- private boolean qualifiedElements = false;
-
- private NamespaceRegistry namespaceRegistry = new NamespaceRegistry();
-
- protected XSNamespaceItemList nslist = null;
-
- protected HashMap<String, JBossXSNamespaceItem> nsimap = new HashMap<String,
JBossXSNamespaceItem>();
-
- public JBossXSModel()
- {
- }
-
- @Override
- public JBossXSModel clone() throws CloneNotSupportedException
- {
- return (JBossXSModel)super.clone();
- }
-
- /**
- * Convenience method. Returns a list of all namespaces that belong to
- * this schema. The value <code>null</code> is not a valid namespace
- * name, but if there are components that do not have a target namespace
- * , <code>null</code> is included in this list.
- */
- public StringList getNamespaces()
- {
- return new JBossXSStringList(nsimap.keySet());
- }
-
- /**
- * A set of namespace schema information information items (of type
- * <code>XSNamespaceItem</code>), one for each namespace name which
- * appears as the target namespace of any schema component in the schema
- * used for that assessment, and one for absent if any schema component
- * in the schema had no target namespace. For more information see
- * schema information.
- */
- public XSNamespaceItemList getNamespaceItems()
- {
-
- nslist = new JBossXSNamespaceItemList(nsimap.values());
-
- //One for the default xsd
- JBossXSNamespaceItem nsxsd = new JBossXSNamespaceItem(Constants.NS_SCHEMA_XSD,
namespaceRegistry, qualifiedElements);
- ((JBossXSNamespaceItemList)nslist).addItem(nsxsd);
- return nslist;
- }
-
- /**
- * Returns a list of top-level components, i.e. element declarations,
- * attribute declarations, etc.
- * @param objectType The type of the declaration, i.e.
- * <code>ELEMENT_DECLARATION</code>. Note that
- * <code>XSTypeDefinition.SIMPLE_TYPE</code> and
- * <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the
- * <code>objectType</code> to retrieve only complex types or simple
- * types, instead of all types.
- * @return A list of top-level definitions of the specified type in
- * <code>objectType</code> or an empty
<code>XSNamedMap</code> if no
- * such definitions exist.
- */
- public XSNamedMap getComponents(short objectType)
- {
- JBossXSNamedMap map = new JBossXSNamedMap();
- JBossXSStringList sl = (JBossXSStringList)getNamespaces();
- int len = sl != null ? sl.getLength() : 0;
-
- for (int i = 0; i < len; i++)
- {
- String ns = sl.item(i);
- JBossXSNamespaceItem ni = nsimap.get(ns);
- JBossXSNamedMap nm = null;
- if (ni != null)
- {
- nm = (JBossXSNamedMap)ni.getComponents(objectType);
- map.addItems(nm.toList());
- }
- }
-
- return map;
- }
-
- /**
- * Convenience method. Returns a list of top-level component declarations
- * that are defined within the specified namespace, i.e. element
- * declarations, attribute declarations, etc.
- * @param objectType The type of the declaration, i.e.
- * <code>ELEMENT_DECLARATION</code>.
- * @param namespace The namespace to which the declaration belongs or
- * <code>null</code> (for components with no target namespace).
- * @return A list of top-level definitions of the specified type in
- * <code>objectType</code> and defined in the specified
- * <code>namespace</code> or an empty
<code>XSNamedMap</code>.
- */
- public XSNamedMap getComponentsByNamespace(short objectType, String namespace)
- {
- JBossXSNamedMap map = new JBossXSNamedMap();
-
- JBossXSNamespaceItem ni = nsimap.get(namespace);
- if (ni == null)
- return map;
-
- return ni.getComponents(objectType);
- }
-
- /**
- * [annotations]: a set of annotations if it exists, otherwise an empty
- * <code>XSObjectList</code>.
- */
- public XSObjectList getAnnotations()
- {
- List lst = new ArrayList();
- JBossXSObjectList objlist = new JBossXSObjectList(lst);
- Set<String> keyset = nsimap.keySet();
- for (String ns : keyset)
- {
- XSNamespaceItem xs = nsimap.get(ns);
- objlist.addObjects(xs.getAnnotations());
- }
- return objlist;
- }
-
- /**
- * Convenience method. Returns a top-level element declaration.
- * @param name The name of the declaration.
- * @param namespace The namespace of the declaration, otherwise
- * <code>null</code>.
- * @return A top-level element declaration or <code>null</code> if such a
- * declaration does not exist.
- */
- public XSElementDeclaration getElementDeclaration(String name, String namespace)
- {
- if (name == null)
- return null;
-
- if (name.startsWith(">") || name.endsWith("]"))
- return anonymousMapper.getElementDeclaration(name, namespace);
-
- JBossXSNamespaceItem ni = nsimap.get(namespace);
- if (ni == null)
- return null;
- return ni.getElementDeclaration(name);
- }
-
- /**
- * Convenience method. Returns a top-level attribute declaration.
- * @param name The name of the declaration.
- * @param namespace The namespace of the declaration, otherwise
- * <code>null</code>.
- * @return A top-level attribute declaration or <code>null</code> if such
- * a declaration does not exist.
- */
- public XSAttributeDeclaration getAttributeDeclaration(String name, String namespace)
- {
- JBossXSNamespaceItem ni = nsimap.get(namespace);
- if (ni == null)
- return null;
- return ni.getAttributeDeclaration(name);
- }
-
- /**
- * Convenience method. Returns a top-level simple or complex type
- * definition.
- * @param name The name of the definition.
- * @param namespace The namespace of the declaration, otherwise
- * <code>null</code>.
- * @return An <code>XSTypeDefinition</code> or
<code>null</code> if such
- * a definition does not exist.
- */
- public XSTypeDefinition getTypeDefinition(String name, String namespace)
- {
- if (name == null)
- return null;
-
- if (name.startsWith(">") || name.endsWith("]"))
- return anonymousMapper.getTypeDefinition(name, namespace);
-
- JBossXSNamespaceItem ni = nsimap.get(namespace);
- if (ni == null)
- return null;
- return ni.getTypeDefinition(name);
- }
-
- /**
- * Convenience method. Returns a top-level attribute group definition.
- * @param name The name of the definition.
- * @param namespace The namespace of the definition, otherwise
- * <code>null</code>.
- * @return A top-level attribute group definition or <code>null</code> if
- * such a definition does not exist.
- */
- public XSAttributeGroupDefinition getAttributeGroup(String name, String namespace)
- {
- return null;
- }
-
- /**
- * Convenience method. Returns a top-level model group definition.
- * @param name The name of the definition.
- * @param namespace The namespace of the definition, otherwise
- * <code>null</code>.
- * @return A top-level model group definition or <code>null</code> if
- * such a definition does not exist.
- */
- public XSModelGroupDefinition getModelGroupDefinition(String name, String namespace)
- {
- return null;
- }
-
- /**
- * Convenience method. Returns a top-level notation declaration.
- * @param name The name of the declaration.
- * @param namespace The namespace of the declaration, otherwise
- * <code>null</code>.
- * @return A top-level notation declaration or <code>null</code> if such
- * a declaration does not exist.
- */
- public XSNotationDeclaration getNotationDeclaration(String name, String namespace)
- {
- return null;
- }
-
- public void addXSAnnotation(XSAnnotation xa)
- {
- String ns = xa.getNamespace();
- if (ns == null && nsimap.keySet().size() == 1)
- {
- ns = nsimap.keySet().iterator().next();
- }
- if (ns != null)
- {
- createNamespaceItemIfNotExistent(ns);
- JBossXSNamespaceItem jbnm = nsimap.get(ns);
- jbnm.addXSAnnotation(xa);
- }
- else
- {
- log.trace("Cannot assign XSAnnotation to null namespace");
- }
- }
-
- public void addXSAttributeDeclaration(XSAttributeDeclaration attr)
- {
- //Add attribute to the namespace item
- String ns = attr.getNamespace();
- JBossXSNamespaceItem jbnm = createNamespaceItemIfNotExistent(ns);
- jbnm.addXSAttributeDeclaration(attr);
- }
-
- public void addXSTypeDefinition(XSTypeDefinition xst)
- {
- //Add type to the namespace item
- String ns = xst.getNamespace();
- if (ns == null)
- throw new WSException("Illegal namespace:null");
- JBossXSNamespaceItem jbnm = createNamespaceItemIfNotExistent(ns);
- jbnm.addXSTypeDefinition(xst);
-
- anonymousMapper.rebuild();
- }
-
- public void addXSComplexTypeDefinition(XSTypeDefinition xst)
- {
- this.addXSTypeDefinition(xst);
-
- anonymousMapper.rebuild();
- }
-
- public void addXSElementDeclaration(XSElementDeclaration xsel)
- {
- //Add element to the namespace item
- String ns = xsel.getNamespace();
- JBossXSNamespaceItem jbnm = createNamespaceItemIfNotExistent(ns);
- jbnm.addXSElementDeclaration(xsel);
-
- anonymousMapper.rebuild();
- }
-
- public void addSchemaLocation(String nsURI, URL locationURL)
- {
- JBossXSNamespaceItem ni = createNamespaceItemIfNotExistent(nsURI);
- ni.addDocumentLocation(locationURL.toExternalForm());
- }
-
- public void addXSNamespaceItem(XSNamespaceItem xsitem)
- {
- ((JBossXSNamespaceItemList)nslist).addItem(xsitem);
-
- anonymousMapper.rebuild();
- }
-
- public void setXSNamespaceItemList(XSNamespaceItemList list)
- {
- this.nslist = list;
- }
-
- public void merge(JBossXSModel xsm)
- {
- JBossXSNamespaceItemList jxsm = (JBossXSNamespaceItemList)xsm.getNamespaceItems();
- int len = jxsm.getLength();
- for (int i = 0; i < len; i++)
- {
- JBossXSNamespaceItem ni = (JBossXSNamespaceItem)jxsm.item(i);
- String sns = ni.getSchemaNamespace();
- JBossXSNamespaceItem mynsi = nsimap.get(sns);
- if (mynsi != null)
- mynsi.merge(ni);
- else
- {
- //add the namespaceitem
- nsimap.put(sns, ni);
- ni.setNamespaceRegistry(namespaceRegistry);
- }
- }
-
- NamespaceRegistry xsmRegistry = xsm.getNamespaceRegistry();
- Iterator iter = xsmRegistry.getRegisteredPrefixes();
- while (iter.hasNext())
- {
- String prefix = (String)iter.next();
- String ns = xsmRegistry.getNamespaceURI(prefix);
- this.namespaceRegistry.registerURI(ns, prefix);
- }
-
- anonymousMapper.rebuild();
- }
-
- public void removeXSTypeDefinition(XSTypeDefinition xst)
- {
- String ns = xst.getNamespace();
- JBossXSNamespaceItem ni = nsimap.get(ns);
- ni.removeXSTypeDefinition(xst);
-
- anonymousMapper.rebuild();
- }
-
- /**
- * Given a namespaceuri, return the NamespaceItem that represents it
- * @param nsuri Namespace URI
- * @return JBossXSNamespaceItem
- */
- public JBossXSNamespaceItem getNamespaceItem(String nsuri)
- {
- return nsimap.get(nsuri);
- }
-
- public void writeTo(OutputStream out) throws IOException
- {
- out.write(serialize().getBytes());
- }
-
- public String serialize()
- {
- StringBuilder sb = serializeNamespaceItems();
-
- /**
- * Since the serialized string can contain multiple schema
- * definitions, we have to embed in a root element before
- * parsing for layout
- */
- sb.insert(0, "<root>");
- sb.append("</root>");
- // Layout schema
- String xsModelString = sb.toString();
-
- if (xsModelString.length() > 0)
- {
- try
- {
- Element root = DOMUtils.parse(xsModelString);
- //xsModelString = DOMWriter.printNode(root, true);
- xsModelString = this.getChildNodesSerialized(root);
- }
- catch (IOException e)
- {
- log.error("Cannot parse xsModelString: " + xsModelString, e);
- }
-
- }
-
- return xsModelString;
- }
-
- public Map<String, XSTypeDefinition> getAnonymousTypes()
- {
- return anonymousMapper.getTypes();
- }
-
- public Map<String, XSElementDeclaration> getAnonymousElements()
- {
- return anonymousMapper.getElements();
- }
-
- public boolean isQualifiedElements()
- {
- return qualifiedElements;
- }
-
- public void setQualifiedElements(boolean qualifiedElements)
- {
- this.qualifiedElements = qualifiedElements;
- for (JBossXSNamespaceItem item : nsimap.values())
- item.setQualifiedElements(qualifiedElements);
- }
-
- public NamespaceRegistry getNamespaceRegistry()
- {
- return namespaceRegistry;
- }
-
- public void eagerInitialize()
- {
- anonymousMapper.build();
- }
-
- private String registerNamespace(String ns)
- {
- String prefix = namespaceRegistry.getPrefix(ns);
-
- if (prefix != null)
- return prefix;
-
- // XML Namespace MUST ALWAYS BE the "xml" prefix
- if (Constants.NS_XML.equals(ns))
- prefix = Constants.PREFIX_XML;
-
- return namespaceRegistry.registerURI(ns, prefix);
- }
-
- private JBossXSNamespaceItem createNamespaceItemIfNotExistent(String ns)
- {
- if (ns == null)
- throw new IllegalArgumentException("Illegal null argument:ns");
-
- JBossXSNamespaceItem jbnm = nsimap.get(ns);
- if (jbnm == null)
- {
- jbnm = new JBossXSNamespaceItem(ns, namespaceRegistry, qualifiedElements);
- nsimap.put(ns, jbnm);
- registerNamespace(ns);
- }
-
- return jbnm;
- }
-
- private StringBuilder serializeNamespaceItems()
- {
- StringBuilder sb = new StringBuilder();
- //Write a schema definition for each namespaceitem that is custom
- Collection<JBossXSNamespaceItem> col = nsimap.values();
- for (JBossXSNamespaceItem i : col)
- {
- String nameS = i.getSchemaNamespace();
- if (Constants.NS_SCHEMA_XSD.equals(nameS) ||
Constants.URI_SOAP11_ENC.equals(nameS))
- continue;
-
- sb.append(i.toString());
- }
-
- return sb;
- }
-
- private String getChildNodesSerialized(Element root)
- {
- StringBuilder sb = new StringBuilder();
- Iterator iter = DOMUtils.getChildElements(root);
- while (iter != null && iter.hasNext())
- {
- Node n = (Node)iter.next();
- sb.append(DOMWriter.printNode(n, true));
- sb.append("\n");
- }
- return sb.toString();
- }
-
- private class AnonymousMapper implements Serializable
- {
- private static final long serialVersionUID = 5572350092914194023L;
-
- private HashMap<String, XSTypeDefinition> anonymousTypeMap;
-
- private HashMap<String, XSElementDeclaration> anonymousElementMap;
-
- // not really a stack, but it does contain items on the stack
- private HashSet<XSComplexTypeDefinition> stack = new
HashSet<XSComplexTypeDefinition>();
-
- /**
- * Triggers a rebuild of anonymous types only if a build has occured before.
- */
- public void rebuild()
- {
- if (anonymousTypeMap != null)
- build();
- }
-
- /**
- * Builds the anonymous type mapping. This is intended to be called lazily.
- */
- public void build()
- {
- XSModel model = JBossXSModel.this;
-
- anonymousTypeMap = new HashMap<String, XSTypeDefinition>();
-
- anonymousElementMap = new HashMap<String, XSElementDeclaration>();
-
- XSNamedMap namedMap = model.getComponents(XSConstants.TYPE_DEFINITION);
- for (int i = 0; i < namedMap.getLength(); i++)
- {
- XSTypeDefinition type = (XSTypeDefinition)namedMap.item(i);
- if (type.getTypeCategory() != XSTypeDefinition.COMPLEX_TYPE)
- continue;
-
- analyzeComplexType((XSComplexTypeDefinition)type, null,
type.getNamespace());
- }
-
- namedMap = model.getComponents(XSConstants.ELEMENT_DECLARATION);
- for (int i = 0; i < namedMap.getLength(); i++)
- {
- XSElementDeclaration element = (XSElementDeclaration)namedMap.item(i);
- analyzeElement(element, null, element.getNamespace(), null, null);
- }
- }
-
- private void analyzeElement(XSElementDeclaration element, String parentName, String
namespace, Integer minOccurs, Integer maxOccurs)
- {
- String name = element.getName();
-
- if (element.getScope() != XSConstants.SCOPE_GLOBAL)
- {
- name = parentName + ">" + name;
- anonymousElementMap.put(namespace + ":" + name, element);
- }
-
- if (maxOccurs != null && maxOccurs.intValue() > 1)
- {
- String key = namespace + ":" + name + "[" +
minOccurs.intValue() + "," + maxOccurs.intValue() + "]";
- anonymousTypeMap.put(key, createArrayWrapperComplexType(element, name,
namespace, minOccurs, maxOccurs));
- if (minOccurs.intValue() == 1)
- {
- key = namespace + ":" + name + "[" + "," +
maxOccurs.intValue() + "]";
- anonymousTypeMap.put(key, createArrayWrapperComplexType(element, name,
namespace, minOccurs, maxOccurs));
- }
- }
-
- XSTypeDefinition type = element.getTypeDefinition();
- if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
- analyzeComplexType((XSComplexTypeDefinition)type, name, namespace);
-
- if (type.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE)
- analyzeSimpleType((XSSimpleTypeDefinition)type, name, namespace);
- }
-
- private XSComplexTypeDefinition createArrayWrapperComplexType(XSElementDeclaration
element, String name, String namespace, Integer minOccurs, Integer maxOccurs)
- {
- JBossXSComplexTypeDefinition definition = new JBossXSComplexTypeDefinition(name,
namespace);
- definition.setAnonymous(true);
-
- JBossXSModelGroup group = new JBossXSModelGroup();
- group.setCompositor(XSModelGroup.COMPOSITOR_SEQUENCE);
- List<XSParticle> particles = new ArrayList<XSParticle>(1);
- JBossXSParticle particle = new JBossXSParticle();
- particle.setMaxOccurs(maxOccurs);
- particle.setMinOccurs(minOccurs);
- particle.setTerm(element);
- particles.add(particle);
- group.setParticles(particles);
-
- particle = new JBossXSParticle();
- particle.setTerm(group);
- definition.setParticle(particle);
-
- return definition;
- }
-
- private String analyzeType(XSTypeDefinition type, String parentName, String
namespace)
- {
- String name;
- if (type.getAnonymous())
- name = ">" + parentName;
- else name = type.getName();
-
- if (type.getAnonymous())
- {
- anonymousTypeMap.put(namespace + ":" + name, type);
- log.debug("Registered as anon type: {" + namespace + ":"
+ name + "} -> " + type);
- }
- return name;
- }
-
- private void analyzeSimpleType(XSSimpleTypeDefinition simpleType, String
parentName, String namespace)
- {
- analyzeType(simpleType, parentName, namespace);
- }
-
- private void analyzeComplexType(XSComplexTypeDefinition complexType, String
parentName, String namespace)
- {
- // Prevent reentrancy
- if (stack.contains(complexType))
- return;
-
- stack.add(complexType);
- String name = analyzeType(complexType, parentName, namespace);
- analyzeParticle(complexType.getParticle(), name, namespace);
- stack.remove(complexType);
- }
-
- private void analyzeParticle(XSParticle particle, String parentName, String
namespace)
- {
- // Is this right, can a particle be null?
- if (particle == null)
- return;
- XSTerm term = particle.getTerm();
-
- // Is this right, can a term be null?
- if (term == null)
- return;
- switch (term.getType())
- {
- case XSConstants.MODEL_GROUP:
- XSModelGroup group = (XSModelGroup)term;
- XSObjectList list = group.getParticles();
- for (int i = 0; i < list.getLength(); i++)
- analyzeParticle((XSParticle)list.item(i), parentName, namespace);
- break;
- case XSConstants.ELEMENT_DECLARATION:
- XSElementDeclaration decl = (XSElementDeclaration)term;
- analyzeElement(decl, parentName, namespace, new
Integer(particle.getMinOccurs()), new Integer(particle.getMaxOccurs()));
- }
- }
-
- public XSTypeDefinition getTypeDefinition(String name, String namespace)
- {
- // We lazily build this, after the first anonymous type name lookup
- if (anonymousTypeMap == null)
- build();
-
- return anonymousTypeMap.get(namespace + ":" + name);
- }
-
- public XSElementDeclaration getElementDeclaration(String name, String namespace)
- {
- // We lazily build this, after the first anonymous type name lookup
- if (anonymousElementMap == null)
- build();
-
- return anonymousElementMap.get(namespace + ":" + name);
- }
-
- public Map<String, XSElementDeclaration> getElements()
- {
- if (anonymousElementMap == null)
- build();
-
- // avoid the copy, trust the client
- return anonymousElementMap;
- }
-
- public Map<String, XSTypeDefinition> getTypes()
- {
- if (anonymousTypeMap == null)
- build();
-
- // avoid the copy, trust the client
- return anonymousTypeMap;
- }
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModel.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModel.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModel.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModel.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,745 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.xerces.xs.StringList;
+import org.apache.xerces.xs.XSAnnotation;
+import org.apache.xerces.xs.XSAttributeDeclaration;
+import org.apache.xerces.xs.XSAttributeGroupDefinition;
+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.XSModelGroupDefinition;
+import org.apache.xerces.xs.XSNamedMap;
+import org.apache.xerces.xs.XSNamespaceItem;
+import org.apache.xerces.xs.XSNamespaceItemList;
+import org.apache.xerces.xs.XSNotationDeclaration;
+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.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * Represents a schema model
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+
+public class JBossXSModel implements XSModel, Cloneable
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(JBossXSModel.class);
+
+ private AnonymousMapper anonymousMapper = new AnonymousMapper();
+
+ private boolean qualifiedElements = false;
+
+ private NamespaceRegistry namespaceRegistry = new NamespaceRegistry();
+
+ protected XSNamespaceItemList nslist = null;
+
+ protected HashMap<String, JBossXSNamespaceItem> nsimap = new HashMap<String,
JBossXSNamespaceItem>();
+
+ public JBossXSModel()
+ {
+ }
+
+ @Override
+ public JBossXSModel clone() throws CloneNotSupportedException
+ {
+ return (JBossXSModel)super.clone();
+ }
+
+ /**
+ * Convenience method. Returns a list of all namespaces that belong to
+ * this schema. The value <code>null</code> is not a valid namespace
+ * name, but if there are components that do not have a target namespace
+ * , <code>null</code> is included in this list.
+ */
+ public StringList getNamespaces()
+ {
+ return new JBossXSStringList(nsimap.keySet());
+ }
+
+ /**
+ * A set of namespace schema information information items (of type
+ * <code>XSNamespaceItem</code>), one for each namespace name which
+ * appears as the target namespace of any schema component in the schema
+ * used for that assessment, and one for absent if any schema component
+ * in the schema had no target namespace. For more information see
+ * schema information.
+ */
+ public XSNamespaceItemList getNamespaceItems()
+ {
+
+ nslist = new JBossXSNamespaceItemList(nsimap.values());
+
+ //One for the default xsd
+ JBossXSNamespaceItem nsxsd = new JBossXSNamespaceItem(Constants.NS_SCHEMA_XSD,
namespaceRegistry, qualifiedElements);
+ ((JBossXSNamespaceItemList)nslist).addItem(nsxsd);
+ return nslist;
+ }
+
+ /**
+ * Returns a list of top-level components, i.e. element declarations,
+ * attribute declarations, etc.
+ * @param objectType The type of the declaration, i.e.
+ * <code>ELEMENT_DECLARATION</code>. Note that
+ * <code>XSTypeDefinition.SIMPLE_TYPE</code> and
+ * <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the
+ * <code>objectType</code> to retrieve only complex types or simple
+ * types, instead of all types.
+ * @return A list of top-level definitions of the specified type in
+ * <code>objectType</code> or an empty
<code>XSNamedMap</code> if no
+ * such definitions exist.
+ */
+ public XSNamedMap getComponents(short objectType)
+ {
+ JBossXSNamedMap map = new JBossXSNamedMap();
+ JBossXSStringList sl = (JBossXSStringList)getNamespaces();
+ int len = sl != null ? sl.getLength() : 0;
+
+ for (int i = 0; i < len; i++)
+ {
+ String ns = sl.item(i);
+ JBossXSNamespaceItem ni = nsimap.get(ns);
+ JBossXSNamedMap nm = null;
+ if (ni != null)
+ {
+ nm = (JBossXSNamedMap)ni.getComponents(objectType);
+ map.addItems(nm.toList());
+ }
+ }
+
+ return map;
+ }
+
+ /**
+ * Convenience method. Returns a list of top-level component declarations
+ * that are defined within the specified namespace, i.e. element
+ * declarations, attribute declarations, etc.
+ * @param objectType The type of the declaration, i.e.
+ * <code>ELEMENT_DECLARATION</code>.
+ * @param namespace The namespace to which the declaration belongs or
+ * <code>null</code> (for components with no target namespace).
+ * @return A list of top-level definitions of the specified type in
+ * <code>objectType</code> and defined in the specified
+ * <code>namespace</code> or an empty
<code>XSNamedMap</code>.
+ */
+ public XSNamedMap getComponentsByNamespace(short objectType, String namespace)
+ {
+ JBossXSNamedMap map = new JBossXSNamedMap();
+
+ JBossXSNamespaceItem ni = nsimap.get(namespace);
+ if (ni == null)
+ return map;
+
+ return ni.getComponents(objectType);
+ }
+
+ /**
+ * [annotations]: a set of annotations if it exists, otherwise an empty
+ * <code>XSObjectList</code>.
+ */
+ public XSObjectList getAnnotations()
+ {
+ List lst = new ArrayList();
+ JBossXSObjectList objlist = new JBossXSObjectList(lst);
+ Set<String> keyset = nsimap.keySet();
+ for (String ns : keyset)
+ {
+ XSNamespaceItem xs = nsimap.get(ns);
+ objlist.addObjects(xs.getAnnotations());
+ }
+ return objlist;
+ }
+
+ /**
+ * Convenience method. Returns a top-level element declaration.
+ * @param name The name of the declaration.
+ * @param namespace The namespace of the declaration, otherwise
+ * <code>null</code>.
+ * @return A top-level element declaration or <code>null</code> if such a
+ * declaration does not exist.
+ */
+ public XSElementDeclaration getElementDeclaration(String name, String namespace)
+ {
+ if (name == null)
+ return null;
+
+ if (name.startsWith(">") || name.endsWith("]"))
+ return anonymousMapper.getElementDeclaration(name, namespace);
+
+ JBossXSNamespaceItem ni = nsimap.get(namespace);
+ if (ni == null)
+ return null;
+ return ni.getElementDeclaration(name);
+ }
+
+ /**
+ * Convenience method. Returns a top-level attribute declaration.
+ * @param name The name of the declaration.
+ * @param namespace The namespace of the declaration, otherwise
+ * <code>null</code>.
+ * @return A top-level attribute declaration or <code>null</code> if such
+ * a declaration does not exist.
+ */
+ public XSAttributeDeclaration getAttributeDeclaration(String name, String namespace)
+ {
+ JBossXSNamespaceItem ni = nsimap.get(namespace);
+ if (ni == null)
+ return null;
+ return ni.getAttributeDeclaration(name);
+ }
+
+ /**
+ * Convenience method. Returns a top-level simple or complex type
+ * definition.
+ * @param name The name of the definition.
+ * @param namespace The namespace of the declaration, otherwise
+ * <code>null</code>.
+ * @return An <code>XSTypeDefinition</code> or
<code>null</code> if such
+ * a definition does not exist.
+ */
+ public XSTypeDefinition getTypeDefinition(String name, String namespace)
+ {
+ if (name == null)
+ return null;
+
+ if (name.startsWith(">") || name.endsWith("]"))
+ return anonymousMapper.getTypeDefinition(name, namespace);
+
+ JBossXSNamespaceItem ni = nsimap.get(namespace);
+ if (ni == null)
+ return null;
+ return ni.getTypeDefinition(name);
+ }
+
+ /**
+ * Convenience method. Returns a top-level attribute group definition.
+ * @param name The name of the definition.
+ * @param namespace The namespace of the definition, otherwise
+ * <code>null</code>.
+ * @return A top-level attribute group definition or <code>null</code> if
+ * such a definition does not exist.
+ */
+ public XSAttributeGroupDefinition getAttributeGroup(String name, String namespace)
+ {
+ return null;
+ }
+
+ /**
+ * Convenience method. Returns a top-level model group definition.
+ * @param name The name of the definition.
+ * @param namespace The namespace of the definition, otherwise
+ * <code>null</code>.
+ * @return A top-level model group definition or <code>null</code> if
+ * such a definition does not exist.
+ */
+ public XSModelGroupDefinition getModelGroupDefinition(String name, String namespace)
+ {
+ return null;
+ }
+
+ /**
+ * Convenience method. Returns a top-level notation declaration.
+ * @param name The name of the declaration.
+ * @param namespace The namespace of the declaration, otherwise
+ * <code>null</code>.
+ * @return A top-level notation declaration or <code>null</code> if such
+ * a declaration does not exist.
+ */
+ public XSNotationDeclaration getNotationDeclaration(String name, String namespace)
+ {
+ return null;
+ }
+
+ public void addXSAnnotation(XSAnnotation xa)
+ {
+ String ns = xa.getNamespace();
+ if (ns == null && nsimap.keySet().size() == 1)
+ {
+ ns = nsimap.keySet().iterator().next();
+ }
+ if (ns != null)
+ {
+ createNamespaceItemIfNotExistent(ns);
+ JBossXSNamespaceItem jbnm = nsimap.get(ns);
+ jbnm.addXSAnnotation(xa);
+ }
+ else
+ {
+ log.trace("Cannot assign XSAnnotation to null namespace");
+ }
+ }
+
+ public void addXSAttributeDeclaration(XSAttributeDeclaration attr)
+ {
+ //Add attribute to the namespace item
+ String ns = attr.getNamespace();
+ JBossXSNamespaceItem jbnm = createNamespaceItemIfNotExistent(ns);
+ jbnm.addXSAttributeDeclaration(attr);
+ }
+
+ public void addXSTypeDefinition(XSTypeDefinition xst)
+ {
+ //Add type to the namespace item
+ String ns = xst.getNamespace();
+ if (ns == null)
+ throw new WSException("Illegal namespace:null");
+ JBossXSNamespaceItem jbnm = createNamespaceItemIfNotExistent(ns);
+ jbnm.addXSTypeDefinition(xst);
+
+ anonymousMapper.rebuild();
+ }
+
+ public void addXSComplexTypeDefinition(XSTypeDefinition xst)
+ {
+ this.addXSTypeDefinition(xst);
+
+ anonymousMapper.rebuild();
+ }
+
+ public void addXSElementDeclaration(XSElementDeclaration xsel)
+ {
+ //Add element to the namespace item
+ String ns = xsel.getNamespace();
+ JBossXSNamespaceItem jbnm = createNamespaceItemIfNotExistent(ns);
+ jbnm.addXSElementDeclaration(xsel);
+
+ anonymousMapper.rebuild();
+ }
+
+ public void addSchemaLocation(String nsURI, URL locationURL)
+ {
+ JBossXSNamespaceItem ni = createNamespaceItemIfNotExistent(nsURI);
+ ni.addDocumentLocation(locationURL.toExternalForm());
+ }
+
+ public void addXSNamespaceItem(XSNamespaceItem xsitem)
+ {
+ ((JBossXSNamespaceItemList)nslist).addItem(xsitem);
+
+ anonymousMapper.rebuild();
+ }
+
+ public void setXSNamespaceItemList(XSNamespaceItemList list)
+ {
+ this.nslist = list;
+ }
+
+ public void merge(JBossXSModel xsm)
+ {
+ JBossXSNamespaceItemList jxsm = (JBossXSNamespaceItemList)xsm.getNamespaceItems();
+ int len = jxsm.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ JBossXSNamespaceItem ni = (JBossXSNamespaceItem)jxsm.item(i);
+ String sns = ni.getSchemaNamespace();
+ JBossXSNamespaceItem mynsi = nsimap.get(sns);
+ if (mynsi != null)
+ mynsi.merge(ni);
+ else
+ {
+ //add the namespaceitem
+ nsimap.put(sns, ni);
+ ni.setNamespaceRegistry(namespaceRegistry);
+ }
+ }
+
+ NamespaceRegistry xsmRegistry = xsm.getNamespaceRegistry();
+ Iterator iter = xsmRegistry.getRegisteredPrefixes();
+ while (iter.hasNext())
+ {
+ String prefix = (String)iter.next();
+ String ns = xsmRegistry.getNamespaceURI(prefix);
+ this.namespaceRegistry.registerURI(ns, prefix);
+ }
+
+ anonymousMapper.rebuild();
+ }
+
+ public void removeXSTypeDefinition(XSTypeDefinition xst)
+ {
+ String ns = xst.getNamespace();
+ JBossXSNamespaceItem ni = nsimap.get(ns);
+ ni.removeXSTypeDefinition(xst);
+
+ anonymousMapper.rebuild();
+ }
+
+ /**
+ * Given a namespaceuri, return the NamespaceItem that represents it
+ * @param nsuri Namespace URI
+ * @return JBossXSNamespaceItem
+ */
+ public JBossXSNamespaceItem getNamespaceItem(String nsuri)
+ {
+ return nsimap.get(nsuri);
+ }
+
+ public void writeTo(OutputStream out) throws IOException
+ {
+ out.write(serialize().getBytes());
+ }
+
+ public String serialize()
+ {
+ StringBuilder sb = serializeNamespaceItems();
+
+ /**
+ * Since the serialized string can contain multiple schema
+ * definitions, we have to embed in a root element before
+ * parsing for layout
+ */
+ sb.insert(0, "<root>");
+ sb.append("</root>");
+ // Layout schema
+ String xsModelString = sb.toString();
+
+ if (xsModelString.length() > 0)
+ {
+ try
+ {
+ Element root = DOMUtils.parse(xsModelString);
+ //xsModelString = DOMWriter.printNode(root, true);
+ xsModelString = this.getChildNodesSerialized(root);
+ }
+ catch (IOException e)
+ {
+ log.error("Cannot parse xsModelString: " + xsModelString, e);
+ }
+
+ }
+
+ return xsModelString;
+ }
+
+ public Map<String, XSTypeDefinition> getAnonymousTypes()
+ {
+ return anonymousMapper.getTypes();
+ }
+
+ public Map<String, XSElementDeclaration> getAnonymousElements()
+ {
+ return anonymousMapper.getElements();
+ }
+
+ public boolean isQualifiedElements()
+ {
+ return qualifiedElements;
+ }
+
+ public void setQualifiedElements(boolean qualifiedElements)
+ {
+ this.qualifiedElements = qualifiedElements;
+ for (JBossXSNamespaceItem item : nsimap.values())
+ item.setQualifiedElements(qualifiedElements);
+ }
+
+ public NamespaceRegistry getNamespaceRegistry()
+ {
+ return namespaceRegistry;
+ }
+
+ public void eagerInitialize()
+ {
+ anonymousMapper.build();
+ }
+
+ private String registerNamespace(String ns)
+ {
+ String prefix = namespaceRegistry.getPrefix(ns);
+
+ if (prefix != null)
+ return prefix;
+
+ // XML Namespace MUST ALWAYS BE the "xml" prefix
+ if (Constants.NS_XML.equals(ns))
+ prefix = Constants.PREFIX_XML;
+
+ return namespaceRegistry.registerURI(ns, prefix);
+ }
+
+ private JBossXSNamespaceItem createNamespaceItemIfNotExistent(String ns)
+ {
+ if (ns == null)
+ throw new IllegalArgumentException("Illegal null argument:ns");
+
+ JBossXSNamespaceItem jbnm = nsimap.get(ns);
+ if (jbnm == null)
+ {
+ jbnm = new JBossXSNamespaceItem(ns, namespaceRegistry, qualifiedElements);
+ nsimap.put(ns, jbnm);
+ registerNamespace(ns);
+ }
+
+ return jbnm;
+ }
+
+ private StringBuilder serializeNamespaceItems()
+ {
+ StringBuilder sb = new StringBuilder();
+ //Write a schema definition for each namespaceitem that is custom
+ Collection<JBossXSNamespaceItem> col = nsimap.values();
+ for (JBossXSNamespaceItem i : col)
+ {
+ String nameS = i.getSchemaNamespace();
+ if (Constants.NS_SCHEMA_XSD.equals(nameS) ||
Constants.URI_SOAP11_ENC.equals(nameS))
+ continue;
+
+ sb.append(i.toString());
+ }
+
+ return sb;
+ }
+
+ private String getChildNodesSerialized(Element root)
+ {
+ StringBuilder sb = new StringBuilder();
+ Iterator iter = DOMUtils.getChildElements(root);
+ while (iter != null && iter.hasNext())
+ {
+ Node n = (Node)iter.next();
+ sb.append(DOMWriter.printNode(n, true));
+ sb.append("\n");
+ }
+ return sb.toString();
+ }
+
+ private class AnonymousMapper implements Serializable
+ {
+ private static final long serialVersionUID = 5572350092914194023L;
+
+ private HashMap<String, XSTypeDefinition> anonymousTypeMap;
+
+ private HashMap<String, XSElementDeclaration> anonymousElementMap;
+
+ // not really a stack, but it does contain items on the stack
+ private HashSet<XSComplexTypeDefinition> stack = new
HashSet<XSComplexTypeDefinition>();
+
+ /**
+ * Triggers a rebuild of anonymous types only if a build has occured before.
+ */
+ public void rebuild()
+ {
+ if (anonymousTypeMap != null)
+ build();
+ }
+
+ /**
+ * Builds the anonymous type mapping. This is intended to be called lazily.
+ */
+ public void build()
+ {
+ XSModel model = JBossXSModel.this;
+
+ anonymousTypeMap = new HashMap<String, XSTypeDefinition>();
+
+ anonymousElementMap = new HashMap<String, XSElementDeclaration>();
+
+ XSNamedMap namedMap = model.getComponents(XSConstants.TYPE_DEFINITION);
+ for (int i = 0; i < namedMap.getLength(); i++)
+ {
+ XSTypeDefinition type = (XSTypeDefinition)namedMap.item(i);
+ if (type.getTypeCategory() != XSTypeDefinition.COMPLEX_TYPE)
+ continue;
+
+ analyzeComplexType((XSComplexTypeDefinition)type, null,
type.getNamespace());
+ }
+
+ namedMap = model.getComponents(XSConstants.ELEMENT_DECLARATION);
+ for (int i = 0; i < namedMap.getLength(); i++)
+ {
+ XSElementDeclaration element = (XSElementDeclaration)namedMap.item(i);
+ analyzeElement(element, null, element.getNamespace(), null, null);
+ }
+ }
+
+ private void analyzeElement(XSElementDeclaration element, String parentName, String
namespace, Integer minOccurs, Integer maxOccurs)
+ {
+ String name = element.getName();
+
+ if (element.getScope() != XSConstants.SCOPE_GLOBAL)
+ {
+ name = parentName + ">" + name;
+ anonymousElementMap.put(namespace + ":" + name, element);
+ }
+
+ if (maxOccurs != null && maxOccurs.intValue() > 1)
+ {
+ String key = namespace + ":" + name + "[" +
minOccurs.intValue() + "," + maxOccurs.intValue() + "]";
+ anonymousTypeMap.put(key, createArrayWrapperComplexType(element, name,
namespace, minOccurs, maxOccurs));
+ if (minOccurs.intValue() == 1)
+ {
+ key = namespace + ":" + name + "[" + "," +
maxOccurs.intValue() + "]";
+ anonymousTypeMap.put(key, createArrayWrapperComplexType(element, name,
namespace, minOccurs, maxOccurs));
+ }
+ }
+
+ XSTypeDefinition type = element.getTypeDefinition();
+ if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE)
+ analyzeComplexType((XSComplexTypeDefinition)type, name, namespace);
+
+ if (type.getTypeCategory() == XSTypeDefinition.SIMPLE_TYPE)
+ analyzeSimpleType((XSSimpleTypeDefinition)type, name, namespace);
+ }
+
+ private XSComplexTypeDefinition createArrayWrapperComplexType(XSElementDeclaration
element, String name, String namespace, Integer minOccurs, Integer maxOccurs)
+ {
+ JBossXSComplexTypeDefinition definition = new JBossXSComplexTypeDefinition(name,
namespace);
+ definition.setAnonymous(true);
+
+ JBossXSModelGroup group = new JBossXSModelGroup();
+ group.setCompositor(XSModelGroup.COMPOSITOR_SEQUENCE);
+ List<XSParticle> particles = new ArrayList<XSParticle>(1);
+ JBossXSParticle particle = new JBossXSParticle();
+ particle.setMaxOccurs(maxOccurs);
+ particle.setMinOccurs(minOccurs);
+ particle.setTerm(element);
+ particles.add(particle);
+ group.setParticles(particles);
+
+ particle = new JBossXSParticle();
+ particle.setTerm(group);
+ definition.setParticle(particle);
+
+ return definition;
+ }
+
+ private String analyzeType(XSTypeDefinition type, String parentName, String
namespace)
+ {
+ String name;
+ if (type.getAnonymous())
+ name = ">" + parentName;
+ else name = type.getName();
+
+ if (type.getAnonymous())
+ {
+ anonymousTypeMap.put(namespace + ":" + name, type);
+ log.debug("Registered as anon type: {" + namespace + ":"
+ name + "} -> " + type);
+ }
+ return name;
+ }
+
+ private void analyzeSimpleType(XSSimpleTypeDefinition simpleType, String
parentName, String namespace)
+ {
+ analyzeType(simpleType, parentName, namespace);
+ }
+
+ private void analyzeComplexType(XSComplexTypeDefinition complexType, String
parentName, String namespace)
+ {
+ // Prevent reentrancy
+ if (stack.contains(complexType))
+ return;
+
+ stack.add(complexType);
+ String name = analyzeType(complexType, parentName, namespace);
+ analyzeParticle(complexType.getParticle(), name, namespace);
+ stack.remove(complexType);
+ }
+
+ private void analyzeParticle(XSParticle particle, String parentName, String
namespace)
+ {
+ // Is this right, can a particle be null?
+ if (particle == null)
+ return;
+ XSTerm term = particle.getTerm();
+
+ // Is this right, can a term be null?
+ if (term == null)
+ return;
+ switch (term.getType())
+ {
+ case XSConstants.MODEL_GROUP:
+ XSModelGroup group = (XSModelGroup)term;
+ XSObjectList list = group.getParticles();
+ for (int i = 0; i < list.getLength(); i++)
+ analyzeParticle((XSParticle)list.item(i), parentName, namespace);
+ break;
+ case XSConstants.ELEMENT_DECLARATION:
+ XSElementDeclaration decl = (XSElementDeclaration)term;
+ analyzeElement(decl, parentName, namespace, new
Integer(particle.getMinOccurs()), new Integer(particle.getMaxOccurs()));
+ }
+ }
+
+ public XSTypeDefinition getTypeDefinition(String name, String namespace)
+ {
+ // We lazily build this, after the first anonymous type name lookup
+ if (anonymousTypeMap == null)
+ build();
+
+ return anonymousTypeMap.get(namespace + ":" + name);
+ }
+
+ public XSElementDeclaration getElementDeclaration(String name, String namespace)
+ {
+ // We lazily build this, after the first anonymous type name lookup
+ if (anonymousElementMap == null)
+ build();
+
+ return anonymousElementMap.get(namespace + ":" + name);
+ }
+
+ public Map<String, XSElementDeclaration> getElements()
+ {
+ if (anonymousElementMap == null)
+ build();
+
+ // avoid the copy, trust the client
+ return anonymousElementMap;
+ }
+
+ public Map<String, XSTypeDefinition> getTypes()
+ {
+ if (anonymousTypeMap == null)
+ build();
+
+ // avoid the copy, trust the client
+ return anonymousTypeMap;
+ }
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModelGroup.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModelGroup.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModelGroup.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,109 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.xerces.xs.XSAnnotation;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSModelGroup;
-import org.apache.xerces.xs.XSObjectList;
-
-/**
- * Implements a ModelGroup of the Xerces Schema API
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 21, 2005
- */
-public class JBossXSModelGroup extends JBossXSObject
- implements XSModelGroup
-{
- private JBossXSObjectList xsparts = new JBossXSObjectList();;
- protected short compositor = 0;
-
- /**
- * [compositor]: one of all, choice or sequence. The valid constant values
- * are:
- * <code>COMPOSITOR_SEQUENCE, COMPOSITOR_CHOICE, COMPOSITOR_ALL</code>.
- */
- public short getCompositor()
- {
- return compositor;
- }
-
- /**
- * A list of [particles] if it exists, otherwise an empty
- * <code>XSObjectList</code>.
- */
- public XSObjectList getParticles()
- {
- return xsparts;
- }
-
- /**
- * An [annotation] if it exists, otherwise <code>null</code>.
- */
- public XSAnnotation getAnnotation()
- {
- return null;
- }
-
- public void setParticles(List p)
- {
- xsparts = new JBossXSObjectList();
- Iterator iter = p.iterator();
- while (iter.hasNext())
- {
- xsparts.addItem((JBossXSParticle)iter.next());
- }
- }
-
- public void setParticles(List p, boolean shouldSort)
- {
- xsparts = new JBossXSObjectList();
- if(shouldSort)
- setParticles(p);
- else
- {
- Iterator iter = p.iterator();
- while (iter.hasNext())
- {
- xsparts.addItem((JBossXSParticle)iter.next(), false);
- }
- }
-
- }
-
- public void setCompositor(short compositor)
- {
- this.compositor = compositor;
- }
-
- /**
- * Get the type
- */
- @Override
- public short getType()
- {
- return XSConstants.MODEL_GROUP;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModelGroup.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModelGroup.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModelGroup.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModelGroup.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,109 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.xerces.xs.XSAnnotation;
+import org.apache.xerces.xs.XSConstants;
+import org.apache.xerces.xs.XSModelGroup;
+import org.apache.xerces.xs.XSObjectList;
+
+/**
+ * Implements a ModelGroup of the Xerces Schema API
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 21, 2005
+ */
+public class JBossXSModelGroup extends JBossXSObject
+ implements XSModelGroup
+{
+ private JBossXSObjectList xsparts = new JBossXSObjectList();;
+ protected short compositor = 0;
+
+ /**
+ * [compositor]: one of all, choice or sequence. The valid constant values
+ * are:
+ * <code>COMPOSITOR_SEQUENCE, COMPOSITOR_CHOICE, COMPOSITOR_ALL</code>.
+ */
+ public short getCompositor()
+ {
+ return compositor;
+ }
+
+ /**
+ * A list of [particles] if it exists, otherwise an empty
+ * <code>XSObjectList</code>.
+ */
+ public XSObjectList getParticles()
+ {
+ return xsparts;
+ }
+
+ /**
+ * An [annotation] if it exists, otherwise <code>null</code>.
+ */
+ public XSAnnotation getAnnotation()
+ {
+ return null;
+ }
+
+ public void setParticles(List p)
+ {
+ xsparts = new JBossXSObjectList();
+ Iterator iter = p.iterator();
+ while (iter.hasNext())
+ {
+ xsparts.addItem((JBossXSParticle)iter.next());
+ }
+ }
+
+ public void setParticles(List p, boolean shouldSort)
+ {
+ xsparts = new JBossXSObjectList();
+ if(shouldSort)
+ setParticles(p);
+ else
+ {
+ Iterator iter = p.iterator();
+ while (iter.hasNext())
+ {
+ xsparts.addItem((JBossXSParticle)iter.next(), false);
+ }
+ }
+
+ }
+
+ public void setCompositor(short compositor)
+ {
+ this.compositor = compositor;
+ }
+
+ /**
+ * Get the type
+ */
+ @Override
+ public short getType()
+ {
+ return XSConstants.MODEL_GROUP;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamedMap.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamedMap.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamedMap.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,105 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.xerces.xs.XSNamedMap;
-import org.apache.xerces.xs.XSObject;
-
-/**
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-public class JBossXSNamedMap implements XSNamedMap
-{
- protected List<XSObject> list = new ArrayList<XSObject>();
- /**
- * The number of <code>XSObjects</code> in the
<code>XSObjectList</code>.
- * The range of valid child object indices is 0 to <code>length-1</code>
- * inclusive.
- */
- public int getLength()
- {
- return list.size();
- }
-
- /**
- * Returns the <code>index</code>th item in the collection or
- * <code>null</code> if <code>index</code> is greater than or
equal to
- * the number of objects in the list. The index starts at 0.
- * @param index index into the collection.
- * @return The <code>XSObject</code> at the
<code>index</code>th
- * position in the <code>XSObjectList</code>, or
<code>null</code> if
- * the index specified is not valid.
- */
- public XSObject item(int index)
- {
- return (XSObject)list.get(index);
- }
-
- /**
- * Retrieves an <code>XSObject</code> specified by local name and
- * namespace URI.
- * <br>Per XML Namespaces, applications must use the value
<code>null</code> as the
- * <code>namespace</code> parameter for methods if they wish to specify
- * no namespace.
- * @param namespace The namespace URI of the <code>XSObject</code> to
- * retrieve, or <code>null</code> if the
<code>XSObject</code> has no
- * namespace.
- * @param localName The local name of the <code>XSObject</code> to
- * retrieve.
- * @return A <code>XSObject</code> (of any type) with the specified local
- * name and namespace URI, or <code>null</code> if they do not
- * identify any object in this map.
- */
- public XSObject itemByName(String namespace, String localName)
- {
- XSObject xso = null;
- //Since our list may contain types from xerces implementation
- for(XSObject obj: list)
- {
- if(localName.equals(obj.getName()) &&
- namespace.equals(obj.getNamespace()))
- return obj;
- }
-
- return xso;
- }
-
- public void addItem(XSObject obj)
- {
- list.add(obj);
- }
-
- public void addItems(Collection col)
- {
- list.addAll(col);
- }
-
- public List<XSObject> toList()
- {
- return list;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamedMap.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamedMap.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamedMap.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamedMap.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,105 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.xerces.xs.XSNamedMap;
+import org.apache.xerces.xs.XSObject;
+
+/**
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+public class JBossXSNamedMap implements XSNamedMap
+{
+ protected List<XSObject> list = new ArrayList<XSObject>();
+ /**
+ * The number of <code>XSObjects</code> in the
<code>XSObjectList</code>.
+ * The range of valid child object indices is 0 to <code>length-1</code>
+ * inclusive.
+ */
+ public int getLength()
+ {
+ return list.size();
+ }
+
+ /**
+ * Returns the <code>index</code>th item in the collection or
+ * <code>null</code> if <code>index</code> is greater than or
equal to
+ * the number of objects in the list. The index starts at 0.
+ * @param index index into the collection.
+ * @return The <code>XSObject</code> at the
<code>index</code>th
+ * position in the <code>XSObjectList</code>, or
<code>null</code> if
+ * the index specified is not valid.
+ */
+ public XSObject item(int index)
+ {
+ return (XSObject)list.get(index);
+ }
+
+ /**
+ * Retrieves an <code>XSObject</code> specified by local name and
+ * namespace URI.
+ * <br>Per XML Namespaces, applications must use the value
<code>null</code> as the
+ * <code>namespace</code> parameter for methods if they wish to specify
+ * no namespace.
+ * @param namespace The namespace URI of the <code>XSObject</code> to
+ * retrieve, or <code>null</code> if the
<code>XSObject</code> has no
+ * namespace.
+ * @param localName The local name of the <code>XSObject</code> to
+ * retrieve.
+ * @return A <code>XSObject</code> (of any type) with the specified local
+ * name and namespace URI, or <code>null</code> if they do not
+ * identify any object in this map.
+ */
+ public XSObject itemByName(String namespace, String localName)
+ {
+ XSObject xso = null;
+ //Since our list may contain types from xerces implementation
+ for(XSObject obj: list)
+ {
+ if(localName.equals(obj.getName()) &&
+ namespace.equals(obj.getNamespace()))
+ return obj;
+ }
+
+ return xso;
+ }
+
+ public void addItem(XSObject obj)
+ {
+ list.add(obj);
+ }
+
+ public void addItems(Collection col)
+ {
+ list.addAll(col);
+ }
+
+ public List<XSObject> toList()
+ {
+ return list;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,495 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
-
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSAnnotation;
-import org.apache.xerces.xs.XSAttributeDeclaration;
-import org.apache.xerces.xs.XSAttributeGroupDefinition;
-import org.apache.xerces.xs.XSComplexTypeDefinition;
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSElementDeclaration;
-import org.apache.xerces.xs.XSModelGroupDefinition;
-import org.apache.xerces.xs.XSNamedMap;
-import org.apache.xerces.xs.XSNamespaceItem;
-import org.apache.xerces.xs.XSNotationDeclaration;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.xb.binding.NamespaceRegistry;
-
-/**
- * Xerces Schema API Implementation
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-public class JBossXSNamespaceItem implements XSNamespaceItem
-{
- // provide logging
- private static final Logger log = Logger.getLogger(JBossXSNamespaceItem.class);
-
- private String schemaNamespace = null;
- private List<String> docLocations = null;
-
- private Map<String,XSAnnotation> anns = new
HashMap<String,XSAnnotation>();
- private Map<String,XSAttributeDeclaration> attrs = new
HashMap<String,XSAttributeDeclaration>();
- private Map<String,XSElementDeclaration> elements = new
HashMap<String,XSElementDeclaration>();
- private Map<String,XSTypeDefinition> types = new
HashMap<String,XSTypeDefinition>();
-
- private boolean qualifiedElements = false;
-
- private NamespaceRegistry namespaceRegistry;
-
- public JBossXSNamespaceItem(String ns, NamespaceRegistry namespaceRegistry, boolean
qualifiedElements)
- {
- this.schemaNamespace = ns;
- this.namespaceRegistry = namespaceRegistry;
- this.qualifiedElements = qualifiedElements;
- }
-
- /**
- * [schema namespace]: A namespace name or <code>null</code> if absent.
- */
- public String getSchemaNamespace()
- {
- return schemaNamespace;
- }
-
- /**
- * [schema components]: a list of top-level components, i.e. element
- * declarations, attribute declarations, etc.
- * @param objectType The type of the declaration, i.e.
- * <code>ELEMENT_DECLARATION</code>. Note that
- * <code>XSTypeDefinition.SIMPLE_TYPE</code> and
- * <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the
- * <code>objectType</code> to retrieve only complex types or simple
- * types, instead of all types.
- * @return A list of top-level definition of the specified type in
- * <code>objectType</code> or an empty
<code>XSNamedMap</code> if no
- * such definitions exist.
- */
- public XSNamedMap getComponents(short objectType)
- {
- JBossXSNamedMap jbnm = new JBossXSNamedMap();
- if(objectType == XSConstants.ELEMENT_DECLARATION && elements.size() >
0)
- jbnm.addItems(elements.values());
- else
- {
- if(objectType == XSConstants.ATTRIBUTE_DECLARATION && attrs.size() >
0)
- {
- jbnm.addItems(attrs.values());
- }
- else
- if(objectType == XSConstants.TYPE_DEFINITION && types.size() > 0)
- {
- jbnm.addItems(types.values());
- }
- else
- if(objectType == XSTypeDefinition.COMPLEX_TYPE)
- {
- Collection col = types.values();
- jbnm.addItems(getTypes(col,XSTypeDefinition.COMPLEX_TYPE));
- }
- else
- if(objectType == XSTypeDefinition.SIMPLE_TYPE)
- {
- Collection col = types.values();
- jbnm.addItems(getTypes(col,XSTypeDefinition.SIMPLE_TYPE));
- }
- }
-
- return jbnm;
- }
-
- /**
- * [annotations]: a set of annotations if it exists, otherwise an empty
- * <code>XSObjectList</code>.
- */
- public XSObjectList getAnnotations()
- {
- List lst = new ArrayList();
- lst.addAll(anns.values());
- return new JBossXSObjectList(lst);
- }
-
- /**
- * Convenience method. Returns a top-level element declaration.
- * @param name The name of the declaration.
- * @return A top-level element declaration or <code>null</code> if such a
- * declaration does not exist.
- */
- public XSElementDeclaration getElementDeclaration(String name)
- {
- JBossXSElementDeclaration jbe = null;
- //Ensure we return JBossXSElementDeclaration
- if(elements != null)
- {
- XSElementDeclaration xe = elements.get(name);
- if(xe != null && !(xe instanceof JBossXSElementDeclaration))
- jbe = new JBossXSElementDeclaration(xe);
- else
- return xe;
- }
- return jbe;
- }
-
- /**
- * Convenience method. Returns a top-level attribute declaration.
- * @param name The name of the declaration.
- * @return A top-level attribute declaration or <code>null</code> if such
- * a declaration does not exist.
- */
- public XSAttributeDeclaration getAttributeDeclaration(String name)
- {
- if(attrs != null) return attrs.get(name);
- return null;
- }
-
- /**
- * Convenience method. Returns a top-level simple or complex type
- * definition.
- * @param name The name of the definition.
- * @return An <code>XSTypeDefinition</code> or
<code>null</code> if such
- * a definition does not exist.
- */
- public XSTypeDefinition getTypeDefinition(String name)
- {
- if(types != null) return types.get(name);
- return null;
- }
-
- /**
- * Convenience method. Returns a top-level attribute group definition.
- * @param name The name of the definition.
- * @return A top-level attribute group definition or <code>null</code> if
- * such a definition does not exist.
- */
- public XSAttributeGroupDefinition getAttributeGroup(String name)
- {
- return null;
- }
-
- /**
- * Convenience method. Returns a top-level model group definition.
- * @param name The name of the definition.
- * @return A top-level model group definition definition or
- * <code>null</code> if such a definition does not exist.
- */
- public XSModelGroupDefinition getModelGroupDefinition(String name)
- {
- return null;
- }
-
- /**
- * Convenience method. Returns a top-level notation declaration.
- * @param name The name of the declaration.
- * @return A top-level notation declaration or <code>null</code> if such
- * a declaration does not exist.
- */
- public XSNotationDeclaration getNotationDeclaration(String name)
- {
- return null;
- }
-
- /**
- * [document location] - a list of location URIs for the documents that
- * contributed to the <code>XSModel</code>.
- */
- public StringList getDocumentLocations()
- {
- if(docLocations == null) return new JBossXSStringList();
- JBossXSStringList strList = new JBossXSStringList(docLocations);
- return strList;
- }
-
- //Setters
-
- //Custom methods
- public void addDocumentLocation(String uri)
- {
- if(docLocations == null)
- docLocations = new ArrayList<String>();
- docLocations.add(uri);
- }
-
- public void addDocumentLocations(List<String> uri)
- {
- if(docLocations == null)
- docLocations = new ArrayList<String>();
- docLocations.addAll(uri);
- }
-
- /**
- * Add an XSAnnotation
- */
- public void addXSAnnotation(XSAnnotation xa)
- {
- if(xa == null)
- throw new IllegalArgumentException("Illegal Null Argument:xa");
- anns.put(xa.getName(),xa);
- }
-
- /**
- * Add an XSAttributeDeclaration
- */
- public void addXSAttributeDeclaration(XSAttributeDeclaration att)
- {
- if(att == null)
- throw new IllegalArgumentException("att is null");
- attrs.put(att.getName(),att);
- }
-
- /**
- * Add an XSElementDeclaration
- * @param el
- */
- public void addXSElementDeclaration(XSElementDeclaration el)
- {
- if(el == null)
- throw new IllegalArgumentException("Element is null");
- elements.put(el.getName(),el);
- }
-
- /**
- * Add an XSTypeDefinition
- * @param xsType
- */
- public void addXSTypeDefinition(XSTypeDefinition xsType)
- {
- if(xsType == null)
- throw new IllegalArgumentException("type is null");
-
- String xsTypeName = xsType.getName();
- log.trace("addXSTypeDefinition: " + xsTypeName);
-
- types.put(xsTypeName,xsType);
- }
-
-
- /**
- * Overrides the toString method
- */
- @Override
- public String toString()
- {
- /*
- * FIXME - The SOAP Encoding namespace handling should be revisited. This
- * routine should really operate purely off of the registry, instead of
- * printing constant declarations, and having to double check that the
- * registry does not contain them.
- *
- * This order is currently maintained to preserve the format of the
- * generated schema files in the test harness.
- */
- if(isEmpty()) return "";
-
- WSSchemaUtils sutils = WSSchemaUtils.getInstance(namespaceRegistry,
schemaNamespace);
-
- StringBuilder buffer = new StringBuilder();
- buffer.append( "<schema targetNamespace='" + schemaNamespace +
"'");
- buffer.append(" xmlns:" + Constants.PREFIX_SOAP11_ENC +
"='" + Constants.URI_SOAP11_ENC + "'");
- // XML Namespace can only be assigned to the XML prefix
- if (! schemaNamespace.equals(Constants.NS_XML))
- buffer.append(" xmlns:" + Constants.PREFIX_TNS + "='" +
schemaNamespace + "'");
- buffer.append(" xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'");
- buffer.append(" xmlns='" + Constants.NS_SCHEMA_XSD +
"'");
-
- //Append any custom prefixes
- Iterator iter = namespaceRegistry.getRegisteredPrefixes();
- while (iter.hasNext())
- {
- String prefix = (String) iter.next();
- String ns = namespaceRegistry.getNamespaceURI(prefix);
- if (ns.equals(schemaNamespace) && ns.equals(Constants.NS_XML) == false)
- continue;
- if (ns.equals(Constants.URI_SOAP11_ENC))
- continue;
- if (ns.equals(Constants.NS_SCHEMA_XSI))
- continue;
- buffer.append(" xmlns:" + prefix + "='" + ns
+"'");
- }
-
- if (qualifiedElements)
- buffer.append(" elementFormDefault='qualified'");
-
- buffer.append(">");
-
- //Write the import namespaces
- iter = namespaceRegistry.getRegisteredURIs();
- while (iter.hasNext())
- {
- String ns = (String) iter.next();
- if (ns.equals(schemaNamespace))
- continue;
- if (ns.equals(Constants.URI_SOAP11_ENC))
- continue;
- if (ns.equals(Constants.NS_SCHEMA_XSI))
- continue;
- buffer.append("<import namespace='" + ns +
"'/>");
- }
-
- //Sort the types
- //TreeSet<String> treeset = new TreeSet<String>(types.keySet());
- TreeSet<String> treeset = new TreeSet<String>(new XSComparator());
- treeset.addAll(types.keySet());
- for(String key: treeset)
- {
- buffer.append(sutils.write(types.get(key)));
- }
-
- // Serialize the elements
- //treeset = new TreeSet<String>(elements.keySet());
- treeset = new TreeSet<String>(new XSComparator());
- treeset.addAll(elements.keySet());
- for( String key: treeset)
- {
- buffer.append(sutils.write(elements.get(key) ));
- }
- buffer.append("</schema>");
- return buffer.toString();
- }
-
- public void merge(JBossXSNamespaceItem nsi)
- {
- //Merge the attributes
- JBossXSNamedMap nmap =
(JBossXSNamedMap)nsi.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
- int len = nmap.getLength();
- for(int i=0;i<len;i++)
- {
- XSAttributeDeclaration xatt = (XSAttributeDeclaration)nmap.item(i);
- this.addXSAttributeDeclaration(xatt);
- }
-
- //Merge the types
- nmap = (JBossXSNamedMap)nsi.getComponents(XSConstants.TYPE_DEFINITION);
- len = nmap.getLength();
- for(int i=0;i<len;i++)
- {
- XSTypeDefinition xt = (XSTypeDefinition)nmap.item(i);
- this.addXSTypeDefinition(xt);
- }
-
- // Merge the elements
- nmap = (JBossXSNamedMap)nsi.getComponents(XSConstants.ELEMENT_DECLARATION);
- len = nmap.getLength();
- for(int i=0;i<len;i++)
- {
- XSElementDeclaration xe = (XSElementDeclaration)nmap.item(i);
- this.addXSElementDeclaration(xe);
- }
- }
-
- /**
- * Delete a XSTypeDefinition
- *
- * @param xst
- */
- public void removeXSTypeDefinition(XSTypeDefinition xst)
- {
- String name = xst.getName();
- types.remove(name);
- }
-
- /**
- * Delete a XSTypeDefinition
- *
- * @param xst
- */
- public void removeXSElementDeclaration(XSElementDeclaration xel)
- {
- String name = xel.getName();
- elements.remove(name);
- }
-
- public boolean isQualifiedElements()
- {
- return qualifiedElements;
- }
-
- public void setQualifiedElements(boolean qualifiedElements)
- {
- this.qualifiedElements = qualifiedElements;
- }
-
- public NamespaceRegistry getNamespaceRegistry()
- {
- return namespaceRegistry;
- }
-
- public void setNamespaceRegistry(NamespaceRegistry namespaceRegistry)
- {
- this.namespaceRegistry = namespaceRegistry;
- }
-
- //PRIVATE METHODS
- private Collection getTypes(Collection col, short objectType)
- {
- if(objectType != XSTypeDefinition.SIMPLE_TYPE && objectType !=
XSTypeDefinition.COMPLEX_TYPE)
- throw new IllegalArgumentException("objectType should be simple type or
complex type");
- Collection values = new ArrayList();
- for(Object obj : col)
- {
- if(objectType == XSTypeDefinition.COMPLEX_TYPE &&
- obj instanceof XSComplexTypeDefinition )
- values.add(obj);
- else
- if(objectType == XSTypeDefinition.SIMPLE_TYPE &&
- obj instanceof XSSimpleTypeDefinition )
- values.add(obj);
- }
- return values;
- }
-
- private boolean isEmpty()
- {
- boolean bool = true;
- if(attrs.size() > 0) return false;
- if(types.size() > 0 ) return false;
- if(elements.size()>0) return false;
- return bool;
- }
-
- private class XSComparator implements Comparator
- {
- public int compare(Object arg0, Object arg1)
- {
- String str1 = (String)arg0;
- String str2 = (String)arg1;
-
- if(Character.isUpperCase(str1.charAt(0))
- && Character.isLowerCase(str2.charAt(0)) )
- return 1;
- return str1.compareTo(str2);
- }
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,495 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeSet;
+
+import org.apache.xerces.xs.StringList;
+import org.apache.xerces.xs.XSAnnotation;
+import org.apache.xerces.xs.XSAttributeDeclaration;
+import org.apache.xerces.xs.XSAttributeGroupDefinition;
+import org.apache.xerces.xs.XSComplexTypeDefinition;
+import org.apache.xerces.xs.XSConstants;
+import org.apache.xerces.xs.XSElementDeclaration;
+import org.apache.xerces.xs.XSModelGroupDefinition;
+import org.apache.xerces.xs.XSNamedMap;
+import org.apache.xerces.xs.XSNamespaceItem;
+import org.apache.xerces.xs.XSNotationDeclaration;
+import org.apache.xerces.xs.XSObjectList;
+import org.apache.xerces.xs.XSSimpleTypeDefinition;
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.xb.binding.NamespaceRegistry;
+
+/**
+ * Xerces Schema API Implementation
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+public class JBossXSNamespaceItem implements XSNamespaceItem
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(JBossXSNamespaceItem.class);
+
+ private String schemaNamespace = null;
+ private List<String> docLocations = null;
+
+ private Map<String,XSAnnotation> anns = new
HashMap<String,XSAnnotation>();
+ private Map<String,XSAttributeDeclaration> attrs = new
HashMap<String,XSAttributeDeclaration>();
+ private Map<String,XSElementDeclaration> elements = new
HashMap<String,XSElementDeclaration>();
+ private Map<String,XSTypeDefinition> types = new
HashMap<String,XSTypeDefinition>();
+
+ private boolean qualifiedElements = false;
+
+ private NamespaceRegistry namespaceRegistry;
+
+ public JBossXSNamespaceItem(String ns, NamespaceRegistry namespaceRegistry, boolean
qualifiedElements)
+ {
+ this.schemaNamespace = ns;
+ this.namespaceRegistry = namespaceRegistry;
+ this.qualifiedElements = qualifiedElements;
+ }
+
+ /**
+ * [schema namespace]: A namespace name or <code>null</code> if absent.
+ */
+ public String getSchemaNamespace()
+ {
+ return schemaNamespace;
+ }
+
+ /**
+ * [schema components]: a list of top-level components, i.e. element
+ * declarations, attribute declarations, etc.
+ * @param objectType The type of the declaration, i.e.
+ * <code>ELEMENT_DECLARATION</code>. Note that
+ * <code>XSTypeDefinition.SIMPLE_TYPE</code> and
+ * <code>XSTypeDefinition.COMPLEX_TYPE</code> can also be used as the
+ * <code>objectType</code> to retrieve only complex types or simple
+ * types, instead of all types.
+ * @return A list of top-level definition of the specified type in
+ * <code>objectType</code> or an empty
<code>XSNamedMap</code> if no
+ * such definitions exist.
+ */
+ public XSNamedMap getComponents(short objectType)
+ {
+ JBossXSNamedMap jbnm = new JBossXSNamedMap();
+ if(objectType == XSConstants.ELEMENT_DECLARATION && elements.size() >
0)
+ jbnm.addItems(elements.values());
+ else
+ {
+ if(objectType == XSConstants.ATTRIBUTE_DECLARATION && attrs.size() >
0)
+ {
+ jbnm.addItems(attrs.values());
+ }
+ else
+ if(objectType == XSConstants.TYPE_DEFINITION && types.size() > 0)
+ {
+ jbnm.addItems(types.values());
+ }
+ else
+ if(objectType == XSTypeDefinition.COMPLEX_TYPE)
+ {
+ Collection col = types.values();
+ jbnm.addItems(getTypes(col,XSTypeDefinition.COMPLEX_TYPE));
+ }
+ else
+ if(objectType == XSTypeDefinition.SIMPLE_TYPE)
+ {
+ Collection col = types.values();
+ jbnm.addItems(getTypes(col,XSTypeDefinition.SIMPLE_TYPE));
+ }
+ }
+
+ return jbnm;
+ }
+
+ /**
+ * [annotations]: a set of annotations if it exists, otherwise an empty
+ * <code>XSObjectList</code>.
+ */
+ public XSObjectList getAnnotations()
+ {
+ List lst = new ArrayList();
+ lst.addAll(anns.values());
+ return new JBossXSObjectList(lst);
+ }
+
+ /**
+ * Convenience method. Returns a top-level element declaration.
+ * @param name The name of the declaration.
+ * @return A top-level element declaration or <code>null</code> if such a
+ * declaration does not exist.
+ */
+ public XSElementDeclaration getElementDeclaration(String name)
+ {
+ JBossXSElementDeclaration jbe = null;
+ //Ensure we return JBossXSElementDeclaration
+ if(elements != null)
+ {
+ XSElementDeclaration xe = elements.get(name);
+ if(xe != null && !(xe instanceof JBossXSElementDeclaration))
+ jbe = new JBossXSElementDeclaration(xe);
+ else
+ return xe;
+ }
+ return jbe;
+ }
+
+ /**
+ * Convenience method. Returns a top-level attribute declaration.
+ * @param name The name of the declaration.
+ * @return A top-level attribute declaration or <code>null</code> if such
+ * a declaration does not exist.
+ */
+ public XSAttributeDeclaration getAttributeDeclaration(String name)
+ {
+ if(attrs != null) return attrs.get(name);
+ return null;
+ }
+
+ /**
+ * Convenience method. Returns a top-level simple or complex type
+ * definition.
+ * @param name The name of the definition.
+ * @return An <code>XSTypeDefinition</code> or
<code>null</code> if such
+ * a definition does not exist.
+ */
+ public XSTypeDefinition getTypeDefinition(String name)
+ {
+ if(types != null) return types.get(name);
+ return null;
+ }
+
+ /**
+ * Convenience method. Returns a top-level attribute group definition.
+ * @param name The name of the definition.
+ * @return A top-level attribute group definition or <code>null</code> if
+ * such a definition does not exist.
+ */
+ public XSAttributeGroupDefinition getAttributeGroup(String name)
+ {
+ return null;
+ }
+
+ /**
+ * Convenience method. Returns a top-level model group definition.
+ * @param name The name of the definition.
+ * @return A top-level model group definition definition or
+ * <code>null</code> if such a definition does not exist.
+ */
+ public XSModelGroupDefinition getModelGroupDefinition(String name)
+ {
+ return null;
+ }
+
+ /**
+ * Convenience method. Returns a top-level notation declaration.
+ * @param name The name of the declaration.
+ * @return A top-level notation declaration or <code>null</code> if such
+ * a declaration does not exist.
+ */
+ public XSNotationDeclaration getNotationDeclaration(String name)
+ {
+ return null;
+ }
+
+ /**
+ * [document location] - a list of location URIs for the documents that
+ * contributed to the <code>XSModel</code>.
+ */
+ public StringList getDocumentLocations()
+ {
+ if(docLocations == null) return new JBossXSStringList();
+ JBossXSStringList strList = new JBossXSStringList(docLocations);
+ return strList;
+ }
+
+ //Setters
+
+ //Custom methods
+ public void addDocumentLocation(String uri)
+ {
+ if(docLocations == null)
+ docLocations = new ArrayList<String>();
+ docLocations.add(uri);
+ }
+
+ public void addDocumentLocations(List<String> uri)
+ {
+ if(docLocations == null)
+ docLocations = new ArrayList<String>();
+ docLocations.addAll(uri);
+ }
+
+ /**
+ * Add an XSAnnotation
+ */
+ public void addXSAnnotation(XSAnnotation xa)
+ {
+ if(xa == null)
+ throw new IllegalArgumentException("Illegal Null Argument:xa");
+ anns.put(xa.getName(),xa);
+ }
+
+ /**
+ * Add an XSAttributeDeclaration
+ */
+ public void addXSAttributeDeclaration(XSAttributeDeclaration att)
+ {
+ if(att == null)
+ throw new IllegalArgumentException("att is null");
+ attrs.put(att.getName(),att);
+ }
+
+ /**
+ * Add an XSElementDeclaration
+ * @param el
+ */
+ public void addXSElementDeclaration(XSElementDeclaration el)
+ {
+ if(el == null)
+ throw new IllegalArgumentException("Element is null");
+ elements.put(el.getName(),el);
+ }
+
+ /**
+ * Add an XSTypeDefinition
+ * @param xsType
+ */
+ public void addXSTypeDefinition(XSTypeDefinition xsType)
+ {
+ if(xsType == null)
+ throw new IllegalArgumentException("type is null");
+
+ String xsTypeName = xsType.getName();
+ log.trace("addXSTypeDefinition: " + xsTypeName);
+
+ types.put(xsTypeName,xsType);
+ }
+
+
+ /**
+ * Overrides the toString method
+ */
+ @Override
+ public String toString()
+ {
+ /*
+ * FIXME - The SOAP Encoding namespace handling should be revisited. This
+ * routine should really operate purely off of the registry, instead of
+ * printing constant declarations, and having to double check that the
+ * registry does not contain them.
+ *
+ * This order is currently maintained to preserve the format of the
+ * generated schema files in the test harness.
+ */
+ if(isEmpty()) return "";
+
+ WSSchemaUtils sutils = WSSchemaUtils.getInstance(namespaceRegistry,
schemaNamespace);
+
+ StringBuilder buffer = new StringBuilder();
+ buffer.append( "<schema targetNamespace='" + schemaNamespace +
"'");
+ buffer.append(" xmlns:" + Constants.PREFIX_SOAP11_ENC +
"='" + Constants.URI_SOAP11_ENC + "'");
+ // XML Namespace can only be assigned to the XML prefix
+ if (! schemaNamespace.equals(Constants.NS_XML))
+ buffer.append(" xmlns:" + Constants.PREFIX_TNS + "='" +
schemaNamespace + "'");
+ buffer.append(" xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'");
+ buffer.append(" xmlns='" + Constants.NS_SCHEMA_XSD +
"'");
+
+ //Append any custom prefixes
+ Iterator iter = namespaceRegistry.getRegisteredPrefixes();
+ while (iter.hasNext())
+ {
+ String prefix = (String) iter.next();
+ String ns = namespaceRegistry.getNamespaceURI(prefix);
+ if (ns.equals(schemaNamespace) && ns.equals(Constants.NS_XML) == false)
+ continue;
+ if (ns.equals(Constants.URI_SOAP11_ENC))
+ continue;
+ if (ns.equals(Constants.NS_SCHEMA_XSI))
+ continue;
+ buffer.append(" xmlns:" + prefix + "='" + ns
+"'");
+ }
+
+ if (qualifiedElements)
+ buffer.append(" elementFormDefault='qualified'");
+
+ buffer.append(">");
+
+ //Write the import namespaces
+ iter = namespaceRegistry.getRegisteredURIs();
+ while (iter.hasNext())
+ {
+ String ns = (String) iter.next();
+ if (ns.equals(schemaNamespace))
+ continue;
+ if (ns.equals(Constants.URI_SOAP11_ENC))
+ continue;
+ if (ns.equals(Constants.NS_SCHEMA_XSI))
+ continue;
+ buffer.append("<import namespace='" + ns +
"'/>");
+ }
+
+ //Sort the types
+ //TreeSet<String> treeset = new TreeSet<String>(types.keySet());
+ TreeSet<String> treeset = new TreeSet<String>(new XSComparator());
+ treeset.addAll(types.keySet());
+ for(String key: treeset)
+ {
+ buffer.append(sutils.write(types.get(key)));
+ }
+
+ // Serialize the elements
+ //treeset = new TreeSet<String>(elements.keySet());
+ treeset = new TreeSet<String>(new XSComparator());
+ treeset.addAll(elements.keySet());
+ for( String key: treeset)
+ {
+ buffer.append(sutils.write(elements.get(key) ));
+ }
+ buffer.append("</schema>");
+ return buffer.toString();
+ }
+
+ public void merge(JBossXSNamespaceItem nsi)
+ {
+ //Merge the attributes
+ JBossXSNamedMap nmap =
(JBossXSNamedMap)nsi.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
+ int len = nmap.getLength();
+ for(int i=0;i<len;i++)
+ {
+ XSAttributeDeclaration xatt = (XSAttributeDeclaration)nmap.item(i);
+ this.addXSAttributeDeclaration(xatt);
+ }
+
+ //Merge the types
+ nmap = (JBossXSNamedMap)nsi.getComponents(XSConstants.TYPE_DEFINITION);
+ len = nmap.getLength();
+ for(int i=0;i<len;i++)
+ {
+ XSTypeDefinition xt = (XSTypeDefinition)nmap.item(i);
+ this.addXSTypeDefinition(xt);
+ }
+
+ // Merge the elements
+ nmap = (JBossXSNamedMap)nsi.getComponents(XSConstants.ELEMENT_DECLARATION);
+ len = nmap.getLength();
+ for(int i=0;i<len;i++)
+ {
+ XSElementDeclaration xe = (XSElementDeclaration)nmap.item(i);
+ this.addXSElementDeclaration(xe);
+ }
+ }
+
+ /**
+ * Delete a XSTypeDefinition
+ *
+ * @param xst
+ */
+ public void removeXSTypeDefinition(XSTypeDefinition xst)
+ {
+ String name = xst.getName();
+ types.remove(name);
+ }
+
+ /**
+ * Delete a XSTypeDefinition
+ *
+ * @param xst
+ */
+ public void removeXSElementDeclaration(XSElementDeclaration xel)
+ {
+ String name = xel.getName();
+ elements.remove(name);
+ }
+
+ public boolean isQualifiedElements()
+ {
+ return qualifiedElements;
+ }
+
+ public void setQualifiedElements(boolean qualifiedElements)
+ {
+ this.qualifiedElements = qualifiedElements;
+ }
+
+ public NamespaceRegistry getNamespaceRegistry()
+ {
+ return namespaceRegistry;
+ }
+
+ public void setNamespaceRegistry(NamespaceRegistry namespaceRegistry)
+ {
+ this.namespaceRegistry = namespaceRegistry;
+ }
+
+ //PRIVATE METHODS
+ private Collection getTypes(Collection col, short objectType)
+ {
+ if(objectType != XSTypeDefinition.SIMPLE_TYPE && objectType !=
XSTypeDefinition.COMPLEX_TYPE)
+ throw new IllegalArgumentException("objectType should be simple type or
complex type");
+ Collection values = new ArrayList();
+ for(Object obj : col)
+ {
+ if(objectType == XSTypeDefinition.COMPLEX_TYPE &&
+ obj instanceof XSComplexTypeDefinition )
+ values.add(obj);
+ else
+ if(objectType == XSTypeDefinition.SIMPLE_TYPE &&
+ obj instanceof XSSimpleTypeDefinition )
+ values.add(obj);
+ }
+ return values;
+ }
+
+ private boolean isEmpty()
+ {
+ boolean bool = true;
+ if(attrs.size() > 0) return false;
+ if(types.size() > 0 ) return false;
+ if(elements.size()>0) return false;
+ return bool;
+ }
+
+ private class XSComparator implements Comparator
+ {
+ public int compare(Object arg0, Object arg1)
+ {
+ String str1 = (String)arg0;
+ String str2 = (String)arg1;
+
+ if(Character.isUpperCase(str1.charAt(0))
+ && Character.isLowerCase(str2.charAt(0)) )
+ return 1;
+ return str1.compareTo(str2);
+ }
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,85 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.xerces.xs.XSNamespaceItem;
-import org.apache.xerces.xs.XSNamespaceItemList;
-
-/**
- *
- *
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-public class JBossXSNamespaceItemList implements XSNamespaceItemList
-{
- protected List xsnsList = new ArrayList();
-
- public JBossXSNamespaceItemList()
- {
- super();
- }
-
- public JBossXSNamespaceItemList(List list)
- {
- super();
- xsnsList = list;
- }
-
- public JBossXSNamespaceItemList(Collection col)
- {
- super();
- xsnsList.addAll(col);
- }
-
- /**
- * The number of <code>XSNamespaceItem</code>s in the list. The range of
- * valid child object indices is 0 to <code>length-1</code> inclusive.
- */
- public int getLength()
- {
- return xsnsList.size();
- }
-
- /**
- * Returns the <code>index</code>th item in the collection or
- * <code>null</code> if <code>index</code> is greater than or
equal to
- * the number of objects in the list. The index starts at 0.
- * @param index index into the collection.
- * @return The <code>XSNamespaceItem</code> at the
<code>index</code>th
- * position in the <code>XSNamespaceItemList</code>, or
- * <code>null</code> if the index specified is not valid.
- */
- public XSNamespaceItem item(int index)
- {
- return (XSNamespaceItem)xsnsList.get(index);
- }
-
- public void addItem(XSNamespaceItem item)
- {
- xsnsList.add(item);
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,85 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.xerces.xs.XSNamespaceItem;
+import org.apache.xerces.xs.XSNamespaceItemList;
+
+/**
+ *
+ *
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+public class JBossXSNamespaceItemList implements XSNamespaceItemList
+{
+ protected List xsnsList = new ArrayList();
+
+ public JBossXSNamespaceItemList()
+ {
+ super();
+ }
+
+ public JBossXSNamespaceItemList(List list)
+ {
+ super();
+ xsnsList = list;
+ }
+
+ public JBossXSNamespaceItemList(Collection col)
+ {
+ super();
+ xsnsList.addAll(col);
+ }
+
+ /**
+ * The number of <code>XSNamespaceItem</code>s in the list. The range of
+ * valid child object indices is 0 to <code>length-1</code> inclusive.
+ */
+ public int getLength()
+ {
+ return xsnsList.size();
+ }
+
+ /**
+ * Returns the <code>index</code>th item in the collection or
+ * <code>null</code> if <code>index</code> is greater than or
equal to
+ * the number of objects in the list. The index starts at 0.
+ * @param index index into the collection.
+ * @return The <code>XSNamespaceItem</code> at the
<code>index</code>th
+ * position in the <code>XSNamespaceItemList</code>, or
+ * <code>null</code> if the index specified is not valid.
+ */
+ public XSNamespaceItem item(int index)
+ {
+ return (XSNamespaceItem)xsnsList.get(index);
+ }
+
+ public void addItem(XSNamespaceItem item)
+ {
+ xsnsList.add(item);
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObject.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObject.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObject.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,133 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import org.apache.xerces.xs.XSNamespaceItem;
-import org.apache.xerces.xs.XSObject;
-
-/**
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-public class JBossXSObject implements XSObject
-{
- protected String name;
- protected String namespace;
- private String prefix;
- private XSNamespaceItem xsNSItem;
- private short type;
-
- public JBossXSObject()
- {
-
- }
-
- public JBossXSObject(String name, String namespace)
- {
- this.name = name;
- this.namespace = namespace;
- }
-
- /**
- * The <code>type</code> of this object, i.e.
- * <code>ELEMENT_DECLARATION</code>.
- */
- public short getType()
- {
- return type;
- }
-
- /**
- * The name of type <code>NCName</code>, as defined in XML Namespaces, of
- * this declaration specified in the <code>{name}</code> property of the
- * component or <code>null</code> if the definition of this component
- * does not have a <code>{name}</code> property. For anonymous types,
- * the processor must construct and expose an anonymous type name that
- * is distinct from the name of every named type and the name of every
- * other anonymous type.
- */
- public String getName()
- {
- return name;
- }
-
- public void setName(String n)
- {
- name = n;
- }
-
- /**
- * The [target namespace] of this object, or <code>null</code> if it is
- * unspecified.
- */
- public String getNamespace()
- {
- return namespace;
- }
-
- public void setNamespace(String namespace)
- {
- this.namespace = namespace;
- }
-
- /**
- * A namespace schema information item corresponding to the target
- * namespace of the component, if it is globally declared; or
- * <code>null</code> otherwise.
- */
- public XSNamespaceItem getNamespaceItem()
- {
- return xsNSItem;
- }
-
- public void setNamespaceItem(XSNamespaceItem xsNSItem)
- {
- this.xsNSItem = xsNSItem;
- }
-
- public void setType(short t)
- {
- type = t;
- }
-
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (!(o instanceof JBossXSObject)) return false;
-
- final JBossXSObject jBossXSObject = (JBossXSObject)o;
-
- if (name != null ? !name.equals(jBossXSObject.name) : jBossXSObject.name != null)
return false;
- if (namespace != null ? !namespace.equals(jBossXSObject.namespace) :
jBossXSObject.namespace != null) return false;
-
- return true;
- }
-
- public int hashCode()
- {
- int result;
- result = (name != null ? name.hashCode() : 0);
- result = 29 * result + (namespace != null ? namespace.hashCode() : 0);
- return result;
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObject.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObject.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObject.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObject.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,133 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import org.apache.xerces.xs.XSNamespaceItem;
+import org.apache.xerces.xs.XSObject;
+
+/**
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+public class JBossXSObject implements XSObject
+{
+ protected String name;
+ protected String namespace;
+ private String prefix;
+ private XSNamespaceItem xsNSItem;
+ private short type;
+
+ public JBossXSObject()
+ {
+
+ }
+
+ public JBossXSObject(String name, String namespace)
+ {
+ this.name = name;
+ this.namespace = namespace;
+ }
+
+ /**
+ * The <code>type</code> of this object, i.e.
+ * <code>ELEMENT_DECLARATION</code>.
+ */
+ public short getType()
+ {
+ return type;
+ }
+
+ /**
+ * The name of type <code>NCName</code>, as defined in XML Namespaces, of
+ * this declaration specified in the <code>{name}</code> property of the
+ * component or <code>null</code> if the definition of this component
+ * does not have a <code>{name}</code> property. For anonymous types,
+ * the processor must construct and expose an anonymous type name that
+ * is distinct from the name of every named type and the name of every
+ * other anonymous type.
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String n)
+ {
+ name = n;
+ }
+
+ /**
+ * The [target namespace] of this object, or <code>null</code> if it is
+ * unspecified.
+ */
+ public String getNamespace()
+ {
+ return namespace;
+ }
+
+ public void setNamespace(String namespace)
+ {
+ this.namespace = namespace;
+ }
+
+ /**
+ * A namespace schema information item corresponding to the target
+ * namespace of the component, if it is globally declared; or
+ * <code>null</code> otherwise.
+ */
+ public XSNamespaceItem getNamespaceItem()
+ {
+ return xsNSItem;
+ }
+
+ public void setNamespaceItem(XSNamespaceItem xsNSItem)
+ {
+ this.xsNSItem = xsNSItem;
+ }
+
+ public void setType(short t)
+ {
+ type = t;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (this == o) return true;
+ if (!(o instanceof JBossXSObject)) return false;
+
+ final JBossXSObject jBossXSObject = (JBossXSObject)o;
+
+ if (name != null ? !name.equals(jBossXSObject.name) : jBossXSObject.name != null)
return false;
+ if (namespace != null ? !namespace.equals(jBossXSObject.namespace) :
jBossXSObject.namespace != null) return false;
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = (name != null ? name.hashCode() : 0);
+ result = 29 * result + (namespace != null ? namespace.hashCode() : 0);
+ return result;
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObjectList.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObjectList.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObjectList.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,105 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.xerces.xs.XSObject;
-import org.apache.xerces.xs.XSObjectList;
-
-/**
- * Xerces Schema API
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-public class JBossXSObjectList implements XSObjectList
-{
- protected List list = new ArrayList();
-
- public JBossXSObjectList()
- {
- }
-
- public JBossXSObjectList(List lst)
- {
- this.list = lst;
- }
-
-
- /**
- * The number of <code>XSObjects</code> in the list. The range of valid
- * child object indices is 0 to <code>length-1</code> inclusive.
- */
- public int getLength()
- {
- int len = list.size();
- return len;
- }
-
- /**
- * Returns the <code>index</code>th item in the collection or
- * <code>null</code> if <code>index</code> is greater than or
equal to
- * the number of objects in the list. The index starts at 0.
- * @param index index into the collection.
- * @return The <code>XSObject</code> at the
<code>index</code>th
- * position in the <code>XSObjectList</code>, or
<code>null</code> if
- * the index specified is not valid.
- */
- public XSObject item(int index)
- {
- return (XSObject)list.get(index);
- }
-
- public void addItem(XSObject xsobj)
- {
- list.add(xsobj);
- }
-
- public void addItem(XSObject xsobj, boolean shouldSort)
- {
- if(shouldSort)
- addItem(xsobj);
- else
- list.add(xsobj);
- }
-
- //CUSTOM METHODS
- public void addObjects(XSObjectList lst)
- {
- if(lst instanceof JBossXSObjectList)
- list.addAll(((JBossXSObjectList)lst).toList());
- else
- {
- int len = lst != null ? lst.getLength() : 0 ;
- for(int i=0; i < len; i++)
- {
- list.add(lst.item(i));
- }
- }
- }
-
- public List toList()
- {
- return list;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObjectList.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObjectList.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObjectList.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObjectList.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,105 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.xerces.xs.XSObject;
+import org.apache.xerces.xs.XSObjectList;
+
+/**
+ * Xerces Schema API
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+public class JBossXSObjectList implements XSObjectList
+{
+ protected List list = new ArrayList();
+
+ public JBossXSObjectList()
+ {
+ }
+
+ public JBossXSObjectList(List lst)
+ {
+ this.list = lst;
+ }
+
+
+ /**
+ * The number of <code>XSObjects</code> in the list. The range of valid
+ * child object indices is 0 to <code>length-1</code> inclusive.
+ */
+ public int getLength()
+ {
+ int len = list.size();
+ return len;
+ }
+
+ /**
+ * Returns the <code>index</code>th item in the collection or
+ * <code>null</code> if <code>index</code> is greater than or
equal to
+ * the number of objects in the list. The index starts at 0.
+ * @param index index into the collection.
+ * @return The <code>XSObject</code> at the
<code>index</code>th
+ * position in the <code>XSObjectList</code>, or
<code>null</code> if
+ * the index specified is not valid.
+ */
+ public XSObject item(int index)
+ {
+ return (XSObject)list.get(index);
+ }
+
+ public void addItem(XSObject xsobj)
+ {
+ list.add(xsobj);
+ }
+
+ public void addItem(XSObject xsobj, boolean shouldSort)
+ {
+ if(shouldSort)
+ addItem(xsobj);
+ else
+ list.add(xsobj);
+ }
+
+ //CUSTOM METHODS
+ public void addObjects(XSObjectList lst)
+ {
+ if(lst instanceof JBossXSObjectList)
+ list.addAll(((JBossXSObjectList)lst).toList());
+ else
+ {
+ int len = lst != null ? lst.getLength() : 0 ;
+ for(int i=0; i < len; i++)
+ {
+ list.add(lst.item(i));
+ }
+ }
+ }
+
+ public List toList()
+ {
+ return list;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSParticle.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSParticle.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSParticle.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,132 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import org.apache.xerces.xs.XSConstants;
-import org.apache.xerces.xs.XSParticle;
-import org.apache.xerces.xs.XSTerm;
-
-/**
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 21, 2005
- */
-public class JBossXSParticle
- extends JBossXSObject implements XSParticle, Comparable
-{
- protected int minOccurs = 0;
- protected int maxOccurs = 0;
- protected XSTerm term = null;
-
- public JBossXSParticle()
- {
- }
-
- public JBossXSParticle(String name, String namespace)
- {
- super(name, namespace);
- }
-
- /**
- * [min occurs]: determines the minimum number of terms that can occur.
- */
- public int getMinOccurs()
- {
- return minOccurs;
- }
-
- /**
- * [max occurs]: determines the maximum number of terms that can occur.
- * To query for the value of unbounded use
- * <code>maxOccursUnbounded</code>. When the value of
- * <code>maxOccursUnbounded</code> is <code>true</code>, the
value of
- * <code>maxOccurs</code> is unspecified.
- */
- public int getMaxOccurs()
- {
- return maxOccurs;
- }
-
- /**
- * [max occurs]: whether the maxOccurs value is unbounded.
- */
- public boolean getMaxOccursUnbounded()
- {
- return (maxOccurs == -1);
- }
-
- /**
- * [term]: one of a model group, a wildcard, or an element declaration.
- */
- public XSTerm getTerm()
- {
- return term;
- }
-
- /**
- * Get the type
- */
- @Override
- public short getType()
- {
- return XSConstants.PARTICLE;
- }
-
- public void setMinOccurs(int minOccurs)
- {
- this.minOccurs = minOccurs;
- }
-
- public void setMaxOccurs(int maxOccurs)
- {
- this.maxOccurs = maxOccurs;
- }
-
- public void setTerm(XSTerm term)
- {
- this.term = term;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Comparable#compareTo(T)
- */
- public int compareTo(Object o)
- {
- int c = -1;
- if(o instanceof JBossXSParticle)
- {
- JBossXSParticle w = (JBossXSParticle)o;
- String oname = w.getTerm().getName();
- String termName = term.getName() ;
- if( termName != null )
- c = termName.compareTo(oname);
- //In the case of doclit, need to be careful about String_1,SimpleType_2
- if( termName != null)
- {
- char num1 = termName.charAt(termName.length()-1);
- char num2 = oname.charAt(oname.length()-1);
- if(Character.isDigit(num1) && Character.isDigit(num2))
- c = (""+num1).compareTo((""+num2));
- }
- }
- return c;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSParticle.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSParticle.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSParticle.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSParticle.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,132 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import org.apache.xerces.xs.XSConstants;
+import org.apache.xerces.xs.XSParticle;
+import org.apache.xerces.xs.XSTerm;
+
+/**
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 21, 2005
+ */
+public class JBossXSParticle
+ extends JBossXSObject implements XSParticle, Comparable
+{
+ protected int minOccurs = 0;
+ protected int maxOccurs = 0;
+ protected XSTerm term = null;
+
+ public JBossXSParticle()
+ {
+ }
+
+ public JBossXSParticle(String name, String namespace)
+ {
+ super(name, namespace);
+ }
+
+ /**
+ * [min occurs]: determines the minimum number of terms that can occur.
+ */
+ public int getMinOccurs()
+ {
+ return minOccurs;
+ }
+
+ /**
+ * [max occurs]: determines the maximum number of terms that can occur.
+ * To query for the value of unbounded use
+ * <code>maxOccursUnbounded</code>. When the value of
+ * <code>maxOccursUnbounded</code> is <code>true</code>, the
value of
+ * <code>maxOccurs</code> is unspecified.
+ */
+ public int getMaxOccurs()
+ {
+ return maxOccurs;
+ }
+
+ /**
+ * [max occurs]: whether the maxOccurs value is unbounded.
+ */
+ public boolean getMaxOccursUnbounded()
+ {
+ return (maxOccurs == -1);
+ }
+
+ /**
+ * [term]: one of a model group, a wildcard, or an element declaration.
+ */
+ public XSTerm getTerm()
+ {
+ return term;
+ }
+
+ /**
+ * Get the type
+ */
+ @Override
+ public short getType()
+ {
+ return XSConstants.PARTICLE;
+ }
+
+ public void setMinOccurs(int minOccurs)
+ {
+ this.minOccurs = minOccurs;
+ }
+
+ public void setMaxOccurs(int maxOccurs)
+ {
+ this.maxOccurs = maxOccurs;
+ }
+
+ public void setTerm(XSTerm term)
+ {
+ this.term = term;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(T)
+ */
+ public int compareTo(Object o)
+ {
+ int c = -1;
+ if(o instanceof JBossXSParticle)
+ {
+ JBossXSParticle w = (JBossXSParticle)o;
+ String oname = w.getTerm().getName();
+ String termName = term.getName() ;
+ if( termName != null )
+ c = termName.compareTo(oname);
+ //In the case of doclit, need to be careful about String_1,SimpleType_2
+ if( termName != null)
+ {
+ char num1 = termName.charAt(termName.length()-1);
+ char num2 = oname.charAt(oname.length()-1);
+ if(Character.isDigit(num1) && Character.isDigit(num2))
+ c = (""+num1).compareTo((""+num2));
+ }
+ }
+ return c;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,194 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSObjectList;
-import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.apache.xerces.xs.XSTypeDefinition;
-
-/**
- * XSSimpleTypeDefinition
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Aug 4, 2005
- */
-public class JBossXSSimpleTypeDefinition
-extends JBossXSTypeDefinition
-implements XSSimpleTypeDefinition
-{
- private XSSimpleTypeDefinition xsSimple = null;
-
- private List<String> enumerations = new ArrayList<String>();
-
- public JBossXSSimpleTypeDefinition()
- {
- }
-
- public JBossXSSimpleTypeDefinition(XSSimpleTypeDefinition xs)
- {
- this.xsSimple = xs;
- }
-
- public short getVariety()
- {
- return xsSimple.getVariety();
- }
-
- public XSSimpleTypeDefinition getPrimitiveType()
- {
- return xsSimple.getPrimitiveType();
- }
-
- public short getBuiltInKind()
- {
- return xsSimple.getBuiltInKind();
- }
-
- public XSSimpleTypeDefinition getItemType()
- {
- return xsSimple.getItemType();
- }
-
- public XSObjectList getMemberTypes()
- {
- return xsSimple.getMemberTypes();
- }
-
- public short getDefinedFacets()
- {
- return xsSimple.getDefinedFacets();
- }
-
- public boolean isDefinedFacet(short arg0)
- {
- return xsSimple.isDefinedFacet(arg0);
- }
-
- public short getFixedFacets()
- {
- return xsSimple.getFixedFacets();
- }
-
- public boolean isFixedFacet(short arg0)
- {
- return xsSimple.isFixedFacet(arg0);
- }
-
- public String getLexicalFacetValue(short arg0)
- {
- return xsSimple.getLexicalFacetValue(arg0);
- }
-
- public StringList getLexicalEnumeration()
- {
- if (xsSimple == null)
- return new JBossXSStringList(enumerations);
-
- return xsSimple.getLexicalEnumeration();
- }
-
- public void addLexicalEnumeration(String enumeration)
- {
- this.enumerations.add(enumeration);
- }
-
- public StringList getLexicalPattern()
- {
- return xsSimple.getLexicalPattern();
- }
-
- public short getOrdered()
- {
- return xsSimple.getOrdered();
- }
-
- public boolean getFinite()
- {
- return xsSimple.getFinite();
- }
-
- public boolean getBounded()
- {
- return xsSimple.getBounded();
- }
-
- public boolean getNumeric()
- {
- return xsSimple.getNumeric();
- }
-
- public XSObjectList getFacets()
- {
- return xsSimple.getFacets();
- }
-
- public XSObjectList getMultiValueFacets()
- {
- return xsSimple.getMultiValueFacets();
- }
-
- public XSObjectList getAnnotations()
- {
- return xsSimple.getAnnotations();
- }
-
- /**
- * Get the type
- */
- @Override
- public short getType()
- {
- return XSTypeDefinition.SIMPLE_TYPE;
- }
-
- /**
- * Return whether this type definition is a simple type or complex type.
- */
- @Override
- public short getTypeCategory()
- {
- return XSTypeDefinition.SIMPLE_TYPE;
- }
-
-
- //***************************
- //Override base class methods
- //****************************
- @Override
- public String getName()
- {
- if (xsSimple == null)
- return name;
- return xsSimple.getName();
- }
-
- @Override
- public String getNamespace()
- {
- if (xsSimple == null)
- return namespace;
- return xsSimple.getNamespace();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,194 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.xerces.xs.StringList;
+import org.apache.xerces.xs.XSObjectList;
+import org.apache.xerces.xs.XSSimpleTypeDefinition;
+import org.apache.xerces.xs.XSTypeDefinition;
+
+/**
+ * XSSimpleTypeDefinition
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Aug 4, 2005
+ */
+public class JBossXSSimpleTypeDefinition
+extends JBossXSTypeDefinition
+implements XSSimpleTypeDefinition
+{
+ private XSSimpleTypeDefinition xsSimple = null;
+
+ private List<String> enumerations = new ArrayList<String>();
+
+ public JBossXSSimpleTypeDefinition()
+ {
+ }
+
+ public JBossXSSimpleTypeDefinition(XSSimpleTypeDefinition xs)
+ {
+ this.xsSimple = xs;
+ }
+
+ public short getVariety()
+ {
+ return xsSimple.getVariety();
+ }
+
+ public XSSimpleTypeDefinition getPrimitiveType()
+ {
+ return xsSimple.getPrimitiveType();
+ }
+
+ public short getBuiltInKind()
+ {
+ return xsSimple.getBuiltInKind();
+ }
+
+ public XSSimpleTypeDefinition getItemType()
+ {
+ return xsSimple.getItemType();
+ }
+
+ public XSObjectList getMemberTypes()
+ {
+ return xsSimple.getMemberTypes();
+ }
+
+ public short getDefinedFacets()
+ {
+ return xsSimple.getDefinedFacets();
+ }
+
+ public boolean isDefinedFacet(short arg0)
+ {
+ return xsSimple.isDefinedFacet(arg0);
+ }
+
+ public short getFixedFacets()
+ {
+ return xsSimple.getFixedFacets();
+ }
+
+ public boolean isFixedFacet(short arg0)
+ {
+ return xsSimple.isFixedFacet(arg0);
+ }
+
+ public String getLexicalFacetValue(short arg0)
+ {
+ return xsSimple.getLexicalFacetValue(arg0);
+ }
+
+ public StringList getLexicalEnumeration()
+ {
+ if (xsSimple == null)
+ return new JBossXSStringList(enumerations);
+
+ return xsSimple.getLexicalEnumeration();
+ }
+
+ public void addLexicalEnumeration(String enumeration)
+ {
+ this.enumerations.add(enumeration);
+ }
+
+ public StringList getLexicalPattern()
+ {
+ return xsSimple.getLexicalPattern();
+ }
+
+ public short getOrdered()
+ {
+ return xsSimple.getOrdered();
+ }
+
+ public boolean getFinite()
+ {
+ return xsSimple.getFinite();
+ }
+
+ public boolean getBounded()
+ {
+ return xsSimple.getBounded();
+ }
+
+ public boolean getNumeric()
+ {
+ return xsSimple.getNumeric();
+ }
+
+ public XSObjectList getFacets()
+ {
+ return xsSimple.getFacets();
+ }
+
+ public XSObjectList getMultiValueFacets()
+ {
+ return xsSimple.getMultiValueFacets();
+ }
+
+ public XSObjectList getAnnotations()
+ {
+ return xsSimple.getAnnotations();
+ }
+
+ /**
+ * Get the type
+ */
+ @Override
+ public short getType()
+ {
+ return XSTypeDefinition.SIMPLE_TYPE;
+ }
+
+ /**
+ * Return whether this type definition is a simple type or complex type.
+ */
+ @Override
+ public short getTypeCategory()
+ {
+ return XSTypeDefinition.SIMPLE_TYPE;
+ }
+
+
+ //***************************
+ //Override base class methods
+ //****************************
+ @Override
+ public String getName()
+ {
+ if (xsSimple == null)
+ return name;
+ return xsSimple.getName();
+ }
+
+ @Override
+ public String getNamespace()
+ {
+ if (xsSimple == null)
+ return namespace;
+ return xsSimple.getNamespace();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSStringList.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSStringList.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSStringList.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.xerces.xs.StringList;
-
-/**
- * Implements the StringList interface
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-public class JBossXSStringList implements StringList
-{
- protected List<String> strList = new ArrayList<String>();
-
- public JBossXSStringList()
- {
- }
-
- public JBossXSStringList(List<String> alist)
- {
- this.strList = alist;
- }
-
- public JBossXSStringList(Collection<String> col)
- {
- this.strList.addAll(col);
- }
-
- /**
- * The number of <code>GenericString</code>s in the list. The range of
- * valid child object indices is 0 to <code>length-1</code> inclusive.
- */
- public int getLength()
- {
- return strList.size();
- }
-
- /**
- * Checks if the <code>GenericString</code> <code>item</code>
is a member
- * of this list.
- * @param item <code>GenericString</code> whose presence in this list is
- * to be tested.
- * @return True if this list contains the <code>GenericString</code>
- * <code>item</code>.
- */
- public boolean contains(String item)
- {
- return strList.contains(item);
- }
-
- /**
- * Returns the <code>index</code>th item in the collection or
- * <code>null</code> if <code>index</code> is greater than or
equal to
- * the number of objects in the list. The index starts at 0.
- * @param index index into the collection.
- * @return The <code>GenericString</code> at the
<code>index</code>th
- * position in the <code>StringList</code>, or
<code>null</code> if
- * the index specified is not valid.
- */
- public String item(int index)
- {
- return (String)strList.get(index);
- }
-
- public List<String> toList()
- {
- return strList;
- }
-
- public void addItem(String str)
- {
- strList.add(str);
- }
-
- public String toString()
- {
- return strList.toString();
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSStringList.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSStringList.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSStringList.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSStringList.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.xerces.xs.StringList;
+
+/**
+ * Implements the StringList interface
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+public class JBossXSStringList implements StringList
+{
+ protected List<String> strList = new ArrayList<String>();
+
+ public JBossXSStringList()
+ {
+ }
+
+ public JBossXSStringList(List<String> alist)
+ {
+ this.strList = alist;
+ }
+
+ public JBossXSStringList(Collection<String> col)
+ {
+ this.strList.addAll(col);
+ }
+
+ /**
+ * The number of <code>GenericString</code>s in the list. The range of
+ * valid child object indices is 0 to <code>length-1</code> inclusive.
+ */
+ public int getLength()
+ {
+ return strList.size();
+ }
+
+ /**
+ * Checks if the <code>GenericString</code> <code>item</code>
is a member
+ * of this list.
+ * @param item <code>GenericString</code> whose presence in this list is
+ * to be tested.
+ * @return True if this list contains the <code>GenericString</code>
+ * <code>item</code>.
+ */
+ public boolean contains(String item)
+ {
+ return strList.contains(item);
+ }
+
+ /**
+ * Returns the <code>index</code>th item in the collection or
+ * <code>null</code> if <code>index</code> is greater than or
equal to
+ * the number of objects in the list. The index starts at 0.
+ * @param index index into the collection.
+ * @return The <code>GenericString</code> at the
<code>index</code>th
+ * position in the <code>StringList</code>, or
<code>null</code> if
+ * the index specified is not valid.
+ */
+ public String item(int index)
+ {
+ return (String)strList.get(index);
+ }
+
+ public List<String> toList()
+ {
+ return strList;
+ }
+
+ public void addItem(String str)
+ {
+ strList.add(str);
+ }
+
+ public String toString()
+ {
+ return strList.toString();
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,176 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.WSException;
-
-/**
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 20, 2005
- */
-public class JBossXSTypeDefinition extends JBossXSObject implements XSTypeDefinition
-{
- private static final long serialVersionUID = -3317350531846406564L;
-
- protected boolean anonymous = false;
- protected JBossXSTypeDefinition baseType;
- protected boolean isFinal = false;
-
- public JBossXSTypeDefinition()
- {
- }
-
- public JBossXSTypeDefinition(String name, String namespace)
- {
- super(name, namespace);
- }
-
- /**
- * Create a new JBossXSTypeDefinition
- * while reading data from a XSTypeDefinition
- *
- * @param xt
- */
- public JBossXSTypeDefinition(XSTypeDefinition xt)
- {
- super(xt.getName(), xt.getNamespace());
- setAnonymous(xt.getAnonymous());
-
- XSTypeDefinition xbase = xt.getBaseType();
- if (xbase != null)
- {
- if (xbase instanceof JBossXSTypeDefinition == false &&
!("anyType".equals(xbase.getName())))
- baseType = new JBossXSTypeDefinition(xbase);
- }
-
- }
-
- /**
- * Return whether this type definition is a simple type or complex type.
- */
- public short getTypeCategory()
- {
- throw new WSException("Type unidentified");
- }
-
- /**
- * {base type definition}: either a simple type definition or a complex
- * type definition.
- */
- public XSTypeDefinition getBaseType()
- {
- return baseType;
- }
-
- /**
- * {final}. For a complex type definition it is a subset of {extension,
- * restriction}. For a simple type definition it is a subset of
- * {extension, list, restriction, union}.
- * @param restriction Extension, restriction, list, union constants
- * (defined in <code>XSConstants</code>).
- * @return True if <code>restriction</code> is in the final set,
- * otherwise false.
- */
- public boolean isFinal(short restriction)
- {
- return isFinal;
- }
-
- /**
- * For complex types the returned value is a bit combination of the subset
- * of {<code>DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code>}
- * corresponding to <code>final</code> set of this type or
- * <code>DERIVATION_NONE</code>. For simple types the returned value is
- * a bit combination of the subset of {
- * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION,
DERIVATION_LIST</code>
- * } corresponding to <code>final</code> set of this type or
- * <code>DERIVATION_NONE</code>.
- */
- public short getFinal()
- {
- return 0;
- }
-
- /** Convenience attribute. A boolean that specifies if the type definition is
anonymous.
- */
- public boolean getAnonymous()
- {
- return anonymous;
- }
-
- public void setAnonymous(boolean anonymous)
- {
- this.anonymous = anonymous;
- }
-
- /**
- * Convenience method which checks if this type is derived from the given
- * <code>ancestorType</code>.
- * @param ancestorType An ancestor type definition.
- * @param derivationMethod A bit combination representing a subset of {
- * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION,
DERIVATION_LIST</code>
- * }.
- * @return True if this type is derived from <code>ancestorType</code>
- * using only derivation methods from the <code>derivationMethod</code>
- * .
- */
- public boolean derivedFromType(XSTypeDefinition ancestorType, short derivationMethod)
- {
- return false;
- }
-
- /**
- * Convenience method which checks if this type is derived from the given
- * ancestor type.
- * @param namespace An ancestor type namespace.
- * @param name An ancestor type name.
- * @param derivationMethod A bit combination representing a subset of {
- * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION,
DERIVATION_LIST</code>
- * }.
- * @return True if this type is derived from <code>ancestorType</code>
- * using only derivation methods from the <code>derivationMethod</code>
- * .
- */
- public boolean derivedFrom(String namespace, String name, short derivationMethod)
- {
- return false;
- }
-
- public void setBaseType(XSTypeDefinition baseT)
- {
- if (baseT instanceof JBossXSTypeDefinition)
- {
- this.baseType = (JBossXSTypeDefinition)baseT;
- }
- else
- {
- this.baseType = new JBossXSTypeDefinition(baseT);
- }
- }
-
- public void setFinal(boolean aFinal)
- {
- isFinal = aFinal;
- }
-
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,176 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.ws.WSException;
+
+/**
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 20, 2005
+ */
+public class JBossXSTypeDefinition extends JBossXSObject implements XSTypeDefinition
+{
+ private static final long serialVersionUID = -3317350531846406564L;
+
+ protected boolean anonymous = false;
+ protected JBossXSTypeDefinition baseType;
+ protected boolean isFinal = false;
+
+ public JBossXSTypeDefinition()
+ {
+ }
+
+ public JBossXSTypeDefinition(String name, String namespace)
+ {
+ super(name, namespace);
+ }
+
+ /**
+ * Create a new JBossXSTypeDefinition
+ * while reading data from a XSTypeDefinition
+ *
+ * @param xt
+ */
+ public JBossXSTypeDefinition(XSTypeDefinition xt)
+ {
+ super(xt.getName(), xt.getNamespace());
+ setAnonymous(xt.getAnonymous());
+
+ XSTypeDefinition xbase = xt.getBaseType();
+ if (xbase != null)
+ {
+ if (xbase instanceof JBossXSTypeDefinition == false &&
!("anyType".equals(xbase.getName())))
+ baseType = new JBossXSTypeDefinition(xbase);
+ }
+
+ }
+
+ /**
+ * Return whether this type definition is a simple type or complex type.
+ */
+ public short getTypeCategory()
+ {
+ throw new WSException("Type unidentified");
+ }
+
+ /**
+ * {base type definition}: either a simple type definition or a complex
+ * type definition.
+ */
+ public XSTypeDefinition getBaseType()
+ {
+ return baseType;
+ }
+
+ /**
+ * {final}. For a complex type definition it is a subset of {extension,
+ * restriction}. For a simple type definition it is a subset of
+ * {extension, list, restriction, union}.
+ * @param restriction Extension, restriction, list, union constants
+ * (defined in <code>XSConstants</code>).
+ * @return True if <code>restriction</code> is in the final set,
+ * otherwise false.
+ */
+ public boolean isFinal(short restriction)
+ {
+ return isFinal;
+ }
+
+ /**
+ * For complex types the returned value is a bit combination of the subset
+ * of {<code>DERIVATION_EXTENSION, DERIVATION_RESTRICTION</code>}
+ * corresponding to <code>final</code> set of this type or
+ * <code>DERIVATION_NONE</code>. For simple types the returned value is
+ * a bit combination of the subset of {
+ * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION,
DERIVATION_LIST</code>
+ * } corresponding to <code>final</code> set of this type or
+ * <code>DERIVATION_NONE</code>.
+ */
+ public short getFinal()
+ {
+ return 0;
+ }
+
+ /** Convenience attribute. A boolean that specifies if the type definition is
anonymous.
+ */
+ public boolean getAnonymous()
+ {
+ return anonymous;
+ }
+
+ public void setAnonymous(boolean anonymous)
+ {
+ this.anonymous = anonymous;
+ }
+
+ /**
+ * Convenience method which checks if this type is derived from the given
+ * <code>ancestorType</code>.
+ * @param ancestorType An ancestor type definition.
+ * @param derivationMethod A bit combination representing a subset of {
+ * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION,
DERIVATION_LIST</code>
+ * }.
+ * @return True if this type is derived from <code>ancestorType</code>
+ * using only derivation methods from the <code>derivationMethod</code>
+ * .
+ */
+ public boolean derivedFromType(XSTypeDefinition ancestorType, short derivationMethod)
+ {
+ return false;
+ }
+
+ /**
+ * Convenience method which checks if this type is derived from the given
+ * ancestor type.
+ * @param namespace An ancestor type namespace.
+ * @param name An ancestor type name.
+ * @param derivationMethod A bit combination representing a subset of {
+ * <code>DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION,
DERIVATION_LIST</code>
+ * }.
+ * @return True if this type is derived from <code>ancestorType</code>
+ * using only derivation methods from the <code>derivationMethod</code>
+ * .
+ */
+ public boolean derivedFrom(String namespace, String name, short derivationMethod)
+ {
+ return false;
+ }
+
+ public void setBaseType(XSTypeDefinition baseT)
+ {
+ if (baseT instanceof JBossXSTypeDefinition)
+ {
+ this.baseType = (JBossXSTypeDefinition)baseT;
+ }
+ else
+ {
+ this.baseType = new JBossXSTypeDefinition(baseT);
+ }
+ }
+
+ public void setFinal(boolean aFinal)
+ {
+ isFinal = aFinal;
+ }
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/WSSchemaUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,775 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xmlschema;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Arrays;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.xerces.xs.StringList;
-import org.apache.xerces.xs.XSAnnotation;
-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.XSNamedMap;
-import org.apache.xerces.xs.XSNamespaceItem;
-import org.apache.xerces.xs.XSNamespaceItemList;
-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.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.xb.binding.NamespaceRegistry;
-
-/**
- * Singleton class that works on the JBoss version of XSModel
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Jun 3, 2005
- */
-
-public class WSSchemaUtils
-{
- private static final String xsNS = Constants.NS_SCHEMA_XSD;
- private static SchemaUtils utils = SchemaUtils.getInstance();
-
- private NamespaceRegistry namespaceRegistry;
-
- private String targetNamespace = null;
-
- public static WSSchemaUtils getInstance(NamespaceRegistry namespaceRegistry, String
targetNamespace)
- {
- return new WSSchemaUtils(namespaceRegistry, targetNamespace);
- }
-
- private WSSchemaUtils(NamespaceRegistry namespaceRegistry, String targetNamespace)
- {
- this.namespaceRegistry = namespaceRegistry;
- this.targetNamespace = targetNamespace;
- }
-
-
- /**
- * Checks whether given a targetNS and other regular schema namespaces,
- * the passed "checkNS" is a custom namespace
- * @param targetNS Target Namespace of the schema
- * @param checkNS Namespace that needs to be checked if its a custom namespace
- * @return true - if checkNS is a custom namespace, false - otherwise
- */
- public boolean checkCustomNamespace(String targetNS, String checkNS)
- {
- String[] nsarr = new String[] {xsNS,Constants.NS_SCHEMA_XSI };
- List<String> knownNamespaces = Arrays.asList(nsarr);
- boolean isCustom = false;
- if(xsNS.equals(targetNS))
- throw new IllegalArgumentException("targetNamespace cannot be "+xsNS
);
- if(checkNS == null)
- throw new IllegalArgumentException("checkNS is null");
- if(knownNamespaces.contains(checkNS) == false &&
- targetNS.equals(checkNS) == false)
- isCustom = true;
- return isCustom;
- }
-
- /**
- * Create a global XSElementDeclaration object
- * @param name
- * @param xstype
- * @param targetNS
- * @return
- */
-
- public JBossXSElementDeclaration createGlobalXSElementDeclaration(String name,
XSTypeDefinition xstype,
- String targetNS)
- {
- JBossXSElementDeclaration xsel = new JBossXSElementDeclaration();
- xsel.setName(name);
- xsel.setTypeDefinition(xstype);
- xsel.setTargetNamespace(targetNS);
- xsel.setNamespace(targetNS);
- xsel.setScope(XSConstants.SCOPE_GLOBAL);
- return xsel;
- }
-
- /**
- * Generate a Schema Model for a namespace
- * @return
- */
-
- public JBossXSModel createXSModel()
- {
- return new JBossXSModel();
- }
-
- public JBossXSComplexTypeDefinition createXSComplexTypeDefinition( String name,
- XSTypeDefinition baseType, List<XSParticle> xsparts, String typens)
- {
- //No complex type if particles are null
- if(xsparts == null)
- return null;
-
- JBossXSComplexTypeDefinition ct = new JBossXSComplexTypeDefinition();
- ct.setName(name);
- ct.setNamespace(typens);
- JBossXSModelGroup group = new JBossXSModelGroup();
-
- group.setCompositor(XSModelGroup.COMPOSITOR_SEQUENCE);
- group.setParticles(xsparts);
- // Plug the particle array into the modelgroup
- JBossXSParticle xspa = new JBossXSParticle(null, typens);
- xspa.setTerm(group);
- ((JBossXSComplexTypeDefinition) ct).setParticle(xspa);
-
- if (baseType != null)
- {
- ((JBossXSComplexTypeDefinition)
ct).setDerivationMethod(XSConstants.DERIVATION_EXTENSION);
- ((JBossXSComplexTypeDefinition) ct).setBaseType(baseType);
- }
-
- return ct;
- }
-
-
- /**
- * Create a local XSElementDeclaration object
- * @param name
- * @param xstype
- * @param targetNS
- * @param isNillable
- * @return
- */
-
- public JBossXSElementDeclaration createXSElementDeclaration(String name,
XSTypeDefinition xstype,boolean isNillable)
- {
- JBossXSElementDeclaration xsel = new JBossXSElementDeclaration();
- xsel.setName(name);
- xsel.setTypeDefinition(xstype);
- xsel.setNillable(isNillable);
- return xsel;
- }
-
- public JBossXSParticle createXSParticle(String targetNS, boolean isArray, XSTerm
xsterm)
- {
- JBossXSParticle xsp = new JBossXSParticle(null, targetNS);
- if (isArray)
- xsp.setMaxOccurs(-1);
- xsp.setTerm(xsterm);
- return xsp;
- }
-
-
- /**
- * Creates a XSTypeDefinition object given a QName
- *
- * @param qname
- * @return a XSTypeDefinition
- */
- public JBossXSTypeDefinition createXSTypeDefinition(QName qname)
- {
- JBossXSTypeDefinition jbxs = new JBossXSTypeDefinition();
- jbxs.setName(qname.getLocalPart());
- jbxs.setNamespace(qname.getNamespaceURI());
- return jbxs;
- }
-
-
- /**
- * Generate a complex type for a custom exception
- * @param exname
- * @param ns
- * @return
- */
-
- public XSComplexTypeDefinition getExceptionType(String exname, String ns)
- {
- JBossXSParticle xsp = new JBossXSParticle();
- /*xsp.setType(XSConstants.ELEMENT_DECLARATION);
- xsp.setMaxOccurs(-1);
- JBossXSElementDeclaration xsel =
(JBossXSElementDeclaration)createXSElementDeclaration("name",
utils.getSchemaBasicType("string"), true);
-
- xsp.setTerm(xsel); */
- XSComplexTypeDefinition ct =
- new JBossXSComplexTypeDefinition(exname, ns);
-
- ((JBossXSComplexTypeDefinition)ct).setParticle(xsp);
- return ct;
- }
-
- /**
- * Convert the read-only Xerces implementation of XSModel
- * into JBossXSModel.
- * If the input is JBossXSModel, it will be returned back.
- * @param xsmodel XSModel object
- * @return JBossXSModel (RW Model)
- */
- public JBossXSModel getJBossXSModel(XSModel xsmodel)
- {
- if(xsmodel instanceof JBossXSModel)
- return (JBossXSModel)xsmodel;
- JBossXSModel jbxs = new JBossXSModel();
- copyXSModel(xsmodel,jbxs);
- return jbxs;
- }
-
- /**
- * Checks if the XSModel is empty given a namespace
- * @param xsmodel Schema Model to check
- * @param namespace namespace to check components for
- * @return true (if empty) and false (if not empty)
- */
- public boolean isEmptySchema(JBossXSModel xsmodel, String namespace)
- {
- if(xsmodel == null) return true;
- if(namespace == null) throw new WSException("Target Namespace of xsmodel is
null");
- XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION,
namespace);
- XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION,
namespace);
-
- if (tmap != null && tmap.getLength() > 0) return false;
- if (emap != null && emap.getLength() > 0) return false;
-
- return true;
- }
-
-
- /**
- * Serialize the SchemaModel into a Writer
- * @param xsmodel Schema Model which needs to be serialized
- * @param writer a Writer to which serialization should happen
- * @throws IOException
- */
- public void serialize(XSModel xsmodel, Writer writer) throws IOException
- {
- StringBuilder buffer = new StringBuilder();
- if(xsmodel instanceof JBossXSModel)
- {
- String str = ((JBossXSModel)xsmodel).serialize();
- buffer.append(str);
- }
- else
- {
- buffer.append("<schema ");
- XSNamespaceItemList itemlist = xsmodel.getNamespaceItems();
- appendSchemaDefinitions(buffer, itemlist);
- appendTypes(buffer, xsmodel);
- appendGlobalElements(buffer, xsmodel);
- buffer.append("</schema>");
- }
- writer.write(buffer.toString());
- }
-
-
- /**
- * Serialize the SchemaModel (with no types and elements) into a Writer
- * @param xsmodel Schema Model which needs to be serialized
- * @param writer a Writer to which serialization should happen
- * @throws IOException
- */
-
- public void serializeEmptySchema(XSModel xsmodel, Writer writer) throws IOException
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append("<schema ");
- XSNamespaceItemList itemlist = xsmodel.getNamespaceItems();
- appendSchemaDefinitions(buffer, itemlist);
- appendTypes(buffer, xsmodel);
- appendGlobalElements(buffer, xsmodel);
- buffer.append("</schema>");
- writer.write(buffer.toString());
- }
-
- /**
- * Return a string for the element declaration
- * @param xsel
- * @param xsp
- * @return
- */
-
- public String write(XSElementDeclaration xsel, XSParticle xsp)
- {
- XSTypeDefinition xst = xsel.getTypeDefinition();
- if(xst == null)
- throw new IllegalStateException("Type xst is null");
-
- boolean isGlobalRef = (xsel.getScope() == XSConstants.SCOPE_GLOBAL);
- boolean isAnonType = xst.getAnonymous();
-
- StringBuilder buf = new StringBuilder();
- String elname = xsel.getName();
- String prefix = null;
-
- if(isGlobalRef)
- {
- String namespace = xsel.getNamespace();
- prefix = getPrefix(namespace);
- buf.append("<element ref='" + prefix + ":" + elname +
"'");
- }
- else
- {
- String namespace = xst.getNamespace();
- String typename = xst.getName();
-
- if (! Constants.NS_SCHEMA_XSD.equals(namespace))
- {
- prefix = getPrefix(namespace);
- typename = prefix + ":" + typename;
- }
- buf.append("<element name='" + elname + "'");
-
- if(! isAnonType)
- buf.append(" type='" + typename + "' ");
- }
-
- if (xsel.getNillable())
- buf.append(" nillable='true' ");
-
- int minoccurs = xsp.getMinOccurs();
- int maxoccurs = xsp.getMaxOccurs();
- if (!(minoccurs == 0 && maxoccurs == 0) && !(minoccurs == 1
&& maxoccurs == 1))
- {
- if (xsp.getMaxOccursUnbounded())
- buf.append(" maxOccurs='unbounded' ");
- else
- buf.append(" maxOccurs='" + xsp.getMaxOccurs() +
"'");
-
- buf.append(" minOccurs='" + xsp.getMinOccurs() +
"'");
- }
-
- if(! isAnonType)
- buf.append("/>");
- else
-
buf.append(">").append(write(xst)).append("</element>");
-
- return buf.toString();
- }
-
- public String write(XSAttributeDeclaration decl)
- {
- XSTypeDefinition xst = decl.getTypeDefinition();
- if(xst == null)
- throw new IllegalStateException("Type xst is null");
-
- boolean isGlobalRef = (decl.getScope() == XSConstants.SCOPE_GLOBAL);
- boolean isAnonType = xst.getAnonymous();
-
- StringBuilder buf = new StringBuilder();
- String name = decl.getName();
- String prefix = null;
-
- if (isGlobalRef)
- {
- String namespace = decl.getNamespace();
- prefix = getPrefix(namespace);
- buf.append("<attribute ref='" + prefix + ":" + name +
"'");
- }
- else
- {
- String namespace = xst.getNamespace();
- String typename = xst.getName();
-
- if (! Constants.NS_SCHEMA_XSD.equals(namespace))
- {
- prefix = getPrefix(namespace);
- typename = prefix + ":" + typename;
- }
- buf.append("<attribute name='" + name + "'");
-
- if(! isAnonType)
- buf.append(" type='" + typename + "' ");
- }
-
- if(! isAnonType)
- buf.append("/>");
- else
-
buf.append(">").append(write(xst)).append("</attribute>");
-
- return buf.toString();
- }
-
- /**
- * Return a string for the global element declaration
- * @param xsel
- * @param xsp
- * @return
- */
- public String write(XSElementDeclaration xsel)
- {
- boolean isAnonType = false;
- if (XSConstants.SCOPE_GLOBAL != xsel.getScope())
- throw new IllegalArgumentException("Element is not a global
element");
-
- StringBuilder buf = new StringBuilder();
- String elname = xsel.getName();
- XSTypeDefinition xst = xsel.getTypeDefinition();
- isAnonType = xst.getAnonymous();
- String typename = xst.getName();
- String namespace = xst.getNamespace();
- String prefix = null;
-
- if (! Constants.NS_SCHEMA_XSD.equals(namespace))
- {
- prefix = getPrefix(namespace);
- typename = prefix + ":" + typename;
- }
-
- buf.append("<element name='" + elname + "'");
- if(!isAnonType)
- buf.append(" type='" + typename + "' ");
- else
- buf.append(">").append(write(xst));
-
- if (xsel.getNillable() &&
- xsel.getScope() != XSConstants.SCOPE_GLOBAL)
- buf.append(" nillable='true' ");
- if(!isAnonType)
- buf.append("/>");
- else
- buf.append("</element>");
-
- return buf.toString();
- }
-
- /**
- * Return a string for the xs model group
- * @param xstype
- * @return
- */
- public String write(XSModelGroup xsm)
- {
- StringBuilder buf = new StringBuilder();
- XSObjectList objlist = xsm.getParticles();
-
- int lenobj = objlist != null ? objlist.getLength() : 0;
-
- for (int i = 0; i < lenobj; i++)
- {
- XSParticle jxsp = (XSParticle)objlist.item(i);
- XSTerm xterm = jxsp.getTerm();
- short termType = xterm.getType();
- if(termType == XSConstants.ELEMENT_DECLARATION)
- {
- XSElementDeclaration xsel = (XSElementDeclaration)jxsp.getTerm();
- buf.append(this.write(xsel, jxsp));
- }
- else
- if ( termType == XSConstants.MODEL_GROUP)
- {
- XSObjectList olist = ((XSModelGroup)xterm).getParticles();
- int lobj = olist != null ? olist.getLength() : 0;
- for (int k = 0; k < lobj; k++)
- {
- XSParticle jxp = (XSParticle)olist.item(k);
- XSTerm xsterm = jxp.getTerm();
- termType = xsterm.getType();
- if(termType == XSConstants.ELEMENT_DECLARATION)
- buf.append(write((XSElementDeclaration)xsterm, jxsp));
- else
- if(termType == XSConstants.MODEL_GROUP && k > 0)
- buf.append(write((XSModelGroup)xsterm));
- }
- }
- }
- return buf.toString();
- }
-
-
- /**
- * Return a string for the xs type
- * @param xstype
- * @return
- */
- public String write(XSTypeDefinition xstype)
- {
- StringBuilder buf = new StringBuilder();
-
- //Handle Complex Type
- if (xstype instanceof XSComplexTypeDefinition)
- {
- XSComplexTypeDefinition jxstype = (XSComplexTypeDefinition)xstype;
- String jxsTypeName = jxstype.getName();
- boolean isSimple = jxstype.getContentType() ==
XSComplexTypeDefinition.CONTENTTYPE_SIMPLE;
-
- if(xstype.getAnonymous()) buf.append("<complexType>");
- else
- buf.append("<complexType name='" + jxsTypeName +
"'>");
-
- XSTypeDefinition xsbase = (XSTypeDefinition)jxstype.getBaseType();
- String baseType = null;
- if (xsbase != null && !("anyType".equals(xsbase.getName())))
- baseType = getPrefix(xsbase.getNamespace()) + ":" +
xsbase.getName();
-
- if (baseType != null)
- {
- buf.append((isSimple) ? "<simpleContent>" :
"<complexContent>");
- buf.append("<extension base='" + baseType +
"'>");
- }
-
- XSParticle xsp = jxstype.getParticle();
- if (xsp != null) appendComplexTypeDefinition(buf,jxstype);
-
- XSObjectList list = jxstype.getAttributeUses();
- for (int i = 0; i < list.getLength(); i++)
- {
- XSAttributeUse use = (XSAttributeUse) list.item(i);
- XSAttributeDeclaration decl = use.getAttrDeclaration();
- buf.append(write(decl));
- }
-
- if (baseType != null)
- {
- buf.append("</extension>");
- buf.append((isSimple) ? "</simpleContent>" :
"</complexContent>");
- }
-
- buf.append("</complexType>");
-
- }
- else if (xstype instanceof XSSimpleTypeDefinition)
- {
- XSTypeDefinition xsbase = (XSTypeDefinition)xstype.getBaseType();
- buf.append("<simpleType name='" + xstype.getName() +
"'>");
- if (xsbase != null && !"anyType".equals(xsbase.getName()))
- {
- String baseType = xsbase.getName();
- String ns = xsbase.getNamespace();
- if (! Constants.NS_SCHEMA_XSD.equals(ns))
- {
- String prefix = getPrefix(ns);
- baseType = prefix + ":" + baseType;
- }
-
- // currently only handle enumerations
- buf.append("<restriction base='" + baseType +
"'>");
- StringList list = ((XSSimpleTypeDefinition)xstype).getLexicalEnumeration();
- for (int i = 0; i < list.getLength(); i++)
- {
- String listItem = DOMWriter.normalize(list.item(i), false);
- buf.append("<enumeration value='" + listItem
+"'/>");
- }
- buf.append("</restriction>");
- }
- buf.append("</simpleType>");
- }
-
- return buf.toString();
- }
-
-// Private methods
-
- private void appendSchemaDefinitions(StringBuilder buffer, XSNamespaceItemList
itemlist)
- {
- int len = itemlist != null ? itemlist.getLength() : 0;
-
- for (int i = 0; i < len; i++)
- {
- XSNamespaceItem nsitem = (XSNamespaceItem)itemlist.item(i);
- String ns = nsitem.getSchemaNamespace();
- //Ignore the one for xsd
-
- if (Constants.NS_SCHEMA_XSD.equals(ns)) continue;
- buffer.append(utils.getSchemaDefinitions(ns));
-
- } //end for
- }
-
- private void appendComplexTypeDefinition(StringBuilder buf , XSComplexTypeDefinition
jxstype)
- {
- XSParticle xsp = jxstype.getParticle();
- XSTerm xsterm = xsp.getTerm();
- short deriveMethod = jxstype.getDerivationMethod();
-
- if (xsterm instanceof XSElementDeclaration)
- {
- // FIXME This is horribly wrong, but too much depends on this broken behavior
- buf.append("<sequence>");
-
- XSElementDeclaration xsel = (XSElementDeclaration)xsterm;
- buf.append(this.write(xsel, xsp));
- buf.append("</sequence>");
- }
- else if (xsterm instanceof XSModelGroup)
- {
- XSModelGroup jmg = (XSModelGroup)xsterm;
- XSObjectList objlist = jmg.getParticles();
- String end = null;
-
- switch (jmg.getCompositor())
- {
- case XSModelGroup.COMPOSITOR_ALL:
- buf.append("<all>");
- end = "</all>";
- break;
- case XSModelGroup.COMPOSITOR_CHOICE:
- buf.append("<choice>");
- end = "</choice>";
- break;
- default:
- case XSModelGroup.COMPOSITOR_SEQUENCE:
- buf.append("<sequence>");
- end = "</sequence>";
- break;
- }
-
- int lenobj = objlist != null ? objlist.getLength() : 0;
-
- for (int i = 0; i < lenobj; i++)
- {
- XSParticle jxsp = (XSParticle)objlist.item(i);
- XSTerm xterm = jxsp.getTerm();
- if (xterm instanceof XSElementDeclaration)
- {
- XSElementDeclaration xsel = (XSElementDeclaration)jxsp.getTerm();
- buf.append(this.write(xsel, jxsp));
- }
- else if (xterm instanceof XSModelGroup)
- {
- if(deriveMethod == XSConstants.DERIVATION_EXTENSION && i != lenobj
-1)
- continue;
-
- if (i == 0) continue;//Ignore as it provides the baseclass sequence of
elements
- XSObjectList olist = ((XSModelGroup)xterm).getParticles();
- int lobj = olist != null ? olist.getLength() : 0;
- for (int k = 0; k < lobj; k++)
- {
- XSParticle jxp = (XSParticle)olist.item(k);
- XSTerm jxpterm = jxp.getTerm();
- short termType = jxpterm.getType();
- if(termType == XSConstants.ELEMENT_DECLARATION)
- buf.append(write((XSElementDeclaration)jxpterm, jxsp));
- else
- if(termType == XSConstants.MODEL_GROUP)
- buf.append(write((XSModelGroup)jxpterm));
- }
- }
- }
-
- buf.append(end);
- }
- }
-
- private void appendTypes(StringBuilder buffer, XSModel xsmodel)
- {
- XSNamedMap xsmap = xsmodel.getComponents(XSConstants.TYPE_DEFINITION);
- int len = xsmap != null ? xsmap.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSTypeDefinition xstype = (XSTypeDefinition)xsmap.item(i);
- if (Constants.NS_SCHEMA_XSD.equals(xstype.getNamespace())) continue;
- buffer.append(this.write(xstype));
- }
- }
-
-
- private void appendGlobalElements(StringBuilder buffer, XSModel xsmodel)
- {
- XSNamedMap xsmap = xsmodel.getComponents(XSConstants.ELEMENT_DECLARATION);
- int len = xsmap != null ? xsmap.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSElementDeclaration xsel = (XSElementDeclaration)xsmap.item(i);
- if (Constants.NS_SCHEMA_XSD.equals(xsel.getNamespace())) continue;
- buffer.append(this.write(xsel));
- }
- }
-
- //Copy the Xerces implementation of XSModel into JBossXSModel
- public void copyXSModel(XSModel xsmodel, JBossXSModel jb)
- {
- if(xsmodel == null)
- throw new IllegalArgumentException("Illegal Null Argument:xsmodel");
- if(jb == null)
- throw new IllegalArgumentException("Illegal Null Argument:jb");
- //Copy all the Namespace Items
- jb.setXSNamespaceItemList(xsmodel.getNamespaceItems());
- //Copy all the elements
- XSNamedMap xsmp = xsmodel.getComponents(XSConstants.ELEMENT_DECLARATION);
- int len = xsmp != null ? xsmp.getLength() : 0;
-
- for (int i = 0; i < len; i++)
- {
- XSElementDeclaration xsel = (XSElementDeclaration)xsmp.item(i);
- jb.addXSElementDeclaration(xsel);
- }
- //Copy all the types
- xsmp = xsmodel.getComponents(XSConstants.TYPE_DEFINITION);
- len = xsmp != null ? xsmp.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSTypeDefinition xstype = (XSTypeDefinition)xsmp.item(i);
- if (!this.xsNS.equals(xstype.getNamespace())) jb.addXSTypeDefinition(xstype);
- }
-
- //Copy all the attributes
- xsmp = xsmodel.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
- len = xsmp != null ? xsmp.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- XSAttributeDeclaration xsattr = (XSAttributeDeclaration)xsmp.item(i);
- jb.addXSAttributeDeclaration(xsattr);
- }
-
- //copy all the global annotations
- //xsmp = xsmodel.getComponents(XSConstants.ANNOTATION);
- XSObjectList xo = xsmodel.getAnnotations();
- len = xo != null ? xo.getLength():0;
- //len = xsmp != null ? xsmp.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- //XSAnnotation xa = (XSAnnotation)xsmp.item(i);
- XSAnnotation xa = (XSAnnotation)xo.item(i);
- jb.addXSAnnotation(xa);
- }
- }
-
- private String getPrefix(String namespace)
- {
- if (namespaceRegistry == null)
- throw new IllegalArgumentException("nameespaceRegistry can not be
null!");
-
- if (namespace == null)
- throw new IllegalArgumentException("namespace can not be null");
-
- // XML Namespace can only legally be assigned the XML prefix
- if (namespace.equals(Constants.NS_XML))
- return Constants.PREFIX_XML;
- if (namespace.equals(targetNamespace))
- return Constants.PREFIX_TNS;
- if (namespace.equals(Constants.URI_SOAP11_ENC))
- return Constants.PREFIX_SOAP11_ENC;
- if (namespace.equals(Constants.NS_SCHEMA_XSI))
- return Constants.PREFIX_XSI;
-
- String prefix = namespaceRegistry.getPrefix(namespace);
-
- // Assume target namespace
- return (prefix == null) ? Constants.PREFIX_TNS : prefix;
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/WSSchemaUtils.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/WSSchemaUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,775 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xmlschema;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.xerces.xs.StringList;
+import org.apache.xerces.xs.XSAnnotation;
+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.XSNamedMap;
+import org.apache.xerces.xs.XSNamespaceItem;
+import org.apache.xerces.xs.XSNamespaceItemList;
+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.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.xb.binding.NamespaceRegistry;
+
+/**
+ * Singleton class that works on the JBoss version of XSModel
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Jun 3, 2005
+ */
+
+public class WSSchemaUtils
+{
+ private static final String xsNS = Constants.NS_SCHEMA_XSD;
+ private static SchemaUtils utils = SchemaUtils.getInstance();
+
+ private NamespaceRegistry namespaceRegistry;
+
+ private String targetNamespace = null;
+
+ public static WSSchemaUtils getInstance(NamespaceRegistry namespaceRegistry, String
targetNamespace)
+ {
+ return new WSSchemaUtils(namespaceRegistry, targetNamespace);
+ }
+
+ private WSSchemaUtils(NamespaceRegistry namespaceRegistry, String targetNamespace)
+ {
+ this.namespaceRegistry = namespaceRegistry;
+ this.targetNamespace = targetNamespace;
+ }
+
+
+ /**
+ * Checks whether given a targetNS and other regular schema namespaces,
+ * the passed "checkNS" is a custom namespace
+ * @param targetNS Target Namespace of the schema
+ * @param checkNS Namespace that needs to be checked if its a custom namespace
+ * @return true - if checkNS is a custom namespace, false - otherwise
+ */
+ public boolean checkCustomNamespace(String targetNS, String checkNS)
+ {
+ String[] nsarr = new String[] {xsNS,Constants.NS_SCHEMA_XSI };
+ List<String> knownNamespaces = Arrays.asList(nsarr);
+ boolean isCustom = false;
+ if(xsNS.equals(targetNS))
+ throw new IllegalArgumentException("targetNamespace cannot be "+xsNS
);
+ if(checkNS == null)
+ throw new IllegalArgumentException("checkNS is null");
+ if(knownNamespaces.contains(checkNS) == false &&
+ targetNS.equals(checkNS) == false)
+ isCustom = true;
+ return isCustom;
+ }
+
+ /**
+ * Create a global XSElementDeclaration object
+ * @param name
+ * @param xstype
+ * @param targetNS
+ * @return
+ */
+
+ public JBossXSElementDeclaration createGlobalXSElementDeclaration(String name,
XSTypeDefinition xstype,
+ String targetNS)
+ {
+ JBossXSElementDeclaration xsel = new JBossXSElementDeclaration();
+ xsel.setName(name);
+ xsel.setTypeDefinition(xstype);
+ xsel.setTargetNamespace(targetNS);
+ xsel.setNamespace(targetNS);
+ xsel.setScope(XSConstants.SCOPE_GLOBAL);
+ return xsel;
+ }
+
+ /**
+ * Generate a Schema Model for a namespace
+ * @return
+ */
+
+ public JBossXSModel createXSModel()
+ {
+ return new JBossXSModel();
+ }
+
+ public JBossXSComplexTypeDefinition createXSComplexTypeDefinition( String name,
+ XSTypeDefinition baseType, List<XSParticle> xsparts, String typens)
+ {
+ //No complex type if particles are null
+ if(xsparts == null)
+ return null;
+
+ JBossXSComplexTypeDefinition ct = new JBossXSComplexTypeDefinition();
+ ct.setName(name);
+ ct.setNamespace(typens);
+ JBossXSModelGroup group = new JBossXSModelGroup();
+
+ group.setCompositor(XSModelGroup.COMPOSITOR_SEQUENCE);
+ group.setParticles(xsparts);
+ // Plug the particle array into the modelgroup
+ JBossXSParticle xspa = new JBossXSParticle(null, typens);
+ xspa.setTerm(group);
+ ((JBossXSComplexTypeDefinition) ct).setParticle(xspa);
+
+ if (baseType != null)
+ {
+ ((JBossXSComplexTypeDefinition)
ct).setDerivationMethod(XSConstants.DERIVATION_EXTENSION);
+ ((JBossXSComplexTypeDefinition) ct).setBaseType(baseType);
+ }
+
+ return ct;
+ }
+
+
+ /**
+ * Create a local XSElementDeclaration object
+ * @param name
+ * @param xstype
+ * @param targetNS
+ * @param isNillable
+ * @return
+ */
+
+ public JBossXSElementDeclaration createXSElementDeclaration(String name,
XSTypeDefinition xstype,boolean isNillable)
+ {
+ JBossXSElementDeclaration xsel = new JBossXSElementDeclaration();
+ xsel.setName(name);
+ xsel.setTypeDefinition(xstype);
+ xsel.setNillable(isNillable);
+ return xsel;
+ }
+
+ public JBossXSParticle createXSParticle(String targetNS, boolean isArray, XSTerm
xsterm)
+ {
+ JBossXSParticle xsp = new JBossXSParticle(null, targetNS);
+ if (isArray)
+ xsp.setMaxOccurs(-1);
+ xsp.setTerm(xsterm);
+ return xsp;
+ }
+
+
+ /**
+ * Creates a XSTypeDefinition object given a QName
+ *
+ * @param qname
+ * @return a XSTypeDefinition
+ */
+ public JBossXSTypeDefinition createXSTypeDefinition(QName qname)
+ {
+ JBossXSTypeDefinition jbxs = new JBossXSTypeDefinition();
+ jbxs.setName(qname.getLocalPart());
+ jbxs.setNamespace(qname.getNamespaceURI());
+ return jbxs;
+ }
+
+
+ /**
+ * Generate a complex type for a custom exception
+ * @param exname
+ * @param ns
+ * @return
+ */
+
+ public XSComplexTypeDefinition getExceptionType(String exname, String ns)
+ {
+ JBossXSParticle xsp = new JBossXSParticle();
+ /*xsp.setType(XSConstants.ELEMENT_DECLARATION);
+ xsp.setMaxOccurs(-1);
+ JBossXSElementDeclaration xsel =
(JBossXSElementDeclaration)createXSElementDeclaration("name",
utils.getSchemaBasicType("string"), true);
+
+ xsp.setTerm(xsel); */
+ XSComplexTypeDefinition ct =
+ new JBossXSComplexTypeDefinition(exname, ns);
+
+ ((JBossXSComplexTypeDefinition)ct).setParticle(xsp);
+ return ct;
+ }
+
+ /**
+ * Convert the read-only Xerces implementation of XSModel
+ * into JBossXSModel.
+ * If the input is JBossXSModel, it will be returned back.
+ * @param xsmodel XSModel object
+ * @return JBossXSModel (RW Model)
+ */
+ public JBossXSModel getJBossXSModel(XSModel xsmodel)
+ {
+ if(xsmodel instanceof JBossXSModel)
+ return (JBossXSModel)xsmodel;
+ JBossXSModel jbxs = new JBossXSModel();
+ copyXSModel(xsmodel,jbxs);
+ return jbxs;
+ }
+
+ /**
+ * Checks if the XSModel is empty given a namespace
+ * @param xsmodel Schema Model to check
+ * @param namespace namespace to check components for
+ * @return true (if empty) and false (if not empty)
+ */
+ public boolean isEmptySchema(JBossXSModel xsmodel, String namespace)
+ {
+ if(xsmodel == null) return true;
+ if(namespace == null) throw new WSException("Target Namespace of xsmodel is
null");
+ XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION,
namespace);
+ XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION,
namespace);
+
+ if (tmap != null && tmap.getLength() > 0) return false;
+ if (emap != null && emap.getLength() > 0) return false;
+
+ return true;
+ }
+
+
+ /**
+ * Serialize the SchemaModel into a Writer
+ * @param xsmodel Schema Model which needs to be serialized
+ * @param writer a Writer to which serialization should happen
+ * @throws IOException
+ */
+ public void serialize(XSModel xsmodel, Writer writer) throws IOException
+ {
+ StringBuilder buffer = new StringBuilder();
+ if(xsmodel instanceof JBossXSModel)
+ {
+ String str = ((JBossXSModel)xsmodel).serialize();
+ buffer.append(str);
+ }
+ else
+ {
+ buffer.append("<schema ");
+ XSNamespaceItemList itemlist = xsmodel.getNamespaceItems();
+ appendSchemaDefinitions(buffer, itemlist);
+ appendTypes(buffer, xsmodel);
+ appendGlobalElements(buffer, xsmodel);
+ buffer.append("</schema>");
+ }
+ writer.write(buffer.toString());
+ }
+
+
+ /**
+ * Serialize the SchemaModel (with no types and elements) into a Writer
+ * @param xsmodel Schema Model which needs to be serialized
+ * @param writer a Writer to which serialization should happen
+ * @throws IOException
+ */
+
+ public void serializeEmptySchema(XSModel xsmodel, Writer writer) throws IOException
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append("<schema ");
+ XSNamespaceItemList itemlist = xsmodel.getNamespaceItems();
+ appendSchemaDefinitions(buffer, itemlist);
+ appendTypes(buffer, xsmodel);
+ appendGlobalElements(buffer, xsmodel);
+ buffer.append("</schema>");
+ writer.write(buffer.toString());
+ }
+
+ /**
+ * Return a string for the element declaration
+ * @param xsel
+ * @param xsp
+ * @return
+ */
+
+ public String write(XSElementDeclaration xsel, XSParticle xsp)
+ {
+ XSTypeDefinition xst = xsel.getTypeDefinition();
+ if(xst == null)
+ throw new IllegalStateException("Type xst is null");
+
+ boolean isGlobalRef = (xsel.getScope() == XSConstants.SCOPE_GLOBAL);
+ boolean isAnonType = xst.getAnonymous();
+
+ StringBuilder buf = new StringBuilder();
+ String elname = xsel.getName();
+ String prefix = null;
+
+ if(isGlobalRef)
+ {
+ String namespace = xsel.getNamespace();
+ prefix = getPrefix(namespace);
+ buf.append("<element ref='" + prefix + ":" + elname +
"'");
+ }
+ else
+ {
+ String namespace = xst.getNamespace();
+ String typename = xst.getName();
+
+ if (! Constants.NS_SCHEMA_XSD.equals(namespace))
+ {
+ prefix = getPrefix(namespace);
+ typename = prefix + ":" + typename;
+ }
+ buf.append("<element name='" + elname + "'");
+
+ if(! isAnonType)
+ buf.append(" type='" + typename + "' ");
+ }
+
+ if (xsel.getNillable())
+ buf.append(" nillable='true' ");
+
+ int minoccurs = xsp.getMinOccurs();
+ int maxoccurs = xsp.getMaxOccurs();
+ if (!(minoccurs == 0 && maxoccurs == 0) && !(minoccurs == 1
&& maxoccurs == 1))
+ {
+ if (xsp.getMaxOccursUnbounded())
+ buf.append(" maxOccurs='unbounded' ");
+ else
+ buf.append(" maxOccurs='" + xsp.getMaxOccurs() +
"'");
+
+ buf.append(" minOccurs='" + xsp.getMinOccurs() +
"'");
+ }
+
+ if(! isAnonType)
+ buf.append("/>");
+ else
+
buf.append(">").append(write(xst)).append("</element>");
+
+ return buf.toString();
+ }
+
+ public String write(XSAttributeDeclaration decl)
+ {
+ XSTypeDefinition xst = decl.getTypeDefinition();
+ if(xst == null)
+ throw new IllegalStateException("Type xst is null");
+
+ boolean isGlobalRef = (decl.getScope() == XSConstants.SCOPE_GLOBAL);
+ boolean isAnonType = xst.getAnonymous();
+
+ StringBuilder buf = new StringBuilder();
+ String name = decl.getName();
+ String prefix = null;
+
+ if (isGlobalRef)
+ {
+ String namespace = decl.getNamespace();
+ prefix = getPrefix(namespace);
+ buf.append("<attribute ref='" + prefix + ":" + name +
"'");
+ }
+ else
+ {
+ String namespace = xst.getNamespace();
+ String typename = xst.getName();
+
+ if (! Constants.NS_SCHEMA_XSD.equals(namespace))
+ {
+ prefix = getPrefix(namespace);
+ typename = prefix + ":" + typename;
+ }
+ buf.append("<attribute name='" + name + "'");
+
+ if(! isAnonType)
+ buf.append(" type='" + typename + "' ");
+ }
+
+ if(! isAnonType)
+ buf.append("/>");
+ else
+
buf.append(">").append(write(xst)).append("</attribute>");
+
+ return buf.toString();
+ }
+
+ /**
+ * Return a string for the global element declaration
+ * @param xsel
+ * @param xsp
+ * @return
+ */
+ public String write(XSElementDeclaration xsel)
+ {
+ boolean isAnonType = false;
+ if (XSConstants.SCOPE_GLOBAL != xsel.getScope())
+ throw new IllegalArgumentException("Element is not a global
element");
+
+ StringBuilder buf = new StringBuilder();
+ String elname = xsel.getName();
+ XSTypeDefinition xst = xsel.getTypeDefinition();
+ isAnonType = xst.getAnonymous();
+ String typename = xst.getName();
+ String namespace = xst.getNamespace();
+ String prefix = null;
+
+ if (! Constants.NS_SCHEMA_XSD.equals(namespace))
+ {
+ prefix = getPrefix(namespace);
+ typename = prefix + ":" + typename;
+ }
+
+ buf.append("<element name='" + elname + "'");
+ if(!isAnonType)
+ buf.append(" type='" + typename + "' ");
+ else
+ buf.append(">").append(write(xst));
+
+ if (xsel.getNillable() &&
+ xsel.getScope() != XSConstants.SCOPE_GLOBAL)
+ buf.append(" nillable='true' ");
+ if(!isAnonType)
+ buf.append("/>");
+ else
+ buf.append("</element>");
+
+ return buf.toString();
+ }
+
+ /**
+ * Return a string for the xs model group
+ * @param xstype
+ * @return
+ */
+ public String write(XSModelGroup xsm)
+ {
+ StringBuilder buf = new StringBuilder();
+ XSObjectList objlist = xsm.getParticles();
+
+ int lenobj = objlist != null ? objlist.getLength() : 0;
+
+ for (int i = 0; i < lenobj; i++)
+ {
+ XSParticle jxsp = (XSParticle)objlist.item(i);
+ XSTerm xterm = jxsp.getTerm();
+ short termType = xterm.getType();
+ if(termType == XSConstants.ELEMENT_DECLARATION)
+ {
+ XSElementDeclaration xsel = (XSElementDeclaration)jxsp.getTerm();
+ buf.append(this.write(xsel, jxsp));
+ }
+ else
+ if ( termType == XSConstants.MODEL_GROUP)
+ {
+ XSObjectList olist = ((XSModelGroup)xterm).getParticles();
+ int lobj = olist != null ? olist.getLength() : 0;
+ for (int k = 0; k < lobj; k++)
+ {
+ XSParticle jxp = (XSParticle)olist.item(k);
+ XSTerm xsterm = jxp.getTerm();
+ termType = xsterm.getType();
+ if(termType == XSConstants.ELEMENT_DECLARATION)
+ buf.append(write((XSElementDeclaration)xsterm, jxsp));
+ else
+ if(termType == XSConstants.MODEL_GROUP && k > 0)
+ buf.append(write((XSModelGroup)xsterm));
+ }
+ }
+ }
+ return buf.toString();
+ }
+
+
+ /**
+ * Return a string for the xs type
+ * @param xstype
+ * @return
+ */
+ public String write(XSTypeDefinition xstype)
+ {
+ StringBuilder buf = new StringBuilder();
+
+ //Handle Complex Type
+ if (xstype instanceof XSComplexTypeDefinition)
+ {
+ XSComplexTypeDefinition jxstype = (XSComplexTypeDefinition)xstype;
+ String jxsTypeName = jxstype.getName();
+ boolean isSimple = jxstype.getContentType() ==
XSComplexTypeDefinition.CONTENTTYPE_SIMPLE;
+
+ if(xstype.getAnonymous()) buf.append("<complexType>");
+ else
+ buf.append("<complexType name='" + jxsTypeName +
"'>");
+
+ XSTypeDefinition xsbase = (XSTypeDefinition)jxstype.getBaseType();
+ String baseType = null;
+ if (xsbase != null && !("anyType".equals(xsbase.getName())))
+ baseType = getPrefix(xsbase.getNamespace()) + ":" +
xsbase.getName();
+
+ if (baseType != null)
+ {
+ buf.append((isSimple) ? "<simpleContent>" :
"<complexContent>");
+ buf.append("<extension base='" + baseType +
"'>");
+ }
+
+ XSParticle xsp = jxstype.getParticle();
+ if (xsp != null) appendComplexTypeDefinition(buf,jxstype);
+
+ XSObjectList list = jxstype.getAttributeUses();
+ for (int i = 0; i < list.getLength(); i++)
+ {
+ XSAttributeUse use = (XSAttributeUse) list.item(i);
+ XSAttributeDeclaration decl = use.getAttrDeclaration();
+ buf.append(write(decl));
+ }
+
+ if (baseType != null)
+ {
+ buf.append("</extension>");
+ buf.append((isSimple) ? "</simpleContent>" :
"</complexContent>");
+ }
+
+ buf.append("</complexType>");
+
+ }
+ else if (xstype instanceof XSSimpleTypeDefinition)
+ {
+ XSTypeDefinition xsbase = (XSTypeDefinition)xstype.getBaseType();
+ buf.append("<simpleType name='" + xstype.getName() +
"'>");
+ if (xsbase != null && !"anyType".equals(xsbase.getName()))
+ {
+ String baseType = xsbase.getName();
+ String ns = xsbase.getNamespace();
+ if (! Constants.NS_SCHEMA_XSD.equals(ns))
+ {
+ String prefix = getPrefix(ns);
+ baseType = prefix + ":" + baseType;
+ }
+
+ // currently only handle enumerations
+ buf.append("<restriction base='" + baseType +
"'>");
+ StringList list = ((XSSimpleTypeDefinition)xstype).getLexicalEnumeration();
+ for (int i = 0; i < list.getLength(); i++)
+ {
+ String listItem = DOMWriter.normalize(list.item(i), false);
+ buf.append("<enumeration value='" + listItem
+"'/>");
+ }
+ buf.append("</restriction>");
+ }
+ buf.append("</simpleType>");
+ }
+
+ return buf.toString();
+ }
+
+// Private methods
+
+ private void appendSchemaDefinitions(StringBuilder buffer, XSNamespaceItemList
itemlist)
+ {
+ int len = itemlist != null ? itemlist.getLength() : 0;
+
+ for (int i = 0; i < len; i++)
+ {
+ XSNamespaceItem nsitem = (XSNamespaceItem)itemlist.item(i);
+ String ns = nsitem.getSchemaNamespace();
+ //Ignore the one for xsd
+
+ if (Constants.NS_SCHEMA_XSD.equals(ns)) continue;
+ buffer.append(utils.getSchemaDefinitions(ns));
+
+ } //end for
+ }
+
+ private void appendComplexTypeDefinition(StringBuilder buf , XSComplexTypeDefinition
jxstype)
+ {
+ XSParticle xsp = jxstype.getParticle();
+ XSTerm xsterm = xsp.getTerm();
+ short deriveMethod = jxstype.getDerivationMethod();
+
+ if (xsterm instanceof XSElementDeclaration)
+ {
+ // FIXME This is horribly wrong, but too much depends on this broken behavior
+ buf.append("<sequence>");
+
+ XSElementDeclaration xsel = (XSElementDeclaration)xsterm;
+ buf.append(this.write(xsel, xsp));
+ buf.append("</sequence>");
+ }
+ else if (xsterm instanceof XSModelGroup)
+ {
+ XSModelGroup jmg = (XSModelGroup)xsterm;
+ XSObjectList objlist = jmg.getParticles();
+ String end = null;
+
+ switch (jmg.getCompositor())
+ {
+ case XSModelGroup.COMPOSITOR_ALL:
+ buf.append("<all>");
+ end = "</all>";
+ break;
+ case XSModelGroup.COMPOSITOR_CHOICE:
+ buf.append("<choice>");
+ end = "</choice>";
+ break;
+ default:
+ case XSModelGroup.COMPOSITOR_SEQUENCE:
+ buf.append("<sequence>");
+ end = "</sequence>";
+ break;
+ }
+
+ int lenobj = objlist != null ? objlist.getLength() : 0;
+
+ for (int i = 0; i < lenobj; i++)
+ {
+ XSParticle jxsp = (XSParticle)objlist.item(i);
+ XSTerm xterm = jxsp.getTerm();
+ if (xterm instanceof XSElementDeclaration)
+ {
+ XSElementDeclaration xsel = (XSElementDeclaration)jxsp.getTerm();
+ buf.append(this.write(xsel, jxsp));
+ }
+ else if (xterm instanceof XSModelGroup)
+ {
+ if(deriveMethod == XSConstants.DERIVATION_EXTENSION && i != lenobj
-1)
+ continue;
+
+ if (i == 0) continue;//Ignore as it provides the baseclass sequence of
elements
+ XSObjectList olist = ((XSModelGroup)xterm).getParticles();
+ int lobj = olist != null ? olist.getLength() : 0;
+ for (int k = 0; k < lobj; k++)
+ {
+ XSParticle jxp = (XSParticle)olist.item(k);
+ XSTerm jxpterm = jxp.getTerm();
+ short termType = jxpterm.getType();
+ if(termType == XSConstants.ELEMENT_DECLARATION)
+ buf.append(write((XSElementDeclaration)jxpterm, jxsp));
+ else
+ if(termType == XSConstants.MODEL_GROUP)
+ buf.append(write((XSModelGroup)jxpterm));
+ }
+ }
+ }
+
+ buf.append(end);
+ }
+ }
+
+ private void appendTypes(StringBuilder buffer, XSModel xsmodel)
+ {
+ XSNamedMap xsmap = xsmodel.getComponents(XSConstants.TYPE_DEFINITION);
+ int len = xsmap != null ? xsmap.getLength() : 0;
+ for (int i = 0; i < len; i++)
+ {
+ XSTypeDefinition xstype = (XSTypeDefinition)xsmap.item(i);
+ if (Constants.NS_SCHEMA_XSD.equals(xstype.getNamespace())) continue;
+ buffer.append(this.write(xstype));
+ }
+ }
+
+
+ private void appendGlobalElements(StringBuilder buffer, XSModel xsmodel)
+ {
+ XSNamedMap xsmap = xsmodel.getComponents(XSConstants.ELEMENT_DECLARATION);
+ int len = xsmap != null ? xsmap.getLength() : 0;
+ for (int i = 0; i < len; i++)
+ {
+ XSElementDeclaration xsel = (XSElementDeclaration)xsmap.item(i);
+ if (Constants.NS_SCHEMA_XSD.equals(xsel.getNamespace())) continue;
+ buffer.append(this.write(xsel));
+ }
+ }
+
+ //Copy the Xerces implementation of XSModel into JBossXSModel
+ public void copyXSModel(XSModel xsmodel, JBossXSModel jb)
+ {
+ if(xsmodel == null)
+ throw new IllegalArgumentException("Illegal Null Argument:xsmodel");
+ if(jb == null)
+ throw new IllegalArgumentException("Illegal Null Argument:jb");
+ //Copy all the Namespace Items
+ jb.setXSNamespaceItemList(xsmodel.getNamespaceItems());
+ //Copy all the elements
+ XSNamedMap xsmp = xsmodel.getComponents(XSConstants.ELEMENT_DECLARATION);
+ int len = xsmp != null ? xsmp.getLength() : 0;
+
+ for (int i = 0; i < len; i++)
+ {
+ XSElementDeclaration xsel = (XSElementDeclaration)xsmp.item(i);
+ jb.addXSElementDeclaration(xsel);
+ }
+ //Copy all the types
+ xsmp = xsmodel.getComponents(XSConstants.TYPE_DEFINITION);
+ len = xsmp != null ? xsmp.getLength() : 0;
+ for (int i = 0; i < len; i++)
+ {
+ XSTypeDefinition xstype = (XSTypeDefinition)xsmp.item(i);
+ if (!this.xsNS.equals(xstype.getNamespace())) jb.addXSTypeDefinition(xstype);
+ }
+
+ //Copy all the attributes
+ xsmp = xsmodel.getComponents(XSConstants.ATTRIBUTE_DECLARATION);
+ len = xsmp != null ? xsmp.getLength() : 0;
+ for (int i = 0; i < len; i++)
+ {
+ XSAttributeDeclaration xsattr = (XSAttributeDeclaration)xsmp.item(i);
+ jb.addXSAttributeDeclaration(xsattr);
+ }
+
+ //copy all the global annotations
+ //xsmp = xsmodel.getComponents(XSConstants.ANNOTATION);
+ XSObjectList xo = xsmodel.getAnnotations();
+ len = xo != null ? xo.getLength():0;
+ //len = xsmp != null ? xsmp.getLength() : 0;
+ for (int i = 0; i < len; i++)
+ {
+ //XSAnnotation xa = (XSAnnotation)xsmp.item(i);
+ XSAnnotation xa = (XSAnnotation)xo.item(i);
+ jb.addXSAnnotation(xa);
+ }
+ }
+
+ private String getPrefix(String namespace)
+ {
+ if (namespaceRegistry == null)
+ throw new IllegalArgumentException("nameespaceRegistry can not be
null!");
+
+ if (namespace == null)
+ throw new IllegalArgumentException("namespace can not be null");
+
+ // XML Namespace can only legally be assigned the XML prefix
+ if (namespace.equals(Constants.NS_XML))
+ return Constants.PREFIX_XML;
+ if (namespace.equals(targetNamespace))
+ return Constants.PREFIX_TNS;
+ if (namespace.equals(Constants.URI_SOAP11_ENC))
+ return Constants.PREFIX_SOAP11_ENC;
+ if (namespace.equals(Constants.NS_SCHEMA_XSI))
+ return Constants.PREFIX_XSI;
+
+ String prefix = namespaceRegistry.getPrefix(namespace);
+
+ // Assume target namespace
+ return (prefix == null) ? Constants.PREFIX_TNS : prefix;
+ }
+}
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd (from
rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd)
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/SchemaUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/SchemaUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,567 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.metadata.wsdl.xsd;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl;
-import org.apache.xerces.impl.xs.XMLSchemaLoader;
-import org.apache.xerces.xni.parser.XMLEntityResolver;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xs.StringList;
-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.XSModelGroup;
-import org.apache.xerces.xs.XSNamedMap;
-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.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSErrorHandler;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSSimpleTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSStringList;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
-
-/**
- * Util class that deals with XML Schema
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- * @since Apr 12, 2005
- */
-public class SchemaUtils
-{
- private static SchemaUtils ourInstance = new SchemaUtils();
-
- protected static String xsNS = Constants.NS_SCHEMA_XSD;
-
- private static Map<Class, QName> toolsTypeMappingOverride = new
HashMap<Class, QName>();
-
- static
- {
- toolsTypeMappingOverride.put(byte[].class, Constants.TYPE_LITERAL_BASE64BINARY);
- }
-
- public static SchemaUtils getInstance()
- {
- return ourInstance;
- }
-
- private SchemaUtils()
- {
- }
-
- /**
- * Checks if the XS Particle is of array type
- * @param xsparticle
- * @return
- */
-
- public boolean isArrayType(XSParticle xsparticle)
- {
- //Determine if it is an arrayType
- int maxOccurs = xsparticle.getMaxOccurs();
- return xsparticle.getMaxOccursUnbounded() || maxOccurs > 1;
- }
-
- public static boolean isWrapperArrayType(XSTypeDefinition xst)
- {
- return unwrapArrayType(xst) != null;
- }
-
- public static XSElementDeclaration unwrapArrayType(XSTypeDefinition xst)
- {
- if (xst instanceof XSComplexTypeDefinition == false)
- return null;
-
- XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xst;
- if (xc.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
- return null;
-
- XSParticle xsp = xc.getParticle();
- if (xsp == null)
- return null;
-
- XSTerm xsterm = xsp.getTerm();
- if (xsterm instanceof XSModelGroup == false)
- return null;
-
- XSModelGroup xm = (XSModelGroup)xsterm;
- XSObjectList xo = xm.getParticles();
- if (xo.getLength() != 1)
- return null;
-
- XSParticle xp = (XSParticle)xo.item(0);
- XSTerm term = xp.getTerm();
- if ((xp.getMaxOccursUnbounded() || xp.getMaxOccurs() > 1) == false || term
instanceof XSElementDeclaration == false)
- return null;
-
- return (XSElementDeclaration)term;
- }
-
- /**
- * Generate a QName for a simple type
- * @param simple
- * @return
- */
- public static QName handleSimpleType(XSSimpleTypeDefinition simple)
- {
- if (simple == null)
- throw new IllegalArgumentException("XSSimpleTypeDefinition passed is
null");
-
- //Check if the type of SimpleType is a plain xsd type
- if (Constants.NS_SCHEMA_XSD.equals(simple.getNamespace()))
- return createQNameFromXSSimpleType(simple);
-
- switch (simple.getVariety())
- {
- case XSSimpleTypeDefinition.VARIETY_LIST:
- return handleSimpleType(simple.getItemType());
- case XSSimpleTypeDefinition.VARIETY_UNION:
- XSObjectList list = simple.getMemberTypes();
- if (list.getLength() > 0)
- return handleSimpleType((XSSimpleTypeDefinition)list.item(0));
- throw new WSException("Empty union type not expected");
- case XSSimpleTypeDefinition.VARIETY_ABSENT:
- throw new WSException("Absent variety is not supported in simple
types");
- }
-
- XSTypeDefinition base = simple.getBaseType();
- while (!Constants.NS_SCHEMA_XSD.equals(base.getNamespace()))
- base = base.getBaseType();
-
- if (!(base instanceof XSSimpleTypeDefinition))
- throw new WSException("Expected base type to be a simple type");
-
- return new QName(base.getNamespace(), base.getName());
- }
-
- /**
- * For the basic xsd types, patch prefix and ns uri
- * @param qname
- * @return
- */
- public QName patchXSDQName(QName qname)
- {
- if (qname == null)
- return null;
- return new QName(Constants.NS_SCHEMA_XSD, qname.getLocalPart(),
Constants.PREFIX_XSD);
- }
-
- /**
- * Given a XSTypeDefinition and the QName for the element,
- * create a XSElementDeclaration object
- * @param xmlName Name of the element
- * @param xst Type of the element
- * @return XSElementDeclaration
- */
- public XSElementDeclaration createXSElementDeclaration(QName xmlName, XSTypeDefinition
xst)
- {
- String name = xmlName.getLocalPart();
- String ns = xmlName.getNamespaceURI();
- JBossXSElementDeclaration jbel = new JBossXSElementDeclaration(name, ns);
- jbel.setTypeDefinition(xst);
- jbel.setScope(XSConstants.SCOPE_GLOBAL);
- return jbel;
- }
-
- /**
- * Create a QName given a Simple Type
- * @param xs
- * @return qname
- */
- public static QName createQNameFromXSSimpleType(XSSimpleTypeDefinition xs)
- {
- String nsuri = xs.getNamespace();
- String localpart = xs.getName();
- if (xsNS.equals(nsuri))
- return new QName(nsuri, localpart, Constants.PREFIX_XSD);
- else return new QName(nsuri, localpart);
- }
-
- /**
- * Return typemapping override for tools if any
- *
- * @param javaType
- * @return
- */
- public QName getToolsOverrideInTypeMapping(Class javaType)
- {
- return toolsTypeMappingOverride.get(javaType);
- }
-
- /**
- * Check if a global element exists
- * @param xmlName QName of the element that needs to be checked
- * @param xsmodel Schema model that is passed
- * @return
- */
- public boolean hasGlobalElement(QName xmlName, XSModel xsmodel)
- {
- if (xmlName == null)
- throw new IllegalArgumentException("xmlName is null");
- if (xsmodel == null)
- throw new IllegalArgumentException("XSModel is null");
- boolean bool = false;
- String name = xmlName.getLocalPart();
- if (name == null)
- throw new IllegalArgumentException("xmlName has a null name");
- String ns = xmlName.getNamespaceURI();
- if (ns == null)
- throw new IllegalArgumentException("xmlName has a null namespace");
- if (xsmodel.getElementDeclaration(name, ns) != null)
- bool = true;
- return bool;
- }
-
- /**
- * Check if a Complex Type exists
- * @param xmlType QName of the Complex Type that needs to be checked
- * @param xsmodel Schema model that is passed
- * @return
- */
- public boolean hasComplexTypeDefinition(QName xmlType, URL xsdLocation)
- {
- if (xsdLocation == null)
- throw new IllegalArgumentException("xsdLocation is null");
- XSModel xsmodel = parseSchema(xsdLocation);
- return this.hasComplexTypeDefinition(xmlType, xsmodel);
- }
-
- /**
- * Check if a Global Element exists
- * @param xmlType QName of the global element that needs to be checked
- * @param xsmodel Schema model that is passed
- * @return
- */
- public boolean hasGlobalElement(QName xmlName, URL xsdLocation)
- {
- if (xmlName == null)
- throw new IllegalArgumentException("xmlName is null");
- if (xsdLocation == null)
- throw new IllegalArgumentException("xsdLocation is null");
- XSModel xsmodel = parseSchema(xsdLocation);
- boolean bool = false;
- String name = xmlName.getLocalPart();
- if (name == null)
- throw new IllegalArgumentException("xmlName has a null name");
- String ns = xmlName.getNamespaceURI();
- if (ns == null)
- throw new IllegalArgumentException("xmlName has a null namespace");
- if (xsmodel.getElementDeclaration(name, ns) != null)
- bool = true;
- return bool;
- }
-
- /**
- * Check if a Complex Type exists
- * @param xmlType QName of the Complex Type that needs to be checked
- * @param xsmodel Schema model that is passed
- * @return
- */
- public boolean hasComplexTypeDefinition(QName xmlType, XSModel xsmodel)
- {
- if (xmlType == null)
- throw new IllegalArgumentException("xmlType is null");
- if (xsmodel == null)
- throw new IllegalArgumentException("XSModel is null");
- boolean bool = false;
- String name = xmlType.getLocalPart();
- if (name == null)
- throw new IllegalArgumentException("xmlName has a null name");
- String ns = xmlType.getNamespaceURI();
- if (ns == null)
- throw new IllegalArgumentException("xmlName has a null namespace");
- if (xsmodel.getTypeDefinition(name, ns) != null)
- bool = true;
- return bool;
- }
-
- /**
- * Get formatted string for the qname representing the xstype
- * @param xstype
- * @return
- */
- public String getFormattedString(XSTypeDefinition xstype)
- {
- String ns = xstype.getNamespace();
- String name = xstype.getName();
- if (!ns.equals(xsNS))
- name = getPrefix(ns) + ":" + name;
-
- return name;
- }
-
- /**
- * Get a QName for a xs type
- * @param xstype
- * @return
- */
- public QName getQName(XSTypeDefinition xstype)
- {
- String prefix = null;
- String ns = xstype.getNamespace();
- String name = xstype.getName();
- if (!ns.equals(xsNS))
- prefix = Constants.PREFIX_TNS;
- else prefix = Constants.PREFIX_XSD;
-
- return new QName(ns, name, prefix);
- }
-
- /**
- * Get a schema basic type
- * TODO: Migrate this off of the Xerces Impl
- * @param localpart
- * @return
- */
- public JBossXSTypeDefinition getSchemaBasicType(String localpart)
- {
- JBossXSTypeDefinition xt = null;
- /**
- * Special case: xs:anyType
- */
- if ("anyType".equals(localpart))
- {
- JBossXSComplexTypeDefinition ct = new JBossXSComplexTypeDefinition(localpart,
Constants.NS_SCHEMA_XSD);
- ct.setContentType(XSComplexTypeDefinition.CONTENTTYPE_EMPTY);
- xt = ct;
- }
- else
- {
- XSSimpleTypeDefinition xstype = (new
SchemaDVFactoryImpl()).getBuiltInType(localpart);
- xt = new JBossXSSimpleTypeDefinition(xstype);
-
- }
- return xt;
- }
-
- /**
- * Get an instance of XSLoader that is capable of
- * parsing schema files
- *
- * @return
- */
- public XSLoader getXSLoader()
- {
- XMLSchemaLoader xsloader = new XMLSchemaLoader();
- JBossXSErrorHandler eh = new JBossXSErrorHandler();
- xsloader.setErrorHandler(eh);
- return xsloader;
- }
-
- /**
- * Get an instance of XSLoader that is capable of
- * parsing schema files
- * @param xeh XML Error handler
- * @param xer XML Entity Resolver
- * @return
- */
- public XSLoader getXSLoader(XMLErrorHandler xeh, XMLEntityResolver xer)
- {
- XMLSchemaLoader xsloader = new XMLSchemaLoader();
- xsloader.setEntityResolver(xer);
- xsloader.setErrorHandler(xeh);
- return xsloader;
- }
-
- /**
- * Given a schema file, generate a schema model
- * @param schemaLoc java.net.URL object to the schema file
- * @return schema model
- */
- public XSModel parseSchema(URL schemaLoc)
- {
- return parseSchema(schemaLoc.toExternalForm());
- }
-
- /**
- * Given a schema file, generate a schema model
- * @param schemaLoc string representation to the location of schema
- * @return schema model
- */
- public XSModel parseSchema(String schemaLoc)
- {
- XSLoader xsloader = getXSLoader();
- XSModel xsModel = xsloader.loadURI(schemaLoc);
- if (xsModel == null)
- throw new WSException("Cannot parse schema: " + schemaLoc);
- return xsModel;
- }
-
- /**
- * Given a list of schema locations, parse and
- * provide a Xerces XSModel
- *
- * @param locations
- * @return
- */
- public XSModel parseSchema(List<String> locations)
- {
- JBossXSStringList slist = new JBossXSStringList(locations);
- XSLoader xsloader = getXSLoader();
- return xsloader.loadURIList(slist);
- }
-
- /**
- * Checks if the XSModel is empty
- * @param xsmodel
- * @return true (if empty) and false (if not empty)
- */
- public boolean isEmptySchema(XSModel xsmodel)
- {
- if (xsmodel == null)
- return true;
- String targetNS = getTargetNamespace(xsmodel);
- if (targetNS == null)
- throw new WSException("Target Namespace of xsmodel is null");
- XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION,
targetNS);
- XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION,
targetNS);
-
- if (tmap != null && tmap.getLength() > 0)
- return false;
- if (emap != null && emap.getLength() > 0)
- return false;
-
- return true;
- }
-
- /**
- * Checks if the XSModel is empty given a namespace
- * @param xsmodel Schema Model to check
- * @param namespace namespace to check components for
- * @return true (if empty) and false (if not empty)
- */
- public boolean isEmptySchema(XSModel xsmodel, String namespace)
- {
- if (xsmodel == null)
- return true;
- if (namespace == null)
- throw new WSException("Target Namespace of xsmodel is null");
- XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION,
namespace);
- XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION,
namespace);
-
- if (tmap != null && tmap.getLength() > 0)
- return false;
- if (emap != null && emap.getLength() > 0)
- return false;
-
- return true;
- }
-
- /**
- * Get the schema definitions as a String
- * @param targetNS The Target Namespace
- * @return
- */
- public static String getSchemaDefinitions(String targetNS)
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append(" targetNamespace='" + targetNS + "'");
- buffer.append(" xmlns='" + Constants.NS_SCHEMA_XSD +
"'");
- buffer.append(" xmlns:" + Constants.PREFIX_SOAP11_ENC +
"='" + Constants.URI_SOAP11_ENC + "'");
- buffer.append(" xmlns:" + Constants.PREFIX_TNS + "='" +
targetNS + "'");
- //buffer.append(" xmlns:" + WSDLConstants.PREFIX_XSD + "='"
+ WSDLConstants.NS_SCHEMA_XSD + "'");
- buffer.append(" xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'");
- buffer.append(">");
- return buffer.toString();
- }
-
- /** Get the temp file for a given namespace
- */
- public static File getSchemaTempFile(String targetNS) throws IOException
- {
- if (targetNS.length() == 0)
- throw new IllegalArgumentException("Invalid null target namespace");
-
- String fname = targetNS;
- if (fname.indexOf("://") > 0)
- fname = fname.substring(fname.indexOf("://") + 3);
-
- File tmpdir = null;
- try
- {
- ServerConfigFactory factory = ServerConfigFactory.getInstance();
- ServerConfig serverConfig = factory.getServerConfig();
- tmpdir = serverConfig.getServerTempDir();
- tmpdir = new File(tmpdir.getCanonicalPath() + "/jbossws");
- tmpdir.mkdirs();
- }
- catch (Throwable th)
- {
- // ignore if the server config cannot be found
- // this would be the case if we are on the client side
- }
-
- fname = fname.replace('/', '_');
- fname = fname.replace(':', '_');
- File file = File.createTempFile("JBossWS_" + fname, ".xsd",
tmpdir);
- return file;
- }
-
- /**
- * Get the TargetNamespace from the schema model
- */
- public static String getTargetNamespace(XSModel xsmodel)
- {
- if (xsmodel == null)
- throw new IllegalArgumentException("Illegal Null Argument: xsmodel");
- String targetNS = null;
- StringList slist = xsmodel.getNamespaces();
- int len = slist != null ? slist.getLength() : 0;
- for (int i = 0; i < len; i++)
- {
- String ns = slist.item(i);
- if (Constants.NS_SCHEMA_XSD.equals(ns))
- continue;
- targetNS = ns;
- break;
- }
- return targetNS;
- }
-
- private String getPrefix(String namespace)
- {
- if (Constants.URI_SOAP11_ENC.equals(namespace))
- return Constants.PREFIX_SOAP11_ENC;
- else if (Constants.NS_SOAP11_ENV.equals(namespace) ||
Constants.NS_SOAP12_ENV.equals(namespace))
- return Constants.PREFIX_ENV;
-
- // Fall back to target namespace even though this is incorrect
- return Constants.PREFIX_TNS;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/SchemaUtils.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/SchemaUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/SchemaUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/SchemaUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,567 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.metadata.wsdl.xsd;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl;
+import org.apache.xerces.impl.xs.XMLSchemaLoader;
+import org.apache.xerces.xni.parser.XMLEntityResolver;
+import org.apache.xerces.xni.parser.XMLErrorHandler;
+import org.apache.xerces.xs.StringList;
+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.XSModelGroup;
+import org.apache.xerces.xs.XSNamedMap;
+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.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSErrorHandler;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSSimpleTypeDefinition;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSStringList;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
+
+/**
+ * Util class that deals with XML Schema
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @since Apr 12, 2005
+ */
+public class SchemaUtils
+{
+ private static SchemaUtils ourInstance = new SchemaUtils();
+
+ protected static String xsNS = Constants.NS_SCHEMA_XSD;
+
+ private static Map<Class, QName> toolsTypeMappingOverride = new
HashMap<Class, QName>();
+
+ static
+ {
+ toolsTypeMappingOverride.put(byte[].class, Constants.TYPE_LITERAL_BASE64BINARY);
+ }
+
+ public static SchemaUtils getInstance()
+ {
+ return ourInstance;
+ }
+
+ private SchemaUtils()
+ {
+ }
+
+ /**
+ * Checks if the XS Particle is of array type
+ * @param xsparticle
+ * @return
+ */
+
+ public boolean isArrayType(XSParticle xsparticle)
+ {
+ //Determine if it is an arrayType
+ int maxOccurs = xsparticle.getMaxOccurs();
+ return xsparticle.getMaxOccursUnbounded() || maxOccurs > 1;
+ }
+
+ public static boolean isWrapperArrayType(XSTypeDefinition xst)
+ {
+ return unwrapArrayType(xst) != null;
+ }
+
+ public static XSElementDeclaration unwrapArrayType(XSTypeDefinition xst)
+ {
+ if (xst instanceof XSComplexTypeDefinition == false)
+ return null;
+
+ XSComplexTypeDefinition xc = (XSComplexTypeDefinition)xst;
+ if (xc.getContentType() == XSComplexTypeDefinition.CONTENTTYPE_EMPTY)
+ return null;
+
+ XSParticle xsp = xc.getParticle();
+ if (xsp == null)
+ return null;
+
+ XSTerm xsterm = xsp.getTerm();
+ if (xsterm instanceof XSModelGroup == false)
+ return null;
+
+ XSModelGroup xm = (XSModelGroup)xsterm;
+ XSObjectList xo = xm.getParticles();
+ if (xo.getLength() != 1)
+ return null;
+
+ XSParticle xp = (XSParticle)xo.item(0);
+ XSTerm term = xp.getTerm();
+ if ((xp.getMaxOccursUnbounded() || xp.getMaxOccurs() > 1) == false || term
instanceof XSElementDeclaration == false)
+ return null;
+
+ return (XSElementDeclaration)term;
+ }
+
+ /**
+ * Generate a QName for a simple type
+ * @param simple
+ * @return
+ */
+ public static QName handleSimpleType(XSSimpleTypeDefinition simple)
+ {
+ if (simple == null)
+ throw new IllegalArgumentException("XSSimpleTypeDefinition passed is
null");
+
+ //Check if the type of SimpleType is a plain xsd type
+ if (Constants.NS_SCHEMA_XSD.equals(simple.getNamespace()))
+ return createQNameFromXSSimpleType(simple);
+
+ switch (simple.getVariety())
+ {
+ case XSSimpleTypeDefinition.VARIETY_LIST:
+ return handleSimpleType(simple.getItemType());
+ case XSSimpleTypeDefinition.VARIETY_UNION:
+ XSObjectList list = simple.getMemberTypes();
+ if (list.getLength() > 0)
+ return handleSimpleType((XSSimpleTypeDefinition)list.item(0));
+ throw new WSException("Empty union type not expected");
+ case XSSimpleTypeDefinition.VARIETY_ABSENT:
+ throw new WSException("Absent variety is not supported in simple
types");
+ }
+
+ XSTypeDefinition base = simple.getBaseType();
+ while (!Constants.NS_SCHEMA_XSD.equals(base.getNamespace()))
+ base = base.getBaseType();
+
+ if (!(base instanceof XSSimpleTypeDefinition))
+ throw new WSException("Expected base type to be a simple type");
+
+ return new QName(base.getNamespace(), base.getName());
+ }
+
+ /**
+ * For the basic xsd types, patch prefix and ns uri
+ * @param qname
+ * @return
+ */
+ public QName patchXSDQName(QName qname)
+ {
+ if (qname == null)
+ return null;
+ return new QName(Constants.NS_SCHEMA_XSD, qname.getLocalPart(),
Constants.PREFIX_XSD);
+ }
+
+ /**
+ * Given a XSTypeDefinition and the QName for the element,
+ * create a XSElementDeclaration object
+ * @param xmlName Name of the element
+ * @param xst Type of the element
+ * @return XSElementDeclaration
+ */
+ public XSElementDeclaration createXSElementDeclaration(QName xmlName, XSTypeDefinition
xst)
+ {
+ String name = xmlName.getLocalPart();
+ String ns = xmlName.getNamespaceURI();
+ JBossXSElementDeclaration jbel = new JBossXSElementDeclaration(name, ns);
+ jbel.setTypeDefinition(xst);
+ jbel.setScope(XSConstants.SCOPE_GLOBAL);
+ return jbel;
+ }
+
+ /**
+ * Create a QName given a Simple Type
+ * @param xs
+ * @return qname
+ */
+ public static QName createQNameFromXSSimpleType(XSSimpleTypeDefinition xs)
+ {
+ String nsuri = xs.getNamespace();
+ String localpart = xs.getName();
+ if (xsNS.equals(nsuri))
+ return new QName(nsuri, localpart, Constants.PREFIX_XSD);
+ else return new QName(nsuri, localpart);
+ }
+
+ /**
+ * Return typemapping override for tools if any
+ *
+ * @param javaType
+ * @return
+ */
+ public QName getToolsOverrideInTypeMapping(Class javaType)
+ {
+ return toolsTypeMappingOverride.get(javaType);
+ }
+
+ /**
+ * Check if a global element exists
+ * @param xmlName QName of the element that needs to be checked
+ * @param xsmodel Schema model that is passed
+ * @return
+ */
+ public boolean hasGlobalElement(QName xmlName, XSModel xsmodel)
+ {
+ if (xmlName == null)
+ throw new IllegalArgumentException("xmlName is null");
+ if (xsmodel == null)
+ throw new IllegalArgumentException("XSModel is null");
+ boolean bool = false;
+ String name = xmlName.getLocalPart();
+ if (name == null)
+ throw new IllegalArgumentException("xmlName has a null name");
+ String ns = xmlName.getNamespaceURI();
+ if (ns == null)
+ throw new IllegalArgumentException("xmlName has a null namespace");
+ if (xsmodel.getElementDeclaration(name, ns) != null)
+ bool = true;
+ return bool;
+ }
+
+ /**
+ * Check if a Complex Type exists
+ * @param xmlType QName of the Complex Type that needs to be checked
+ * @param xsmodel Schema model that is passed
+ * @return
+ */
+ public boolean hasComplexTypeDefinition(QName xmlType, URL xsdLocation)
+ {
+ if (xsdLocation == null)
+ throw new IllegalArgumentException("xsdLocation is null");
+ XSModel xsmodel = parseSchema(xsdLocation);
+ return this.hasComplexTypeDefinition(xmlType, xsmodel);
+ }
+
+ /**
+ * Check if a Global Element exists
+ * @param xmlType QName of the global element that needs to be checked
+ * @param xsmodel Schema model that is passed
+ * @return
+ */
+ public boolean hasGlobalElement(QName xmlName, URL xsdLocation)
+ {
+ if (xmlName == null)
+ throw new IllegalArgumentException("xmlName is null");
+ if (xsdLocation == null)
+ throw new IllegalArgumentException("xsdLocation is null");
+ XSModel xsmodel = parseSchema(xsdLocation);
+ boolean bool = false;
+ String name = xmlName.getLocalPart();
+ if (name == null)
+ throw new IllegalArgumentException("xmlName has a null name");
+ String ns = xmlName.getNamespaceURI();
+ if (ns == null)
+ throw new IllegalArgumentException("xmlName has a null namespace");
+ if (xsmodel.getElementDeclaration(name, ns) != null)
+ bool = true;
+ return bool;
+ }
+
+ /**
+ * Check if a Complex Type exists
+ * @param xmlType QName of the Complex Type that needs to be checked
+ * @param xsmodel Schema model that is passed
+ * @return
+ */
+ public boolean hasComplexTypeDefinition(QName xmlType, XSModel xsmodel)
+ {
+ if (xmlType == null)
+ throw new IllegalArgumentException("xmlType is null");
+ if (xsmodel == null)
+ throw new IllegalArgumentException("XSModel is null");
+ boolean bool = false;
+ String name = xmlType.getLocalPart();
+ if (name == null)
+ throw new IllegalArgumentException("xmlName has a null name");
+ String ns = xmlType.getNamespaceURI();
+ if (ns == null)
+ throw new IllegalArgumentException("xmlName has a null namespace");
+ if (xsmodel.getTypeDefinition(name, ns) != null)
+ bool = true;
+ return bool;
+ }
+
+ /**
+ * Get formatted string for the qname representing the xstype
+ * @param xstype
+ * @return
+ */
+ public String getFormattedString(XSTypeDefinition xstype)
+ {
+ String ns = xstype.getNamespace();
+ String name = xstype.getName();
+ if (!ns.equals(xsNS))
+ name = getPrefix(ns) + ":" + name;
+
+ return name;
+ }
+
+ /**
+ * Get a QName for a xs type
+ * @param xstype
+ * @return
+ */
+ public QName getQName(XSTypeDefinition xstype)
+ {
+ String prefix = null;
+ String ns = xstype.getNamespace();
+ String name = xstype.getName();
+ if (!ns.equals(xsNS))
+ prefix = Constants.PREFIX_TNS;
+ else prefix = Constants.PREFIX_XSD;
+
+ return new QName(ns, name, prefix);
+ }
+
+ /**
+ * Get a schema basic type
+ * TODO: Migrate this off of the Xerces Impl
+ * @param localpart
+ * @return
+ */
+ public JBossXSTypeDefinition getSchemaBasicType(String localpart)
+ {
+ JBossXSTypeDefinition xt = null;
+ /**
+ * Special case: xs:anyType
+ */
+ if ("anyType".equals(localpart))
+ {
+ JBossXSComplexTypeDefinition ct = new JBossXSComplexTypeDefinition(localpart,
Constants.NS_SCHEMA_XSD);
+ ct.setContentType(XSComplexTypeDefinition.CONTENTTYPE_EMPTY);
+ xt = ct;
+ }
+ else
+ {
+ XSSimpleTypeDefinition xstype = (new
SchemaDVFactoryImpl()).getBuiltInType(localpart);
+ xt = new JBossXSSimpleTypeDefinition(xstype);
+
+ }
+ return xt;
+ }
+
+ /**
+ * Get an instance of XSLoader that is capable of
+ * parsing schema files
+ *
+ * @return
+ */
+ public XSLoader getXSLoader()
+ {
+ XMLSchemaLoader xsloader = new XMLSchemaLoader();
+ JBossXSErrorHandler eh = new JBossXSErrorHandler();
+ xsloader.setErrorHandler(eh);
+ return xsloader;
+ }
+
+ /**
+ * Get an instance of XSLoader that is capable of
+ * parsing schema files
+ * @param xeh XML Error handler
+ * @param xer XML Entity Resolver
+ * @return
+ */
+ public XSLoader getXSLoader(XMLErrorHandler xeh, XMLEntityResolver xer)
+ {
+ XMLSchemaLoader xsloader = new XMLSchemaLoader();
+ xsloader.setEntityResolver(xer);
+ xsloader.setErrorHandler(xeh);
+ return xsloader;
+ }
+
+ /**
+ * Given a schema file, generate a schema model
+ * @param schemaLoc java.net.URL object to the schema file
+ * @return schema model
+ */
+ public XSModel parseSchema(URL schemaLoc)
+ {
+ return parseSchema(schemaLoc.toExternalForm());
+ }
+
+ /**
+ * Given a schema file, generate a schema model
+ * @param schemaLoc string representation to the location of schema
+ * @return schema model
+ */
+ public XSModel parseSchema(String schemaLoc)
+ {
+ XSLoader xsloader = getXSLoader();
+ XSModel xsModel = xsloader.loadURI(schemaLoc);
+ if (xsModel == null)
+ throw new WSException("Cannot parse schema: " + schemaLoc);
+ return xsModel;
+ }
+
+ /**
+ * Given a list of schema locations, parse and
+ * provide a Xerces XSModel
+ *
+ * @param locations
+ * @return
+ */
+ public XSModel parseSchema(List<String> locations)
+ {
+ JBossXSStringList slist = new JBossXSStringList(locations);
+ XSLoader xsloader = getXSLoader();
+ return xsloader.loadURIList(slist);
+ }
+
+ /**
+ * Checks if the XSModel is empty
+ * @param xsmodel
+ * @return true (if empty) and false (if not empty)
+ */
+ public boolean isEmptySchema(XSModel xsmodel)
+ {
+ if (xsmodel == null)
+ return true;
+ String targetNS = getTargetNamespace(xsmodel);
+ if (targetNS == null)
+ throw new WSException("Target Namespace of xsmodel is null");
+ XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION,
targetNS);
+ XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION,
targetNS);
+
+ if (tmap != null && tmap.getLength() > 0)
+ return false;
+ if (emap != null && emap.getLength() > 0)
+ return false;
+
+ return true;
+ }
+
+ /**
+ * Checks if the XSModel is empty given a namespace
+ * @param xsmodel Schema Model to check
+ * @param namespace namespace to check components for
+ * @return true (if empty) and false (if not empty)
+ */
+ public boolean isEmptySchema(XSModel xsmodel, String namespace)
+ {
+ if (xsmodel == null)
+ return true;
+ if (namespace == null)
+ throw new WSException("Target Namespace of xsmodel is null");
+ XSNamedMap tmap = xsmodel.getComponentsByNamespace(XSConstants.TYPE_DEFINITION,
namespace);
+ XSNamedMap emap = xsmodel.getComponentsByNamespace(XSConstants.ELEMENT_DECLARATION,
namespace);
+
+ if (tmap != null && tmap.getLength() > 0)
+ return false;
+ if (emap != null && emap.getLength() > 0)
+ return false;
+
+ return true;
+ }
+
+ /**
+ * Get the schema definitions as a String
+ * @param targetNS The Target Namespace
+ * @return
+ */
+ public static String getSchemaDefinitions(String targetNS)
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(" targetNamespace='" + targetNS + "'");
+ buffer.append(" xmlns='" + Constants.NS_SCHEMA_XSD +
"'");
+ buffer.append(" xmlns:" + Constants.PREFIX_SOAP11_ENC +
"='" + Constants.URI_SOAP11_ENC + "'");
+ buffer.append(" xmlns:" + Constants.PREFIX_TNS + "='" +
targetNS + "'");
+ //buffer.append(" xmlns:" + WSDLConstants.PREFIX_XSD + "='"
+ WSDLConstants.NS_SCHEMA_XSD + "'");
+ buffer.append(" xmlns:" + Constants.PREFIX_XSI + "='" +
Constants.NS_SCHEMA_XSI + "'");
+ buffer.append(">");
+ return buffer.toString();
+ }
+
+ /** Get the temp file for a given namespace
+ */
+ public static File getSchemaTempFile(String targetNS) throws IOException
+ {
+ if (targetNS.length() == 0)
+ throw new IllegalArgumentException("Invalid null target namespace");
+
+ String fname = targetNS;
+ if (fname.indexOf("://") > 0)
+ fname = fname.substring(fname.indexOf("://") + 3);
+
+ File tmpdir = null;
+ try
+ {
+ ServerConfigFactory factory = ServerConfigFactory.getInstance();
+ ServerConfig serverConfig = factory.getServerConfig();
+ tmpdir = serverConfig.getServerTempDir();
+ tmpdir = new File(tmpdir.getCanonicalPath() + "/jbossws");
+ tmpdir.mkdirs();
+ }
+ catch (Throwable th)
+ {
+ // ignore if the server config cannot be found
+ // this would be the case if we are on the client side
+ }
+
+ fname = fname.replace('/', '_');
+ fname = fname.replace(':', '_');
+ File file = File.createTempFile("JBossWS_" + fname, ".xsd",
tmpdir);
+ return file;
+ }
+
+ /**
+ * Get the TargetNamespace from the schema model
+ */
+ public static String getTargetNamespace(XSModel xsmodel)
+ {
+ if (xsmodel == null)
+ throw new IllegalArgumentException("Illegal Null Argument: xsmodel");
+ String targetNS = null;
+ StringList slist = xsmodel.getNamespaces();
+ int len = slist != null ? slist.getLength() : 0;
+ for (int i = 0; i < len; i++)
+ {
+ String ns = slist.item(i);
+ if (Constants.NS_SCHEMA_XSD.equals(ns))
+ continue;
+ targetNS = ns;
+ break;
+ }
+ return targetNS;
+ }
+
+ private String getPrefix(String namespace)
+ {
+ if (Constants.URI_SOAP11_ENC.equals(namespace))
+ return Constants.PREFIX_SOAP11_ENC;
+ else if (Constants.NS_SOAP11_ENV.equals(namespace) ||
Constants.NS_SOAP12_ENV.equals(namespace))
+ return Constants.PREFIX_ENV;
+
+ // Fall back to target namespace even though this is incorrect
+ return Constants.PREFIX_TNS;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/XSDWriter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/XSDWriter.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/XSDWriter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,118 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.metadata.wsdl.xsd;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.net.URL;
-
-import org.apache.xerces.xs.XSModel;
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.WSSchemaUtils;
-
-/**
- * XML Schema File Writer
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- */
-public class XSDWriter
-{
- // provide logging
- protected static final Logger log = Logger.getLogger(XSDWriter.class);
-
- protected WSDLDefinitions wsdl = null;
-
- protected SchemaUtils schemautils = SchemaUtils.getInstance();
-
- protected WSSchemaUtils sutils = WSSchemaUtils.getInstance(null, null);
-
- public void writeXSD(Writer writer, XSModel xsmodel, WSDLDefinitions wsdl)
- {
- if (xsmodel == null)
- throw new IllegalArgumentException("xsmodel is NULL");
-
- this.wsdl = wsdl;
-
- if (schemautils.isEmptySchema(xsmodel)) return;
- }
-
- /**
- * Serialize the schema into a temp file
- * @param xsmodel Schema model
- * @param ns Target Namespace
- * @return URL of the temp file where the schema exists
- * @throws IOException
- */
- public URL serialize( XSModel xsmodel, String ns)
- throws IOException
- {
- if(ns == null)
- throw new IllegalArgumentException("Illegal Null Argument:ns");
- String xsdString = "";
- if(xsmodel instanceof JBossXSModel)
- {
- JBossXSModel jbxs = (JBossXSModel)xsmodel;
- xsdString = jbxs.serialize();
- }
- else
- {
- // Serialize XSD model
- StringWriter strwr = new StringWriter();
- sutils.serialize(xsmodel, strwr);
- xsdString = strwr.toString();
- }
-
- log.trace("serialize:\n" + xsdString);
-
- // Write updated xsd file
- File xsdFile = SchemaUtils.getSchemaTempFile(ns);
- FileWriter writer = new FileWriter(xsdFile);
- writer.write(xsdString);
- writer.close();
-
- return xsdFile.toURL();
- }
-
- /**
- * Serialize the schema into a output stream
- * @param xsmodel Schema model
- * @param ns Target Namespace
- * @param os OutputStream to write into
- * @throws IOException
- */
- public void serialize( XSModel xsmodel, String ns, OutputStream os)
- throws IOException
- {
- // Serialize XSD model
- StringWriter strwr = new StringWriter();
- sutils.serialize(xsmodel, strwr);
- String xsdString = strwr.toString();
- log.trace("serialize:" + xsdString);
-
- os.write(xsdString.getBytes());
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/XSDWriter.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/XSDWriter.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/XSDWriter.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/XSDWriter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,118 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.metadata.wsdl.xsd;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.URL;
+
+import org.apache.xerces.xs.XSModel;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.WSSchemaUtils;
+
+/**
+ * XML Schema File Writer
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ */
+public class XSDWriter
+{
+ // provide logging
+ protected static final Logger log = Logger.getLogger(XSDWriter.class);
+
+ protected WSDLDefinitions wsdl = null;
+
+ protected SchemaUtils schemautils = SchemaUtils.getInstance();
+
+ protected WSSchemaUtils sutils = WSSchemaUtils.getInstance(null, null);
+
+ public void writeXSD(Writer writer, XSModel xsmodel, WSDLDefinitions wsdl)
+ {
+ if (xsmodel == null)
+ throw new IllegalArgumentException("xsmodel is NULL");
+
+ this.wsdl = wsdl;
+
+ if (schemautils.isEmptySchema(xsmodel)) return;
+ }
+
+ /**
+ * Serialize the schema into a temp file
+ * @param xsmodel Schema model
+ * @param ns Target Namespace
+ * @return URL of the temp file where the schema exists
+ * @throws IOException
+ */
+ public URL serialize( XSModel xsmodel, String ns)
+ throws IOException
+ {
+ if(ns == null)
+ throw new IllegalArgumentException("Illegal Null Argument:ns");
+ String xsdString = "";
+ if(xsmodel instanceof JBossXSModel)
+ {
+ JBossXSModel jbxs = (JBossXSModel)xsmodel;
+ xsdString = jbxs.serialize();
+ }
+ else
+ {
+ // Serialize XSD model
+ StringWriter strwr = new StringWriter();
+ sutils.serialize(xsmodel, strwr);
+ xsdString = strwr.toString();
+ }
+
+ log.trace("serialize:\n" + xsdString);
+
+ // Write updated xsd file
+ File xsdFile = SchemaUtils.getSchemaTempFile(ns);
+ FileWriter writer = new FileWriter(xsdFile);
+ writer.write(xsdString);
+ writer.close();
+
+ return xsdFile.toURL();
+ }
+
+ /**
+ * Serialize the schema into a output stream
+ * @param xsmodel Schema model
+ * @param ns Target Namespace
+ * @param os OutputStream to write into
+ * @throws IOException
+ */
+ public void serialize( XSModel xsmodel, String ns, OutputStream os)
+ throws IOException
+ {
+ // Serialize XSD model
+ StringWriter strwr = new StringWriter();
+ sutils.serialize(xsmodel, strwr);
+ String xsdString = strwr.toString();
+ log.trace("serialize:" + xsdString);
+
+ os.write(xsdString.getBytes());
+ }
+}
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -41,12 +41,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
@@ -55,9 +50,14 @@
import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.jaxws.core.BindingProviderImpl;
import org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.utils.JavaUtils;
/** An implementation handles invocations on the endpoint
*
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointPublisher.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,11 +35,11 @@
import javax.servlet.Servlet;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.core.utils.JavaUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,9 +36,9 @@
import javax.xml.rpc.JAXRPCException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.utils.ObjectNameFactory;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.utils.ObjectNameFactory;
/**
* A servlet that is installed for every web service endpoint.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/HandlerDelegate.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/HandlerDelegate.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/HandlerDelegate.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
/** An implementation of handles invocations on the endpoint
*
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -37,20 +37,20 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPBinding;
import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.SOAPElementImpl;
import org.jboss.ws.core.soap.SOAPElementWriter;
import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.extras.xop.XOPContext;
import org.w3c.dom.Document;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,15 +27,15 @@
import javax.management.ObjectName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.metadata.builder.jaxrpc.JAXRPCDeployment;
import org.jboss.ws.core.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
import org.jboss.ws.core.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
import org.jboss.ws.core.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
/**
* The POJO deployer for web service endpoints. This Deployer is already decoupled from
the target
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInfo.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,12 +25,12 @@
import javax.management.ObjectName;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedMessageDrivenMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedSessionMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedSessionMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,12 +31,12 @@
import javax.xml.rpc.soap.SOAPFaultException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.ServletEndpointContextImpl;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -56,19 +56,19 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.ThreadLocalAssociation;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
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.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPConnectionImpl;
import org.jboss.ws.extras.addressing.AddressingConstantsImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpointManagerMBean.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,8 +26,8 @@
import javax.management.ObjectName;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.utils.ObjectNameFactory;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.utils.ObjectNameFactory;
/**
* MBean interface.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -40,13 +40,13 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.tools.wsdl.WSDLWriter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLRequestHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,8 +29,8 @@
import java.net.URL;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/EndpointInfo.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/EndpointInfo.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/EndpointInfo.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,7 +28,7 @@
import java.util.Map;
import java.util.Properties;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
/** A wrapper object that associates the target address with some metadata
*
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/JAXWSPayloadBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,9 +34,8 @@
import javax.xml.soap.SOAPHeader;
import javax.xml.transform.stream.StreamSource;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -41,12 +41,12 @@
import javax.xml.ws.Service.Mode;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.soap.attachment.MimeConstants;
import org.jboss.ws.core.soap.attachment.MultipartRelatedDecoder;
+import org.jboss.ws.core.utils.IOUtils;
/**
* MessageFactory implementation
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/NameImpl.java (from
rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/NameImpl.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/NameImpl.java 2006-12-06
22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/NameImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,127 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.soap;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+
+/**
+ * An implementation of a Name
+ * <p/>
+ * At this time of writing, the spec does not say anything about null values.
+ * We assume emty string for any null value.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 01-June-2004
+ */
+public class NameImpl implements Name
+{
+ private QName qname;
+
+ public NameImpl(QName qname)
+ {
+ this.qname = qname;
+ }
+
+ public NameImpl(String local)
+ {
+ qname = new QName(local);
+ }
+
+ public NameImpl(String local, String prefix, String uri)
+ {
+ if (prefix != null)
+ qname = new QName(uri, local, prefix);
+ else
+ qname = new QName(uri, local);
+ }
+
+ /**
+ * Gets the local name part of the XML name that this Name object represents.
+ *
+ * @return a string giving the local name
+ */
+ public String getLocalName()
+ {
+ return qname.getLocalPart();
+ }
+
+ /**
+ * Returns the prefix that was specified when this Name object was initialized.
+ * This prefix is associated with the namespace for the XML name that this Name object
represents.
+ *
+ * @return the prefix as a string
+ */
+ public String getPrefix()
+ {
+ return qname.getPrefix();
+ }
+
+ /**
+ * Gets the namespace-qualified name of the XML name that this Name object
represents.
+ *
+ * @return the namespace-qualified name as a string
+ */
+ public String getQualifiedName()
+ {
+ String prefix = getPrefix();
+ if (prefix.length() > 0)
+ return prefix + ":" + qname.getLocalPart();
+ else
+ return qname.getLocalPart();
+ }
+
+ /**
+ * Returns the URI of the namespace for the XML name that this Name object
represents.
+ *
+ * @return the URI as a string
+ */
+ public String getURI()
+ {
+ return qname.getNamespaceURI();
+ }
+
+ public int hashCode()
+ {
+ return qname.hashCode();
+ }
+
+ public boolean equals(Object obj)
+ {
+ if (!(obj instanceof NameImpl)) return false;
+ if (obj == this) return true;
+ NameImpl other = (NameImpl)obj;
+ return qname.equals(other.qname);
+ }
+
+ public QName toQName()
+ {
+ return qname;
+ }
+
+ public String toString()
+ {
+ return qname.toString();
+ }
+}
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/NodeImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/NodeImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/NodeImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,9 +31,9 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,11 +35,10 @@
import javax.xml.soap.SOAPHeader;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderStax.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,7 +36,6 @@
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.jboss.ws.common.NameImpl;
import org.w3c.dom.Element;
import com.ctc.wstx.stax.WstxInputFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyElementMessage.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import javax.xml.soap.Name;
import javax.xml.soap.SOAPBodyElement;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMWriter;
/**
* An abstract implemenation of the SOAPBodyElement
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -46,13 +46,12 @@
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -39,15 +39,8 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.utils.MimeUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.DeserializerFactoryBase;
@@ -57,7 +50,13 @@
import org.jboss.ws.core.binding.SerializerFactoryBase;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.core.utils.MimeUtils;
import org.jboss.ws.extras.xop.XOPContext;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPDocument.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPDocument.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPDocument.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.core.soap;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -39,10 +39,9 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementWriter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementWriter.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPElementWriter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,9 +33,9 @@
import javax.xml.soap.SOAPEnvelope;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
/**
* Writes a SAAJ elements to an output stream.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPEnvelopeImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,8 +36,7 @@
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
+import org.jboss.ws.Constants;
import org.w3c.dom.Document;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,7 +29,6 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
-import org.jboss.ws.common.NameImpl;
import org.jboss.ws.core.binding.SOAPElementDeserializer;
import org.w3c.dom.Element;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFaultImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,11 +33,10 @@
import javax.xml.soap.SOAPFault;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.xb.QNameBuilder;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPHeaderElementImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPHeaderElementImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPHeaderElementImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,7 +35,7 @@
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPHeaderElement;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
* An object representing the contents in the SOAP header part of the SOAP envelope.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,10 +35,10 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
/**
* Derive the operation meta data from incomming SOAP message
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -40,9 +40,9 @@
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.soap.attachment.AttachmentPartImpl;
import org.jboss.ws.core.soap.attachment.CIDGenerator;
import org.jboss.ws.core.soap.attachment.MimeConstants;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -40,7 +40,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/UnboundHeader.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/UnboundHeader.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/UnboundHeader.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,8 +26,8 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
/**
* Represents an unbound SOAPHeaderElement
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/ByteArrayContentHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/ByteArrayContentHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/ByteArrayContentHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,8 +32,8 @@
import javax.activation.DataHandler;
import javax.activation.DataSource;
-import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.common.utils.MimeUtils;
+import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.core.utils.MimeUtils;
/**
* @author Heiko Braun <heiko.braun(a)jboss.com>
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import java.net.URLEncoder;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.UUIDGenerator;
+import org.jboss.ws.core.utils.UUIDGenerator;
/**
* A common CID generator
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/MultipartRelatedDecoder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -38,7 +38,7 @@
import javax.mail.internet.ParseException;
import javax.xml.soap.AttachmentPart;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
/**
* Abstract MutilPartRelatedDecoder decodes a mime multipart/related stream.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,8 +32,8 @@
import javax.activation.DataSource;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.IOUtils;
/**
* A datasource which offloads large attachments to disk.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/XmlDataContentHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/XmlDataContentHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/attachment/XmlDataContentHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import javax.activation.DataSource;
import javax.xml.transform.stream.StreamSource;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.core.utils.IOUtils;
/**
* <code>XmlDataContentHandler</code> is a JAF content handler that provides
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils (from rev 1583,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils)
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/DOMUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,506 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.utils;
-
-// $Id$
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.Text;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * DOM2 utilites
- *
- * @author Thomas.Diesler(a)jboss.org
- * @version $Revision$
- */
-public final class DOMUtils
-{
- private static Logger log = Logger.getLogger(DOMUtils.class);
-
- // All elements created by the same thread are created by the same builder and belong
to the same doc
- private static ThreadLocal documentThreadLocal = new ThreadLocal();
- private static ThreadLocal builderThreadLocal = new ThreadLocal() {
- protected Object initialValue() {
- try
- {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- factory.setNamespaceAware(true);
- DocumentBuilder builder = factory.newDocumentBuilder();
- builder.setEntityResolver(new JBossEntityResolver());
- return builder;
- }
- catch (ParserConfigurationException e)
- {
- throw new RuntimeException("Failed to create DocumentBuilder",
e);
- }
- }
- };
-
- // Hide the constructor
- private DOMUtils()
- {
- }
-
- /** Initialise the the DocumentBuilder
- */
- public static DocumentBuilder getDocumentBuilder()
- {
- DocumentBuilder builder = (DocumentBuilder)builderThreadLocal.get();
- return builder;
- }
-
- /** Parse the given XML string and return the root Element
- */
- public static Element parse(String xmlString) throws IOException
- {
- try
- {
- return parse(new
ByteArrayInputStream(xmlString.getBytes("UTF-8")));
- }
- catch (IOException e)
- {
- log.error("Cannot parse: " + xmlString);
- throw e;
- }
- }
-
- /** Parse the given XML stream and return the root Element
- */
- public static Element parse(InputStream xmlStream) throws IOException
- {
- try
- {
- Document doc = getDocumentBuilder().parse(xmlStream);
- Element root = doc.getDocumentElement();
- return root;
- }
- catch (SAXException e)
- {
- throw new IOException(e.toString());
- }
- }
-
- /** Parse the given input source and return the root Element
- */
- public static Element parse(InputSource source) throws IOException
- {
- try
- {
- Document doc = getDocumentBuilder().parse(source);
- Element root = doc.getDocumentElement();
- return root;
- }
- catch (SAXException e)
- {
- throw new IOException(e.toString());
- }
- }
-
- /** Create an Element for a given name
- */
- public static Element createElement(String localPart)
- {
- Document doc = getOwnerDocument();
- log.trace("createElement {}" + localPart);
- return doc.createElement(localPart);
- }
-
- /** Create an Element for a given name and prefix
- */
- public static Element createElement(String localPart, String prefix)
- {
- Document doc = getOwnerDocument();
- log.trace("createElement {}" + prefix + ":" + localPart);
- return doc.createElement(prefix + ":" + localPart);
- }
-
- /** Create an Element for a given name, prefix and uri
- */
- public static Element createElement(String localPart, String prefix, String uri)
- {
- Document doc = getOwnerDocument();
- if (prefix == null || prefix.length() == 0)
- {
- log.trace("createElement {" + uri + "}" + localPart);
- return doc.createElementNS(uri, localPart);
- }
- else
- {
- log.trace("createElement {" + uri + "}" + prefix +
":" + localPart);
- return doc.createElementNS(uri, prefix + ":" + localPart);
- }
- }
-
- /** Create an Element for a given QName
- */
- public static Element createElement(QName qname)
- {
- return createElement(qname.getLocalPart(), qname.getPrefix(),
qname.getNamespaceURI());
- }
-
- /** Create a org.w3c.dom.Text node
- */
- public static Text createTextNode(String value)
- {
- Document doc = getOwnerDocument();
- return doc.createTextNode(value);
- }
-
- /** Get the qname of the given node.
- */
- public static QName getElementQName(Element el)
- {
- String qualifiedName = el.getNodeName();
- return resolveQName(el, qualifiedName);
- }
-
- /** Transform the giveen qualified name into a QName
- */
- public static QName resolveQName(Element el, String qualifiedName)
- {
- QName qname;
- String prefix = "";
- String namespaceURI = "";
- String localPart = qualifiedName;
-
- int colIndex = qualifiedName.indexOf(":");
- if (colIndex > 0)
- {
- prefix = qualifiedName.substring(0, colIndex);
- localPart = qualifiedName.substring(colIndex + 1);
-
- if ("xmlns".equals(prefix))
- {
- namespaceURI = "URI:XML_PREDEFINED_NAMESPACE";
- }
- else
- {
- Element nsElement = el;
- while (namespaceURI.equals("") && nsElement != null)
- {
- namespaceURI = nsElement.getAttribute("xmlns:" + prefix);
- if (namespaceURI.equals(""))
- nsElement = getParentElement(nsElement);
- }
- }
-
- if (namespaceURI.equals(""))
- throw new IllegalArgumentException("Cannot find namespace uri for:
" + qualifiedName);
- }
-
- qname = new QName(namespaceURI, localPart, prefix);
- return qname;
- }
-
- /** Get the value from the given attribute
- *
- * @return null if the attribute value is empty or the attribute is not present
- */
- public static String getAttributeValue(Element el, String attrName)
- {
- return getAttributeValue(el, new QName(attrName));
- }
-
- /** Get the value from the given attribute
- *
- * @return null if the attribute value is empty or the attribute is not present
- */
- public static String getAttributeValue(Element el, QName attrName)
- {
- String attr = null;
- if ("".equals(attrName.getNamespaceURI()))
- attr = el.getAttribute(attrName.getLocalPart());
- else attr = el.getAttributeNS(attrName.getNamespaceURI(),
attrName.getLocalPart());
-
- if ("".equals(attr))
- attr = null;
-
- return attr;
- }
-
- /** Get the qname value from the given attribute
- */
- public static QName getAttributeValueAsQName(Element el, String attrName)
- {
- return getAttributeValueAsQName(el, new QName(attrName));
-
- }
-
- /** Get the qname value from the given attribute
- */
- public static QName getAttributeValueAsQName(Element el, QName attrName)
- {
- QName qname = null;
-
- String qualifiedName = getAttributeValue(el, attrName);
- if (qualifiedName != null)
- {
- qname = resolveQName(el, qualifiedName);
- }
-
- return qname;
- }
-
- /** Get the boolean value from the given attribute
- */
- public static boolean getAttributeValueAsBoolean(Element el, String attrName)
- {
- return getAttributeValueAsBoolean(el, new QName(attrName));
- }
-
- /** Get the boolean value from the given attribute
- */
- public static boolean getAttributeValueAsBoolean(Element el, QName attrName)
- {
- String attrVal = getAttributeValue(el, attrName);
- boolean ret = "true".equalsIgnoreCase(attrVal) ||
"1".equalsIgnoreCase(attrVal);
- return ret;
- }
-
- /** Get the integer value from the given attribute
- */
- public static Integer getAttributeValueAsInteger(Element el, String attrName)
- {
- return getAttributeValueAsInteger(el, new QName(attrName));
- }
-
- /** Get the integer value from the given attribute
- */
- public static Integer getAttributeValueAsInteger(Element el, QName attrName)
- {
- String attrVal = getAttributeValue(el, attrName);
- return (attrVal != null ? new Integer(attrVal) : null);
- }
-
- /** Get the attributes as Map<QName, String>
- */
- public static Map getAttributes(Element el)
- {
- Map attmap = new HashMap();
- NamedNodeMap attribs = el.getAttributes();
- for (int i = 0; i < attribs.getLength(); i++)
- {
- Attr attr = (Attr)attribs.item(i);
- String name = attr.getName();
- QName qname = resolveQName(el, name);
- String value = attr.getNodeValue();
- attmap.put(qname, value);
- }
- return attmap;
- }
-
- /** Copy attributes between elements
- */
- public static void copyAttributes(Element destElement, Element srcElement)
- {
- NamedNodeMap attribs = srcElement.getAttributes();
- for (int i = 0; i < attribs.getLength(); i++)
- {
- Attr attr = (Attr)attribs.item(i);
- String uri = attr.getNamespaceURI();
- String qname = attr.getName();
- String value = attr.getNodeValue();
-
- // Prevent DOMException: NAMESPACE_ERR: An attempt is made to create or
- // change an object in a way which is incorrect with regard to namespaces.
- if (uri == null && qname.startsWith("xmlns"))
- {
- log.trace("Ignore attribute: [uri=" + uri + ",qname="
+ qname + ",value=" + value + "]");
- }
- else
- {
- destElement.setAttributeNS(uri, qname, value);
- }
- }
- }
-
- /** True if the node has child elements
- */
- public static boolean hasChildElements(Node node)
- {
- NodeList nlist = node.getChildNodes();
- for (int i = 0; i < nlist.getLength(); i++)
- {
- Node child = nlist.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE)
- return true;
- }
- return false;
- }
-
- /** Gets child elements
- */
- public static Iterator getChildElements(Node node)
- {
- ArrayList list = new ArrayList();
- NodeList nlist = node.getChildNodes();
- for (int i = 0; i < nlist.getLength(); i++)
- {
- Node child = nlist.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE)
- list.add(child);
- }
- return list.iterator();
- }
-
- /** Get the concatenated text content, or null.
- */
- public static String getTextContent(Node node)
- {
- boolean hasTextContent = false;
- StringBuffer buffer = new StringBuffer();
- NodeList nlist = node.getChildNodes();
- for (int i = 0; i < nlist.getLength(); i++)
- {
- Node child = nlist.item(i);
- if (child.getNodeType() == Node.TEXT_NODE)
- {
- buffer.append(child.getNodeValue());
- hasTextContent = true;
- }
- }
- return (hasTextContent ? buffer.toString() : null);
- }
-
- /** Gets the first child element
- */
- public static Element getFirstChildElement(Node node)
- {
- return getFirstChildElementIntern(node, null);
- }
-
- /** Gets the first child element for a given local name without namespace
- */
- public static Element getFirstChildElement(Node node, String nodeName)
- {
- return getFirstChildElementIntern(node, new QName(nodeName));
- }
-
- /** Gets the first child element for a given qname
- */
- public static Element getFirstChildElement(Node node, QName nodeName)
- {
- return getFirstChildElementIntern(node, nodeName);
- }
-
- private static Element getFirstChildElementIntern(Node node, QName nodeName)
- {
- Element childElement = null;
- Iterator it = getChildElementsIntern(node, nodeName);
- if (it.hasNext())
- {
- childElement = (Element)it.next();
- }
- return childElement;
- }
-
- /** Gets the child elements for a given local name without namespace
- */
- public static Iterator getChildElements(Node node, String nodeName)
- {
- return getChildElementsIntern(node, new QName(nodeName));
- }
-
- /** Gets the child element for a given qname
- */
- public static Iterator getChildElements(Node node, QName nodeName)
- {
- return getChildElementsIntern(node, nodeName);
- }
-
- private static Iterator getChildElementsIntern(Node node, QName nodeName)
- {
- ArrayList list = new ArrayList();
- NodeList nlist = node.getChildNodes();
- for (int i = 0; i < nlist.getLength(); i++)
- {
- Node child = nlist.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE)
- {
- if (nodeName == null)
- {
- list.add(child);
- }
- else
- {
- QName qname;
- if (nodeName.getNamespaceURI().length() > 0)
- {
- qname = new QName(child.getNamespaceURI(),
child.getLocalName());
- }
- else
- {
- qname = new QName(child.getLocalName());
- }
- if (qname.equals(nodeName))
- {
- list.add(child);
- }
- }
- }
- }
- return list.iterator();
- }
-
- /** Gets parent element or null if there is none
- */
- public static Element getParentElement(Node node)
- {
- Node parent = node.getParentNode();
- return (parent instanceof Element ? (Element)parent : null);
- }
-
- /** Get the owner document that is associated with the current thread */
- public static Document getOwnerDocument()
- {
- Document doc = (Document)documentThreadLocal.get();
- if (doc == null)
- {
- doc = getDocumentBuilder().newDocument();
- documentThreadLocal.set(doc);
- }
- return doc;
- }
-}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMUtils.java (from
rev 1586, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/DOMUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/DOMUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,506 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * DOM2 utilites
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @version $Revision$
+ */
+public final class DOMUtils
+{
+ private static Logger log = Logger.getLogger(DOMUtils.class);
+
+ // All elements created by the same thread are created by the same builder and belong
to the same doc
+ private static ThreadLocal documentThreadLocal = new ThreadLocal();
+ private static ThreadLocal builderThreadLocal = new ThreadLocal() {
+ protected Object initialValue() {
+ try
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ builder.setEntityResolver(new JBossEntityResolver());
+ return builder;
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new RuntimeException("Failed to create DocumentBuilder",
e);
+ }
+ }
+ };
+
+ // Hide the constructor
+ private DOMUtils()
+ {
+ }
+
+ /** Initialise the the DocumentBuilder
+ */
+ public static DocumentBuilder getDocumentBuilder()
+ {
+ DocumentBuilder builder = (DocumentBuilder)builderThreadLocal.get();
+ return builder;
+ }
+
+ /** Parse the given XML string and return the root Element
+ */
+ public static Element parse(String xmlString) throws IOException
+ {
+ try
+ {
+ return parse(new
ByteArrayInputStream(xmlString.getBytes("UTF-8")));
+ }
+ catch (IOException e)
+ {
+ log.error("Cannot parse: " + xmlString);
+ throw e;
+ }
+ }
+
+ /** Parse the given XML stream and return the root Element
+ */
+ public static Element parse(InputStream xmlStream) throws IOException
+ {
+ try
+ {
+ Document doc = getDocumentBuilder().parse(xmlStream);
+ Element root = doc.getDocumentElement();
+ return root;
+ }
+ catch (SAXException e)
+ {
+ throw new IOException(e.toString());
+ }
+ }
+
+ /** Parse the given input source and return the root Element
+ */
+ public static Element parse(InputSource source) throws IOException
+ {
+ try
+ {
+ Document doc = getDocumentBuilder().parse(source);
+ Element root = doc.getDocumentElement();
+ return root;
+ }
+ catch (SAXException e)
+ {
+ throw new IOException(e.toString());
+ }
+ }
+
+ /** Create an Element for a given name
+ */
+ public static Element createElement(String localPart)
+ {
+ Document doc = getOwnerDocument();
+ log.trace("createElement {}" + localPart);
+ return doc.createElement(localPart);
+ }
+
+ /** Create an Element for a given name and prefix
+ */
+ public static Element createElement(String localPart, String prefix)
+ {
+ Document doc = getOwnerDocument();
+ log.trace("createElement {}" + prefix + ":" + localPart);
+ return doc.createElement(prefix + ":" + localPart);
+ }
+
+ /** Create an Element for a given name, prefix and uri
+ */
+ public static Element createElement(String localPart, String prefix, String uri)
+ {
+ Document doc = getOwnerDocument();
+ if (prefix == null || prefix.length() == 0)
+ {
+ log.trace("createElement {" + uri + "}" + localPart);
+ return doc.createElementNS(uri, localPart);
+ }
+ else
+ {
+ log.trace("createElement {" + uri + "}" + prefix +
":" + localPart);
+ return doc.createElementNS(uri, prefix + ":" + localPart);
+ }
+ }
+
+ /** Create an Element for a given QName
+ */
+ public static Element createElement(QName qname)
+ {
+ return createElement(qname.getLocalPart(), qname.getPrefix(),
qname.getNamespaceURI());
+ }
+
+ /** Create a org.w3c.dom.Text node
+ */
+ public static Text createTextNode(String value)
+ {
+ Document doc = getOwnerDocument();
+ return doc.createTextNode(value);
+ }
+
+ /** Get the qname of the given node.
+ */
+ public static QName getElementQName(Element el)
+ {
+ String qualifiedName = el.getNodeName();
+ return resolveQName(el, qualifiedName);
+ }
+
+ /** Transform the giveen qualified name into a QName
+ */
+ public static QName resolveQName(Element el, String qualifiedName)
+ {
+ QName qname;
+ String prefix = "";
+ String namespaceURI = "";
+ String localPart = qualifiedName;
+
+ int colIndex = qualifiedName.indexOf(":");
+ if (colIndex > 0)
+ {
+ prefix = qualifiedName.substring(0, colIndex);
+ localPart = qualifiedName.substring(colIndex + 1);
+
+ if ("xmlns".equals(prefix))
+ {
+ namespaceURI = "URI:XML_PREDEFINED_NAMESPACE";
+ }
+ else
+ {
+ Element nsElement = el;
+ while (namespaceURI.equals("") && nsElement != null)
+ {
+ namespaceURI = nsElement.getAttribute("xmlns:" + prefix);
+ if (namespaceURI.equals(""))
+ nsElement = getParentElement(nsElement);
+ }
+ }
+
+ if (namespaceURI.equals(""))
+ throw new IllegalArgumentException("Cannot find namespace uri for:
" + qualifiedName);
+ }
+
+ qname = new QName(namespaceURI, localPart, prefix);
+ return qname;
+ }
+
+ /** Get the value from the given attribute
+ *
+ * @return null if the attribute value is empty or the attribute is not present
+ */
+ public static String getAttributeValue(Element el, String attrName)
+ {
+ return getAttributeValue(el, new QName(attrName));
+ }
+
+ /** Get the value from the given attribute
+ *
+ * @return null if the attribute value is empty or the attribute is not present
+ */
+ public static String getAttributeValue(Element el, QName attrName)
+ {
+ String attr = null;
+ if ("".equals(attrName.getNamespaceURI()))
+ attr = el.getAttribute(attrName.getLocalPart());
+ else attr = el.getAttributeNS(attrName.getNamespaceURI(),
attrName.getLocalPart());
+
+ if ("".equals(attr))
+ attr = null;
+
+ return attr;
+ }
+
+ /** Get the qname value from the given attribute
+ */
+ public static QName getAttributeValueAsQName(Element el, String attrName)
+ {
+ return getAttributeValueAsQName(el, new QName(attrName));
+
+ }
+
+ /** Get the qname value from the given attribute
+ */
+ public static QName getAttributeValueAsQName(Element el, QName attrName)
+ {
+ QName qname = null;
+
+ String qualifiedName = getAttributeValue(el, attrName);
+ if (qualifiedName != null)
+ {
+ qname = resolveQName(el, qualifiedName);
+ }
+
+ return qname;
+ }
+
+ /** Get the boolean value from the given attribute
+ */
+ public static boolean getAttributeValueAsBoolean(Element el, String attrName)
+ {
+ return getAttributeValueAsBoolean(el, new QName(attrName));
+ }
+
+ /** Get the boolean value from the given attribute
+ */
+ public static boolean getAttributeValueAsBoolean(Element el, QName attrName)
+ {
+ String attrVal = getAttributeValue(el, attrName);
+ boolean ret = "true".equalsIgnoreCase(attrVal) ||
"1".equalsIgnoreCase(attrVal);
+ return ret;
+ }
+
+ /** Get the integer value from the given attribute
+ */
+ public static Integer getAttributeValueAsInteger(Element el, String attrName)
+ {
+ return getAttributeValueAsInteger(el, new QName(attrName));
+ }
+
+ /** Get the integer value from the given attribute
+ */
+ public static Integer getAttributeValueAsInteger(Element el, QName attrName)
+ {
+ String attrVal = getAttributeValue(el, attrName);
+ return (attrVal != null ? new Integer(attrVal) : null);
+ }
+
+ /** Get the attributes as Map<QName, String>
+ */
+ public static Map getAttributes(Element el)
+ {
+ Map attmap = new HashMap();
+ NamedNodeMap attribs = el.getAttributes();
+ for (int i = 0; i < attribs.getLength(); i++)
+ {
+ Attr attr = (Attr)attribs.item(i);
+ String name = attr.getName();
+ QName qname = resolveQName(el, name);
+ String value = attr.getNodeValue();
+ attmap.put(qname, value);
+ }
+ return attmap;
+ }
+
+ /** Copy attributes between elements
+ */
+ public static void copyAttributes(Element destElement, Element srcElement)
+ {
+ NamedNodeMap attribs = srcElement.getAttributes();
+ for (int i = 0; i < attribs.getLength(); i++)
+ {
+ Attr attr = (Attr)attribs.item(i);
+ String uri = attr.getNamespaceURI();
+ String qname = attr.getName();
+ String value = attr.getNodeValue();
+
+ // Prevent DOMException: NAMESPACE_ERR: An attempt is made to create or
+ // change an object in a way which is incorrect with regard to namespaces.
+ if (uri == null && qname.startsWith("xmlns"))
+ {
+ log.trace("Ignore attribute: [uri=" + uri + ",qname="
+ qname + ",value=" + value + "]");
+ }
+ else
+ {
+ destElement.setAttributeNS(uri, qname, value);
+ }
+ }
+ }
+
+ /** True if the node has child elements
+ */
+ public static boolean hasChildElements(Node node)
+ {
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ return true;
+ }
+ return false;
+ }
+
+ /** Gets child elements
+ */
+ public static Iterator getChildElements(Node node)
+ {
+ ArrayList list = new ArrayList();
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ list.add(child);
+ }
+ return list.iterator();
+ }
+
+ /** Get the concatenated text content, or null.
+ */
+ public static String getTextContent(Node node)
+ {
+ boolean hasTextContent = false;
+ StringBuffer buffer = new StringBuffer();
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.TEXT_NODE)
+ {
+ buffer.append(child.getNodeValue());
+ hasTextContent = true;
+ }
+ }
+ return (hasTextContent ? buffer.toString() : null);
+ }
+
+ /** Gets the first child element
+ */
+ public static Element getFirstChildElement(Node node)
+ {
+ return getFirstChildElementIntern(node, null);
+ }
+
+ /** Gets the first child element for a given local name without namespace
+ */
+ public static Element getFirstChildElement(Node node, String nodeName)
+ {
+ return getFirstChildElementIntern(node, new QName(nodeName));
+ }
+
+ /** Gets the first child element for a given qname
+ */
+ public static Element getFirstChildElement(Node node, QName nodeName)
+ {
+ return getFirstChildElementIntern(node, nodeName);
+ }
+
+ private static Element getFirstChildElementIntern(Node node, QName nodeName)
+ {
+ Element childElement = null;
+ Iterator it = getChildElementsIntern(node, nodeName);
+ if (it.hasNext())
+ {
+ childElement = (Element)it.next();
+ }
+ return childElement;
+ }
+
+ /** Gets the child elements for a given local name without namespace
+ */
+ public static Iterator getChildElements(Node node, String nodeName)
+ {
+ return getChildElementsIntern(node, new QName(nodeName));
+ }
+
+ /** Gets the child element for a given qname
+ */
+ public static Iterator getChildElements(Node node, QName nodeName)
+ {
+ return getChildElementsIntern(node, nodeName);
+ }
+
+ private static Iterator getChildElementsIntern(Node node, QName nodeName)
+ {
+ ArrayList list = new ArrayList();
+ NodeList nlist = node.getChildNodes();
+ for (int i = 0; i < nlist.getLength(); i++)
+ {
+ Node child = nlist.item(i);
+ if (child.getNodeType() == Node.ELEMENT_NODE)
+ {
+ if (nodeName == null)
+ {
+ list.add(child);
+ }
+ else
+ {
+ QName qname;
+ if (nodeName.getNamespaceURI().length() > 0)
+ {
+ qname = new QName(child.getNamespaceURI(),
child.getLocalName());
+ }
+ else
+ {
+ qname = new QName(child.getLocalName());
+ }
+ if (qname.equals(nodeName))
+ {
+ list.add(child);
+ }
+ }
+ }
+ }
+ return list.iterator();
+ }
+
+ /** Gets parent element or null if there is none
+ */
+ public static Element getParentElement(Node node)
+ {
+ Node parent = node.getParentNode();
+ return (parent instanceof Element ? (Element)parent : null);
+ }
+
+ /** Get the owner document that is associated with the current thread */
+ public static Document getOwnerDocument()
+ {
+ Document doc = (Document)documentThreadLocal.get();
+ if (doc == null)
+ {
+ doc = getDocumentBuilder().newDocument();
+ documentThreadLocal.set(doc);
+ }
+ return doc;
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMWriter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/DOMWriter.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMWriter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,587 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.common.utils;
-
-// $Id$
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.jboss.logging.Logger;
-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;
-
-/**
- * Traverse a DOM tree in order to print a document that is parsed.
- *
- * @author Andy Clark, IBM
- * @author Thomas.Diesler(a)jboss.org
- * @version $Revision$
- */
-public class DOMWriter
-{
- private static Logger log = Logger.getLogger(DOMWriter.class);
- // Print writer
- private PrintWriter out;
- // True, if canonical output
- private boolean canonical;
- // True, if pretty printing should be used
- private boolean prettyprint;
- // True, if the XML declaration should be written
- private boolean writeXMLDeclaration;
- // Explicit character set encoding
- private String charsetName;
- // indent for the pretty printer
- private int prettyIndent;
- // True, if the XML declaration has been written
- private boolean wroteXMLDeclaration;
- // The node that started the write
- private Node rootNode;
- // True if we want namespace completion
- private boolean completeNamespaces = true;
-
- public DOMWriter(Writer w)
- {
- this.out = new PrintWriter(w);
- }
-
- public DOMWriter(Writer w, String charsetName)
- {
- this.out = new PrintWriter(w);
- this.charsetName = charsetName;
- this.writeXMLDeclaration = true;
- }
-
- public DOMWriter(OutputStream stream)
- {
- try
- {
- this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
- }
- catch (UnsupportedEncodingException e)
- {
- // ignore, UTF-8 should be available
- }
- }
-
- public DOMWriter(OutputStream stream, String charsetName)
- {
- try
- {
- this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
- this.charsetName = charsetName;
- this.writeXMLDeclaration = true;
- }
- catch (UnsupportedEncodingException e)
- {
- throw new IllegalArgumentException("Unsupported encoding: " +
charsetName);
- }
- }
-
- /**
- * Print a node with explicit prettyprinting.
- * The defaults for all other DOMWriter properties apply.
- *
- */
- public static String printNode(Node node, boolean prettyprint)
- {
- StringWriter strw = new StringWriter();
- new DOMWriter(strw).setPrettyprint(prettyprint).print(node);
- return strw.toString();
- }
-
- public boolean isCanonical()
- {
- return canonical;
- }
-
- /**
- * Set wheter entities should appear in their canonical form.
- * The default is false.
- */
- public DOMWriter setCanonical(boolean canonical)
- {
- this.canonical = canonical;
- return this;
- }
-
- /**
- * Set wheter subelements should have their namespaces completed.
- * Setting this to false may lead to invalid XML fragments.
- * The default is true.
- */
- public DOMWriter setCompleteNamespaces(boolean complete)
- {
- this.completeNamespaces = complete;
- return this;
- }
-
- public boolean isPrettyprint()
- {
- return prettyprint;
- }
-
- /**
- * Set wheter element should be indented.
- * The default is false.
- */
- public DOMWriter setPrettyprint(boolean prettyprint)
- {
- this.prettyprint = prettyprint;
- return this;
- }
-
- public boolean isWriteXMLDeclaration()
- {
- return writeXMLDeclaration;
- }
-
- /**
- * Set wheter the XML declaration should be written.
- * The default is false.
- */
- public DOMWriter setWriteXMLDeclaration(boolean flag)
- {
- this.writeXMLDeclaration = flag;
- return this;
- }
-
- public void print(Node node)
- {
- rootNode = node;
- printInternal(node, false);
- }
-
- private void printInternal(Node node, boolean indentEndMarker)
- {
- // is there anything to do?
- if (node == null)
- {
- return;
- }
-
- // JBAS-2117 - Don't skip the DOCUMENT_NODE
- // if (node instanceof Document) node = ((Document)node).getDocumentElement();
-
- if (wroteXMLDeclaration == false && writeXMLDeclaration == true &&
canonical == false)
- {
- out.print("<?xml version='1.0'");
- if (charsetName != null)
- out.print(" encoding='" + charsetName + "'");
-
- out.print("?>");
- if (prettyprint)
- out.println();
-
- wroteXMLDeclaration = true;
- }
-
- int type = node.getNodeType();
- boolean hasChildNodes = node.getChildNodes().getLength() > 0;
-
- String nodeName = node.getNodeName();
- switch (type)
- {
- // print document
- case Node.DOCUMENT_NODE:
- {
- NodeList children = node.getChildNodes();
- for (int iChild = 0; iChild < children.getLength(); iChild++)
- {
- printInternal(children.item(iChild), false);
- }
- out.flush();
- break;
- }
-
- // print element with attributes
- case Node.ELEMENT_NODE:
- {
- Element element = (Element)node;
- if (prettyprint)
- {
- for (int i = 0; i < prettyIndent; i++)
- {
- out.print(' ');
- }
- prettyIndent++;
- }
-
- out.print('<');
- out.print(nodeName);
-
- Map nsMap = new HashMap();
- String elPrefix = node.getPrefix();
- if (elPrefix != null)
- {
- String nsURI = getNamespaceURI(elPrefix, element, rootNode);
- nsMap.put(elPrefix, nsURI);
- }
-
- Attr attrs[] = sortAttributes(node.getAttributes());
- for (int i = 0; i < attrs.length; i++)
- {
- Attr attr = attrs[i];
- String atPrefix = attr.getPrefix();
- String atName = attr.getNodeName();
- String atValue = normalize(attr.getNodeValue(), canonical);
-
- if (atPrefix != null && !atPrefix.equals("xmlns")
&& !atPrefix.equals("xml"))
- {
- String nsURI = getNamespaceURI(atPrefix, element, rootNode);
- nsMap.put(atPrefix, nsURI);
- // xsi:type='ns1:SubType', xsi:type='xsd:string'
- if (atName.equals(atPrefix + ":type") &&
atValue.indexOf(":") > 0)
- {
- // xsi defined on the envelope
- if (nsURI == null)
- nsURI = getNamespaceURI(atPrefix, element, null);
-
- if
("http://www.w3.org/2001/XMLSchema-instance".equals(nsURI))
- {
- String typePrefix = atValue.substring(0,
atValue.indexOf(":"));
- String typeURI = getNamespaceURI(typePrefix, element, rootNode);
- nsMap.put(typePrefix, typeURI);
- }
- }
- }
-
- out.print(" " + atName + "='" + atValue +
"'");
- }
-
- // Add missing namespace declaration
- if (completeNamespaces)
- {
- Iterator itPrefix = nsMap.keySet().iterator();
- while (itPrefix.hasNext())
- {
- String prefix = (String)itPrefix.next();
- String nsURI = (String)nsMap.get(prefix);
- if (nsURI == null)
- {
- nsURI = getNamespaceURI(prefix, element, null);
- out.print(" xmlns:" + prefix + "='" + nsURI
+ "'");
- }
- }
- }
-
- if (hasChildNodes)
- {
- out.print('>');
- }
-
- // Find out if the end marker is indented
- indentEndMarker = isEndMarkerIndented(node);
-
- if (indentEndMarker)
- {
- out.print('\n');
- }
-
- NodeList childNodes = node.getChildNodes();
- int len = childNodes.getLength();
- for (int i = 0; i < len; i++)
- {
- Node childNode = childNodes.item(i);
- printInternal(childNode, false);
- }
- break;
- }
-
- // handle entity reference nodes
- case Node.ENTITY_REFERENCE_NODE:
- {
- if (canonical)
- {
- NodeList children = node.getChildNodes();
- if (children != null)
- {
- int len = children.getLength();
- for (int i = 0; i < len; i++)
- {
- printInternal(children.item(i), false);
- }
- }
- }
- else
- {
- out.print('&');
- out.print(nodeName);
- out.print(';');
- }
- break;
- }
-
- // print cdata sections
- case Node.CDATA_SECTION_NODE:
- {
- if (canonical)
- {
- out.print(normalize(node.getNodeValue(), canonical));
- }
- else
- {
- out.print("<![CDATA[");
- out.print(node.getNodeValue());
- out.print("]]>");
- }
- break;
- }
-
- // print text
- case Node.TEXT_NODE:
- {
- String text = normalize(node.getNodeValue(), canonical);
- if (prettyprint == false || text.trim().length() > 0)
- out.print(text);
- break;
- }
-
- // print processing instruction
- case Node.PROCESSING_INSTRUCTION_NODE:
- {
- out.print("<?");
- out.print(nodeName);
- String data = node.getNodeValue();
- if (data != null && data.length() > 0)
- {
- out.print(' ');
- out.print(data);
- }
- out.print("?>");
- break;
- }
-
- // print comment
- case Node.COMMENT_NODE:
- {
- for (int i = 0; i < prettyIndent; i++)
- {
- out.print(' ');
- }
-
- out.print("<!--");
- String data = node.getNodeValue();
- if (data != null)
- {
- out.print(data);
- }
- out.print("-->");
-
- if (prettyprint)
- {
- out.print('\n');
- }
-
- break;
- }
- }
-
- if (type == Node.ELEMENT_NODE)
- {
- if (prettyprint)
- prettyIndent--;
-
- if (hasChildNodes == false)
- {
- out.print("/>");
- }
- else
- {
- if (indentEndMarker)
- {
- for (int i = 0; i < prettyIndent; i++)
- {
- out.print(' ');
- }
- }
-
- out.print("</");
- out.print(nodeName);
- out.print('>');
- }
-
- if (prettyIndent > 0)
- {
- out.print('\n');
- }
- }
- out.flush();
- }
-
- private String getNamespaceURI(String prefix, Element element, Node stopNode)
- {
- Node parent = element.getParentNode();
- String nsURI = element.getAttribute("xmlns:" + prefix);
- if (nsURI.length() == 0 && element != stopNode && parent instanceof
Element)
- return getNamespaceURI(prefix, (Element)parent, stopNode);
-
- return (nsURI.length() > 0 ? nsURI : null);
- }
-
- private boolean isEndMarkerIndented(Node node)
- {
- if (prettyprint)
- {
- NodeList childNodes = node.getChildNodes();
- int len = childNodes.getLength();
- for (int i = 0; i < len; i++)
- {
- Node children = childNodes.item(i);
- if (children.getNodeType() == Node.ELEMENT_NODE)
- {
- return true;
- }
- }
- }
- return false;
- }
-
- /** Returns a sorted list of attributes. */
- private Attr[] sortAttributes(NamedNodeMap attrs)
- {
-
- int len = (attrs != null) ? attrs.getLength() : 0;
- Attr array[] = new Attr[len];
- for (int i = 0; i < len; i++)
- {
- array[i] = (Attr)attrs.item(i);
- }
- for (int i = 0; i < len - 1; i++)
- {
- String name = array[i].getNodeName();
- int index = i;
- for (int j = i + 1; j < len; j++)
- {
- String curName = array[j].getNodeName();
- if (curName.compareTo(name) < 0)
- {
- name = curName;
- index = j;
- }
- }
- if (index != i)
- {
- Attr temp = array[i];
- array[i] = array[index];
- array[index] = temp;
- }
- }
- return (array);
- }
-
- /** Normalizes the given string. */
- public static String normalize(String s, boolean canonical)
- {
- StringBuffer str = new StringBuffer();
-
- int len = (s != null) ? s.length() : 0;
- for (int i = 0; i < len; i++)
- {
- char ch = s.charAt(i);
- switch (ch)
- {
- case '<':
- {
- str.append("<");
- break;
- }
- case '>':
- {
- str.append(">");
- break;
- }
- case '&':
- {
- str.append("&");
- break;
- }
- case '"':
- {
- str.append(""");
- break;
- }
- case '\r':
- case '\n':
- {
- if (canonical)
- {
- str.append("&#");
- str.append(Integer.toString(ch));
- str.append(';');
- break;
- }
- // else, default append char
- }
- default:
- {
- str.append(ch);
- }
- }
- }
- return (str.toString());
- }
-}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMWriter.java (from
rev 1586, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/DOMWriter.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/DOMWriter.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/DOMWriter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,587 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.core.utils;
+
+// $Id$
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+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;
+
+/**
+ * Traverse a DOM tree in order to print a document that is parsed.
+ *
+ * @author Andy Clark, IBM
+ * @author Thomas.Diesler(a)jboss.org
+ * @version $Revision$
+ */
+public class DOMWriter
+{
+ private static Logger log = Logger.getLogger(DOMWriter.class);
+ // Print writer
+ private PrintWriter out;
+ // True, if canonical output
+ private boolean canonical;
+ // True, if pretty printing should be used
+ private boolean prettyprint;
+ // True, if the XML declaration should be written
+ private boolean writeXMLDeclaration;
+ // Explicit character set encoding
+ private String charsetName;
+ // indent for the pretty printer
+ private int prettyIndent;
+ // True, if the XML declaration has been written
+ private boolean wroteXMLDeclaration;
+ // The node that started the write
+ private Node rootNode;
+ // True if we want namespace completion
+ private boolean completeNamespaces = true;
+
+ public DOMWriter(Writer w)
+ {
+ this.out = new PrintWriter(w);
+ }
+
+ public DOMWriter(Writer w, String charsetName)
+ {
+ this.out = new PrintWriter(w);
+ this.charsetName = charsetName;
+ this.writeXMLDeclaration = true;
+ }
+
+ public DOMWriter(OutputStream stream)
+ {
+ try
+ {
+ this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ // ignore, UTF-8 should be available
+ }
+ }
+
+ public DOMWriter(OutputStream stream, String charsetName)
+ {
+ try
+ {
+ this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
+ this.charsetName = charsetName;
+ this.writeXMLDeclaration = true;
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ throw new IllegalArgumentException("Unsupported encoding: " +
charsetName);
+ }
+ }
+
+ /**
+ * Print a node with explicit prettyprinting.
+ * The defaults for all other DOMWriter properties apply.
+ *
+ */
+ public static String printNode(Node node, boolean prettyprint)
+ {
+ StringWriter strw = new StringWriter();
+ new DOMWriter(strw).setPrettyprint(prettyprint).print(node);
+ return strw.toString();
+ }
+
+ public boolean isCanonical()
+ {
+ return canonical;
+ }
+
+ /**
+ * Set wheter entities should appear in their canonical form.
+ * The default is false.
+ */
+ public DOMWriter setCanonical(boolean canonical)
+ {
+ this.canonical = canonical;
+ return this;
+ }
+
+ /**
+ * Set wheter subelements should have their namespaces completed.
+ * Setting this to false may lead to invalid XML fragments.
+ * The default is true.
+ */
+ public DOMWriter setCompleteNamespaces(boolean complete)
+ {
+ this.completeNamespaces = complete;
+ return this;
+ }
+
+ public boolean isPrettyprint()
+ {
+ return prettyprint;
+ }
+
+ /**
+ * Set wheter element should be indented.
+ * The default is false.
+ */
+ public DOMWriter setPrettyprint(boolean prettyprint)
+ {
+ this.prettyprint = prettyprint;
+ return this;
+ }
+
+ public boolean isWriteXMLDeclaration()
+ {
+ return writeXMLDeclaration;
+ }
+
+ /**
+ * Set wheter the XML declaration should be written.
+ * The default is false.
+ */
+ public DOMWriter setWriteXMLDeclaration(boolean flag)
+ {
+ this.writeXMLDeclaration = flag;
+ return this;
+ }
+
+ public void print(Node node)
+ {
+ rootNode = node;
+ printInternal(node, false);
+ }
+
+ private void printInternal(Node node, boolean indentEndMarker)
+ {
+ // is there anything to do?
+ if (node == null)
+ {
+ return;
+ }
+
+ // JBAS-2117 - Don't skip the DOCUMENT_NODE
+ // if (node instanceof Document) node = ((Document)node).getDocumentElement();
+
+ if (wroteXMLDeclaration == false && writeXMLDeclaration == true &&
canonical == false)
+ {
+ out.print("<?xml version='1.0'");
+ if (charsetName != null)
+ out.print(" encoding='" + charsetName + "'");
+
+ out.print("?>");
+ if (prettyprint)
+ out.println();
+
+ wroteXMLDeclaration = true;
+ }
+
+ int type = node.getNodeType();
+ boolean hasChildNodes = node.getChildNodes().getLength() > 0;
+
+ String nodeName = node.getNodeName();
+ switch (type)
+ {
+ // print document
+ case Node.DOCUMENT_NODE:
+ {
+ NodeList children = node.getChildNodes();
+ for (int iChild = 0; iChild < children.getLength(); iChild++)
+ {
+ printInternal(children.item(iChild), false);
+ }
+ out.flush();
+ break;
+ }
+
+ // print element with attributes
+ case Node.ELEMENT_NODE:
+ {
+ Element element = (Element)node;
+ if (prettyprint)
+ {
+ for (int i = 0; i < prettyIndent; i++)
+ {
+ out.print(' ');
+ }
+ prettyIndent++;
+ }
+
+ out.print('<');
+ out.print(nodeName);
+
+ Map nsMap = new HashMap();
+ String elPrefix = node.getPrefix();
+ if (elPrefix != null)
+ {
+ String nsURI = getNamespaceURI(elPrefix, element, rootNode);
+ nsMap.put(elPrefix, nsURI);
+ }
+
+ Attr attrs[] = sortAttributes(node.getAttributes());
+ for (int i = 0; i < attrs.length; i++)
+ {
+ Attr attr = attrs[i];
+ String atPrefix = attr.getPrefix();
+ String atName = attr.getNodeName();
+ String atValue = normalize(attr.getNodeValue(), canonical);
+
+ if (atPrefix != null && !atPrefix.equals("xmlns")
&& !atPrefix.equals("xml"))
+ {
+ String nsURI = getNamespaceURI(atPrefix, element, rootNode);
+ nsMap.put(atPrefix, nsURI);
+ // xsi:type='ns1:SubType', xsi:type='xsd:string'
+ if (atName.equals(atPrefix + ":type") &&
atValue.indexOf(":") > 0)
+ {
+ // xsi defined on the envelope
+ if (nsURI == null)
+ nsURI = getNamespaceURI(atPrefix, element, null);
+
+ if
("http://www.w3.org/2001/XMLSchema-instance".equals(nsURI))
+ {
+ String typePrefix = atValue.substring(0,
atValue.indexOf(":"));
+ String typeURI = getNamespaceURI(typePrefix, element, rootNode);
+ nsMap.put(typePrefix, typeURI);
+ }
+ }
+ }
+
+ out.print(" " + atName + "='" + atValue +
"'");
+ }
+
+ // Add missing namespace declaration
+ if (completeNamespaces)
+ {
+ Iterator itPrefix = nsMap.keySet().iterator();
+ while (itPrefix.hasNext())
+ {
+ String prefix = (String)itPrefix.next();
+ String nsURI = (String)nsMap.get(prefix);
+ if (nsURI == null)
+ {
+ nsURI = getNamespaceURI(prefix, element, null);
+ out.print(" xmlns:" + prefix + "='" + nsURI
+ "'");
+ }
+ }
+ }
+
+ if (hasChildNodes)
+ {
+ out.print('>');
+ }
+
+ // Find out if the end marker is indented
+ indentEndMarker = isEndMarkerIndented(node);
+
+ if (indentEndMarker)
+ {
+ out.print('\n');
+ }
+
+ NodeList childNodes = node.getChildNodes();
+ int len = childNodes.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node childNode = childNodes.item(i);
+ printInternal(childNode, false);
+ }
+ break;
+ }
+
+ // handle entity reference nodes
+ case Node.ENTITY_REFERENCE_NODE:
+ {
+ if (canonical)
+ {
+ NodeList children = node.getChildNodes();
+ if (children != null)
+ {
+ int len = children.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ printInternal(children.item(i), false);
+ }
+ }
+ }
+ else
+ {
+ out.print('&');
+ out.print(nodeName);
+ out.print(';');
+ }
+ break;
+ }
+
+ // print cdata sections
+ case Node.CDATA_SECTION_NODE:
+ {
+ if (canonical)
+ {
+ out.print(normalize(node.getNodeValue(), canonical));
+ }
+ else
+ {
+ out.print("<![CDATA[");
+ out.print(node.getNodeValue());
+ out.print("]]>");
+ }
+ break;
+ }
+
+ // print text
+ case Node.TEXT_NODE:
+ {
+ String text = normalize(node.getNodeValue(), canonical);
+ if (prettyprint == false || text.trim().length() > 0)
+ out.print(text);
+ break;
+ }
+
+ // print processing instruction
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ {
+ out.print("<?");
+ out.print(nodeName);
+ String data = node.getNodeValue();
+ if (data != null && data.length() > 0)
+ {
+ out.print(' ');
+ out.print(data);
+ }
+ out.print("?>");
+ break;
+ }
+
+ // print comment
+ case Node.COMMENT_NODE:
+ {
+ for (int i = 0; i < prettyIndent; i++)
+ {
+ out.print(' ');
+ }
+
+ out.print("<!--");
+ String data = node.getNodeValue();
+ if (data != null)
+ {
+ out.print(data);
+ }
+ out.print("-->");
+
+ if (prettyprint)
+ {
+ out.print('\n');
+ }
+
+ break;
+ }
+ }
+
+ if (type == Node.ELEMENT_NODE)
+ {
+ if (prettyprint)
+ prettyIndent--;
+
+ if (hasChildNodes == false)
+ {
+ out.print("/>");
+ }
+ else
+ {
+ if (indentEndMarker)
+ {
+ for (int i = 0; i < prettyIndent; i++)
+ {
+ out.print(' ');
+ }
+ }
+
+ out.print("</");
+ out.print(nodeName);
+ out.print('>');
+ }
+
+ if (prettyIndent > 0)
+ {
+ out.print('\n');
+ }
+ }
+ out.flush();
+ }
+
+ private String getNamespaceURI(String prefix, Element element, Node stopNode)
+ {
+ Node parent = element.getParentNode();
+ String nsURI = element.getAttribute("xmlns:" + prefix);
+ if (nsURI.length() == 0 && element != stopNode && parent instanceof
Element)
+ return getNamespaceURI(prefix, (Element)parent, stopNode);
+
+ return (nsURI.length() > 0 ? nsURI : null);
+ }
+
+ private boolean isEndMarkerIndented(Node node)
+ {
+ if (prettyprint)
+ {
+ NodeList childNodes = node.getChildNodes();
+ int len = childNodes.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node children = childNodes.item(i);
+ if (children.getNodeType() == Node.ELEMENT_NODE)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /** Returns a sorted list of attributes. */
+ private Attr[] sortAttributes(NamedNodeMap attrs)
+ {
+
+ int len = (attrs != null) ? attrs.getLength() : 0;
+ Attr array[] = new Attr[len];
+ for (int i = 0; i < len; i++)
+ {
+ array[i] = (Attr)attrs.item(i);
+ }
+ for (int i = 0; i < len - 1; i++)
+ {
+ String name = array[i].getNodeName();
+ int index = i;
+ for (int j = i + 1; j < len; j++)
+ {
+ String curName = array[j].getNodeName();
+ if (curName.compareTo(name) < 0)
+ {
+ name = curName;
+ index = j;
+ }
+ }
+ if (index != i)
+ {
+ Attr temp = array[i];
+ array[i] = array[index];
+ array[index] = temp;
+ }
+ }
+ return (array);
+ }
+
+ /** Normalizes the given string. */
+ public static String normalize(String s, boolean canonical)
+ {
+ StringBuffer str = new StringBuffer();
+
+ int len = (s != null) ? s.length() : 0;
+ for (int i = 0; i < len; i++)
+ {
+ char ch = s.charAt(i);
+ switch (ch)
+ {
+ case '<':
+ {
+ str.append("<");
+ break;
+ }
+ case '>':
+ {
+ str.append(">");
+ break;
+ }
+ case '&':
+ {
+ str.append("&");
+ break;
+ }
+ case '"':
+ {
+ str.append(""");
+ break;
+ }
+ case '\r':
+ case '\n':
+ {
+ if (canonical)
+ {
+ str.append("&#");
+ str.append(Integer.toString(ch));
+ str.append(';');
+ break;
+ }
+ // else, default append char
+ }
+ default:
+ {
+ str.append(ch);
+ }
+ }
+ }
+ return (str.toString());
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/HolderUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/HolderUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,322 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Axis" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-
-package org.jboss.ws.common.utils;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Calendar;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.holders.BigDecimalHolder;
-import javax.xml.rpc.holders.BigIntegerHolder;
-import javax.xml.rpc.holders.BooleanHolder;
-import javax.xml.rpc.holders.BooleanWrapperHolder;
-import javax.xml.rpc.holders.ByteArrayHolder;
-import javax.xml.rpc.holders.ByteHolder;
-import javax.xml.rpc.holders.ByteWrapperHolder;
-import javax.xml.rpc.holders.CalendarHolder;
-import javax.xml.rpc.holders.DoubleHolder;
-import javax.xml.rpc.holders.DoubleWrapperHolder;
-import javax.xml.rpc.holders.FloatHolder;
-import javax.xml.rpc.holders.FloatWrapperHolder;
-import javax.xml.rpc.holders.IntHolder;
-import javax.xml.rpc.holders.IntegerWrapperHolder;
-import javax.xml.rpc.holders.LongHolder;
-import javax.xml.rpc.holders.LongWrapperHolder;
-import javax.xml.rpc.holders.ObjectHolder;
-import javax.xml.rpc.holders.QNameHolder;
-import javax.xml.rpc.holders.ShortHolder;
-import javax.xml.rpc.holders.ShortWrapperHolder;
-import javax.xml.rpc.holders.StringHolder;
-
-import org.jboss.logging.Logger;
-
-/**
- * HolderUtils provides static utility functions for both JAX-RPC
- * and JAX-WS holders.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
- * @since 22-Dec-2004
- */
-public class HolderUtils
-{
- private static final Logger log = Logger.getLogger(HolderUtils.class);
-
- /** True if the given type is a holder. */
- public static boolean isHolderType(Class javaType)
- {
- return javax.xml.rpc.holders.Holder.class.isAssignableFrom(javaType) ||
javax.xml.ws.Holder.class.isAssignableFrom(javaType);
- }
-
- /** True if the given type is a holder. */
- public static boolean isHolderType(Type javaType)
- {
- return isHolderType(JavaUtils.erasure(javaType));
- }
-
- /**
- * Gets the JAX-RPC holder for a specific value type.
- *
- * @param valueType the value
- * @return the holder, or null if there is no match
- */
- public static Class getJAXRPCHolderType(Class valueType)
- {
- if (valueType == null)
- throw new IllegalArgumentException("Illegal null parameter");
-
- if (javax.xml.rpc.holders.Holder.class.isAssignableFrom(valueType))
- throw new IllegalArgumentException("Is already a holder: " +
valueType.getName());
-
- if (valueType == BigDecimal.class)
- return BigDecimalHolder.class;
- if (valueType == BigInteger.class)
- return BigIntegerHolder.class;
- if (valueType == boolean.class)
- return BooleanHolder.class;
- if (valueType == Boolean.class)
- return BooleanWrapperHolder.class;
- if (valueType == byte[].class)
- return ByteArrayHolder.class;
- if (valueType == byte.class)
- return ByteHolder.class;
- if (valueType == Byte.class)
- return ByteWrapperHolder.class;
- if (valueType == Calendar.class)
- return CalendarHolder.class;
- if (valueType == double.class)
- return DoubleHolder.class;
- if (valueType == Double.class)
- return DoubleWrapperHolder.class;
- if (valueType == float.class)
- return FloatHolder.class;
- if (valueType == Float.class)
- return FloatWrapperHolder.class;
- if (valueType == int.class)
- return IntHolder.class;
- if (valueType == Integer.class)
- return IntegerWrapperHolder.class;
- if (valueType == long.class)
- return LongHolder.class;
- if (valueType == Long.class)
- return LongWrapperHolder.class;
- if (valueType == QName.class)
- return QNameHolder.class;
- if (valueType == short.class)
- return ShortHolder.class;
- if (valueType == Short.class)
- return ShortWrapperHolder.class;
- if (valueType == String.class)
- return StringHolder.class;
- if (valueType == Object.class)
- return ObjectHolder.class;
-
- log.warn("Cannot get holder type for: " + valueType);
-
- return null;
- }
-
- /**
- * Gets the value type of a JAX-WS or JAX-RPC holder.
- *
- * @param holderType the generic type for JAX-WS, a standard class for JAX-RPC
- * @return the value type
- */
- public static Class getValueType(Type holderType)
- {
- Class holderClass = JavaUtils.erasure(holderType);
-
- boolean jaxrpcHolder =
javax.xml.rpc.holders.Holder.class.isAssignableFrom(holderClass);
- boolean jaxwsHolder = javax.xml.ws.Holder.class.isAssignableFrom(holderClass);
- if (!jaxrpcHolder && !jaxwsHolder)
- throw new IllegalArgumentException("Is not a holder: " +
holderClass.getName());
-
- if (jaxwsHolder)
- return JavaUtils.erasure(getGenericValueType(holderType));
-
- // Holder is supposed to have a public value field.
- Field field;
- try
- {
- field = holderClass.getField("value");
- }
- catch (NoSuchFieldException e)
- {
- throw new IllegalArgumentException("Cannot find public value field: "
+ holderClass);
- }
-
- return field.getType();
- }
-
- /**
- * Gets the value object of a JAX-WS or JAX-RPC holder instance.
- *
- * @param holder the holder object instance
- * @return the value object instance
- */
- public static Object getHolderValue(Object holder)
- {
- if (holder == null)
- throw new IllegalArgumentException("Illegal null parameter");
-
- if (!javax.xml.rpc.holders.Holder.class.isInstance(holder) &&
!javax.xml.ws.Holder.class.isInstance(holder))
- throw new IllegalArgumentException("Is not a holder: " + holder);
-
- try
- {
- Field valueField = holder.getClass().getField("value");
- Object obj = valueField.get(holder);
- return obj;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new IllegalArgumentException("Cannot access public value field:
" + holder);
- }
- }
-
- /**
- * Sets the value object of a JAX-WS or JAX-RPC holder instance. This method
- * will also dynamically convert primitive and wrapper arrays to match the
- * target array type.
- *
- * @param holder the holder instance
- * @param value the value, can be null
- */
- public static void setHolderValue(Object holder, Object value)
- {
- if (holder == null)
- throw new IllegalArgumentException("Holder instance was null");
-
- if (!javax.xml.rpc.holders.Holder.class.isInstance(holder) &&
!javax.xml.ws.Holder.class.isInstance(holder))
- throw new IllegalArgumentException("Is not a holder: " + holder);
-
- Class valueType = getValueType(holder.getClass());
-
- if (value != null && JavaUtils.isAssignableFrom(valueType,
value.getClass()) == false)
- throw new IllegalArgumentException("Holder [" +
holder.getClass().getName() + "] value not assignable: " + value);
-
- if (valueType.isArray())
- value = JavaUtils.syncArray(value, valueType);
-
- try
- {
- Field valueField = holder.getClass().getField("value");
- if (value != null || valueType.isPrimitive() == false)
- valueField.set(holder, value);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new IllegalArgumentException("Cannot access public value field:
" + holder);
- }
- }
-
- /**
- * Gets the generic value type of a JAX-WS Holder.
- * If there is no generic information, Object.class will be returned
- *
- * @param holder JAX-WS holder type
- * @return generic value type
- */
- public static Type getGenericValueType(Type holder)
- {
- return (holder instanceof ParameterizedType) ?
((ParameterizedType)holder).getActualTypeArguments()[0] : Object.class;
- }
-
-
- /**
- * Creates a JAX-WS or JAX-RPC holder instance.
- *
- * @param value the value instance
- * @param holderType the holder type
- * @return a new holder
- */
- public static Object createHolderInstance(Object value, Class<?> holderType)
- {
- if (! isHolderType(holderType))
- throw new IllegalArgumentException("Not a holder type:" +
holderType.getName());
-
- Object holder;
-
- try
- {
- holder = holderType.newInstance();
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new IllegalArgumentException("Cannot instanciate holder: " +
holderType);
- }
-
- setHolderValue(holder, value);
-
- return holder;
- }
-}
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/HolderUtils.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/HolderUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/HolderUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/HolderUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,322 @@
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Axis" and "Apache Software Foundation" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+
+package org.jboss.ws.core.utils;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.holders.BigDecimalHolder;
+import javax.xml.rpc.holders.BigIntegerHolder;
+import javax.xml.rpc.holders.BooleanHolder;
+import javax.xml.rpc.holders.BooleanWrapperHolder;
+import javax.xml.rpc.holders.ByteArrayHolder;
+import javax.xml.rpc.holders.ByteHolder;
+import javax.xml.rpc.holders.ByteWrapperHolder;
+import javax.xml.rpc.holders.CalendarHolder;
+import javax.xml.rpc.holders.DoubleHolder;
+import javax.xml.rpc.holders.DoubleWrapperHolder;
+import javax.xml.rpc.holders.FloatHolder;
+import javax.xml.rpc.holders.FloatWrapperHolder;
+import javax.xml.rpc.holders.IntHolder;
+import javax.xml.rpc.holders.IntegerWrapperHolder;
+import javax.xml.rpc.holders.LongHolder;
+import javax.xml.rpc.holders.LongWrapperHolder;
+import javax.xml.rpc.holders.ObjectHolder;
+import javax.xml.rpc.holders.QNameHolder;
+import javax.xml.rpc.holders.ShortHolder;
+import javax.xml.rpc.holders.ShortWrapperHolder;
+import javax.xml.rpc.holders.StringHolder;
+
+import org.jboss.logging.Logger;
+
+/**
+ * HolderUtils provides static utility functions for both JAX-RPC
+ * and JAX-WS holders.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @since 22-Dec-2004
+ */
+public class HolderUtils
+{
+ private static final Logger log = Logger.getLogger(HolderUtils.class);
+
+ /** True if the given type is a holder. */
+ public static boolean isHolderType(Class javaType)
+ {
+ return javax.xml.rpc.holders.Holder.class.isAssignableFrom(javaType) ||
javax.xml.ws.Holder.class.isAssignableFrom(javaType);
+ }
+
+ /** True if the given type is a holder. */
+ public static boolean isHolderType(Type javaType)
+ {
+ return isHolderType(JavaUtils.erasure(javaType));
+ }
+
+ /**
+ * Gets the JAX-RPC holder for a specific value type.
+ *
+ * @param valueType the value
+ * @return the holder, or null if there is no match
+ */
+ public static Class getJAXRPCHolderType(Class valueType)
+ {
+ if (valueType == null)
+ throw new IllegalArgumentException("Illegal null parameter");
+
+ if (javax.xml.rpc.holders.Holder.class.isAssignableFrom(valueType))
+ throw new IllegalArgumentException("Is already a holder: " +
valueType.getName());
+
+ if (valueType == BigDecimal.class)
+ return BigDecimalHolder.class;
+ if (valueType == BigInteger.class)
+ return BigIntegerHolder.class;
+ if (valueType == boolean.class)
+ return BooleanHolder.class;
+ if (valueType == Boolean.class)
+ return BooleanWrapperHolder.class;
+ if (valueType == byte[].class)
+ return ByteArrayHolder.class;
+ if (valueType == byte.class)
+ return ByteHolder.class;
+ if (valueType == Byte.class)
+ return ByteWrapperHolder.class;
+ if (valueType == Calendar.class)
+ return CalendarHolder.class;
+ if (valueType == double.class)
+ return DoubleHolder.class;
+ if (valueType == Double.class)
+ return DoubleWrapperHolder.class;
+ if (valueType == float.class)
+ return FloatHolder.class;
+ if (valueType == Float.class)
+ return FloatWrapperHolder.class;
+ if (valueType == int.class)
+ return IntHolder.class;
+ if (valueType == Integer.class)
+ return IntegerWrapperHolder.class;
+ if (valueType == long.class)
+ return LongHolder.class;
+ if (valueType == Long.class)
+ return LongWrapperHolder.class;
+ if (valueType == QName.class)
+ return QNameHolder.class;
+ if (valueType == short.class)
+ return ShortHolder.class;
+ if (valueType == Short.class)
+ return ShortWrapperHolder.class;
+ if (valueType == String.class)
+ return StringHolder.class;
+ if (valueType == Object.class)
+ return ObjectHolder.class;
+
+ log.warn("Cannot get holder type for: " + valueType);
+
+ return null;
+ }
+
+ /**
+ * Gets the value type of a JAX-WS or JAX-RPC holder.
+ *
+ * @param holderType the generic type for JAX-WS, a standard class for JAX-RPC
+ * @return the value type
+ */
+ public static Class getValueType(Type holderType)
+ {
+ Class holderClass = JavaUtils.erasure(holderType);
+
+ boolean jaxrpcHolder =
javax.xml.rpc.holders.Holder.class.isAssignableFrom(holderClass);
+ boolean jaxwsHolder = javax.xml.ws.Holder.class.isAssignableFrom(holderClass);
+ if (!jaxrpcHolder && !jaxwsHolder)
+ throw new IllegalArgumentException("Is not a holder: " +
holderClass.getName());
+
+ if (jaxwsHolder)
+ return JavaUtils.erasure(getGenericValueType(holderType));
+
+ // Holder is supposed to have a public value field.
+ Field field;
+ try
+ {
+ field = holderClass.getField("value");
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new IllegalArgumentException("Cannot find public value field: "
+ holderClass);
+ }
+
+ return field.getType();
+ }
+
+ /**
+ * Gets the value object of a JAX-WS or JAX-RPC holder instance.
+ *
+ * @param holder the holder object instance
+ * @return the value object instance
+ */
+ public static Object getHolderValue(Object holder)
+ {
+ if (holder == null)
+ throw new IllegalArgumentException("Illegal null parameter");
+
+ if (!javax.xml.rpc.holders.Holder.class.isInstance(holder) &&
!javax.xml.ws.Holder.class.isInstance(holder))
+ throw new IllegalArgumentException("Is not a holder: " + holder);
+
+ try
+ {
+ Field valueField = holder.getClass().getField("value");
+ Object obj = valueField.get(holder);
+ return obj;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Cannot access public value field:
" + holder);
+ }
+ }
+
+ /**
+ * Sets the value object of a JAX-WS or JAX-RPC holder instance. This method
+ * will also dynamically convert primitive and wrapper arrays to match the
+ * target array type.
+ *
+ * @param holder the holder instance
+ * @param value the value, can be null
+ */
+ public static void setHolderValue(Object holder, Object value)
+ {
+ if (holder == null)
+ throw new IllegalArgumentException("Holder instance was null");
+
+ if (!javax.xml.rpc.holders.Holder.class.isInstance(holder) &&
!javax.xml.ws.Holder.class.isInstance(holder))
+ throw new IllegalArgumentException("Is not a holder: " + holder);
+
+ Class valueType = getValueType(holder.getClass());
+
+ if (value != null && JavaUtils.isAssignableFrom(valueType,
value.getClass()) == false)
+ throw new IllegalArgumentException("Holder [" +
holder.getClass().getName() + "] value not assignable: " + value);
+
+ if (valueType.isArray())
+ value = JavaUtils.syncArray(value, valueType);
+
+ try
+ {
+ Field valueField = holder.getClass().getField("value");
+ if (value != null || valueType.isPrimitive() == false)
+ valueField.set(holder, value);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Cannot access public value field:
" + holder);
+ }
+ }
+
+ /**
+ * Gets the generic value type of a JAX-WS Holder.
+ * If there is no generic information, Object.class will be returned
+ *
+ * @param holder JAX-WS holder type
+ * @return generic value type
+ */
+ public static Type getGenericValueType(Type holder)
+ {
+ return (holder instanceof ParameterizedType) ?
((ParameterizedType)holder).getActualTypeArguments()[0] : Object.class;
+ }
+
+
+ /**
+ * Creates a JAX-WS or JAX-RPC holder instance.
+ *
+ * @param value the value instance
+ * @param holderType the holder type
+ * @return a new holder
+ */
+ public static Object createHolderInstance(Object value, Class<?> holderType)
+ {
+ if (! isHolderType(holderType))
+ throw new IllegalArgumentException("Not a holder type:" +
holderType.getName());
+
+ Object holder;
+
+ try
+ {
+ holder = holderType.newInstance();
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Cannot instanciate holder: " +
holderType);
+ }
+
+ setHolderValue(holder, value);
+
+ return holder;
+ }
+}
\ No newline at end of file
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/IOUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/IOUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/IOUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.utils;
-
-// $Id$
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.Writer;
-
-import javax.activation.DataHandler;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
-
-/**
- * IO utilites
- *
- * @author Thomas.Diesler(a)jboss.org
- */
-public final class IOUtils
-{
- private static Logger log = Logger.getLogger(IOUtils.class);
-
- // Hide the constructor
- private IOUtils()
- {
- }
-
- public static Writer getCharsetFileWriter(File file, String charset) throws
IOException
- {
- return new OutputStreamWriter(new FileOutputStream(file), charset);
- }
-
- /** Copy the input stream to the output stream
- */
- public static void copyStream(OutputStream outs, InputStream ins) throws IOException
- {
- byte[] bytes = new byte[1024];
- int r = ins.read(bytes);
- while (r > 0)
- {
- outs.write(bytes, 0, r);
- r = ins.read(bytes);
- }
- }
-
- public static byte[] convertToBytes(DataHandler dh)
- {
- try
- {
- ByteArrayOutputStream buffOS= new ByteArrayOutputStream();
- dh.writeTo(buffOS);
- return buffOS.toByteArray();
- }
- catch (IOException e)
- {
- throw new WSException("Unable to convert DataHandler to byte[]: " +
e.getMessage());
- }
- }
-
- /**
- * Transform a Reader to an InputStream
- * Background is that DocumentBuilder.parse() cannot take the Reader directly
- */
- public static InputStream transformReader(Reader reader) throws IOException
- {
- int capacity = 1024;
- char[] charBuffer = new char[capacity];
- StringBuffer strBuffer = new StringBuffer(capacity);
-
- int len = reader.read(charBuffer, 0, capacity);
- while (len > 0)
- {
- strBuffer.append(charBuffer, 0, len);
- len = reader.read(charBuffer, 0, capacity);
- }
- return new ByteArrayInputStream(strBuffer.toString().getBytes());
- }
-
- public static File createTempDirectory() throws IOException
- {
- ServerConfigFactory factory = ServerConfigFactory.getInstance();
- ServerConfig config = factory.getServerConfig();
- File tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/jbossws");
- tmpdir.mkdirs();
- return tmpdir;
- }
-}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/IOUtils.java (from
rev 1586, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/IOUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/IOUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/IOUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
+
+import javax.activation.DataHandler;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
+
+/**
+ * IO utilites
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public final class IOUtils
+{
+ private static Logger log = Logger.getLogger(IOUtils.class);
+
+ // Hide the constructor
+ private IOUtils()
+ {
+ }
+
+ public static Writer getCharsetFileWriter(File file, String charset) throws
IOException
+ {
+ return new OutputStreamWriter(new FileOutputStream(file), charset);
+ }
+
+ /** Copy the input stream to the output stream
+ */
+ public static void copyStream(OutputStream outs, InputStream ins) throws IOException
+ {
+ byte[] bytes = new byte[1024];
+ int r = ins.read(bytes);
+ while (r > 0)
+ {
+ outs.write(bytes, 0, r);
+ r = ins.read(bytes);
+ }
+ }
+
+ public static byte[] convertToBytes(DataHandler dh)
+ {
+ try
+ {
+ ByteArrayOutputStream buffOS= new ByteArrayOutputStream();
+ dh.writeTo(buffOS);
+ return buffOS.toByteArray();
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Unable to convert DataHandler to byte[]: " +
e.getMessage());
+ }
+ }
+
+ /**
+ * Transform a Reader to an InputStream
+ * Background is that DocumentBuilder.parse() cannot take the Reader directly
+ */
+ public static InputStream transformReader(Reader reader) throws IOException
+ {
+ int capacity = 1024;
+ char[] charBuffer = new char[capacity];
+ StringBuffer strBuffer = new StringBuffer(capacity);
+
+ int len = reader.read(charBuffer, 0, capacity);
+ while (len > 0)
+ {
+ strBuffer.append(charBuffer, 0, len);
+ len = reader.read(charBuffer, 0, capacity);
+ }
+ return new ByteArrayInputStream(strBuffer.toString().getBytes());
+ }
+
+ public static File createTempDirectory() throws IOException
+ {
+ ServerConfigFactory factory = ServerConfigFactory.getInstance();
+ ServerConfig config = factory.getServerConfig();
+ File tmpdir = new File(config.getServerTempDir().getCanonicalPath() +
"/jbossws");
+ tmpdir.mkdirs();
+ return tmpdir;
+ }
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.utils;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Dynamically register the JBossWS entities.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 02-Aug-2006
- */
-public class JBossWSEntityResolver extends JBossEntityResolver
-{
- // provide logging
- private static final Logger log = Logger.getLogger(JBossWSEntityResolver.class);
-
- public JBossWSEntityResolver()
- {
- registerEntity("urn:jboss:jaxrpc-config:2.0",
"schema/jaxrpc-config_2_0.xsd");
- registerEntity("urn:jboss:jaxws-config:2.0",
"schema/jaxws-config_2_0.xsd");
-
registerEntity("http://java.sun.com/xml/ns/javaee",
"schema/javaee_web_services_1_2.xsd");
-
registerEntity("http://www.w3.org/2005/08/addressing",
"schema/ws-addr.xsd");
-
registerEntity("http://schemas.xmlsoap.org/ws/2004/08/eventing",
"eventing.xsd");
- }
-
- public InputSource resolveEntity(String publicId, String systemId) throws
SAXException, IOException
- {
- log.debug("resolveEntity: [pub=" + publicId + ",sysid=" +
systemId + "]");
- InputSource inputSource = super.resolveEntity(publicId, systemId);
- return inputSource;
- }
-
- public URL resolveNamespaceURI(String nsURI)
- {
- URL url = null;
-
- String resource = (String)getEntityMap().get(nsURI);
- if (resource != null)
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- url = loader.getResource(resource);
- if( url == null )
- {
- if( resource.endsWith(".dtd") )
- resource = "dtd/" + resource;
- else if( resource.endsWith(".xsd") )
- resource = "schema/" + resource;
- url = loader.getResource(resource);
- }
- }
-
- return url;
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JBossWSEntityResolver.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+// $Id$
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Dynamically register the JBossWS entities.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 02-Aug-2006
+ */
+public class JBossWSEntityResolver extends JBossEntityResolver
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(JBossWSEntityResolver.class);
+
+ public JBossWSEntityResolver()
+ {
+ registerEntity("urn:jboss:jaxrpc-config:2.0",
"schema/jaxrpc-config_2_0.xsd");
+ registerEntity("urn:jboss:jaxws-config:2.0",
"schema/jaxws-config_2_0.xsd");
+
registerEntity("http://java.sun.com/xml/ns/javaee",
"schema/javaee_web_services_1_2.xsd");
+
registerEntity("http://www.w3.org/2005/08/addressing",
"schema/ws-addr.xsd");
+
registerEntity("http://schemas.xmlsoap.org/ws/2004/08/eventing",
"eventing.xsd");
+ }
+
+ public InputSource resolveEntity(String publicId, String systemId) throws
SAXException, IOException
+ {
+ log.debug("resolveEntity: [pub=" + publicId + ",sysid=" +
systemId + "]");
+ InputSource inputSource = super.resolveEntity(publicId, systemId);
+ return inputSource;
+ }
+
+ public URL resolveNamespaceURI(String nsURI)
+ {
+ URL url = null;
+
+ String resource = (String)getEntityMap().get(nsURI);
+ if (resource != null)
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ url = loader.getResource(resource);
+ if( url == null )
+ {
+ if( resource.endsWith(".dtd") )
+ resource = "dtd/" + resource;
+ else if( resource.endsWith(".xsd") )
+ resource = "schema/" + resource;
+ url = loader.getResource(resource);
+ }
+ }
+
+ return url;
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavaUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JavaUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavaUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,637 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.utils;
-
-// $Id$
-
-import java.lang.reflect.Array;
-import java.lang.reflect.GenericArrayType;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-import java.lang.reflect.WildcardType;
-import java.util.HashMap;
-import java.util.HashSet;
-
-import org.jboss.logging.Logger;
-
-/** Java utilities
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 22-Dec-2004
- */
-public class JavaUtils
-{
- // provide logging
- private static final Logger log = Logger.getLogger(JavaUtils.class);
-
- private static HashMap<String, Class> primitiveNames = new HashMap<String,
Class>(8);
- private static HashMap<String, String> primitiveNameDescriptors = new
HashMap<String, String>(8);
- private static HashSet<String> reservedKeywords = new
HashSet<String>(50);
-
- static
- {
- primitiveNames.put("int", int.class);
- primitiveNames.put("short", short.class);
- primitiveNames.put("boolean", boolean.class);
- primitiveNames.put("byte", byte.class);
- primitiveNames.put("long", long.class);
- primitiveNames.put("double", double.class);
- primitiveNames.put("float", float.class);
- primitiveNames.put("char", char.class);
-
- primitiveNameDescriptors.put("int", "I");
- primitiveNameDescriptors.put("short", "S");
- primitiveNameDescriptors.put("boolean", "Z");
- primitiveNameDescriptors.put("byte", "B");
- primitiveNameDescriptors.put("long", "J");
- primitiveNameDescriptors.put("double", "D");
- primitiveNameDescriptors.put("float", "F");
- primitiveNameDescriptors.put("char", "C");
-
- reservedKeywords.add("abstract");
- reservedKeywords.add("continue");
- reservedKeywords.add("for");
- reservedKeywords.add("new");
- reservedKeywords.add("switch");
- reservedKeywords.add("assert");
- reservedKeywords.add("default");
- reservedKeywords.add("if");
- reservedKeywords.add("package");
- reservedKeywords.add("synchronized");
- reservedKeywords.add("boolean");
- reservedKeywords.add("do");
- reservedKeywords.add("goto");
- reservedKeywords.add("private");
- reservedKeywords.add("this");
- reservedKeywords.add("break");
- reservedKeywords.add("double");
- reservedKeywords.add("implements");
- reservedKeywords.add("protected");
- reservedKeywords.add("throw");
- reservedKeywords.add("byte");
- reservedKeywords.add("else");
- reservedKeywords.add("import");
- reservedKeywords.add("public");
- reservedKeywords.add("throws");
- reservedKeywords.add("case");
- reservedKeywords.add("enum");
- reservedKeywords.add("instanceof");
- reservedKeywords.add("return");
- reservedKeywords.add("transient");
- reservedKeywords.add("catch");
- reservedKeywords.add("extends");
- reservedKeywords.add("int");
- reservedKeywords.add("short");
- reservedKeywords.add("try");
- reservedKeywords.add("char");
- reservedKeywords.add("final");
- reservedKeywords.add("interface");
- reservedKeywords.add("static");
- reservedKeywords.add("void");
- reservedKeywords.add("class");
- reservedKeywords.add("finally");
- reservedKeywords.add("long");
- reservedKeywords.add("strictfp");
- reservedKeywords.add("volatile");
- reservedKeywords.add("const");
- reservedKeywords.add("float");
- reservedKeywords.add("native");
- reservedKeywords.add("super");
- reservedKeywords.add("while");
- }
-
- /**
- * Load a Java type from a given class loader.
- *
- * @param typeName maybe the source notation of a primitve, class name, array of both
- */
- public static Class loadJavaType(String typeName) throws ClassNotFoundException
- {
- return loadJavaType(typeName, null);
- }
-
- /**
- * Load a Java type from a given class loader.
- *
- * @param typeName maybe the source notation of a primitve, class name, array of both
- */
- public static Class loadJavaType(String typeName, ClassLoader classLoader) throws
ClassNotFoundException
- {
- if (classLoader == null)
- classLoader = Thread.currentThread().getContextClassLoader();
-
- Class javaType = primitiveNames.get(typeName);
- if (javaType == null)
- javaType = getArray(typeName, classLoader);
-
- if (javaType == null)
- javaType = classLoader.loadClass(typeName);
-
- return javaType;
- }
-
- /**
- * True if the given type name is the source notation of a primitive or array of
which.
- */
- public static boolean isPrimitive(String javaType)
- {
- return getPrimitiveType(javaType) != null;
- }
-
- /**
- * True if the given class is a primitive or array of which.
- */
- public static boolean isPrimitive(Class javaType)
- {
- return javaType.isPrimitive() || (javaType.isArray() &&
isPrimitive(javaType.getComponentType()));
- }
-
- public static Class getPrimitiveType(String javaType)
- {
- Class type = primitiveNames.get(javaType);
- if (type != null)
- return type;
-
- try
- {
- // null loader = primitive only
- type = getArray(javaType, null);
- }
- catch (ClassNotFoundException e)
- {
- // This will actually never be thrown since is null
- }
-
- return type;
- }
-
- private static Class getArray(String javaType, ClassLoader loader) throws
ClassNotFoundException
- {
- if (javaType.charAt(0) == '[')
- return getArrayFromJVMName(javaType, loader);
-
- if (javaType.endsWith("[]"))
- return getArrayFromSourceName(javaType, loader);
-
- return null;
- }
-
- private static Class getArrayFromJVMName(String javaType, ClassLoader loader) throws
ClassNotFoundException
- {
- Class componentType;
- int componentStart = javaType.lastIndexOf('[') + 1;
- switch (javaType.charAt(componentStart))
- {
- case 'I': componentType = int.class; break;
- case 'S': componentType = short.class; break;
- case 'Z': componentType = boolean.class; break;
- case 'B': componentType = byte.class; break;
- case 'J': componentType = long.class; break;
- case 'D': componentType = double.class; break;
- case 'F': componentType = float.class; break;
- case 'C': componentType = char.class; break;
- case 'L':
- if (loader == null)
- return null;
- String name = javaType.substring(componentStart + 1, javaType.length() - 1);
- componentType = loader.loadClass(name);
- break;
- default:
- throw new IllegalArgumentException("Invalid binary component for array:
" + javaType.charAt(componentStart));
- }
-
- // componentStart doubles as the number of '['s which is the number of
dimensions
- return Array.newInstance(componentType, new int[componentStart]).getClass();
- }
-
- private static Class getArrayFromSourceName(String javaType, ClassLoader loader)
throws ClassNotFoundException
- {
- int arrayStart = javaType.indexOf('[');
- String componentName = javaType.substring(0, arrayStart);
-
- Class componentType = primitiveNames.get(componentName);
- if (componentType == null)
- {
- if (loader == null)
- return null;
-
- componentType = loader.loadClass(componentName);
- }
-
- // [][][][] divided by 2
- int dimensions = (javaType.length() - arrayStart) >> 1;
-
- return Array.newInstance(componentType, new int[dimensions]).getClass();
- }
-
- /**
- * Get the corresponding primitive for a give wrapper type.
- * Also handles arrays of which.
- */
- public static Class getPrimitiveType(Class javaType)
- {
- if (javaType == Integer.class)
- return int.class;
- if (javaType == Short.class)
- return short.class;
- if (javaType == Boolean.class)
- return boolean.class;
- if (javaType == Byte.class)
- return byte.class;
- if (javaType == Long.class)
- return long.class;
- if (javaType == Double.class)
- return double.class;
- if (javaType == Float.class)
- return float.class;
- if (javaType == Character.class)
- return char.class;
-
- if (javaType == Integer[].class)
- return int[].class;
- if (javaType == Short[].class)
- return short[].class;
- if (javaType == Boolean[].class)
- return boolean[].class;
- if (javaType == Byte[].class)
- return byte[].class;
- if (javaType == Long[].class)
- return long[].class;
- if (javaType == Double[].class)
- return double[].class;
- if (javaType == Float[].class)
- return float[].class;
- if (javaType == Character[].class)
- return char[].class;
-
- if (javaType.isArray() && javaType.getComponentType().isArray())
- {
- Class compType = getPrimitiveType(javaType.getComponentType());
- return Array.newInstance(compType, 0).getClass();
- }
-
- return javaType;
- }
-
- /**
- * Converts an n-dimensional array of wrapper types to primitive types
- */
- public static Object getPrimitiveValueArray(Object value)
- {
- if (value == null)
- return null;
-
- Class javaType = value.getClass();
- if (javaType.isArray())
- {
- int length = Array.getLength(value);
- Object destArr =
Array.newInstance(getPrimitiveType(javaType.getComponentType()), length);
- for (int i = 0; i < length; i++)
- {
- Object srcObj = Array.get(value, i);
- Array.set(destArr, i, getPrimitiveValueArray(srcObj));
- }
- return destArr;
- }
-
- return value;
- }
-
- /**
- * Get the corresponding wrapper type for a give primitive.
- * Also handles arrays of which.
- */
- public static Class getWrapperType(Class javaType)
- {
- if (javaType == int.class)
- return Integer.class;
- if (javaType == short.class)
- return Short.class;
- if (javaType == boolean.class)
- return Boolean.class;
- if (javaType == byte.class)
- return Byte.class;
- if (javaType == long.class)
- return Long.class;
- if (javaType == double.class)
- return Double.class;
- if (javaType == float.class)
- return Float.class;
- if (javaType == char.class)
- return Character.class;
-
- if (javaType == int[].class)
- return Integer[].class;
- if (javaType == short[].class)
- return Short[].class;
- if (javaType == boolean[].class)
- return Boolean[].class;
- if (javaType == byte[].class)
- return Byte[].class;
- if (javaType == long[].class)
- return Long[].class;
- if (javaType == double[].class)
- return Double[].class;
- if (javaType == float[].class)
- return Float[].class;
- if (javaType == char[].class)
- return Character[].class;
-
- if (javaType.isArray() && javaType.getComponentType().isArray())
- {
- Class compType = getWrapperType(javaType.getComponentType());
- return Array.newInstance(compType, 0).getClass();
- }
-
- return javaType;
- }
-
- /**
- * Converts an n-dimensional array of primitive types to wrapper types
- */
- public static Object getWrapperValueArray(Object value)
- {
- if (value == null)
- return null;
-
- Class javaType = value.getClass();
- if (javaType.isArray())
- {
- int length = Array.getLength(value);
- Object destArr = Array.newInstance(getWrapperType(javaType.getComponentType()),
length);
- for (int i = 0; i < length; i++)
- {
- Object srcObj = Array.get(value, i);
- Array.set(destArr, i, getWrapperValueArray(srcObj));
- }
- return destArr;
- }
-
- return value;
- }
-
- public static Object syncArray(Object array, Class target)
- {
- return (JavaUtils.isPrimitive(target)) ? JavaUtils.getPrimitiveValueArray(array) :
JavaUtils.getWrapperValueArray(array);
- }
-
- /**
- * Return true if the dest class is assignable from the src.
- * Also handles arrays and primitives.
- */
- public static boolean isAssignableFrom(Class dest, Class src)
- {
- if (dest == null)
- throw new IllegalArgumentException("Destination class cannot be
null");
- if (src == null)
- throw new IllegalArgumentException("Source class cannot be null");
-
- boolean isAssignable = dest.isAssignableFrom(src);
- if (isAssignable == false && dest.getName().equals(src.getName()))
- {
- ClassLoader destLoader = dest.getClassLoader();
- ClassLoader srcLoader = src.getClassLoader();
- log.debug("Not assignable because of conflicting class
loaders:\ndstLoader=" + destLoader + "\nsrcLoader=" + srcLoader);
- }
-
- if (isAssignable == false && isPrimitive(dest))
- {
- dest = getWrapperType(dest);
- isAssignable = dest.isAssignableFrom(src);
- }
- if (isAssignable == false && isPrimitive(src))
- {
- src = getWrapperType(src);
- isAssignable = dest.isAssignableFrom(src);
- }
- return isAssignable;
- }
-
- public static String convertJVMNameToSourceName(String typeName, ClassLoader loader)
- {
- // TODO Don't use a ClassLoader for this, we need to just convert it
- try
- {
- Class javaType = loadJavaType(typeName, loader);
- typeName = getSourceName(javaType);
- }
- catch (Exception e)
- {
- }
-
- return typeName;
- }
-
- /**
- * Converts a JVM external name to a JVM signature name. An external name is
- * that which is returned from {@link Class#getName()} A signature name is
- * the name in class file format.
- * <p>
- * For example:
- * <p>
- * [java.lang.Object
- * <p>
- * becomes:
- * <p>
- * [Ljava/lang/Object;
- *
- * @param externalName
- * @return
- */
- public static String toSignature(String externalName)
- {
- if (externalName == null)
- return null;
-
- String ret = primitiveNameDescriptors.get(externalName);
- if (ret != null)
- return ret;
-
- ret = externalName.replace('.', '/');
- return (ret.charAt(0) == '[') ? ret : "L" + ret + ";";
- }
-
- public static String printArray(Object[] val)
- {
- if (val == null)
- return "null";
-
- StringBuilder out = new StringBuilder("[");
- for (int i = 0; i < val.length; i++)
- {
- if (i > 0)
- {
- out.append(",");
- }
- out.append(val[i].getClass().isArray() ? printArray((Object[])val[i]) :
val[i]);
- }
- return out.append("]").toString();
- }
-
- public static String getSourceName(Class type)
- {
- if (! type.isArray())
- return type.getName();
-
- String arrayNotation = "";
- Class component = type;
- while(component.isArray())
- {
- component = component.getComponentType();
- arrayNotation += "[]";
- }
-
- return component.getName() + arrayNotation;
- }
-
- public static String capitalize(String source)
- {
- if (source == null)
- return null;
-
- if (source.length() == 0)
- return source;
-
- if (Character.isUpperCase(source.charAt(0)))
- return source;
-
- char c = Character.toUpperCase(source.charAt(0));
-
- return c + source.substring(1);
- }
-
- public static boolean isLoaded(String className, ClassLoader loader)
- {
- try
- {
- loadJavaType(className, loader);
- }
- catch (ClassNotFoundException e)
- {
- return false;
- }
-
- return true;
- }
-
- public static String getPackageName(Class<?> clazz)
- {
- String fullName = clazz.getName();
- return fullName.substring(0, fullName.lastIndexOf("."));
- }
-
- public static boolean isReservedKeyword(String keyword)
- {
- return reservedKeywords.contains(keyword);
- }
-
- /**
- * Erases a type according to the JLS type erasure rules
- *
- * @param t type to erase
- * @return erased type
- */
- public static Class erasure(Type type)
- {
- if (type instanceof ParameterizedType)
- {
- return erasure(((ParameterizedType)type).getRawType());
- }
- if (type instanceof TypeVariable)
- {
- return erasure(((TypeVariable)type).getBounds()[0]);
- }
- if (type instanceof WildcardType)
- {
- return erasure(((WildcardType)type).getUpperBounds()[0]);
- }
- if (type instanceof GenericArrayType)
- {
- return
Array.newInstance(erasure(((GenericArrayType)type).getGenericComponentType()),
0).getClass();
- }
-
- // Only type left is class
- return (Class)type;
- }
-
- public static String[] getRawParameterTypeArguments(ParameterizedType type)
- {
- Type[] arguments = type.getActualTypeArguments();
- String[] ret = new String[arguments.length];
- for (int i = 0; i < arguments.length; i++)
- {
- Class raw = erasure(arguments[i]);
- ret[i] = raw.getName();
- }
-
- return ret;
- }
-
- /**
- * Tests if this class loader is a JBoss RepositoryClassLoader
- *
- * @param loader
- * @return
- */
- public static boolean isJBossRepositoryClassLoader(ClassLoader loader)
- {
- Class clazz = loader.getClass();
- while (!clazz.getName().startsWith("java"))
- {
- if
("org.jboss.mx.loading.RepositoryClassLoader".equals(clazz.getName()))
- return true;
- clazz = clazz.getSuperclass();
- }
-
- return false;
- }
-
- /**
- * Clears black lists on a JBoss RepositoryClassLoader. This is somewhat of a hack,
and
- * could be replaced with an integration module. This is needed when the following
order of
- * events occur.
- *
- * <ol>
- * <li>loadClass() returns not found</li>
- * <li>Some call to defineClass()</li>
- * <ol>
- *
- * The CNFE triggers a black list addition, which cause the class never again to be
found.
- *
- * @param loader the loader to clear black lists for
- */
- public static void clearBlacklists(ClassLoader loader)
- {
- if (isJBossRepositoryClassLoader(loader))
- {
- try
- {
- loader.getClass().getMethod("clearBlacklists").invoke(loader);
- }
- catch (Exception e)
- {
- log.debug("Could not clear blacklists on " + loader);
- }
- }
- }
-}
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavaUtils.java (from
rev 1586, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JavaUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JavaUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavaUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,637 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+// $Id$
+
+import java.lang.reflect.Array;
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.util.HashMap;
+import java.util.HashSet;
+
+import org.jboss.logging.Logger;
+
+/** Java utilities
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 22-Dec-2004
+ */
+public class JavaUtils
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(JavaUtils.class);
+
+ private static HashMap<String, Class> primitiveNames = new HashMap<String,
Class>(8);
+ private static HashMap<String, String> primitiveNameDescriptors = new
HashMap<String, String>(8);
+ private static HashSet<String> reservedKeywords = new
HashSet<String>(50);
+
+ static
+ {
+ primitiveNames.put("int", int.class);
+ primitiveNames.put("short", short.class);
+ primitiveNames.put("boolean", boolean.class);
+ primitiveNames.put("byte", byte.class);
+ primitiveNames.put("long", long.class);
+ primitiveNames.put("double", double.class);
+ primitiveNames.put("float", float.class);
+ primitiveNames.put("char", char.class);
+
+ primitiveNameDescriptors.put("int", "I");
+ primitiveNameDescriptors.put("short", "S");
+ primitiveNameDescriptors.put("boolean", "Z");
+ primitiveNameDescriptors.put("byte", "B");
+ primitiveNameDescriptors.put("long", "J");
+ primitiveNameDescriptors.put("double", "D");
+ primitiveNameDescriptors.put("float", "F");
+ primitiveNameDescriptors.put("char", "C");
+
+ reservedKeywords.add("abstract");
+ reservedKeywords.add("continue");
+ reservedKeywords.add("for");
+ reservedKeywords.add("new");
+ reservedKeywords.add("switch");
+ reservedKeywords.add("assert");
+ reservedKeywords.add("default");
+ reservedKeywords.add("if");
+ reservedKeywords.add("package");
+ reservedKeywords.add("synchronized");
+ reservedKeywords.add("boolean");
+ reservedKeywords.add("do");
+ reservedKeywords.add("goto");
+ reservedKeywords.add("private");
+ reservedKeywords.add("this");
+ reservedKeywords.add("break");
+ reservedKeywords.add("double");
+ reservedKeywords.add("implements");
+ reservedKeywords.add("protected");
+ reservedKeywords.add("throw");
+ reservedKeywords.add("byte");
+ reservedKeywords.add("else");
+ reservedKeywords.add("import");
+ reservedKeywords.add("public");
+ reservedKeywords.add("throws");
+ reservedKeywords.add("case");
+ reservedKeywords.add("enum");
+ reservedKeywords.add("instanceof");
+ reservedKeywords.add("return");
+ reservedKeywords.add("transient");
+ reservedKeywords.add("catch");
+ reservedKeywords.add("extends");
+ reservedKeywords.add("int");
+ reservedKeywords.add("short");
+ reservedKeywords.add("try");
+ reservedKeywords.add("char");
+ reservedKeywords.add("final");
+ reservedKeywords.add("interface");
+ reservedKeywords.add("static");
+ reservedKeywords.add("void");
+ reservedKeywords.add("class");
+ reservedKeywords.add("finally");
+ reservedKeywords.add("long");
+ reservedKeywords.add("strictfp");
+ reservedKeywords.add("volatile");
+ reservedKeywords.add("const");
+ reservedKeywords.add("float");
+ reservedKeywords.add("native");
+ reservedKeywords.add("super");
+ reservedKeywords.add("while");
+ }
+
+ /**
+ * Load a Java type from a given class loader.
+ *
+ * @param typeName maybe the source notation of a primitve, class name, array of both
+ */
+ public static Class loadJavaType(String typeName) throws ClassNotFoundException
+ {
+ return loadJavaType(typeName, null);
+ }
+
+ /**
+ * Load a Java type from a given class loader.
+ *
+ * @param typeName maybe the source notation of a primitve, class name, array of both
+ */
+ public static Class loadJavaType(String typeName, ClassLoader classLoader) throws
ClassNotFoundException
+ {
+ if (classLoader == null)
+ classLoader = Thread.currentThread().getContextClassLoader();
+
+ Class javaType = primitiveNames.get(typeName);
+ if (javaType == null)
+ javaType = getArray(typeName, classLoader);
+
+ if (javaType == null)
+ javaType = classLoader.loadClass(typeName);
+
+ return javaType;
+ }
+
+ /**
+ * True if the given type name is the source notation of a primitive or array of
which.
+ */
+ public static boolean isPrimitive(String javaType)
+ {
+ return getPrimitiveType(javaType) != null;
+ }
+
+ /**
+ * True if the given class is a primitive or array of which.
+ */
+ public static boolean isPrimitive(Class javaType)
+ {
+ return javaType.isPrimitive() || (javaType.isArray() &&
isPrimitive(javaType.getComponentType()));
+ }
+
+ public static Class getPrimitiveType(String javaType)
+ {
+ Class type = primitiveNames.get(javaType);
+ if (type != null)
+ return type;
+
+ try
+ {
+ // null loader = primitive only
+ type = getArray(javaType, null);
+ }
+ catch (ClassNotFoundException e)
+ {
+ // This will actually never be thrown since is null
+ }
+
+ return type;
+ }
+
+ private static Class getArray(String javaType, ClassLoader loader) throws
ClassNotFoundException
+ {
+ if (javaType.charAt(0) == '[')
+ return getArrayFromJVMName(javaType, loader);
+
+ if (javaType.endsWith("[]"))
+ return getArrayFromSourceName(javaType, loader);
+
+ return null;
+ }
+
+ private static Class getArrayFromJVMName(String javaType, ClassLoader loader) throws
ClassNotFoundException
+ {
+ Class componentType;
+ int componentStart = javaType.lastIndexOf('[') + 1;
+ switch (javaType.charAt(componentStart))
+ {
+ case 'I': componentType = int.class; break;
+ case 'S': componentType = short.class; break;
+ case 'Z': componentType = boolean.class; break;
+ case 'B': componentType = byte.class; break;
+ case 'J': componentType = long.class; break;
+ case 'D': componentType = double.class; break;
+ case 'F': componentType = float.class; break;
+ case 'C': componentType = char.class; break;
+ case 'L':
+ if (loader == null)
+ return null;
+ String name = javaType.substring(componentStart + 1, javaType.length() - 1);
+ componentType = loader.loadClass(name);
+ break;
+ default:
+ throw new IllegalArgumentException("Invalid binary component for array:
" + javaType.charAt(componentStart));
+ }
+
+ // componentStart doubles as the number of '['s which is the number of
dimensions
+ return Array.newInstance(componentType, new int[componentStart]).getClass();
+ }
+
+ private static Class getArrayFromSourceName(String javaType, ClassLoader loader)
throws ClassNotFoundException
+ {
+ int arrayStart = javaType.indexOf('[');
+ String componentName = javaType.substring(0, arrayStart);
+
+ Class componentType = primitiveNames.get(componentName);
+ if (componentType == null)
+ {
+ if (loader == null)
+ return null;
+
+ componentType = loader.loadClass(componentName);
+ }
+
+ // [][][][] divided by 2
+ int dimensions = (javaType.length() - arrayStart) >> 1;
+
+ return Array.newInstance(componentType, new int[dimensions]).getClass();
+ }
+
+ /**
+ * Get the corresponding primitive for a give wrapper type.
+ * Also handles arrays of which.
+ */
+ public static Class getPrimitiveType(Class javaType)
+ {
+ if (javaType == Integer.class)
+ return int.class;
+ if (javaType == Short.class)
+ return short.class;
+ if (javaType == Boolean.class)
+ return boolean.class;
+ if (javaType == Byte.class)
+ return byte.class;
+ if (javaType == Long.class)
+ return long.class;
+ if (javaType == Double.class)
+ return double.class;
+ if (javaType == Float.class)
+ return float.class;
+ if (javaType == Character.class)
+ return char.class;
+
+ if (javaType == Integer[].class)
+ return int[].class;
+ if (javaType == Short[].class)
+ return short[].class;
+ if (javaType == Boolean[].class)
+ return boolean[].class;
+ if (javaType == Byte[].class)
+ return byte[].class;
+ if (javaType == Long[].class)
+ return long[].class;
+ if (javaType == Double[].class)
+ return double[].class;
+ if (javaType == Float[].class)
+ return float[].class;
+ if (javaType == Character[].class)
+ return char[].class;
+
+ if (javaType.isArray() && javaType.getComponentType().isArray())
+ {
+ Class compType = getPrimitiveType(javaType.getComponentType());
+ return Array.newInstance(compType, 0).getClass();
+ }
+
+ return javaType;
+ }
+
+ /**
+ * Converts an n-dimensional array of wrapper types to primitive types
+ */
+ public static Object getPrimitiveValueArray(Object value)
+ {
+ if (value == null)
+ return null;
+
+ Class javaType = value.getClass();
+ if (javaType.isArray())
+ {
+ int length = Array.getLength(value);
+ Object destArr =
Array.newInstance(getPrimitiveType(javaType.getComponentType()), length);
+ for (int i = 0; i < length; i++)
+ {
+ Object srcObj = Array.get(value, i);
+ Array.set(destArr, i, getPrimitiveValueArray(srcObj));
+ }
+ return destArr;
+ }
+
+ return value;
+ }
+
+ /**
+ * Get the corresponding wrapper type for a give primitive.
+ * Also handles arrays of which.
+ */
+ public static Class getWrapperType(Class javaType)
+ {
+ if (javaType == int.class)
+ return Integer.class;
+ if (javaType == short.class)
+ return Short.class;
+ if (javaType == boolean.class)
+ return Boolean.class;
+ if (javaType == byte.class)
+ return Byte.class;
+ if (javaType == long.class)
+ return Long.class;
+ if (javaType == double.class)
+ return Double.class;
+ if (javaType == float.class)
+ return Float.class;
+ if (javaType == char.class)
+ return Character.class;
+
+ if (javaType == int[].class)
+ return Integer[].class;
+ if (javaType == short[].class)
+ return Short[].class;
+ if (javaType == boolean[].class)
+ return Boolean[].class;
+ if (javaType == byte[].class)
+ return Byte[].class;
+ if (javaType == long[].class)
+ return Long[].class;
+ if (javaType == double[].class)
+ return Double[].class;
+ if (javaType == float[].class)
+ return Float[].class;
+ if (javaType == char[].class)
+ return Character[].class;
+
+ if (javaType.isArray() && javaType.getComponentType().isArray())
+ {
+ Class compType = getWrapperType(javaType.getComponentType());
+ return Array.newInstance(compType, 0).getClass();
+ }
+
+ return javaType;
+ }
+
+ /**
+ * Converts an n-dimensional array of primitive types to wrapper types
+ */
+ public static Object getWrapperValueArray(Object value)
+ {
+ if (value == null)
+ return null;
+
+ Class javaType = value.getClass();
+ if (javaType.isArray())
+ {
+ int length = Array.getLength(value);
+ Object destArr = Array.newInstance(getWrapperType(javaType.getComponentType()),
length);
+ for (int i = 0; i < length; i++)
+ {
+ Object srcObj = Array.get(value, i);
+ Array.set(destArr, i, getWrapperValueArray(srcObj));
+ }
+ return destArr;
+ }
+
+ return value;
+ }
+
+ public static Object syncArray(Object array, Class target)
+ {
+ return (JavaUtils.isPrimitive(target)) ? JavaUtils.getPrimitiveValueArray(array) :
JavaUtils.getWrapperValueArray(array);
+ }
+
+ /**
+ * Return true if the dest class is assignable from the src.
+ * Also handles arrays and primitives.
+ */
+ public static boolean isAssignableFrom(Class dest, Class src)
+ {
+ if (dest == null)
+ throw new IllegalArgumentException("Destination class cannot be
null");
+ if (src == null)
+ throw new IllegalArgumentException("Source class cannot be null");
+
+ boolean isAssignable = dest.isAssignableFrom(src);
+ if (isAssignable == false && dest.getName().equals(src.getName()))
+ {
+ ClassLoader destLoader = dest.getClassLoader();
+ ClassLoader srcLoader = src.getClassLoader();
+ log.debug("Not assignable because of conflicting class
loaders:\ndstLoader=" + destLoader + "\nsrcLoader=" + srcLoader);
+ }
+
+ if (isAssignable == false && isPrimitive(dest))
+ {
+ dest = getWrapperType(dest);
+ isAssignable = dest.isAssignableFrom(src);
+ }
+ if (isAssignable == false && isPrimitive(src))
+ {
+ src = getWrapperType(src);
+ isAssignable = dest.isAssignableFrom(src);
+ }
+ return isAssignable;
+ }
+
+ public static String convertJVMNameToSourceName(String typeName, ClassLoader loader)
+ {
+ // TODO Don't use a ClassLoader for this, we need to just convert it
+ try
+ {
+ Class javaType = loadJavaType(typeName, loader);
+ typeName = getSourceName(javaType);
+ }
+ catch (Exception e)
+ {
+ }
+
+ return typeName;
+ }
+
+ /**
+ * Converts a JVM external name to a JVM signature name. An external name is
+ * that which is returned from {@link Class#getName()} A signature name is
+ * the name in class file format.
+ * <p>
+ * For example:
+ * <p>
+ * [java.lang.Object
+ * <p>
+ * becomes:
+ * <p>
+ * [Ljava/lang/Object;
+ *
+ * @param externalName
+ * @return
+ */
+ public static String toSignature(String externalName)
+ {
+ if (externalName == null)
+ return null;
+
+ String ret = primitiveNameDescriptors.get(externalName);
+ if (ret != null)
+ return ret;
+
+ ret = externalName.replace('.', '/');
+ return (ret.charAt(0) == '[') ? ret : "L" + ret + ";";
+ }
+
+ public static String printArray(Object[] val)
+ {
+ if (val == null)
+ return "null";
+
+ StringBuilder out = new StringBuilder("[");
+ for (int i = 0; i < val.length; i++)
+ {
+ if (i > 0)
+ {
+ out.append(",");
+ }
+ out.append(val[i].getClass().isArray() ? printArray((Object[])val[i]) :
val[i]);
+ }
+ return out.append("]").toString();
+ }
+
+ public static String getSourceName(Class type)
+ {
+ if (! type.isArray())
+ return type.getName();
+
+ String arrayNotation = "";
+ Class component = type;
+ while(component.isArray())
+ {
+ component = component.getComponentType();
+ arrayNotation += "[]";
+ }
+
+ return component.getName() + arrayNotation;
+ }
+
+ public static String capitalize(String source)
+ {
+ if (source == null)
+ return null;
+
+ if (source.length() == 0)
+ return source;
+
+ if (Character.isUpperCase(source.charAt(0)))
+ return source;
+
+ char c = Character.toUpperCase(source.charAt(0));
+
+ return c + source.substring(1);
+ }
+
+ public static boolean isLoaded(String className, ClassLoader loader)
+ {
+ try
+ {
+ loadJavaType(className, loader);
+ }
+ catch (ClassNotFoundException e)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static String getPackageName(Class<?> clazz)
+ {
+ String fullName = clazz.getName();
+ return fullName.substring(0, fullName.lastIndexOf("."));
+ }
+
+ public static boolean isReservedKeyword(String keyword)
+ {
+ return reservedKeywords.contains(keyword);
+ }
+
+ /**
+ * Erases a type according to the JLS type erasure rules
+ *
+ * @param t type to erase
+ * @return erased type
+ */
+ public static Class erasure(Type type)
+ {
+ if (type instanceof ParameterizedType)
+ {
+ return erasure(((ParameterizedType)type).getRawType());
+ }
+ if (type instanceof TypeVariable)
+ {
+ return erasure(((TypeVariable)type).getBounds()[0]);
+ }
+ if (type instanceof WildcardType)
+ {
+ return erasure(((WildcardType)type).getUpperBounds()[0]);
+ }
+ if (type instanceof GenericArrayType)
+ {
+ return
Array.newInstance(erasure(((GenericArrayType)type).getGenericComponentType()),
0).getClass();
+ }
+
+ // Only type left is class
+ return (Class)type;
+ }
+
+ public static String[] getRawParameterTypeArguments(ParameterizedType type)
+ {
+ Type[] arguments = type.getActualTypeArguments();
+ String[] ret = new String[arguments.length];
+ for (int i = 0; i < arguments.length; i++)
+ {
+ Class raw = erasure(arguments[i]);
+ ret[i] = raw.getName();
+ }
+
+ return ret;
+ }
+
+ /**
+ * Tests if this class loader is a JBoss RepositoryClassLoader
+ *
+ * @param loader
+ * @return
+ */
+ public static boolean isJBossRepositoryClassLoader(ClassLoader loader)
+ {
+ Class clazz = loader.getClass();
+ while (!clazz.getName().startsWith("java"))
+ {
+ if
("org.jboss.mx.loading.RepositoryClassLoader".equals(clazz.getName()))
+ return true;
+ clazz = clazz.getSuperclass();
+ }
+
+ return false;
+ }
+
+ /**
+ * Clears black lists on a JBoss RepositoryClassLoader. This is somewhat of a hack,
and
+ * could be replaced with an integration module. This is needed when the following
order of
+ * events occur.
+ *
+ * <ol>
+ * <li>loadClass() returns not found</li>
+ * <li>Some call to defineClass()</li>
+ * <ol>
+ *
+ * The CNFE triggers a black list addition, which cause the class never again to be
found.
+ *
+ * @param loader the loader to clear black lists for
+ */
+ public static void clearBlacklists(ClassLoader loader)
+ {
+ if (isJBossRepositoryClassLoader(loader))
+ {
+ try
+ {
+ loader.getClass().getMethod("clearBlacklists").invoke(loader);
+ }
+ catch (Exception e)
+ {
+ log.debug("Could not clear blacklists on " + loader);
+ }
+ }
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavassistUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JavassistUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavassistUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,130 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.utils;
-
-import javassist.CtClass;
-import javassist.CtField;
-import javassist.CtMethod;
-import javassist.bytecode.AnnotationsAttribute;
-import javassist.bytecode.ClassFile;
-import javassist.bytecode.ConstPool;
-import javassist.bytecode.FieldInfo;
-import javassist.bytecode.MethodInfo;
-import javassist.bytecode.SignatureAttribute;
-import javassist.bytecode.annotation.ArrayMemberValue;
-import javassist.bytecode.annotation.EnumMemberValue;
-import javassist.bytecode.annotation.StringMemberValue;
-
-/**
- * Utility functions that simplify Javassist.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
- * @version $Revision$
- */
-public class JavassistUtils
-{
- public static void addFieldAnnotation(CtField field,
javassist.bytecode.annotation.Annotation annotation)
- {
- FieldInfo fieldInfo = field.getFieldInfo();
- AnnotationsAttribute attribute = (AnnotationsAttribute)
fieldInfo.getAttribute(AnnotationsAttribute.visibleTag);
- if (attribute == null)
- attribute = new AnnotationsAttribute(fieldInfo.getConstPool(),
AnnotationsAttribute.visibleTag);
- attribute.addAnnotation(annotation);
- fieldInfo.addAttribute(attribute);
- }
-
- public static void addClassAnnotation(CtClass clazz,
javassist.bytecode.annotation.Annotation annotation)
- {
- ClassFile classFile = clazz.getClassFile();
- AnnotationsAttribute attribute = (AnnotationsAttribute)
classFile.getAttribute(AnnotationsAttribute.visibleTag);
- if (attribute == null)
- attribute = new AnnotationsAttribute(classFile.getConstPool(),
AnnotationsAttribute.visibleTag);
- attribute.addAnnotation(annotation);
- classFile.addAttribute(attribute);
- }
-
- public static Annotation createAnnotation(Class<? extends
java.lang.annotation.Annotation> annotation, ConstPool constPool)
- {
- return new Annotation(annotation, constPool);
- }
-
- public static void addSignature(CtField field, String signature)
- {
- FieldInfo fieldInfo = field.getFieldInfo();
- ConstPool constPool = fieldInfo.getConstPool();
- SignatureAttribute signatureAttribute = new SignatureAttribute(constPool,
signature);
- fieldInfo.addAttribute(signatureAttribute);
- }
-
- public static void addSignature(CtMethod method, String signature)
- {
- MethodInfo methodInfo = method.getMethodInfo();
- ConstPool constPool = methodInfo.getConstPool();
- SignatureAttribute signatureAttribute = new SignatureAttribute(constPool,
signature);
- methodInfo.addAttribute(signatureAttribute);
- }
-
- public static class Annotation
- {
- private javassist.bytecode.annotation.Annotation annotation;
- private ConstPool constPool;
-
- public Annotation(Class<? extends java.lang.annotation.Annotation>
annotation, ConstPool constPool)
- {
- this.annotation = new
javassist.bytecode.annotation.Annotation(annotation.getName(), constPool);
- this.constPool = constPool;
- }
-
- public void addParameter(String name, String value)
- {
- annotation.addMemberValue(name, new StringMemberValue(value, constPool));
- }
-
- public void addParameter(String name, Enum value)
- {
- EnumMemberValue enumValue = new EnumMemberValue(constPool);
- enumValue.setType(value.getClass().getName());
- enumValue.setValue(value.name());
- annotation.addMemberValue(name, enumValue);
- }
-
- public void addParameter(String name, String[] values)
- {
- ArrayMemberValue member = new ArrayMemberValue(constPool);
- StringMemberValue[] members = new StringMemberValue[values.length];
- for (int i = 0; i < values.length; i++)
- members[i] = new StringMemberValue(values[i], constPool);
- member.setValue(members);
- annotation.addMemberValue(name, member);
- }
-
- public void markClass(CtClass clazz)
- {
- addClassAnnotation(clazz, annotation);
- }
-
- public void markField(CtField field)
- {
- addFieldAnnotation(field, annotation);
- }
- }
-}
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavassistUtils.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JavassistUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/JavassistUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/JavassistUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+import javassist.CtClass;
+import javassist.CtField;
+import javassist.CtMethod;
+import javassist.bytecode.AnnotationsAttribute;
+import javassist.bytecode.ClassFile;
+import javassist.bytecode.ConstPool;
+import javassist.bytecode.FieldInfo;
+import javassist.bytecode.MethodInfo;
+import javassist.bytecode.SignatureAttribute;
+import javassist.bytecode.annotation.ArrayMemberValue;
+import javassist.bytecode.annotation.EnumMemberValue;
+import javassist.bytecode.annotation.StringMemberValue;
+
+/**
+ * Utility functions that simplify Javassist.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class JavassistUtils
+{
+ public static void addFieldAnnotation(CtField field,
javassist.bytecode.annotation.Annotation annotation)
+ {
+ FieldInfo fieldInfo = field.getFieldInfo();
+ AnnotationsAttribute attribute = (AnnotationsAttribute)
fieldInfo.getAttribute(AnnotationsAttribute.visibleTag);
+ if (attribute == null)
+ attribute = new AnnotationsAttribute(fieldInfo.getConstPool(),
AnnotationsAttribute.visibleTag);
+ attribute.addAnnotation(annotation);
+ fieldInfo.addAttribute(attribute);
+ }
+
+ public static void addClassAnnotation(CtClass clazz,
javassist.bytecode.annotation.Annotation annotation)
+ {
+ ClassFile classFile = clazz.getClassFile();
+ AnnotationsAttribute attribute = (AnnotationsAttribute)
classFile.getAttribute(AnnotationsAttribute.visibleTag);
+ if (attribute == null)
+ attribute = new AnnotationsAttribute(classFile.getConstPool(),
AnnotationsAttribute.visibleTag);
+ attribute.addAnnotation(annotation);
+ classFile.addAttribute(attribute);
+ }
+
+ public static Annotation createAnnotation(Class<? extends
java.lang.annotation.Annotation> annotation, ConstPool constPool)
+ {
+ return new Annotation(annotation, constPool);
+ }
+
+ public static void addSignature(CtField field, String signature)
+ {
+ FieldInfo fieldInfo = field.getFieldInfo();
+ ConstPool constPool = fieldInfo.getConstPool();
+ SignatureAttribute signatureAttribute = new SignatureAttribute(constPool,
signature);
+ fieldInfo.addAttribute(signatureAttribute);
+ }
+
+ public static void addSignature(CtMethod method, String signature)
+ {
+ MethodInfo methodInfo = method.getMethodInfo();
+ ConstPool constPool = methodInfo.getConstPool();
+ SignatureAttribute signatureAttribute = new SignatureAttribute(constPool,
signature);
+ methodInfo.addAttribute(signatureAttribute);
+ }
+
+ public static class Annotation
+ {
+ private javassist.bytecode.annotation.Annotation annotation;
+ private ConstPool constPool;
+
+ public Annotation(Class<? extends java.lang.annotation.Annotation>
annotation, ConstPool constPool)
+ {
+ this.annotation = new
javassist.bytecode.annotation.Annotation(annotation.getName(), constPool);
+ this.constPool = constPool;
+ }
+
+ public void addParameter(String name, String value)
+ {
+ annotation.addMemberValue(name, new StringMemberValue(value, constPool));
+ }
+
+ public void addParameter(String name, Enum value)
+ {
+ EnumMemberValue enumValue = new EnumMemberValue(constPool);
+ enumValue.setType(value.getClass().getName());
+ enumValue.setValue(value.name());
+ annotation.addMemberValue(name, enumValue);
+ }
+
+ public void addParameter(String name, String[] values)
+ {
+ ArrayMemberValue member = new ArrayMemberValue(constPool);
+ StringMemberValue[] members = new StringMemberValue[values.length];
+ for (int i = 0; i < values.length; i++)
+ members[i] = new StringMemberValue(values[i], constPool);
+ member.setValue(members);
+ annotation.addMemberValue(name, member);
+ }
+
+ public void markClass(CtClass clazz)
+ {
+ addClassAnnotation(clazz, annotation);
+ }
+
+ public void markField(CtField field)
+ {
+ addFieldAnnotation(field, annotation);
+ }
+ }
+}
\ No newline at end of file
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/MimeUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/MimeUtils.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,358 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.utils;
-
-// $Id$
-
-
-
-import java.awt.image.BufferedImage;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.mail.internet.ContentType;
-import javax.mail.internet.MimeMultipart;
-import javax.mail.internet.ParseException;
-import javax.xml.namespace.QName;
-import javax.xml.transform.stream.StreamSource;
-
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-
-import com.sun.image.codec.jpeg.JPEGCodec;
-import com.sun.image.codec.jpeg.JPEGImageDecoder;
-import com.sun.image.codec.jpeg.JPEGImageEncoder;
-
-/**
- * Generic mime utility class.
- *
- * @author <a href="mailto:jason@stacksmash.com">Jason T.
Greene</a>
- */
-public class MimeUtils
-{
-
- private static Map<String, Class> mime2class = new HashMap<String,
Class>();
- private static Map<Class, String> class2mime = new HashMap<Class,
String>();
-
- static {
- mime2class.put("text/plain", java.lang.String.class);
- mime2class.put("image/jpeg", java.awt.Image.class);
- mime2class.put("text/xml", javax.xml.transform.Source.class);
- mime2class.put("application/xml", javax.xml.transform.Source.class);
- mime2class.put("application/octet-stream",
javax.activation.DataHandler.class);
-
- class2mime.put(java.awt.Image.class, "image/jpeg");
- class2mime.put(javax.xml.transform.Source.class, "text/xml");
- class2mime.put(java.lang.String.class, "text/plain");
- }
-
- /**
- * Converts a MIME type into a proprietary JBossWS attachment xml type.
- *
- * @param mimeType the MIME type string to convert
- * @return the xml type that this mime type corresponds to
- */
- public static QName convertMimeTypeToXmlType(String mimeType)
- {
- StringBuilder mimeName = new StringBuilder(mimeType);
-
- int pos = mimeName.indexOf("/");
-
- if (pos == -1)
- return null;
-
- mimeName.setCharAt(pos, '_');
-
- return new QName(Constants.NS_ATTACHMENT_MIME_TYPE, mimeName.toString());
- }
-
- /**
- * Gets the base portion of a MIME type string. This basically just strips
- * off any type parameter elements.
- *
- * @param mimeType any MIME type string
- * @return a reduced MIME string containing no type parameters
- */
- public static String getBaseMimeType(String mimeType)
- {
- ContentType contentType;
-
- if (mimeType == null)
- return null;
- try
- {
- contentType = new ContentType(mimeType);
- }
- catch (ParseException e)
- {
- return null;
- }
-
- return contentType.getBaseType();
- }
-
- /**
- * Checks if there is a matching mime pattern for mimeType in mimeTypes. This
- * will return true if there is an exact match (for example text/plain =
- * text/plain), or if there is a wildcard subtype match (text/plain =
- * text/*).
- *
- * @param mimeType the mime type to search for
- * @param mimeTypes the set of mime types to search
- * @return true if there is a match, false if not
- */
- public static boolean isMemberOf(String mimeType, Set mimeTypes)
- {
- if (mimeTypes.contains(mimeType))
- return true;
-
- try
- {
- if (mimeTypes.contains(new ContentType(mimeType).getPrimaryType() +
"/*"))
- return true;
- }
- catch (ParseException e)
- {
- // eat
- }
-
- return false;
- }
-
- /**
- * Resolve the class for a mype type.
- * Defaults to <code>DataHandler</code> if no mapping could be found.
- */
- public static Class resolveClass(String mimeType) {
- Class cl = mime2class.get(mimeType);
- if(null==cl)
- cl = javax.activation.DataHandler.class;
- return cl;
- }
-
- /**
- * Resolve the mime type for an object.
- * Default to <code>application/octet-stream</code>
- * if no mapping could be found.
- */
- public static String resolveMimeType(Object obj) {
- String mimeType = (obj instanceof MimeMultipart) ?
- ((MimeMultipart)obj).getContentType() :
- resolveMimeType(obj.getClass());
- return mimeType;
- }
-
- public static String resolveMimeType(Class clazz) {
- String mimeType = "application/octet-stream";
- for(Class cl : class2mime.keySet())
- {
- if(JavaUtils.isAssignableFrom(cl, clazz))
- mimeType = class2mime.get(cl);
- }
- return mimeType;
- }
-
- public static ByteArrayConverter getConverterForJavaType(Class targetClazz)
- {
- ByteArrayConverter converter = null;
- if(JavaUtils.isAssignableFrom(java.awt.Image.class, targetClazz))
- converter = new ImageConverter();
- else if (JavaUtils.isAssignableFrom(javax.xml.transform.Source.class,
targetClazz))
- converter = new SourceConverter();
- else if (JavaUtils.isAssignableFrom(java.lang.String.class, targetClazz))
- converter = new StringConverter();
- else if (JavaUtils.isAssignableFrom(java.io.InputStream.class, targetClazz))
- converter = new StreamConverter();
-
- if(null == converter)
- throw new WSException("No ByteArrayConverter for class: " +
targetClazz.getName());
-
- return converter;
- }
-
- public static ByteArrayConverter getConverterForContentType(String contentType)
- {
- ByteArrayConverter converter = null;
-
- if(contentType != null)
- {
- if("image/jpeg".equals(contentType) ||
"image/jpg".equals(contentType))
- converter = new ImageConverter();
- else if("text/xml".equals(contentType) ||
"application/xml".equals(contentType))
- converter = new SourceConverter();
- else if("text/plain".equals(contentType))
- converter = new StringConverter();
- else if("application/octet-stream".equals(contentType))
- converter = new StreamConverter();
- }
-
- if(null == converter)
- throw new WSException("No ByteArrayConverter for content type: " +
contentType);
-
- return converter;
- }
- public static class ImageConverter implements ByteArrayConverter
- {
- public Object readFrom(InputStream in) {
- Object converted = null;
- try
- {
- JPEGImageDecoder dec = JPEGCodec.createJPEGDecoder(in);
- BufferedImage bim = dec.decodeAsBufferedImage();
- converted = bim;
- }
- catch (Exception e)
- {
- // ignore
- }
-
- return converted;
- }
-
- public void writeTo(Object obj, OutputStream out) {
- if(obj instanceof BufferedImage)
- {
- JPEGImageEncoder enc = JPEGCodec.createJPEGEncoder(out);
- try
- {
- enc.encode((BufferedImage)obj);
- }
- catch (IOException e)
- {
- throw new WSException("Failed to convert " + obj.getClass());
- }
- }
- else
- {
- throw new WSException("Unable to convert " + obj.getClass());
- }
-
- }
-
- }
-
- public static class SourceConverter implements ByteArrayConverter
- {
- public Object readFrom(InputStream in) {
- return new StreamSource(in);
- }
-
- public void writeTo(Object obj, OutputStream out) {
- if(obj instanceof StreamSource)
- {
- StreamSource s = (StreamSource)obj;
- try
- {
- IOUtils.copyStream(out, s.getInputStream());
- }
- catch (IOException e)
- {
- throw new WSException("Failed to convert " + obj.getClass());
- }
- }
- else
- {
- throw new WSException("Unable to convert " + obj.getClass());
- }
- }
- }
-
- public static class StringConverter implements ByteArrayConverter
- {
- public Object readFrom(InputStream in) {
- Object converted = null;
- try
- {
- BufferedReader br = new BufferedReader(new InputStreamReader(in));
- StringBuilder sb = new StringBuilder();
- String line = null;
-
- while ((line = br.readLine()) != null) {
- sb.append(line + "\n");
- }
-
- br.close();
-
- converted = sb.toString();
- }
- catch (IOException e)
- {
- throw new WSException("Failed to convert java.lang.String");
- }
-
- return converted;
- }
-
- public void writeTo(Object obj, OutputStream out) {
- if(obj instanceof String)
- {
- String s = (String)obj;
- try
- {
- out.write(s.getBytes("UTF-8"));
- }
- catch (IOException e)
- {
- throw new WSException("Failed to convert " + obj.getClass());
- }
- }
- else
- {
- throw new WSException("Unable to convert " + obj.getClass());
- }
- }
- }
-
- public static class StreamConverter implements ByteArrayConverter
- {
- public Object readFrom(InputStream in) {
- return in;
- }
-
- public void writeTo(Object obj, OutputStream out) {
- if(obj instanceof InputStream)
- {
- try
- {
- IOUtils.copyStream(out, (InputStream)obj);
- }
- catch (IOException e)
- {
- throw new WSException("Failed to convert " + obj.getClass());
- }
- }
- }
- }
- public interface ByteArrayConverter
- {
- Object readFrom(InputStream in);
- void writeTo(Object obj, OutputStream out);
- }
-
-
-}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/MimeUtils.java (from
rev 1586, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/MimeUtils.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/MimeUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/MimeUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,358 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.utils;
+
+// $Id$
+
+
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.mail.internet.ContentType;
+import javax.mail.internet.MimeMultipart;
+import javax.mail.internet.ParseException;
+import javax.xml.namespace.QName;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+
+import com.sun.image.codec.jpeg.JPEGCodec;
+import com.sun.image.codec.jpeg.JPEGImageDecoder;
+import com.sun.image.codec.jpeg.JPEGImageEncoder;
+
+/**
+ * Generic mime utility class.
+ *
+ * @author <a href="mailto:jason@stacksmash.com">Jason T.
Greene</a>
+ */
+public class MimeUtils
+{
+
+ private static Map<String, Class> mime2class = new HashMap<String,
Class>();
+ private static Map<Class, String> class2mime = new HashMap<Class,
String>();
+
+ static {
+ mime2class.put("text/plain", java.lang.String.class);
+ mime2class.put("image/jpeg", java.awt.Image.class);
+ mime2class.put("text/xml", javax.xml.transform.Source.class);
+ mime2class.put("application/xml", javax.xml.transform.Source.class);
+ mime2class.put("application/octet-stream",
javax.activation.DataHandler.class);
+
+ class2mime.put(java.awt.Image.class, "image/jpeg");
+ class2mime.put(javax.xml.transform.Source.class, "text/xml");
+ class2mime.put(java.lang.String.class, "text/plain");
+ }
+
+ /**
+ * Converts a MIME type into a proprietary JBossWS attachment xml type.
+ *
+ * @param mimeType the MIME type string to convert
+ * @return the xml type that this mime type corresponds to
+ */
+ public static QName convertMimeTypeToXmlType(String mimeType)
+ {
+ StringBuilder mimeName = new StringBuilder(mimeType);
+
+ int pos = mimeName.indexOf("/");
+
+ if (pos == -1)
+ return null;
+
+ mimeName.setCharAt(pos, '_');
+
+ return new QName(Constants.NS_ATTACHMENT_MIME_TYPE, mimeName.toString());
+ }
+
+ /**
+ * Gets the base portion of a MIME type string. This basically just strips
+ * off any type parameter elements.
+ *
+ * @param mimeType any MIME type string
+ * @return a reduced MIME string containing no type parameters
+ */
+ public static String getBaseMimeType(String mimeType)
+ {
+ ContentType contentType;
+
+ if (mimeType == null)
+ return null;
+ try
+ {
+ contentType = new ContentType(mimeType);
+ }
+ catch (ParseException e)
+ {
+ return null;
+ }
+
+ return contentType.getBaseType();
+ }
+
+ /**
+ * Checks if there is a matching mime pattern for mimeType in mimeTypes. This
+ * will return true if there is an exact match (for example text/plain =
+ * text/plain), or if there is a wildcard subtype match (text/plain =
+ * text/*).
+ *
+ * @param mimeType the mime type to search for
+ * @param mimeTypes the set of mime types to search
+ * @return true if there is a match, false if not
+ */
+ public static boolean isMemberOf(String mimeType, Set mimeTypes)
+ {
+ if (mimeTypes.contains(mimeType))
+ return true;
+
+ try
+ {
+ if (mimeTypes.contains(new ContentType(mimeType).getPrimaryType() +
"/*"))
+ return true;
+ }
+ catch (ParseException e)
+ {
+ // eat
+ }
+
+ return false;
+ }
+
+ /**
+ * Resolve the class for a mype type.
+ * Defaults to <code>DataHandler</code> if no mapping could be found.
+ */
+ public static Class resolveClass(String mimeType) {
+ Class cl = mime2class.get(mimeType);
+ if(null==cl)
+ cl = javax.activation.DataHandler.class;
+ return cl;
+ }
+
+ /**
+ * Resolve the mime type for an object.
+ * Default to <code>application/octet-stream</code>
+ * if no mapping could be found.
+ */
+ public static String resolveMimeType(Object obj) {
+ String mimeType = (obj instanceof MimeMultipart) ?
+ ((MimeMultipart)obj).getContentType() :
+ resolveMimeType(obj.getClass());
+ return mimeType;
+ }
+
+ public static String resolveMimeType(Class clazz) {
+ String mimeType = "application/octet-stream";
+ for(Class cl : class2mime.keySet())
+ {
+ if(JavaUtils.isAssignableFrom(cl, clazz))
+ mimeType = class2mime.get(cl);
+ }
+ return mimeType;
+ }
+
+ public static ByteArrayConverter getConverterForJavaType(Class targetClazz)
+ {
+ ByteArrayConverter converter = null;
+ if(JavaUtils.isAssignableFrom(java.awt.Image.class, targetClazz))
+ converter = new ImageConverter();
+ else if (JavaUtils.isAssignableFrom(javax.xml.transform.Source.class,
targetClazz))
+ converter = new SourceConverter();
+ else if (JavaUtils.isAssignableFrom(java.lang.String.class, targetClazz))
+ converter = new StringConverter();
+ else if (JavaUtils.isAssignableFrom(java.io.InputStream.class, targetClazz))
+ converter = new StreamConverter();
+
+ if(null == converter)
+ throw new WSException("No ByteArrayConverter for class: " +
targetClazz.getName());
+
+ return converter;
+ }
+
+ public static ByteArrayConverter getConverterForContentType(String contentType)
+ {
+ ByteArrayConverter converter = null;
+
+ if(contentType != null)
+ {
+ if("image/jpeg".equals(contentType) ||
"image/jpg".equals(contentType))
+ converter = new ImageConverter();
+ else if("text/xml".equals(contentType) ||
"application/xml".equals(contentType))
+ converter = new SourceConverter();
+ else if("text/plain".equals(contentType))
+ converter = new StringConverter();
+ else if("application/octet-stream".equals(contentType))
+ converter = new StreamConverter();
+ }
+
+ if(null == converter)
+ throw new WSException("No ByteArrayConverter for content type: " +
contentType);
+
+ return converter;
+ }
+ public static class ImageConverter implements ByteArrayConverter
+ {
+ public Object readFrom(InputStream in) {
+ Object converted = null;
+ try
+ {
+ JPEGImageDecoder dec = JPEGCodec.createJPEGDecoder(in);
+ BufferedImage bim = dec.decodeAsBufferedImage();
+ converted = bim;
+ }
+ catch (Exception e)
+ {
+ // ignore
+ }
+
+ return converted;
+ }
+
+ public void writeTo(Object obj, OutputStream out) {
+ if(obj instanceof BufferedImage)
+ {
+ JPEGImageEncoder enc = JPEGCodec.createJPEGEncoder(out);
+ try
+ {
+ enc.encode((BufferedImage)obj);
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to convert " + obj.getClass());
+ }
+ }
+ else
+ {
+ throw new WSException("Unable to convert " + obj.getClass());
+ }
+
+ }
+
+ }
+
+ public static class SourceConverter implements ByteArrayConverter
+ {
+ public Object readFrom(InputStream in) {
+ return new StreamSource(in);
+ }
+
+ public void writeTo(Object obj, OutputStream out) {
+ if(obj instanceof StreamSource)
+ {
+ StreamSource s = (StreamSource)obj;
+ try
+ {
+ IOUtils.copyStream(out, s.getInputStream());
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to convert " + obj.getClass());
+ }
+ }
+ else
+ {
+ throw new WSException("Unable to convert " + obj.getClass());
+ }
+ }
+ }
+
+ public static class StringConverter implements ByteArrayConverter
+ {
+ public Object readFrom(InputStream in) {
+ Object converted = null;
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(in));
+ StringBuilder sb = new StringBuilder();
+ String line = null;
+
+ while ((line = br.readLine()) != null) {
+ sb.append(line + "\n");
+ }
+
+ br.close();
+
+ converted = sb.toString();
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to convert java.lang.String");
+ }
+
+ return converted;
+ }
+
+ public void writeTo(Object obj, OutputStream out) {
+ if(obj instanceof String)
+ {
+ String s = (String)obj;
+ try
+ {
+ out.write(s.getBytes("UTF-8"));
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to convert " + obj.getClass());
+ }
+ }
+ else
+ {
+ throw new WSException("Unable to convert " + obj.getClass());
+ }
+ }
+ }
+
+ public static class StreamConverter implements ByteArrayConverter
+ {
+ public Object readFrom(InputStream in) {
+ return in;
+ }
+
+ public void writeTo(Object obj, OutputStream out) {
+ if(obj instanceof InputStream)
+ {
+ try
+ {
+ IOUtils.copyStream(out, (InputStream)obj);
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Failed to convert " + obj.getClass());
+ }
+ }
+ }
+ }
+ public interface ByteArrayConverter
+ {
+ Object readFrom(InputStream in);
+ void writeTo(Object obj, OutputStream out);
+ }
+
+
+}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/ObjectNameFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/ObjectNameFactory.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/ObjectNameFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.utils;
-
-import java.util.Hashtable;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-/**
- * A simple factory for creating safe object names.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 08-May-2006
- */
-public class ObjectNameFactory
-{
- public static ObjectName create(String name)
- {
- try
- {
- return new ObjectName(name);
- }
- catch (MalformedObjectNameException e)
- {
- throw new Error("Invalid ObjectName: " + name + "; " + e);
- }
- }
-
- public static ObjectName create(String domain, String key, String value)
- {
- try
- {
- return new ObjectName(domain, key, value);
- }
- catch (MalformedObjectNameException e)
- {
- throw new Error("Invalid ObjectName: " + domain + "," + key
+ "," + value + "; " + e);
- }
- }
-
- public static ObjectName create(String domain, Hashtable table)
- {
- try
- {
- return new ObjectName(domain, table);
- }
- catch (MalformedObjectNameException e)
- {
- throw new Error("Invalid ObjectName: " + domain + "," +
table + "; " + e);
- }
- }
-}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/ObjectNameFactory.java (from
rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/ObjectNameFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/ObjectNameFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/ObjectNameFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.utils;
+
+import java.util.Hashtable;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * A simple factory for creating safe object names.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-May-2006
+ */
+public class ObjectNameFactory
+{
+ public static ObjectName create(String name)
+ {
+ try
+ {
+ return new ObjectName(name);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + name + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, String key, String value)
+ {
+ try
+ {
+ return new ObjectName(domain, key, value);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + key
+ "," + value + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, Hashtable table)
+ {
+ try
+ {
+ return new ObjectName(domain, table);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," +
table + "; " + e);
+ }
+ }
+}
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/UUIDGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/UUIDGenerator.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/UUIDGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,121 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.utils;
-
-import java.security.SecureRandom;
-
-/**
- * Generates the string form of IETF variant UUIDs.
- *
- * See <a
href="http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-05...
- * the latest IETF draft</a> for more information about UUID generation.
- *
- * Currently only pseudo random (type 4) UUIDs are supported.
- *
- * @author <a href="mailto:jason@stacksmash.com">Jason T.
Greene</a>
- */
-public class UUIDGenerator
-{
- private static SecureRandom rand;
-
- private static String bytesToHex(byte[] buffer, int offset, int length)
- {
- long value = 0;
- for (int i = 0, countDown = 8 * length; i < length; i++)
- {
- value |= (buffer[offset + i] & 0xffL) << (countDown -= 8);
- }
-
- return Long.toHexString(value);
- }
-
- /**
- * Generates a pseudo random UUID and returns it in byte array form.
- *
- * @return a UUID byte array in network order
- */
- public static byte[] generateRandomUUIDBytes()
- {
- if (rand == null)
- rand = new SecureRandom();
-
- byte[] buffer = new byte[16];
- rand.nextBytes(buffer);
-
- // Set version to 3 (Random)
- buffer[6] = (byte) ((buffer[6] & 0x0f) | 0x40);
- // Set variant to 2 (IETF)
- buffer[8] = (byte) ((buffer[8] & 0x3f) | 0x80);
-
- return buffer;
- }
-
- /**
- * Generates a pseudo random UUID and returns it the IETF specified
- * String form. See {@link #convertToString(byte[])} for a description
- * of the format.
- *
- * @return a UUID in IETF string form.
- */
- public static String generateRandomUUIDString()
- {
- return convertToString(generateRandomUUIDBytes());
- }
-
- /**
- * Converts a UUID in byte array form to the IETF string format.
- *
- * <p>The BNF follows:
- * <pre>
- * UUID = <time_low> "-" <time_mid>
"-"
- * <time_high_and_version> "-"
- * <variant_and_sequence> "-"
- * <node>
- * time_low = 4*<hexOctet>
- * time_mid = 2*<hexOctet>
- * time_high_and_version = 2*<hexOctet>
- * variant_and_sequence = 2*<hexOctet>
- * node = 6*<hexOctet>
- * hexOctet = <hexDigit><hexDigit>
- * hexDigit =
- * "0" | "1" | "2" | "3" |
"4" | "5" | "6" | "7" | "8" |
"9"
- * | "a" | "b" | "c" | "d" |
"e" | "f"
- * | "A" | "B" | "C" | "D" |
"E" | "F"
- * </pre>
- *
- * @param uuid a 16 byte
- * @return the IETF string form of the passed UUID
- */
- public static String convertToString(byte[] uuid)
- {
- if (uuid.length != 16)
- throw new IllegalArgumentException("A UUID must be 16 bytes!");
-
- String string = bytesToHex(uuid, 0, 4) + "-"
- + bytesToHex(uuid, 4, 2) + "-"
- + bytesToHex(uuid, 6, 2) + "-"
- + bytesToHex(uuid, 8, 2) + "-"
- + bytesToHex(uuid, 10, 6);
-
- return string;
- }
-}
\ No newline at end of file
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/UUIDGenerator.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/UUIDGenerator.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/UUIDGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/UUIDGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,121 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.utils;
+
+import java.security.SecureRandom;
+
+/**
+ * Generates the string form of IETF variant UUIDs.
+ *
+ * See <a
href="http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-05...
+ * the latest IETF draft</a> for more information about UUID generation.
+ *
+ * Currently only pseudo random (type 4) UUIDs are supported.
+ *
+ * @author <a href="mailto:jason@stacksmash.com">Jason T.
Greene</a>
+ */
+public class UUIDGenerator
+{
+ private static SecureRandom rand;
+
+ private static String bytesToHex(byte[] buffer, int offset, int length)
+ {
+ long value = 0;
+ for (int i = 0, countDown = 8 * length; i < length; i++)
+ {
+ value |= (buffer[offset + i] & 0xffL) << (countDown -= 8);
+ }
+
+ return Long.toHexString(value);
+ }
+
+ /**
+ * Generates a pseudo random UUID and returns it in byte array form.
+ *
+ * @return a UUID byte array in network order
+ */
+ public static byte[] generateRandomUUIDBytes()
+ {
+ if (rand == null)
+ rand = new SecureRandom();
+
+ byte[] buffer = new byte[16];
+ rand.nextBytes(buffer);
+
+ // Set version to 3 (Random)
+ buffer[6] = (byte) ((buffer[6] & 0x0f) | 0x40);
+ // Set variant to 2 (IETF)
+ buffer[8] = (byte) ((buffer[8] & 0x3f) | 0x80);
+
+ return buffer;
+ }
+
+ /**
+ * Generates a pseudo random UUID and returns it the IETF specified
+ * String form. See {@link #convertToString(byte[])} for a description
+ * of the format.
+ *
+ * @return a UUID in IETF string form.
+ */
+ public static String generateRandomUUIDString()
+ {
+ return convertToString(generateRandomUUIDBytes());
+ }
+
+ /**
+ * Converts a UUID in byte array form to the IETF string format.
+ *
+ * <p>The BNF follows:
+ * <pre>
+ * UUID = <time_low> "-" <time_mid>
"-"
+ * <time_high_and_version> "-"
+ * <variant_and_sequence> "-"
+ * <node>
+ * time_low = 4*<hexOctet>
+ * time_mid = 2*<hexOctet>
+ * time_high_and_version = 2*<hexOctet>
+ * variant_and_sequence = 2*<hexOctet>
+ * node = 6*<hexOctet>
+ * hexOctet = <hexDigit><hexDigit>
+ * hexDigit =
+ * "0" | "1" | "2" | "3" |
"4" | "5" | "6" | "7" | "8" |
"9"
+ * | "a" | "b" | "c" | "d" |
"e" | "f"
+ * | "A" | "B" | "C" | "D" |
"E" | "F"
+ * </pre>
+ *
+ * @param uuid a 16 byte
+ * @return the IETF string form of the passed UUID
+ */
+ public static String convertToString(byte[] uuid)
+ {
+ if (uuid.length != 16)
+ throw new IllegalArgumentException("A UUID must be 16 bytes!");
+
+ String string = bytesToHex(uuid, 0, 4) + "-"
+ + bytesToHex(uuid, 4, 2) + "-"
+ + bytesToHex(uuid, 6, 2) + "-"
+ + bytesToHex(uuid, 8, 2) + "-"
+ + bytesToHex(uuid, 10, 6);
+
+ return string;
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/XMLPredefinedEntityReferenceResolver.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java 2006-12-06
22:50:47 UTC (rev 1583)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/XMLPredefinedEntityReferenceResolver.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,123 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.common.utils;
-
-import java.util.HashMap;
-
-/**
- * Utility class for resolving predefined XML entity and character references.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
- * @version $Revision$
- */
-public class XMLPredefinedEntityReferenceResolver
-{
- private static HashMap<String, Character> entities = new HashMap<String,
Character>();
-
- static
- {
- entities.put("quot", '"');
- entities.put("amp", '&');
- entities.put("lt", '<');
- entities.put("gt", '>');
- entities.put("apos", '\'');
- }
-
- private static int resolveCharRef(String source, int pos, StringBuilder builder)
- {
- int radix = 10;
- if (source.charAt(pos += 2) == 'x')
- {
- pos++;
- radix = 16;
- }
-
- int end = source.indexOf(';', pos);
- if (end == -1)
- throw new IllegalArgumentException("Invalid character reference");
-
- int c = Integer.parseInt(source.substring(pos, end), radix);
- builder.append((char) c);
-
- return end + 1;
- }
-
- private static int resolveEntityRef(String source, int pos, StringBuilder builder)
- {
- int end = source.indexOf(';', ++pos);
- if (end == -1)
- throw new IllegalArgumentException("Invalid entity reference");
-
- String entity = source.substring(pos, end);
- Character c = entities.get(entity);
- if (c == null)
- throw new IllegalArgumentException("Invalid entity: " + entity);
-
- builder.append(c.charValue());
-
- return end + 1;
- }
-
- /**
- * Transforms an XML normalized string by resolving all predefined character and
entity references
- *
- * @param normalized an XML normalized string
- * @return a standard java string that is no longer XML normalized
- */
- public static String resolve(String normalized)
- {
- StringBuilder builder = new StringBuilder();
- int end = normalized.length();
- int pos = normalized.indexOf('&');
- int last = 0;
-
- // No references
- if (pos == -1)
- return normalized;
-
- while (pos != -1)
- {
- String sub = normalized.subSequence(last, pos).toString();
- builder.append(sub);
-
- int peek = pos + 1;
- if (peek == end)
- throw new IllegalArgumentException("Invalid entity reference");
-
- if (normalized.charAt(peek) == '#')
- pos = resolveCharRef(normalized, pos, builder);
- else
- pos = resolveEntityRef(normalized, pos, builder);
-
- last = pos;
- pos = normalized.indexOf('&', pos);
- }
-
- if (last < end)
- {
- String sub = normalized.subSequence(last, end).toString();
- builder.append(sub);
- }
-
- return builder.toString();
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/XMLPredefinedEntityReferenceResolver.java
(from rev 1586,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/XMLPredefinedEntityReferenceResolver.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/utils/XMLPredefinedEntityReferenceResolver.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -0,0 +1,123 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.utils;
+
+import java.util.HashMap;
+
+/**
+ * Utility class for resolving predefined XML entity and character references.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @version $Revision$
+ */
+public class XMLPredefinedEntityReferenceResolver
+{
+ private static HashMap<String, Character> entities = new HashMap<String,
Character>();
+
+ static
+ {
+ entities.put("quot", '"');
+ entities.put("amp", '&');
+ entities.put("lt", '<');
+ entities.put("gt", '>');
+ entities.put("apos", '\'');
+ }
+
+ private static int resolveCharRef(String source, int pos, StringBuilder builder)
+ {
+ int radix = 10;
+ if (source.charAt(pos += 2) == 'x')
+ {
+ pos++;
+ radix = 16;
+ }
+
+ int end = source.indexOf(';', pos);
+ if (end == -1)
+ throw new IllegalArgumentException("Invalid character reference");
+
+ int c = Integer.parseInt(source.substring(pos, end), radix);
+ builder.append((char) c);
+
+ return end + 1;
+ }
+
+ private static int resolveEntityRef(String source, int pos, StringBuilder builder)
+ {
+ int end = source.indexOf(';', ++pos);
+ if (end == -1)
+ throw new IllegalArgumentException("Invalid entity reference");
+
+ String entity = source.substring(pos, end);
+ Character c = entities.get(entity);
+ if (c == null)
+ throw new IllegalArgumentException("Invalid entity: " + entity);
+
+ builder.append(c.charValue());
+
+ return end + 1;
+ }
+
+ /**
+ * Transforms an XML normalized string by resolving all predefined character and
entity references
+ *
+ * @param normalized an XML normalized string
+ * @return a standard java string that is no longer XML normalized
+ */
+ public static String resolve(String normalized)
+ {
+ StringBuilder builder = new StringBuilder();
+ int end = normalized.length();
+ int pos = normalized.indexOf('&');
+ int last = 0;
+
+ // No references
+ if (pos == -1)
+ return normalized;
+
+ while (pos != -1)
+ {
+ String sub = normalized.subSequence(last, pos).toString();
+ builder.append(sub);
+
+ int peek = pos + 1;
+ if (peek == end)
+ throw new IllegalArgumentException("Invalid entity reference");
+
+ if (normalized.charAt(peek) == '#')
+ pos = resolveCharRef(normalized, pos, builder);
+ else
+ pos = resolveEntityRef(normalized, pos, builder);
+
+ last = pos;
+ pos = normalized.indexOf('&', pos);
+ }
+
+ if (last < end)
+ {
+ String sub = normalized.subSequence(last, end).toString();
+ builder.append(sub);
+ }
+
+ return builder.toString();
+ }
+}
\ No newline at end of file
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingClientUtil.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingClientUtil.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingClientUtil.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -9,7 +9,7 @@
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.AttributedURI;
-import org.jboss.ws.common.utils.UUIDGenerator;
+import org.jboss.ws.core.utils.UUIDGenerator;
/**
* @author Heiko Braun, <heiko(a)openj.net>
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingConstantsImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingConstantsImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/AddressingConstantsImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import javax.xml.ws.addressing.AddressingConstants;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
* Encapsulation for version-specific WS-Addressing constants.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/EndpointReferenceImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/EndpointReferenceImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/EndpointReferenceImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -39,9 +39,9 @@
import javax.xml.ws.addressing.ReferenceParameters;
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.extras.addressing.soap.SOAPAddressingBuilderImpl;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxrpc/WSAddressingServerHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxrpc/WSAddressingServerHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxrpc/WSAddressingServerHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,8 +35,8 @@
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.extras.addressing.AddressingConstantsImpl;
import org.jboss.ws.extras.addressing.metadata.AddressingOpMetaExt;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxws/WSAddressingServerHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/jaxws/WSAddressingServerHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,9 +32,9 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.extras.addressing.AddressingConstantsImpl;
import org.jboss.ws.extras.addressing.metadata.AddressingOpMetaExt;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/metadata/AddressingOpMetaExt.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/metadata/AddressingOpMetaExt.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/metadata/AddressingOpMetaExt.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.ws.common.metadata.umdm.MetaDataExtension;
+import org.jboss.ws.core.metadata.umdm.MetaDataExtension;
/**
* Addressing meta data extensions:
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/soap/SOAPAddressingPropertiesImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/soap/SOAPAddressingPropertiesImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/addressing/soap/SOAPAddressingPropertiesImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -46,10 +46,10 @@
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPElementImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extras.addressing.AddressingConstantsImpl;
import org.jboss.ws.extras.addressing.AddressingPropertiesImpl;
import org.jboss.ws.extras.addressing.EndpointReferenceImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingConstants.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingConstants.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingConstants.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,7 +29,7 @@
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingConstants;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
/**
* @author Heiko Braun, <heiko(a)openj.net>
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingEndpointBase.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingEndpointBase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/EventingEndpointBase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extras.eventing.mgmt.SubscriptionManagerFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/SubscriptionManagerEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/SubscriptionManagerEndpointImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/SubscriptionManagerEndpointImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,10 +34,10 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.ReferenceParameters;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extras.eventing.element.RenewRequest;
import org.jboss.ws.extras.eventing.element.RenewResponse;
import org.jboss.ws.extras.eventing.element.StatusRequest;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpoint.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpoint.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpoint.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,7 +1,7 @@
package org.jboss.ws.extras.eventing.deployment;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.core.server.ServiceEndpoint;
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.extras.eventing.EventingConstants;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpointDI.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpointDI.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/deployment/EventingEndpointDI.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -2,7 +2,7 @@
import java.io.IOException;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/metadata/EventingEpMetaExt.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/metadata/EventingEpMetaExt.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/metadata/EventingEpMetaExt.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -3,7 +3,7 @@
import java.net.URI;
import java.net.URISyntaxException;
-import org.jboss.ws.common.metadata.umdm.MetaDataExtension;
+import org.jboss.ws.core.metadata.umdm.MetaDataExtension;
/**
* Eventing specific endpoint meta data extensions.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/DispatcherDelegate.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/DispatcherDelegate.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/DispatcherDelegate.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -13,7 +13,7 @@
import javax.naming.Referenceable;
import javax.naming.StringRefAddr;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/EventingBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/EventingBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/EventingBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -3,7 +3,7 @@
import java.net.URI;
import java.net.URISyntaxException;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.extras.eventing.EventingConstants;
import org.jboss.ws.extras.eventing.deployment.EventingEndpointDI;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/Subscription.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/Subscription.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/Subscription.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,8 +35,8 @@
import org.apache.xpath.XPathAPI;
import org.apache.xpath.objects.XObject;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.soap.SOAPConnectionImpl;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.extras.eventing.EventingConstants;
import org.jboss.ws.extras.eventing.element.EndpointReference;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/SubscriptionManager.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/SubscriptionManager.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/eventing/mgmt/SubscriptionManager.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -46,9 +46,9 @@
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.ObjectNameFactory;
-import org.jboss.ws.common.utils.UUIDGenerator;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.ObjectNameFactory;
+import org.jboss.ws.core.utils.UUIDGenerator;
import org.jboss.ws.extras.eventing.EventingConstants;
import org.jboss.ws.extras.eventing.deployment.EventingEndpointDI;
import org.jboss.ws.extras.eventing.element.EndpointReference;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/Policy.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/Policy.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/Policy.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,9 +28,9 @@
import java.util.Collection;
import java.util.Iterator;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAlternative.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAlternative.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAlternative.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,9 +28,9 @@
import java.util.Collection;
import java.util.Iterator;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAssertion.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAssertion.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyAssertion.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -23,8 +23,8 @@
//$Id$
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/policy/PolicyFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,8 +28,8 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/STRTransform.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/STRTransform.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/STRTransform.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import org.apache.xml.security.transforms.TransformationException;
import org.apache.xml.security.utils.XMLUtils;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.ThreadLocalAssociation;
import org.jboss.ws.extras.security.element.BinarySecurityToken;
import org.jboss.ws.extras.security.element.SecurityTokenReference;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/SecurityAdaptorFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/SecurityAdaptorFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/SecurityAdaptorFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
//$Id$
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
/**
* A container idependent security adaptor factory
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/WSSecurityDispatcher.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/WSSecurityDispatcher.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/WSSecurityDispatcher.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,12 +33,11 @@
import javax.xml.soap.SOAPHeader;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.metadata.wsse.Config;
import org.jboss.ws.core.metadata.wsse.Encrypt;
import org.jboss.ws.core.metadata.wsse.Operation;
@@ -51,6 +50,7 @@
import org.jboss.ws.core.metadata.wsse.Timestamp;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
public class WSSecurityDispatcher
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxrpc/WSSecurityHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxrpc/WSSecurityHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxrpc/WSSecurityHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,8 +29,8 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.extras.security.WSSecurityDispatcher;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxws/WSSecurityHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxws/WSSecurityHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/security/jaxws/WSSecurityHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,9 +27,9 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.extras.security.WSSecurityDispatcher;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/XOPContext.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,19 +34,19 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.common.utils.MimeUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPElementImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.soap.attachment.MimeConstants;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.core.utils.MimeUtils;
import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/JBossXBContentAdapter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/JBossXBContentAdapter.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/JBossXBContentAdapter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,12 +31,12 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.common.utils.MimeUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
+import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.core.utils.MimeUtils;
import org.jboss.ws.extras.xop.XOPContext;
import org.jboss.xb.binding.sunday.marshalling.MarshallingContext;
import org.jboss.xb.binding.sunday.marshalling.TermBeforeMarshallingCallback;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/XOPUnmarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/XOPUnmarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxrpc/XOPUnmarshallerImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,8 +30,8 @@
import javax.xml.soap.SOAPException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
import org.jboss.ws.extras.xop.XOPContext;
import org.jboss.xb.binding.sunday.xop.XOPObject;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentMarshallerImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -6,7 +6,7 @@
import javax.xml.soap.AttachmentPart;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPMessageImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/extras/xop/jaxws/AttachmentUnmarshallerImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -8,7 +8,7 @@
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.SOAPException;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
import org.jboss.ws.extras.xop.XOPContext;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -42,11 +42,11 @@
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.utils.IOUtils;
/**
* An abstract deployer for JSE Endpoints
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ApplicationMetaDataAdaptor.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,10 +34,10 @@
import org.jboss.ejb3.SessionContainer;
import org.jboss.ejb3.mdb.MessagingContainer;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedMessageDrivenMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedSessionMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedSessionMetaData;
/**
* Build container independent application meta data
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossServiceEndpointServlet.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossServiceEndpointServlet.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/JBossServiceEndpointServlet.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,11 +28,11 @@
import javax.servlet.ServletContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.config.WSCommonConfig;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.config.WSCommonConfig;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.core.server.AbstractServiceEndpointServlet;
import org.jboss.ws.core.server.ServiceEndpoint;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/PortComponentLinkServlet.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,7 +33,7 @@
import javax.servlet.http.HttpServletResponse;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.server.ServiceEndpoint;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,8 +30,8 @@
import javax.management.ObjectName;
import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.ws.common.utils.ObjectNameFactory;
import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.utils.ObjectNameFactory;
/**
* JBoss specific implementation of a ServerConfig
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,15 +33,15 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB3.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,7 +31,7 @@
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,13 +31,13 @@
import org.jboss.aop.Dispatcher;
import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.ObjectNameFactory;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.utils.ObjectNameFactory;
/**
* Handles invocations on EJB3 endpoints.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -37,12 +37,12 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.naming.Util;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ServiceReferenceable;
import org.jboss.ws.core.metadata.builder.jaxrpc.JAXRPCClientDeployment;
+import org.jboss.ws.core.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.tools.wsdl.WSDL11DefinitionFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandlerMBean.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
import javax.management.ObjectName;
import org.jboss.webservice.ServiceRefHandler;
-import org.jboss.ws.common.utils.ObjectNameFactory;
+import org.jboss.ws.core.utils.ObjectNameFactory;
/**
* MBean interface.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefMetaDataAdaptor.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,10 +32,10 @@
import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedServiceRefMetaData;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerInitParam;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedServiceRefMetaData;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData.HandlerInitParam;
/**
* Build container independent service ref meta data
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,10 +34,10 @@
import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
import org.jboss.metadata.web.Servlet;
import org.jboss.metadata.web.ServletMapping;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebSecurityMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
-import
org.jboss.ws.common.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebSecurityMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
+import
org.jboss.ws.core.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
/**
* Build container independent web meta data
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,13 +36,13 @@
import javax.servlet.ServletContext;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.ws.common.metadata.j2ee.UnifiedWebSecurityMetaData;
-import
org.jboss.ws.common.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.core.metadata.j2ee.UnifiedWebSecurityMetaData;
+import
org.jboss.ws.core.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import java.net.URL;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonContextServlet;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -37,7 +37,7 @@
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.metadata.builder.jaxrpc.JAXRPCDeployment;
import org.jboss.ws.core.server.AbstractServiceEndpointServlet;
import org.jboss.ws.core.server.JAXWSDeployment;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,14 +32,14 @@
import javax.xml.rpc.encoding.TypeMapping;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.tools.Configuration.OperationConfig;
import org.jboss.ws.tools.metadata.ToolsUnifiedMetaDataBuilder;
import org.jboss.ws.tools.wsdl.WSDLWriter;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,15 +28,15 @@
import javax.xml.rpc.encoding.TypeMapping;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.helpers.JavaToWSDLHelper;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,9 +25,9 @@
import java.util.Map;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
// $Id$
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToXSD.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,15 +34,15 @@
import org.apache.xerces.impl.xs.XMLSchemaLoader;
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSEntityResolver;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSErrorHandler;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSStringList;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.WSSchemaUtils;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSEntityResolver;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSErrorHandler;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSStringList;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.WSSchemaUtils;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
import org.jboss.ws.tools.helpers.JavaToXSDHelper;
import org.jboss.ws.tools.interfaces.JavaToXSDIntf;
import org.jboss.ws.tools.interfaces.SchemaCreatorIntf;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaWriter.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaWriter.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaWriter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import org.apache.xerces.xs.StringList;
import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.XSDTypeToJava.VAR;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/RPCSignature.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/RPCSignature.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/RPCSignature.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,13 +24,13 @@
import java.util.ArrayList;
import java.util.Collection;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem.Direction;
public class RPCSignature
{
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,13 +32,13 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxws.WrapperGenerator;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.utils.JavaUtils;
import com.sun.codemodel.JAnnotationArrayMember;
import com.sun.codemodel.JAnnotationUse;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -40,14 +40,14 @@
import javax.xml.rpc.holders.Holder;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.binding.SimpleDeserializerFactory;
import org.jboss.ws.core.binding.SimpleSerializerFactory;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* Util class for the JBossWS Tools project
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -41,23 +41,23 @@
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTerm;
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLException;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLException;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Element;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,12 +30,12 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.webservices.PortComponentMetaData;
-import org.jboss.ws.common.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.ws.common.metadata.webservices.WebservicesMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.core.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.core.metadata.webservices.WebservicesMetaData;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.tools.interfaces.WSDotXMLCreatorIntf;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSTools.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSTools.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSTools.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,7 +30,7 @@
import java.util.StringTokenizer;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.tools.config.ToolsSchemaConfigReader;
import org.jboss.ws.tools.helpers.ToolsHelper;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSToolsConstants.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSToolsConstants.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSToolsConstants.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.tools;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,10 +33,10 @@
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.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.ws.tools.interfaces.XSDToJavaIntf;
/**
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -47,12 +47,12 @@
import org.apache.xerces.xs.XSTerm;
import org.apache.xerces.xs.XSTypeDefinition;
import org.apache.xerces.xs.XSWildcard;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
/** Class that converts a XSD Type into Java class
* @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,13 +27,13 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.interfaces.ServiceCreatorIntf;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/config/ToolsSchemaConfigReader.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/config/ToolsSchemaConfigReader.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/config/ToolsSchemaConfigReader.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import java.util.List;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.jboss.ws.tools.Configuration;
import org.jboss.ws.tools.Configuration.GlobalConfig;
import org.jboss.ws.tools.Configuration.JavaToWSDLConfig;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,37 +35,37 @@
import javax.xml.rpc.holders.Holder;
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ExceptionMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PortMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlMessageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlReturnValueMapping;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.XSModelTypes;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.WSSchemaUtils;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ExceptionMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.MethodParamPartsMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PortMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlMessageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlReturnValueMapping;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.XSModelTypes;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.WSSchemaUtils;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.tools.JavaToXSD;
import org.jboss.ws.tools.interfaces.JavaToXSDIntf;
import org.jboss.ws.tools.interfaces.SchemaCreatorIntf;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,10 +26,10 @@
import javax.xml.namespace.QName;
import org.apache.xerces.xs.XSModel;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.ws.tools.interfaces.SchemaCreatorIntf;
import org.jboss.ws.tools.schema.SchemaTypeCreator;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -39,39 +39,39 @@
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.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ExceptionMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PortMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlMessageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlReturnValueMapping;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceMessageReference;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLProperty;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ExceptionMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.MethodParamPartsMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PortMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlMessageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlReturnValueMapping;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceMessageReference;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLProperty;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.tools.RPCSignature;
import org.jboss.ws.tools.ToolsUtils;
import org.jboss.ws.tools.WSToolsConstants;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ReformatXML.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,8 +25,8 @@
import java.io.FileNotFoundException;
import java.io.InputStream;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,25 +36,25 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.IOUtils;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.tools.Configuration;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.JavaWriter;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/JavaToXSDIntf.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/JavaToXSDIntf.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/JavaToXSDIntf.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
/**
@@ -68,7 +68,7 @@
/**
* Set the WSDLStyle
- * @see org.jboss.ws.common.Constants for Constants.DOCUMENT_LITERAL
+ * @see org.jboss.ws.Constants for Constants.DOCUMENT_LITERAL
* and Constants.RPC_LITERAL
* @param wsdlStyle
*/
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/SchemaCreatorIntf.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/SchemaCreatorIntf.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/SchemaCreatorIntf.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,10 +26,10 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
/**
* Defines the contract for Schema Creating agents (Java -> XSD Process)
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -23,7 +23,7 @@
import java.io.IOException;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
/**
* Defines the contract for creation of java.xml.rpc.Service Interface
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,9 +26,9 @@
import java.net.URL;
import java.util.Map;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLException;
/**
* Defines the contract for WSDL To Java Converters
@@ -43,7 +43,7 @@
* Provide a WSDLFile and get back the WSDL20 Object Graph
* @param wsdlfileurl
* @return
- * @throws org.jboss.ws.common.metadata.wsdl.WSDLException
+ * @throws org.jboss.ws.core.metadata.wsdl.WSDLException
*/
public WSDLDefinitions convertWSDL2Java(URL wsdlfileurl)
throws WSDLException;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,9 +29,9 @@
import javax.xml.transform.Result;
import javax.xml.transform.dom.DOMResult;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.DOMTypes;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.DOMTypes;
import org.jboss.ws.extras.security.Util;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,33 +26,33 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLImport;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLImport;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem;
+import org.jboss.ws.core.metadata.wsdl.WSDLSOAPHeader;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem.Direction;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,16 +31,16 @@
import org.apache.xerces.xs.XSComplexTypeDefinition;
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.MethodParamPartsMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.JavaWriter;
import org.jboss.ws.tools.XSDTypeToJava;
import org.jboss.ws.tools.XSDTypeToJava.VAR;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,16 +33,16 @@
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.holders.Holder;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.WrappedParameter;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.utils.HolderUtils;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.WrappedParameter;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.tools.ToolsUtils;
import org.jboss.ws.tools.Configuration.OperationConfig;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsAnnotationMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsAnnotationMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsAnnotationMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,12 +35,12 @@
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.holders.Holder;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.FaultMetaData;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.umdm.FaultMetaData;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.ToolsUtils;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,8 +26,8 @@
import javax.xml.namespace.QName;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
/**
* Tools Endpoint Metadata
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,11 +31,11 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.core.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.Configuration.OperationConfig;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -51,24 +51,24 @@
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.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModelGroup;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSParticle;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSSimpleTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.WSSchemaUtils;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModelGroup;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSParticle;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSSimpleTypeDefinition;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.WSSchemaUtils;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.ws.tools.interfaces.SchemaCreatorIntf;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11DefinitionFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,7 +31,7 @@
import javax.wsdl.xml.WSDLReader;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
import org.xml.sax.EntityResolver;
import com.ibm.wsdl.xml.WSDLReaderImpl;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -65,37 +65,37 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingMessageReference;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLMIMEPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLProperty;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.XSModelTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingMessageReference;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLMIMEPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLProperty;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem;
+import org.jboss.ws.core.metadata.wsdl.WSDLSOAPHeader;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.XSModelTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.tools.JavaToXSD;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,31 +31,31 @@
import javax.wsdl.factory.WSDLFactory;
import javax.xml.namespace.QName;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingMessageReference;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLImport;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceMessageReference;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem;
-import org.jboss.ws.common.metadata.wsdl.WSDLSOAPHeader;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingMessageReference;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLImport;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceMessageReference;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem;
+import org.jboss.ws.core.metadata.wsdl.WSDLSOAPHeader;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -37,11 +37,11 @@
import javax.xml.parsers.DocumentBuilder;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLException;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLException;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.EntityResolver;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLLocatorImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,7 +31,7 @@
import javax.wsdl.xml.WSDLLocator;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDLWriter.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,17 +30,17 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.DOMTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.XSModelTypes;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.DOMTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.XSModelTypes;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/JBossWSTest.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/JBossWSTest.java 2006-12-07
00:31:03 UTC (rev 1586)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/JBossWSTest.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import junit.framework.TestCase;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,11 +35,7 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
@@ -47,9 +43,13 @@
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.CallImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the SOAPBindingProvider
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/config/WSConfigTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,11 +24,11 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.config.WSConfigFactory;
-import org.jboss.ws.common.metadata.config.jaxrpc.WSConfigRootJAXRPC;
-import org.jboss.ws.common.metadata.config.jaxrpc.WSEndpointConfigJAXRPC;
-import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
-import org.jboss.ws.common.metadata.jsr181.HandlerChainMetaData;
+import org.jboss.ws.core.metadata.config.WSConfigFactory;
+import org.jboss.ws.core.metadata.config.jaxrpc.WSConfigRootJAXRPC;
+import org.jboss.ws.core.metadata.config.jaxrpc.WSEndpointConfigJAXRPC;
+import org.jboss.ws.core.metadata.j2ee.UnifiedHandlerMetaData;
+import org.jboss.ws.core.metadata.jsr181.HandlerChainMetaData;
/**
* Test parsing of the JBossWS config
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,7 +31,7 @@
import javax.xml.rpc.encoding.TypeMappingRegistry;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.binding.DeserializerFactoryBase;
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,10 +28,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of array types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,10 +28,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of array types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,10 +30,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of array types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,10 +30,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of array types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,10 +27,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of array types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,10 +27,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of array types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,11 +30,11 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of complex types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,10 +30,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.tools.JavaToXSD;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,11 +30,11 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of complex types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,10 +29,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
/**
* Test the JAXB unmarshalling of complex types
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,11 +27,11 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB marshalling of a SimpleUserType
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,11 +27,11 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the JAXB unmarshalling of a SimpleUserType
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/MessageFactoryTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,9 +30,9 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPContentElementTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,7 +33,7 @@
import javax.xml.soap.Text;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.NameImpl;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPContentElement;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPEnvelopeTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPEnvelopeTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPEnvelopeTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,9 +31,9 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPFaultTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,9 +36,9 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the SOAPFault
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderElementTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,9 +32,9 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.NameImpl;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the SOAPHeaderElement
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/SOAPHeaderTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,10 +33,10 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.NameImpl;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* Test the SOAPHeader
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -40,15 +40,15 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonSOAPBinding;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.CallImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.EndpointMetaData.Type;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.attachment.MimeConstants;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/DOMWriterTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,8 +29,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/utils/JavaUtilsTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -23,7 +23,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.tools.jbws_161.custom.HelloObj;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* Test the JavaUtils
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,9 +24,9 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,9 +24,9 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,18 +26,18 @@
import javax.xml.namespace.QName;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLRPCPart;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLRPCPart;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.extras.eventing.EventingConstants;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,9 +25,9 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLWithAnonTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLWithAnonTypesTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLWithAnonTypesTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,10 +32,10 @@
import org.apache.xerces.xs.XSTerm;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/JavaBean.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -10,7 +10,7 @@
import java.util.Arrays;
import java.util.Calendar;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
public class JavaBean
{
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/encoded/marshalltest/ValueType.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -10,7 +10,7 @@
import java.util.Arrays;
import java.util.Calendar;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
public class ValueType
{
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1124/TestEndpointImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,7 +28,7 @@
import java.rmi.RemoteException;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
/**
* @author Thomas.Diesler(a)jboss.org
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,9 +25,9 @@
import java.io.FilenameFilter;
import java.net.MalformedURLException;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1303/ServerHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,7 +30,7 @@
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
public class ServerHandler extends GenericHandler
{
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws434/JBWS434TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws434/JBWS434TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws434/JBWS434TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws775/JBWS775TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws775/JBWS775TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws775/JBWS775TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMWriter;
/**
* Web services deployment can fail when deploying multiple EJB JARs
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws807/TestServiceImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws807/TestServiceImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws807/TestServiceImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -2,7 +2,7 @@
import java.rmi.RemoteException;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
/**
* @author Heiko Braun, <heiko(a)openj.net>
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/JBWS812TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/JBWS812TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/JBWS812TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -41,8 +41,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/ServerHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/ServerHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws812/ServerHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,7 +30,7 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMWriter;
public class ServerHandler extends GenericHandler
{
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws955/JBWS955TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws955/JBWS955TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws955/JBWS955TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,8 +32,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,7 +25,7 @@
import java.net.URL;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallRpcLitDIITestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.test.ws.jaxrpc.marshall.types.JavaBean;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.jaxrpc.marshall.types.JavaBean;
import org.jboss.test.ws.jaxrpc.marshall.types.JavaBean2;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.utils.JavaUtils;
/**
* Test standard JAX-RPC types.
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/outparam/OutParamDIITestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/outparam/OutParamDIITestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/outparam/OutParamDIITestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -56,7 +56,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
* Test DII with Holders
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,9 +35,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.umdm.HandlerMetaData;
-import org.jboss.ws.common.utils.ObjectNameFactory;
import org.jboss.ws.core.jaxrpc.ServiceExt;
+import org.jboss.ws.core.metadata.umdm.HandlerMetaData;
+import org.jboss.ws.core.utils.ObjectNameFactory;
/**
* Test dynamic handlers
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderClientTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.StubExt;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderDIITestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.CallImpl;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/handler/HeaderProxyTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.ServiceImpl;
import org.jboss.ws.core.jaxrpc.StubExt;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderDIITestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderDIITestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/holder/HolderDIITestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -55,7 +55,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
* Test DII with Holders
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* A web service client that connects to a MDB endpoint.
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcDIIUnconfiguredCallTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -50,8 +50,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestServiceBean.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestServiceBean.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/message/MessageTestServiceBean.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,7 +36,7 @@
import javax.xml.transform.dom.DOMSource;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/mtom/EmployeeRecordsImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,8 +32,8 @@
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.IOUtils;
/**
* EmployeeRecords service endpoint
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentDIITestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentDIITestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/swa/AttachmentDIITestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -42,7 +42,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
* Test SOAP with Attachements (SwA) through the JAXRPC DII layer.
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,8 +33,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/AddrConstraintsHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/AddrConstraintsHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/AddrConstraintsHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,7 +29,7 @@
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
/**
* A client side handler that checks the addressing constraints.
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -43,10 +43,10 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.jaxrpc.ServiceExt;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.extras.addressing.AddressingClientUtil;
import org.jboss.ws.extras.addressing.jaxrpc.WSAddressingClientHandler;
import org.jboss.ws.extras.eventing.EventSourceEndpoint;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventSinkServlet.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventSinkServlet.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventSinkServlet.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,8 +29,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,8 +35,8 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.extras.addressing.AddressingClientUtil;
import org.jboss.ws.extras.eventing.EventSourceEndpoint;
import org.jboss.ws.extras.eventing.EventingConstants;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/NotificationTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,7 +28,7 @@
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extras.eventing.EventingConstants;
import org.jboss.ws.extras.eventing.element.SubscribeResponse;
import org.jboss.ws.extras.eventing.mgmt.EventDispatcher;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/SubscriptionManagerTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import java.util.Date;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extras.eventing.EventingConstants;
import org.jboss.ws.extras.eventing.deployment.EventingEndpointDI;
import org.jboss.ws.extras.eventing.element.EndpointReference;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,8 +32,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extras.security.Constants;
import org.jboss.ws.extras.security.SecurityDecoder;
import org.jboss.ws.extras.security.SecurityStore;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,8 +34,8 @@
import org.jboss.security.SecurityAssociation;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.extras.security.Constants;
import org.jboss.ws.extras.security.EncryptionOperation;
import org.jboss.ws.extras.security.OperationDescription;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,8 +31,8 @@
import javax.xml.soap.SOAPMessage;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.extras.security.Constants;
import org.jboss.ws.extras.security.SecurityDecoder;
import org.jboss.ws.extras.security.SecurityStore;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -7,9 +7,9 @@
import org.apache.xerces.xs.XSComplexTypeDefinition;
import org.apache.xerces.xs.XSModel;
import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.WSSchemaUtils;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.WSSchemaUtils;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.ws.extras.xop.jaxrpc.XOPScanner;
import org.jboss.xb.binding.NamespaceRegistry;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/InlineHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/InlineHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/InlineHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxrpc.xop.doclit;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.NameImpl;
+import org.jboss.ws.core.soap.NameImpl;
import javax.xml.rpc.handler.GenericHandler;
import javax.xml.rpc.handler.HandlerInfo;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,8 +24,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.*;
-import org.jboss.ws.common.utils.IOUtils;
import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.utils.IOUtils;
import javax.activation.DataHandler;
import javax.xml.rpc.Stub;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/InlineHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -1,7 +1,7 @@
package org.jboss.test.ws.jaxrpc.xop.rpclit;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.NameImpl;
+import org.jboss.ws.core.soap.NameImpl;
import javax.xml.namespace.QName;
import javax.xml.rpc.handler.GenericHandler;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,8 +24,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.jaxrpc.xop.XOPTestSupport;
import org.jboss.test.ws.jaxrpc.xop.shared.*;
-import org.jboss.ws.common.utils.IOUtils;
import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.utils.IOUtils;
import javax.activation.DataHandler;
import javax.xml.rpc.Stub;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/asynchronous/AsynchronousDispatchTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/asynchronous/AsynchronousDispatchTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/asynchronous/AsynchronousDispatchTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -41,7 +41,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.xml.sax.InputSource;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,7 +35,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.Constants;
+import org.jboss.ws.Constants;
/**
* Test SOAP12 binding type
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -42,7 +42,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/exception/ExceptionEndpointImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import javax.xml.soap.SOAPFault;
import javax.xml.ws.soap.SOAPFaultException;
-import org.jboss.ws.common.NameImpl;
+import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPFaultImpl;
@WebService(endpointInterface="org.jboss.test.ws.jaxws.exception.ExceptionEndpoint")
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,9 +27,9 @@
import javax.jws.WebService;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws871/RpcArrayEndpointImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,7 +29,7 @@
import javax.jws.soap.SOAPBinding.Style;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
@WebService(endpointInterface="org.jboss.test.ws.jaxws.jbws871.RpcArrayEndpoint")
public class RpcArrayEndpointImpl
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/oneway/JSR181OneWayTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
import org.xml.sax.InputSource;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -39,7 +39,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.NameImpl;
+import org.jboss.ws.core.soap.NameImpl;
/**
* Test the JSR-181 annotation: javax.jws.SOAPBinding
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -41,8 +41,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.soap.NameImpl;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
import org.xml.sax.InputSource;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webparam/JSR181WebParamTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,10 +32,10 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
-import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
import org.jboss.ws.core.jaxrpc.CallImpl;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.metadata.umdm.ParameterMetaData;
/**
* Test the JSR-181 annotation: javax.jws.WebParam
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webresult/JSR181WebResultTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -37,10 +37,10 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.metadata.umdm.OperationMetaData;
import org.jboss.ws.core.jaxrpc.CallImpl;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.soap.NameImpl;
/**
* Test the JSR-181 annotation: javax.jws.webresult
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,7 +29,7 @@
import javax.xml.ws.Service;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
// $Id$
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalSourceHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalSourceHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/LogicalSourceHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,8 +34,8 @@
import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.MessageContext;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.jaxws.handler.GenericLogicalHandler;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
public class LogicalSourceHandler extends GenericLogicalHandler
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanPayload.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanPayload.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderBeanPayload.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,8 +31,8 @@
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceProvider;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -47,7 +47,7 @@
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.test.ws.jaxws.jsr181.soapbinding.SubmitBareRequest;
import org.jboss.test.ws.jaxws.jsr181.soapbinding.SubmitBareResponse;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,7 +36,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -36,7 +36,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import org.jboss.security.SimplePrincipal;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,8 +33,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import javax.xml.namespace.QName;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,9 +35,9 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.UUIDGenerator;
import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.UUIDGenerator;
/**
* A client side handler for the ws-addressing
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,8 +33,8 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.core.jaxws.handler.GenericSOAPHandler;
+import org.jboss.ws.core.utils.DOMUtils;
/**
* A server side handler for the ws-addressing
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -32,7 +32,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,7 +33,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -34,7 +34,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/EndpointReferenceTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/EndpointReferenceTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/EndpointReferenceTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
//$Id$
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extras.addressing.EndpointReferenceImpl;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ClientHandler.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ClientHandler.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/ClientHandler.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,7 +33,7 @@
import org.jboss.logging.Logger;
import org.jboss.test.ws.jaxws.wsaddressing.AddressingHandler;
-import org.jboss.ws.common.utils.UUIDGenerator;
+import org.jboss.ws.core.utils.UUIDGenerator;
/**
* A client side handler for the ws-addressing
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/replyto/FaultToEndpointImpl.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,8 +33,8 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/xop/doclit/MTOMEndpointBean.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,7 +27,7 @@
import javax.ejb.Stateless;
import javax.jws.WebService;
-import org.jboss.ws.common.WSException;
+import org.jboss.ws.WSException;
@Stateless
@WebService(name="MTOMEndpoint", serviceName = "MTOMService",
endpointInterface = "org.jboss.test.ws.jaxws.xop.doclit.MTOMEndpoint")
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -33,12 +33,12 @@
import org.jboss.test.ws.tools.sei.PrimitiveTypes;
import org.jboss.test.ws.tools.sei.ServiceException;
import org.jboss.test.ws.tools.sei.StandardJavaTypes;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSToolsConstants;
import org.jboss.ws.tools.wsdl.WSDLWriter;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/SchemaGeneratorTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/SchemaGeneratorTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/SchemaGeneratorTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,7 +28,7 @@
import org.jboss.test.ws.common.jbossxb.complex.Base;
import org.jboss.test.ws.common.jbossxb.complex.Composite;
import org.jboss.test.ws.common.jbossxb.complex.Derived;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/** Test the XSD schema generator
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -31,8 +31,8 @@
import org.jboss.test.ws.tools.sei.StandardJavaTypes;
import org.jboss.test.ws.tools.validation.WSDL11Validator;
import org.jboss.test.ws.tools.validation.WSDLValidator;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.WSDLToJava;
import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
import org.jboss.ws.tools.wsdl.WSDLWriter;
Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -38,15 +38,15 @@
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
import org.jboss.test.ws.tools.validation.WSDL11Validator;
import org.jboss.test.ws.tools.validation.WSDLValidator;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.JavaToXSD;
import org.jboss.ws.tools.WSToolsConstants;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/Jaxrpc20AssertionsTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/Jaxrpc20AssertionsTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/Jaxrpc20AssertionsTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,9 +27,9 @@
import org.jboss.test.ws.tools.sei.assertions.AssertRemoteExceptions;
import org.jboss.test.ws.tools.sei.assertions.AssertRemoteType;
import org.jboss.test.ws.tools.sei.assertions.AssertReturnTypeExtendRemote;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.JavaToWSDL;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.WSDLToJava;
import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,11 +28,11 @@
import org.jboss.test.ws.tools.WSToolsTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.tools.WSDLToJava;
import org.jboss.ws.tools.client.ServiceCreator;
import org.jboss.ws.tools.mapping.MappingFileGenerator;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/config/globalconfig/GlobalConfigTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/config/globalconfig/GlobalConfigTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/config/globalconfig/GlobalConfigTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,9 +29,9 @@
import java.io.IOException;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.WSTools;
import com.thoughtworks.qdox.JavaDocBuilder;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,11 +25,11 @@
import java.io.Writer;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSToolsConstants;
import org.jboss.ws.tools.wsdl.WSDLWriter;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/enums/EnumTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/enums/EnumTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/enums/EnumTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
import java.io.FileInputStream;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.WSTools;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,12 +29,12 @@
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
import org.jboss.test.ws.tools.validation.WSDL11Validator;
import org.jboss.test.ws.tools.validation.WSDLValidator;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.IOUtils;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSDLToJava;
import org.jboss.ws.tools.WSToolsConstants;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaModelTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaModelTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaModelTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,9 +30,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.common.jbossxb.complex.Derived;
import org.jboss.test.ws.common.jbossxb.simple.SimpleUserType;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.JavaToXSD;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaTypesCreatorTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaTypesCreatorTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaTypesCreatorTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -29,9 +29,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.tools.jbws_161.customexceptions.UserException;
import org.jboss.test.ws.tools.sei.Derived;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.schema.SchemaTypeCreator;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1079/JBWS1079TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.WSTools;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1170/JBWS1170TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1170/JBWS1170TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1170/JBWS1170TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import java.io.FileReader;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.WSTools;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1253/JBWS1253TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1253/JBWS1253TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws1253/JBWS1253TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,7 +26,7 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.WSTools;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws818/JBWS818TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws818/JBWS818TestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws818/JBWS818TestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -24,7 +24,7 @@
import java.io.FileInputStream;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.WSTools;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/AnonTypesTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,8 +28,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.tools.jbws_204.wscompile.anontypes.Items;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.JavaToXSD;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -30,10 +30,10 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.tools.jbws_204.wscompile.nillabletypes.NillableType;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.WSSchemaUtils;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.WSSchemaUtils;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.JavaToXSD;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardArraysTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardArraysTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardArraysTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,8 +28,8 @@
import javax.xml.namespace.QName;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.tools.JavaToXSD;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardDoubleArraysTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardDoubleArraysTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/StandardDoubleArraysTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,8 +28,8 @@
import javax.xml.namespace.QName;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/JavaWsdlMappingMetaDataTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/JavaWsdlMappingMetaDataTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/JavaWsdlMappingMetaDataTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,17 +27,17 @@
import javax.xml.namespace.QName;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.common.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PortMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlMessageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlReturnValueMapping;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.metadata.jaxrpcmapping.MethodParamPartsMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PortMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlMessageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlReturnValueMapping;
+import org.jboss.ws.core.utils.DOMUtils;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/WebServicesMetaDataTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/WebServicesMetaDataTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/WebServicesMetaDataTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -28,11 +28,11 @@
import javax.xml.namespace.QName;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.webservices.PortComponentMetaData;
-import org.jboss.ws.common.metadata.webservices.WebserviceDescriptionMetaData;
-import org.jboss.ws.common.metadata.webservices.WebservicesFactory;
-import org.jboss.ws.common.metadata.webservices.WebservicesMetaData;
-import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.core.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.core.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.core.metadata.webservices.WebservicesMetaData;
+import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -26,19 +26,19 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.MethodParamPartsMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PortMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceInterfaceMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlMessageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.WsdlReturnValueMapping;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.MethodParamPartsMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.PortMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointMethodMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceInterfaceMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlMessageMapping;
+import org.jboss.ws.core.metadata.jaxrpcmapping.WsdlReturnValueMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
/**
* Validates a JAXRPC Mapping File against another
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,7 +25,7 @@
import junit.framework.TestCase;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11Validator.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11Validator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11Validator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -35,17 +35,17 @@
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.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceFault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLProperty;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceFault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLProperty;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -25,20 +25,20 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.common.metadata.wsdl.NCName;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationInput;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutfault;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperationOutput;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.NCName;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInfault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationInput;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutfault;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperationOutput;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,16 +27,16 @@
import java.util.List;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.metadata.wsdl.WSDLBinding;
-import org.jboss.ws.common.metadata.wsdl.WSDLBindingOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterface;
-import org.jboss.ws.common.metadata.wsdl.WSDLInterfaceOperation;
-import org.jboss.ws.common.metadata.wsdl.WSDLService;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.metadata.wsdl.WSDLBinding;
+import org.jboss.ws.core.metadata.wsdl.WSDLBindingOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterface;
+import org.jboss.ws.core.metadata.wsdl.WSDLInterfaceOperation;
+import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
/**
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -27,11 +27,11 @@
import javax.xml.namespace.QName;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.tools.WSDLToJava;
import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/XercesSchemaParserTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/XercesSchemaParserTestCase.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/XercesSchemaParserTestCase.java 2006-12-07
00:41:57 UTC (rev 1587)
@@ -47,13 +47,13 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.apache.xerces.xs.XSWildcard;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSEntityResolver;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSParticle;
-import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSEntityResolver;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSParticle;
+import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
import org.jboss.ws.tools.JavaToXSD;
import org.jboss.xb.binding.sunday.unmarshalling.LSInputAdaptor;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;