Author: thomas.diesler(a)jboss.com
Date: 2006-12-05 20:43:00 -0500 (Tue, 05 Dec 2006)
New Revision: 1567
Added:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/Style.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/
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/Extendable.java
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/WSDL11DefinitionFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL11Reader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL11Writer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL20Reader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL20Writer.java
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/WSDLBindingFault.java
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/WSDLBindingOperation.java
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/WSDLBindingOperationOutput.java
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/WSDLDefinitionsFactory.java
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/WSDLEndpoint.java
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/WSDLFeature.java
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/WSDLInclude.java
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/WSDLInterfaceFault.java
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/WSDLInterfaceOperation.java
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/WSDLInterfaceOperationInput.java
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/WSDLInterfaceOperationOutput.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLLocatorImpl.java
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/WSDLProperty.java
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/WSDLRPCSignatureItem.java
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/WSDLService.java
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/WSDLUtils.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLWriter.java
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/xmlschema/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/
Removed:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr109/
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/WSDL11DefinitionFactory.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Reader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Writer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Reader.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Writer.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/WSDLDefinitionsFactory.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/WSDLLocatorImpl.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/WSDLWriter.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/xsd/
Modified:
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/JavaWsdlMapping.java
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/JavaXmlTypeMapping.java
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/PackageMapping.java
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/ServiceEndpointInterfaceMapping.java
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/ServiceInterfaceMapping.java
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/WsdlMessageMapping.java
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/webservices/PortComponentMetaData.java
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/WebservicesFactory.java
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/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
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/JBossXSEntityResolver.java
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/JBossXSModel.java
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/JBossXSNamedMap.java
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/JBossXSNamespaceItemList.java
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/JBossXSObjectList.java
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/JBossXSSimpleTypeDefinition.java
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/JBossXSTypeDefinition.java
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/xsd/SchemaUtils.java
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/umdm/EndpointMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/OperationMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/TypesMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/UnifiedMetaData.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.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/EncodedTypeMapping.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/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/TypeMappingRegistryImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.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/jbossxb/JBossXBDeserializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBMarshallerImpl.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSupport.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/SchemaBindingBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/XercesXSMarshallerImpl.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/JAXWSClientMetaDataBuilder.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/JAXWSWebServiceMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.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/SAAJPayloadBuilderDOM.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/SOAPMessageDispatcher.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.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/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/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/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/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/interfaces/XSDToJavaIntf.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/ToolsUnifiedMetaDataBuilder.java
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.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/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/SimpleFileImportTestCase.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/jbws1068/JBWS1068TestCase.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/jbws958/JBWS958TestCase.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/DIIClientTestCase.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/xop/XOPTypeDefTestCase.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/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/jbws944/JBWS944TestCase.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/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/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/tools/JavaToWSDL11TestCase.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/WSDL11ToWSDL20TestCase.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/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/jbws_204/NillableTypesTestCase.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
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/AnonymousTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ComplexTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/NillableTypesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ReferencesTestCase.java
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/SimpleTypesTestCase.java
Log:
partial commit
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java
(from rev 1566,
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,114 @@
+/*
+* 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.jaxrpc;
+
+// $Id$
+
+import javax.activation.DataHandler;
+import javax.mail.internet.MimeMultipart;
+import javax.xml.soap.SOAPElement;
+import javax.xml.transform.Source;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.core.jaxrpc.encoding.*;
+import org.jboss.ws.core.jbossxb.JBossXBDeserializerFactory;
+import org.jboss.ws.core.jbossxb.JBossXBSerializerFactory;
+import org.w3c.dom.Element;
+import java.awt.*;
+
+/**
+ * This is the representation of a type mapping.
+ * This TypeMapping implementation supports the literal encoding style.
+ *
+ * The TypeMapping instance maintains a tuple of the type
+ * {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class LiteralTypeMapping extends TypeMappingImpl
+{
+
+ /**
+ * Construct the default literal type mapping.
+ * Registers javaTypes for all standard XMLSchema types specified by JAXRPC.
+ *
+ * Note, the order of registered types is important
+ * The last xmlType wins for a given javaType
+ *
+ */
+ public LiteralTypeMapping()
+ {
+ // XOP default mapping
+ JBossXBSerializerFactory jbxbSF = new JBossXBSerializerFactory();
+ JBossXBDeserializerFactory jbxbDF = new JBossXBDeserializerFactory();
+
+ registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+ registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+ registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+ registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+ registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+
+ registerInternal(String.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+ registerInternal(Image.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+ registerInternal(Source.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
+ registerInternal(MimeMultipart.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF,
jbxbDF);
+
+ registerStandardLiteralTypes();
+
+ // register default mime mappings
+ registerInternal(DataHandler.class, Constants.TYPE_MIME_APPLICATION_XML, null,
null);
+ registerInternal(DataHandler.class, Constants.TYPE_MIME_IMAGE_GIF, null, null);
+ registerInternal(DataHandler.class, Constants.TYPE_MIME_IMAGE_JPEG, null, null);
+ registerInternal(DataHandler.class, Constants.TYPE_MIME_TEXT_PLAIN, null, null);
+ registerInternal(DataHandler.class, Constants.TYPE_MIME_TEXT_XML, null, null);
+ registerInternal(MimeMultipart.class, Constants.TYPE_MIME_MULTIPART_MIXED, null,
null);
+
+ // register mapping for xsd:anyType
+ registerInternal(SOAPElement.class, Constants.TYPE_LITERAL_ANYTYPE, new
SOAPElementSerializerFactory(), new SOAPElementDeserializerFactory());
+ registerInternal(Element.class, Constants.TYPE_LITERAL_ANYTYPE, new
ElementSerializerFactory(), new ElementDeserializerFactory());
+ }
+
+ /**
+ * Returns the encodingStyle URIs (as String[]) supported by this TypeMapping
instance.
+ * A TypeMapping that contains only encoding style independent serializers and
deserializers
+ * returns null from this method.
+ *
+ * @return Array of encodingStyle URIs for the supported encoding styles
+ */
+ public String[] getSupportedEncodings()
+ {
+ return new String[] { "" };
+ }
+
+ /**
+ * Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping
that contains only encoding
+ * independent serializers and deserializers requires null as the parameter for this
method.
+ *
+ * @param encodingStyleURIs Array of encodingStyle URIs for the supported encoding
styles
+ */
+ public void setSupportedEncodings(String[] encodingStyleURIs)
+ {
+ throw new NotImplementedException();
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/Style.java (from
rev 1566, branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java 2006-12-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/Style.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.jaxrpc;
+
+// $Id$
+
+/** A type-safe enumeration for encoding style.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Oct-2004
+ */
+public class Style
+{
+ private String style;
+
+ public static final Style RPC = new Style("rpc");
+ public static final Style DOCUMENT = new Style("document");
+
+ private Style(String style)
+ {
+ this.style = style;
+ }
+
+ public static Style getDefaultStyle()
+ {
+ return DOCUMENT;
+ }
+
+ public static Style valueOf(String style)
+ {
+ if (RPC.style.equals(style))
+ return RPC;
+ if (DOCUMENT.style.equals(style))
+ return DOCUMENT;
+
+ throw new IllegalArgumentException("Unsupported style: " + style);
+ }
+
+ public String toString()
+ {
+ return style;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java
(from rev 1566,
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,624 @@
+/*
+* 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.jaxrpc;
+
+// $Id$
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.DeserializerFactory;
+import javax.xml.rpc.encoding.SerializerFactory;
+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.core.jaxrpc.encoding.Base64DeserializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.Base64SerializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.CalendarDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.CalendarSerializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.DateDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.DateSerializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.HexDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.HexSerializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.QNameDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.QNameSerializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
+
+/**
+ * This is the representation of a type mapping.
+ * This TypeMapping implementation supports the literal encoding style.
+ *
+ * The TypeMapping instance maintains a tuple of the type
+ * {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public abstract class TypeMappingImpl implements TypeMapping
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(TypeMappingImpl.class);
+
+ // Map<KeyPair,FactoryPair>
+ private Map<KeyPair, FactoryPair> tupleMap = new LinkedHashMap<KeyPair,
FactoryPair>();
+
+ /**
+ * Gets the DeserializerFactory registered for the specified pair of Java type and XML
data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @return Registered DeserializerFactory or null if there is no registered factory
+ */
+ public DeserializerFactory getDeserializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(xmlType, javaType);
+ return (fPair != null ? fPair.getDeserializerFactory() : null);
+ }
+
+ /**
+ * Gets the SerializerFactory registered for the specified pair of Java type and XML
data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @return Registered SerializerFactory or null if there is no registered factory
+ */
+ public SerializerFactory getSerializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(xmlType, javaType);
+ return (fPair != null ? fPair.getSerializerFactory() : null);
+ }
+
+ /**
+ * Returns the encodingStyle URIs (as String[]) supported by this TypeMapping
instance.
+ * A TypeMapping that contains only encoding style independent serializers and
deserializers
+ * returns null from this method.
+ *
+ * @return Array of encodingStyle URIs for the supported encoding styles
+ */
+ public abstract String[] getSupportedEncodings();
+
+ /**
+ * Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping
that contains only encoding
+ * independent serializers and deserializers requires null as the parameter for this
method.
+ *
+ * @param encodingStyleURIs Array of encodingStyle URIs for the supported encoding
styles
+ */
+ public abstract void setSupportedEncodings(String[] encodingStyleURIs);
+
+ /**
+ * Checks whether or not type mapping between specified XML type and Java type is
registered.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @return boolean; true if type mapping between the specified XML type and Java type
is registered; otherwise false
+ */
+ public boolean isRegistered(Class javaType, QName xmlType)
+ {
+ return getFactoryPair(xmlType, javaType) != null;
+ }
+
+ /**
+ * Registers SerializerFactory and DeserializerFactory for a specific type mapping
between an XML type and Java type.
+ * This method replaces any existing registered SerializerFactory DeserializerFactory
instances.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @param sf SerializerFactory
+ * @param df DeserializerFactory
+ * @throws javax.xml.rpc.JAXRPCException If any error during the registration
+ */
+ public void register(Class javaType, QName xmlType, SerializerFactory sf,
DeserializerFactory df)
+ {
+ log.debug("register: TypeMappingImpl@" + hashCode() + "
[xmlType=" + xmlType + ",javaType=" + javaType.getName() + ",sf="
+ sf + ",df=" + df + "]");
+ registerInternal(javaType, xmlType, sf, df);
+ }
+
+ void registerInternal(Class javaType, QName xmlType, SerializerFactory sf,
DeserializerFactory df)
+ {
+ if (javaType == null)
+ throw new IllegalArgumentException("javaType cannot be null for: " +
xmlType);
+ if (xmlType == null)
+ throw new IllegalArgumentException("xmlType cannot be null for: " +
javaType);
+
+ KeyPair kPair = new KeyPair(xmlType, javaType);
+ FactoryPair fPair = new FactoryPair(sf, df);
+ tupleMap.put(kPair, fPair);
+ }
+
+ /**
+ * Removes the DeserializerFactory registered for the specified pair of Java type and
XML data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered
DeserializerFactory
+ */
+ public void removeDeserializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(xmlType, javaType);
+ if (fPair != null)
+ fPair.setDeserializerFactory(null);
+ }
+
+ /**
+ * Removes the SerializerFactory registered for the specified pair of Java type and
XML data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered
SerializerFactory
+ */
+ public void removeSerializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(xmlType, javaType);
+ if (fPair != null)
+ fPair.setSerializerFactory(null);
+ }
+
+ /** Get the list of registered XML types */
+ public List<QName> getRegisteredXmlTypes()
+ {
+ List<QName> types = new ArrayList<QName>();
+ for (KeyPair keyPair : getKeyPairs(null, null))
+ {
+ types.add(keyPair.getXmlType());
+ }
+ return types;
+ }
+
+ /** Get the list of registered Java types */
+ public List<Class> getRegisteredJavaTypes()
+ {
+ List<Class> types = new ArrayList<Class>();
+ for (KeyPair keyPair : getKeyPairs(null, null))
+ {
+ types.add(keyPair.getJavaType());
+ }
+ return types;
+ }
+
+ /** Get the Class that was registered last for this xmlType */
+ public Class getJavaType(QName xmlType)
+ {
+ Class javaType = null;
+
+ List keyPairList = getKeyPairs(xmlType, null);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
+ javaType = kPair.getJavaType();
+ }
+
+ return javaType;
+ }
+
+ /**
+ * Get all of the Classes registered for this xmlType.
+ */
+ public List<Class> getJavaTypes(QName xmlType)
+ {
+ List<KeyPair> keyPairList = getKeyPairs(xmlType, null);
+ List<Class> classes = new ArrayList<Class>(keyPairList.size());
+
+ for (KeyPair current : keyPairList)
+ {
+ classes.add(current.getJavaType());
+ }
+
+ return classes;
+ }
+
+ /**
+ * Get the Class that was registered last for this xmlType
+ * If there are two Java Types registered for the xmlType
+ * return the primitive type rather than the wrapper,
+ * if available
+ */
+ public Class getJavaType(QName xmlType,boolean getPrimitive)
+ {
+ //Lets get the primitive type if available
+ Class javaType = null;
+
+ List keyPairList = getKeyPairs(xmlType, null);
+ int size = keyPairList.size();
+ if (size == 2 && getPrimitive)
+ {
+ KeyPair kPair1 = (KeyPair)keyPairList.get(0);
+ Class javaType1 = kPair1.getJavaType();
+ KeyPair kPair2 = (KeyPair)keyPairList.get(1);
+ Class javaType2 = kPair2.getJavaType();
+ if(javaType2.isPrimitive() && !javaType1.isPrimitive())
+ javaType = javaType2;
+ else
+ if(javaType1.isPrimitive() && !javaType2.isPrimitive())
+ javaType = javaType1;
+ else
+ javaType = javaType2; //Fallback on the most latest
+ }
+ else
+ return getJavaType(xmlType);
+
+ return javaType;
+ }
+
+ /** Get the Class name that was registered last for this xmlType */
+ public String getJavaTypeName(QName xmlType)
+ {
+ Class javaType = getJavaType(xmlType);
+ return (javaType != null ? javaType.getName() : null);
+ }
+
+ /** Get the QName that was registered last for this javaType */
+ public QName getXMLType(Class javaType)
+ {
+ QName xmlType = null;
+
+ List keyPairList = getKeyPairs(null, javaType);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
+ xmlType = kPair.getXmlType();
+ }
+
+ return xmlType;
+ }
+
+ /**
+ * Get the QName that was registered last for this javaType
+ * @param javaType class for which XML Type is needed
+ * @param tryAssignable If the xmlType is not registered for javaType
+ * should a base class type be checked?
+ *
+ */
+ public QName getXMLType(Class javaType, boolean tryAssignable)
+ {
+ if(tryAssignable) return getXMLType(javaType);
+
+ QName xmlType = null;
+
+ List keyPairList = getKeyPairs(null, javaType, tryAssignable);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
+ xmlType = kPair.getXmlType();
+ }
+
+ return xmlType;
+ }
+
+ /**
+ * Get the serializer/deserializer factory pair for the given xmlType, javaType
+ * Both xmlType, javaType may be null. In that case, this implementation still
+ * returns a FactoryPair if there is only one possible match.
+ */
+ List<KeyPair> getKeyPairs(QName xmlType, Class javaType)
+ {
+ List<KeyPair> keyPairList = new ArrayList<KeyPair>();
+
+ // Getting the exact matching pair
+ if (xmlType != null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() ==
javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ // No exact match, try assignable
+ if (keyPairList.size() == 0)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()) &&
JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+ }
+
+ // Getting the pair for a given xmlType
+ else if (xmlType != null && javaType == null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the pair for a given javaType
+ else if (xmlType == null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (entry.getJavaType() == javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ // No exact match, try assignable
+ if (keyPairList.size() == 0)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+ }
+
+ // Getting the all pairs
+ else if (xmlType == null && javaType == null)
+ {
+ keyPairList.addAll(tupleMap.keySet());
+ }
+
+ return keyPairList;
+ }
+
+ /**
+ * Get the serializer/deserializer factory pair for the given xmlType, javaType
+ * Both xmlType, javaType may be null. In that case, this implementation still
+ * returns a FactoryPair if there is only one possible match.
+ * <br>Note: This method does not try for the base class, if no keypair exists
for the
+ * javaType in question.
+ */
+ List<KeyPair> getKeyPairs(QName xmlType, Class javaType, boolean tryAssignable)
+ {
+ if(tryAssignable) return getKeyPairs( xmlType, javaType);
+
+ List<KeyPair> keyPairList = new ArrayList<KeyPair>();
+
+ // Getting the exact matching pair
+ if (xmlType != null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() ==
javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the pair for a given xmlType
+ else if (xmlType != null && javaType == null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the pair for a given javaType
+ else if (xmlType == null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (entry.getJavaType() == javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the all pairs
+ else if (xmlType == null && javaType == null)
+ {
+ keyPairList.addAll(tupleMap.keySet());
+ }
+
+ return keyPairList;
+ }
+
+ /**
+ * Get the serializer/deserializer factory pair for the given xmlType, javaType
+ * Both xmlType, javaType may be null. In that case, this implementation still
+ * returns a FactoryPair that was last registered
+ */
+ FactoryPair getFactoryPair(QName xmlType, Class javaType)
+ {
+ FactoryPair fPair = null;
+
+ List<KeyPair> keyPairList = getKeyPairs(xmlType, javaType);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = keyPairList.get(size - 1);
+ fPair = (FactoryPair)tupleMap.get(kPair);
+ }
+
+ return fPair;
+ }
+
+ protected void registerStandardLiteralTypes()
+ {
+ registerInternal(BigDecimal.class, Constants.TYPE_LITERAL_DECIMAL, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(BigInteger.class, Constants.TYPE_LITERAL_POSITIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(BigInteger.class, Constants.TYPE_LITERAL_NEGATIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(BigInteger.class, Constants.TYPE_LITERAL_NONPOSITIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(BigInteger.class, Constants.TYPE_LITERAL_NONNEGATIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(BigInteger.class, Constants.TYPE_LITERAL_UNSIGNEDLONG, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(BigInteger.class, Constants.TYPE_LITERAL_INTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(Date.class, Constants.TYPE_LITERAL_DATETIME, new
DateSerializerFactory(), new DateDeserializerFactory());
+
+ registerInternal(Calendar.class, Constants.TYPE_LITERAL_DATE, new
CalendarSerializerFactory(), new CalendarDeserializerFactory());
+ registerInternal(Calendar.class, Constants.TYPE_LITERAL_TIME, new
CalendarSerializerFactory(), new CalendarDeserializerFactory());
+ registerInternal(Calendar.class, Constants.TYPE_LITERAL_DATETIME, new
CalendarSerializerFactory(), new CalendarDeserializerFactory());
+
+ registerInternal(QName.class, Constants.TYPE_LITERAL_QNAME, new
QNameSerializerFactory(), new QNameDeserializerFactory());
+
+ registerInternal(String.class, Constants.TYPE_LITERAL_ANYSIMPLETYPE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_DURATION, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_GDAY, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_GMONTH, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_GMONTHDAY, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_GYEAR, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_GYEARMONTH, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_ID, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_LANGUAGE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_NAME, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_NCNAME, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_NMTOKEN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_NORMALIZEDSTRING, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_TOKEN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(String.class, Constants.TYPE_LITERAL_STRING, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(String[].class, Constants.TYPE_LITERAL_NMTOKENS, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(URI.class, Constants.TYPE_LITERAL_ANYURI, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(byte.class, Constants.TYPE_LITERAL_BYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Byte.class, Constants.TYPE_LITERAL_BYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(Byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new
HexSerializerFactory(), new HexDeserializerFactory());
+ registerInternal(byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new
HexSerializerFactory(), new HexDeserializerFactory());
+
+ registerInternal(Byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new
Base64SerializerFactory(), new Base64DeserializerFactory());
+ registerInternal(byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new
Base64SerializerFactory(), new Base64DeserializerFactory());
+
+ registerInternal(double.class, Constants.TYPE_LITERAL_DOUBLE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Double.class, Constants.TYPE_LITERAL_DOUBLE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(float.class, Constants.TYPE_LITERAL_FLOAT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Float.class, Constants.TYPE_LITERAL_FLOAT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(int.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Integer.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(int.class, Constants.TYPE_LITERAL_INT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Integer.class, Constants.TYPE_LITERAL_INT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(long.class, Constants.TYPE_LITERAL_LONG, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Long.class, Constants.TYPE_LITERAL_LONG, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ registerInternal(short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(short.class, Constants.TYPE_LITERAL_SHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ registerInternal(Short.class, Constants.TYPE_LITERAL_SHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ }
+
+ /** A tuple of the type {XML typeQName, Java Class, SerializerFactory,
DeserializerFactory}.
+ */
+ public static class KeyPair
+ {
+ private QName xmlType;
+ private Class javaType;
+
+ public KeyPair(QName xmlType, Class javaType)
+ {
+ this.javaType = javaType;
+ this.xmlType = xmlType;
+ }
+
+ public Class getJavaType()
+ {
+ return javaType;
+ }
+
+ public QName getXmlType()
+ {
+ return xmlType;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (this == o) return true;
+ if (!(o instanceof KeyPair)) return false;
+
+ final KeyPair keyPair = (KeyPair)o;
+
+ if (!javaType.equals(keyPair.javaType)) return false;
+ if (!xmlType.equals(keyPair.xmlType)) return false;
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = xmlType.hashCode();
+ result = 29 * result + javaType.hashCode();
+ return result;
+ }
+
+ public String toString()
+ {
+ return "[xmlType=" + xmlType + ",javaType=" +
javaType.getName() + "]";
+ }
+ }
+
+ /** A tuple of the type {XML typeQName, Java Class, SerializerFactory,
DeserializerFactory}.
+ */
+ public static class FactoryPair
+ {
+ private SerializerFactory serializerFactory;
+ private DeserializerFactory deserializerFactory;
+
+ FactoryPair(SerializerFactory sf, DeserializerFactory df)
+ {
+ this.deserializerFactory = df;
+ this.serializerFactory = sf;
+ }
+
+ public DeserializerFactory getDeserializerFactory()
+ {
+ return deserializerFactory;
+ }
+
+ public SerializerFactory getSerializerFactory()
+ {
+ return serializerFactory;
+ }
+
+ public void setDeserializerFactory(DeserializerFactory df)
+ {
+ this.deserializerFactory = df;
+ }
+
+ public void setSerializerFactory(SerializerFactory sf)
+ {
+ this.serializerFactory = sf;
+ }
+ }
+}
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping)
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ExceptionMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ExceptionMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ExceptionMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaWsdlMappingFactory.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
@@ -38,7 +38,7 @@
import org.xml.sax.Attributes;
/**
- * A JBossXB factory for {@link
org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping}
+ * A JBossXB factory for {@link
org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping}
*
* @author Thomas.Diesler(a)jboss.org
* @since 14-May-2004
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaXmlTypeMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/JavaXmlTypeMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/JavaXmlTypeMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/MethodParamPartsMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/MethodParamPartsMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
import java.io.Serializable;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PackageMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PackageMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PackageMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
import java.io.Serializable;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PortMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/PortMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/PortMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
import java.io.Serializable;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointInterfaceMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceEndpointMethodMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceInterfaceMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/ServiceInterfaceMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/ServiceInterfaceMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/VariableMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/VariableMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/VariableMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
import java.io.Serializable;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlMessageMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlMessageMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlMessageMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
import java.io.Serializable;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlReturnValueMapping.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jaxrpcmapping/WsdlReturnValueMapping.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/jaxrpcmapping/WsdlReturnValueMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.jaxrpcmapping;
// $Id$
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices
(from rev 1566, branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr109)
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/PortComponentMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr109/PortComponentMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/PortComponentMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
// $Id$
-package org.jboss.ws.core.metadata.jsr109;
+package org.jboss.ws.common.metadata.webservices;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebserviceDescriptionMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr109/WebserviceDescriptionMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebserviceDescriptionMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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.jsr109;
+package org.jboss.ws.common.metadata.webservices;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr109/WebservicesFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesFactory.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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.jsr109;
+package org.jboss.ws.common.metadata.webservices;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/jsr109/WebservicesMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/webservices/WebservicesMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -20,7 +20,7 @@
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
// $Id$
-package org.jboss.ws.core.metadata.jsr109;
+package org.jboss.ws.common.metadata.webservices;
import java.net.URL;
import java.util.ArrayList;
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/DOMTypes.java
(from rev 1566,
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/DOMTypes.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/DOMTypes.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/Extendable.java
(from rev 1566,
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/Extendable.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/Extendable.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/NCName.java (from
rev 1566,
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/NCName.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/NCName.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDL11DefinitionFactory.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11DefinitionFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11DefinitionFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL11DefinitionFactory.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.metadata.wsdl;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+
+import com.ibm.wsdl.xml.WSDLReaderImpl;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLLocator;
+import javax.wsdl.xml.WSDLReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * A factory that creates a WSDL-1.1 <code>Definition</code> from an URL.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 15-April-2004
+ */
+public class WSDL11DefinitionFactory
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(WSDL11DefinitionFactory.class);
+
+ // This feature is set by default in wsdl4j, it means the object structore contains
the imported arguments
+ public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
+ // Set this feature for additional debugging output
+ public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
+
+ // The WSDLReader that is used by this factory
+ private WSDLReader wsdlReader;
+
+ // Hide constructor
+ private WSDL11DefinitionFactory() throws WSDLException
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ wsdlReader = wsdlFactory.newWSDLReader();
+ wsdlReader.setFeature(WSDL11DefinitionFactory.FEATURE_VERBOSE, false);
+ }
+
+ /** Create a new instance of a wsdl factory */
+ public static WSDL11DefinitionFactory newInstance() throws WSDLException
+ {
+ return new WSDL11DefinitionFactory();
+ }
+
+ /** Set a feature on the underlying reader */
+ public void setFeature(String name, boolean value) throws IllegalArgumentException
+ {
+ wsdlReader.setFeature(name, value);
+ }
+
+ /**
+ * Read the wsdl document from the given URL
+ */
+ public Definition parse(URL wsdlLocation) throws WSDLException
+ {
+ if (wsdlLocation == null)
+ throw new IllegalArgumentException("URL cannot be null");
+
+ log.trace("parse: " + wsdlLocation.toExternalForm());
+
+ EntityResolver entityResolver = new JBossWSEntityResolver();
+
+ // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
+ ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
+
+ Definition wsdlDefinition = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver,
wsdlLocation));
+ return wsdlDefinition;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL11Reader.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Reader.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Reader.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL11Reader.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,1197 @@
+/*
+ * 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;
+
+// $Id$
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.wsdl.Binding;
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.BindingOutput;
+import javax.wsdl.Definition;
+import javax.wsdl.Fault;
+import javax.wsdl.Import;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Output;
+import javax.wsdl.Part;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.Types;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.UnknownExtensibilityElement;
+import javax.wsdl.extensions.mime.MIMEContent;
+import javax.wsdl.extensions.mime.MIMEMultipartRelated;
+import javax.wsdl.extensions.mime.MIMEPart;
+import javax.wsdl.extensions.schema.Schema;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap.SOAPBody;
+import javax.wsdl.extensions.soap.SOAPHeader;
+import javax.wsdl.extensions.soap.SOAPOperation;
+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.jaxrpc.Style;
+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.tools.JavaToXSD;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * A helper that translates a WSDL-1.1 object graph into a WSDL-2.0 object graph.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @since 10-Oct-2004
+ */
+public class WSDL11Reader
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDL11Reader.class);
+
+ private static QName SOAP12_BINDING = new QName(Constants.NS_SOAP12,
"binding");
+ private static QName SOAP12_BODY = new QName(Constants.NS_SOAP12, "body");
+ private static QName SOAP12_OPERATION = new QName(Constants.NS_SOAP12,
"operation");
+ private static QName SOAP12_ADDRESS = new QName(Constants.NS_SOAP12,
"address");
+
+ private WSDLDefinitions destWsdl;
+
+ // Maps wsdl message parts to their corresponding element names
+ private Map<String, QName> messagePartToElementMap = new HashMap<String,
QName>();
+
+ // Map of <ns,URL> for schemalocation keyed by namespace
+ private Map<String, URL> schemaLocationsMap = new HashMap<String, URL>();
+
+ private LinkedHashMap<QName, Binding> allBindings;
+ private LinkedHashMap<QName, Binding> portTypeBindings;
+
+ // Temporary files used by this reader.
+ private List<File> tempFiles = new ArrayList<File>();
+
+ /**
+ * Takes a WSDL11 Definition element and converts into
+ * our object graph that has been developed for WSDL20
+ *
+ * @param srcWsdl The src WSDL11 definition
+ * @param wsdlLoc The source location, if null we cannot process imports or includes
+ */
+ public WSDLDefinitions processDefinition(Definition srcWsdl, URL wsdlLoc) throws
IOException
+ {
+ log.trace("processDefinition: " + wsdlLoc);
+
+ destWsdl = new WSDLDefinitions();
+ destWsdl.setWsdlTypes(new XSModelTypes());
+ destWsdl.setWsdlOneOneDefinition(srcWsdl);
+ destWsdl.setWsdlNamespace(Constants.NS_WSDL11);
+
+ processNamespaces(srcWsdl);
+ processTypes(srcWsdl, wsdlLoc);
+ processServices(srcWsdl);
+
+ if (getAllDefinedBindings(srcWsdl).size() != destWsdl.getBindings().length)
+ processUnreachableBindings(srcWsdl);
+
+ cleanupTemporaryFiles();
+
+ return destWsdl;
+ }
+
+ private void cleanupTemporaryFiles()
+ {
+ for (File current : tempFiles)
+ {
+ current.delete();
+ }
+ }
+
+ // process all bindings not within service separetly
+ private void processUnreachableBindings(Definition srcWsdl)
+ {
+ log.trace("processUnreachableBindings");
+
+ Iterator it = getAllDefinedBindings(srcWsdl).values().iterator();
+ while (it.hasNext())
+ {
+ Binding srcBinding = (Binding)it.next();
+ QName srcQName = srcBinding.getQName();
+
+ WSDLBinding destBinding = destWsdl.getBinding(new NCName(srcQName));
+ if (destBinding == null)
+ {
+ processBinding(srcWsdl, srcBinding);
+ }
+ }
+ }
+
+ private void processNamespaces(Definition srcWsdl)
+ {
+ String targetNS = srcWsdl.getTargetNamespace();
+ destWsdl.setTargetNamespace(targetNS);
+
+ // Copy wsdl namespaces
+ Map nsMap = srcWsdl.getNamespaces();
+ Iterator iter = nsMap.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)iter.next();
+ String prefix = (String)entry.getKey();
+ String nsURI = (String)entry.getValue();
+ destWsdl.registerNamespaceURI(nsURI, prefix);
+ }
+ }
+
+ private void processTypes(Definition srcWsdl, URL wsdlLoc) throws IOException
+ {
+ log.trace("BEGIN processTypes: " + wsdlLoc);
+
+ WSDLTypes destTypes = destWsdl.getWsdlTypes();
+
+ Types srcTypes = srcWsdl.getTypes();
+ if (srcTypes != null && srcTypes.getExtensibilityElements().size() > 0)
+ {
+ List extElements = srcTypes.getExtensibilityElements();
+ int len = extElements.size();
+
+ for (int i = 0; i < len; i++)
+ {
+ ExtensibilityElement extElement = (ExtensibilityElement)extElements.get(i);
+
+ Element domElement;
+ if (extElement instanceof Schema)
+ {
+ domElement = ((Schema)extElement).getElement();
+ }
+ else if (extElement instanceof UnknownExtensibilityElement)
+ {
+ domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ }
+ else
+ {
+ throw new WSException("Unsupported extensibility element: " +
extElement);
+ }
+
+ Element domElementClone = (Element)domElement.cloneNode(true);
+ copyParentNamespaceDeclarations(domElementClone, domElement);
+
+ String localname = domElementClone.getLocalName();
+ try
+ {
+ if ("import".equals(localname))
+ {
+ processSchemaImport(destTypes, wsdlLoc, domElementClone);
+ }
+ else if ("schema".equals(localname))
+ {
+ processSchemaInclude(destTypes, wsdlLoc, domElementClone);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unsuported schema element:
" + localname);
+ }
+ }
+ catch (IOException e)
+ {
+ throw new WSException("Cannot extract schema definition", e);
+ }
+ }
+
+ if (len > 0)
+ {
+ JavaToXSD jxsd = new JavaToXSD();
+ JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
+ WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
+ }
+ }
+ else
+ {
+ log.trace("Empty wsdl types element, processing imports");
+ Iterator it = srcWsdl.getImports().values().iterator();
+ while (it.hasNext())
+ {
+ List<Import> srcImports = (List<Import>)it.next();
+ for (Import srcImport : srcImports)
+ {
+ Definition impDefinition = srcImport.getDefinition();
+ String impLoc = impDefinition.getDocumentBaseURI();
+ processTypes(impDefinition, new URL(impLoc));
+ }
+ }
+ }
+
+ log.trace("END processTypes: " + wsdlLoc + "\n" + destTypes);
+ }
+
+ private void copyParentNamespaceDeclarations(Element destElement, Element srcElement)
+ {
+ Node parent = srcElement.getParentNode();
+ while (parent != null)
+ {
+ if (parent.hasAttributes())
+ {
+ NamedNodeMap attributes = parent.getAttributes();
+ for (int i = 0; i < attributes.getLength(); i++)
+ {
+ Attr attr = (Attr)attributes.item(i);
+ String name = attr.getName();
+ String value = attr.getValue();
+ if (name.startsWith("xmlns:") &&
destElement.hasAttribute(name) == false)
+ destElement.setAttribute(name, value);
+ }
+ }
+ parent = parent.getParentNode();
+ }
+ }
+
+ private void processSchemaImport(WSDLTypes types, URL wsdlLoc, Element importEl)
throws IOException
+ {
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process import, parent location
not set");
+
+ log.trace("processSchemaImport: " + wsdlLoc);
+
+ String location = getOptionalAttribute(importEl, "schemaLocation");
+ if (location == null)
+ throw new IllegalArgumentException("schemaLocation is null for
xsd:import");
+
+ URL locationURL = getLocationURL(wsdlLoc, location);
+ Element rootElement = DOMUtils.parse(locationURL.openStream());
+ URL newloc = processSchemaInclude(types, locationURL, rootElement);
+ if (newloc != null)
+ importEl.setAttribute("schemaLocation", newloc.toExternalForm());
+ }
+
+ private URL processSchemaInclude(WSDLTypes types, URL wsdlLoc, Element schemaEl)
throws IOException
+ {
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process iclude, parent location
not set");
+
+ File tmpFile = null;
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process include, parent location
not set");
+
+ log.trace("processSchemaInclude: " + wsdlLoc);
+
+ String schemaPrefix = schemaEl.getPrefix();
+
+ String importTag = (schemaPrefix == null) ? "import" : schemaPrefix +
":import";
+ Element importElement =
schemaEl.getOwnerDocument().createElementNS(Constants.NS_SCHEMA_XSD, importTag);
+ importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
+ schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
+
+ // Handle schema includes
+ Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "include"));
+ while (it.hasNext())
+ {
+ Element includeEl = (Element)it.next();
+ String location = getOptionalAttribute(includeEl, "schemaLocation");
+ if (location == null)
+ throw new IllegalArgumentException("schemaLocation is null for
xsd:include");
+
+ URL locationURL = getLocationURL(wsdlLoc, location);
+ Element rootElement = DOMUtils.parse(locationURL.openStream());
+ URL newloc = processSchemaInclude(types, locationURL, rootElement);
+ if (newloc != null)
+ includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
+ }
+
+ String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
+ if (targetNS != null)
+ {
+ log.trace("processSchemaInclude: [targetNS=" + targetNS +
",parentURL=" + wsdlLoc + "]");
+
+ tmpFile = SchemaUtils.getSchemaTempFile(targetNS);
+ tempFiles.add(tmpFile);
+
+ FileWriter fwrite = new FileWriter(tmpFile);
+ new DOMWriter(fwrite).setPrettyprint(true).print(schemaEl);
+ fwrite.close();
+
+ schemaLocationsMap.put(targetNS, tmpFile.toURL());
+ }
+
+ // schema elements that have no target namespace are skipped
+ //
+ // <xsd:schema>
+ // <xsd:import
namespace="http://org.jboss.webservice/example/types"
schemaLocation="Hello.xsd"/>
+ // <xsd:import
namespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel"
schemaLocation="subdir/HelloArr.xsd"/>
+ // </xsd:schema>
+ if (targetNS == null)
+ {
+ log.trace("Schema element without target namespace in: " + wsdlLoc);
+ }
+
+ handleSchemaImports(schemaEl, wsdlLoc);
+
+ return tmpFile != null ? tmpFile.toURL() : null;
+ }
+
+ private void handleSchemaImports(Element schemaEl, URL wsdlLoc) throws
MalformedURLException
+ {
+ if (wsdlLoc == null)
+ throw new IllegalArgumentException("Cannot process import, parent location
not set");
+
+ Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "import"));
+ while (it.hasNext())
+ {
+ Element includeEl = (Element)it.next();
+ String schemaLocation = getOptionalAttribute(includeEl,
"schemaLocation");
+ String namespace = getOptionalAttribute(includeEl, "namespace");
+
+ log.trace("handleSchemaImport: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
+
+ // Skip, let the entity resolver resolve these
+ if (namespace != null && schemaLocation != null)
+ {
+ URL currLoc = getLocationURL(wsdlLoc, schemaLocation);
+ schemaLocationsMap.put(namespace, currLoc);
+ }
+ else
+ {
+ log.trace("Skip schema import: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
+ }
+ }
+ }
+
+ private URL getLocationURL(URL parentURL, String location) throws
MalformedURLException
+ {
+ log.trace("getLocationURL: [location=" + location + ",parent="
+ parentURL + "]");
+
+ URL locationURL = null;
+ try
+ {
+ locationURL = new URL(location);
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore malformed URL
+ }
+
+ if (locationURL == null)
+ {
+ String parentProtocol = parentURL.getProtocol();
+ if (parentProtocol.equals("file") &&
!location.startsWith("/"))
+ {
+ String path = parentURL.toExternalForm();
+ path = path.substring(0, path.lastIndexOf("/"));
+ locationURL = new URL(path + "/" + location);
+ }
+ else if (parentProtocol.startsWith("http") &&
location.startsWith("/"))
+ {
+ String path = parentProtocol + "://" + parentURL.getHost() +
":" + parentURL.getPort();
+ locationURL = new URL(path + location);
+ }
+ else if (parentProtocol.equals("jar") &&
!location.startsWith("/"))
+ {
+ String path = parentURL.toExternalForm();
+ path = path.substring(0, path.lastIndexOf("/"));
+ locationURL = new URL(path + "/" + location);
+ }
+ else
+ {
+ throw new WSException("Unsupported schemaLocation: " + location);
+ }
+ }
+
+ log.trace("Modified schemaLocation: " + locationURL);
+ return locationURL;
+ }
+
+ private void processPortType(Definition srcWsdl, PortType srcPortType)
+ {
+ log.trace("processPortType: " + srcPortType.getQName());
+
+ QName qname = srcPortType.getQName();
+ NCName ncName = new NCName(qname);
+ if (destWsdl.getInterface(ncName) == null)
+ {
+ WSDLInterface destInterface = new WSDLInterface(destWsdl);
+ destInterface.setName(ncName);
+ destInterface.setQName(qname);
+
+ // eventing extensions
+ QName eventSourceProp =
(QName)srcPortType.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSE_EVENTSOURCE);
+ if (eventSourceProp != null &&
eventSourceProp.getLocalPart().equals(Boolean.TRUE.toString()))
+ {
+ destInterface.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_EVENTSOURCE, eventSourceProp.getLocalPart()));
+ }
+
+ destWsdl.addInterface(destInterface);
+
+ processPortTypeOperations(srcWsdl, destInterface, srcPortType);
+ }
+ }
+
+ private void processPortTypeOperations(Definition srcWsdl, WSDLInterface
destInterface, PortType srcPortType)
+ {
+ Iterator itOperations = srcPortType.getOperations().iterator();
+ while (itOperations.hasNext())
+ {
+ Operation srcOperation = (Operation)itOperations.next();
+
+ WSDLInterfaceOperation destOperation = new
WSDLInterfaceOperation(destInterface);
+ destOperation.setName(new NCName(srcOperation.getName()));
+ destOperation.setStyle(getOperationStyle(srcWsdl, srcPortType, srcOperation));
+
+ processOperationInput(srcWsdl, srcOperation, destOperation, srcPortType);
+ processOperationOutput(srcWsdl, srcOperation, destOperation, srcPortType);
+ processOperationFaults(srcOperation, destOperation, destInterface);
+
+ destInterface.addOperation(destOperation);
+ }
+ }
+
+ private void processOperationInput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
+ {
+ Input srcInput = srcOperation.getInput();
+ if (srcInput != null)
+ {
+ Message srcMessage = srcInput.getMessage();
+ log.trace("processOperationInput: " + srcMessage.getQName());
+
+ QName wsaAction =
(QName)srcInput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
+ if (wsaAction != null)
+ destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN,
wsaAction.getLocalPart()));
+
+ List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
+ if (paramOrder != null)
+ {
+ for (String name : paramOrder)
+ {
+ if (srcMessage.getPart(name) != null)
+ destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name));
+ }
+ }
+
+ WSDLInterfaceOperationInput rpcInput = new
WSDLInterfaceOperationInput(destOperation);
+ for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(paramOrder))
+ {
+ if (Constants.URI_STYLE_IRI == destOperation.getStyle())
+ {
+ WSDLInterfaceOperationInput destInput = new
WSDLInterfaceOperationInput(destOperation);
+ QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
+ destInput.setElement(elementName);
+
+ //Lets remember the Message name
+ destInput.setMessageName(srcMessage.getQName());
+ destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN,
srcMessage.getQName().getLocalPart()));
+
+ destInput.setPartName(srcPart.getName());
+
+ destOperation.addInput(destInput);
+ }
+ else
+ {
+ // If we don't have a type then we aren't a valid RPC parameter
+ // This could happen on a header element, in which case the
+ // binding will pick it up
+ QName xmlType = srcPart.getTypeName();
+ if (xmlType != null)
+ rpcInput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
+ else
+ messagePartToElementName(srcWsdl, srcPortType, srcOperation,
srcMessage, srcPart);
+ }
+ }
+ if (Constants.URI_STYLE_RPC == destOperation.getStyle())
+ {
+ // This is really a place holder, but also the actual value used in
+ // WSDL 2.0 RPC bindings
+ rpcInput.setElement(destOperation.getQName());
+ rpcInput.setMessageName(srcMessage.getQName());
+ destOperation.addInput(rpcInput);
+ }
+ }
+ }
+
+ private void processOperationOutput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
+ {
+ Output srcOutput = srcOperation.getOutput();
+ if (srcOutput == null)
+ {
+ destOperation.setPattern(Constants.WSDL20_PATTERN_IN_ONLY);
+ return;
+ }
+
+ Message srcMessage = srcOutput.getMessage();
+ log.trace("processOperationOutput: " + srcMessage.getQName());
+
+ destOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
+ QName wsaAction = (QName)
srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
+ if (wsaAction != null)
+ destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT,
wsaAction.getLocalPart()));
+
+ List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
+ if (paramOrder != null)
+ {
+ for (String name : paramOrder)
+ {
+ if (srcMessage.getPart(name) != null)
+ {
+ WSDLRPCSignatureItem item = destOperation.getRpcSignatureitem(name);
+ if (item != null)
+ item.setDirection(Direction.INOUT);
+ else
+ destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name,
Direction.OUT));
+ }
+ }
+ }
+
+ WSDLInterfaceOperationOutput rpcOutput = new
WSDLInterfaceOperationOutput(destOperation);
+ for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(null))
+ {
+ if (Constants.URI_STYLE_IRI == destOperation.getStyle())
+ {
+ WSDLInterfaceOperationOutput destOutput = new
WSDLInterfaceOperationOutput(destOperation);
+
+ QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
+ destOutput.setElement(elementName);
+
+ // Lets remember the Message name
+ destOutput.setMessageName(srcMessage.getQName());
+ destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT, srcMessage.getQName()
+ .getLocalPart()));
+
+ // Remember the original part name
+ destOutput.setPartName(srcPart.getName());
+
+ destOperation.addOutput(destOutput);
+ }
+ else
+ {
+ // If we don't have a type then we aren't a valid RPC parameter
+ // This could happen on a header element, in which case the
+ // binding will pick it up
+ QName xmlType = srcPart.getTypeName();
+ if (xmlType != null)
+ rpcOutput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
+ else
+ messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage,
srcPart);
+ }
+ }
+
+ if (Constants.URI_STYLE_RPC == destOperation.getStyle())
+ {
+ // This is really a place holder, but also the actual value used in
+ // WSDL 2.0 RPC bindings
+ QName name = destOperation.getQName();
+ rpcOutput.setElement(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
+ rpcOutput.setMessageName(srcMessage.getQName());
+ destOperation.addOutput(rpcOutput);
+ }
+ }
+
+ private void processOperationFaults(Operation srcOperation, WSDLInterfaceOperation
destOperation, WSDLInterface destInterface)
+ {
+
+ Map faults = srcOperation.getFaults();
+ Iterator itFaults = faults.values().iterator();
+ while (itFaults.hasNext())
+ {
+ Fault srcFault = (Fault)itFaults.next();
+ processOperationFault(destOperation, destInterface, srcFault);
+ }
+ }
+
+ private void processOperationFault(WSDLInterfaceOperation destOperation, WSDLInterface
destInterface, Fault srcFault)
+ {
+ String faultName = srcFault.getName();
+ log.trace("processOperationFault: " + faultName);
+
+ WSDLInterfaceFault destFault = new WSDLInterfaceFault(destInterface);
+ NCName ncName = new NCName(faultName);
+ destFault.setName(ncName);
+
+ Message message = srcFault.getMessage();
+ QName messageName = message.getQName();
+
+ Map partsMap = message.getParts();
+ if (partsMap.size() != 1)
+ throw new WSException("Unsupported number of fault parts in message "
+ messageName);
+
+ Part part = (Part)partsMap.values().iterator().next();
+ QName xmlName = part.getElementName();
+
+ if (xmlName != null)
+ {
+ destFault.setElement(xmlName);
+ }
+ else
+ {
+ destFault.setElement(messageName);
+ log.warn("Unsupported fault message part in message: " +
messageName);
+ }
+
+ WSDLInterfaceFault prevFault = destInterface.getFault(ncName);
+ if (prevFault != null && prevFault.getName().equals(ncName) == false)
+ throw new WSException("Fault name must be unique: " + faultName);
+
+ // Add the fault to the interface
+ destInterface.addFault(destFault);
+
+ // Add the fault refererence to the operation
+ WSDLInterfaceOperationOutfault opOutFault = new
WSDLInterfaceOperationOutfault(destOperation);
+ opOutFault.setRef(new QName(destWsdl.getTargetNamespace(), faultName));
+ destOperation.addOutfault(opOutFault);
+ }
+
+ /** Translate the message part name into an XML element name.
+ */
+ private QName messagePartToElementName(Definition srcWsdl, PortType srcPortType,
Operation srcOperation, Message srcMessage, Part srcPart)
+ {
+ // <part name="param" element="tns:SomeType" />
+ QName xmlName = srcPart.getElementName();
+
+ // <part name="param" type="xsd:string" />
+ if (xmlName == null)
+ xmlName = new QName(srcPart.getName());
+
+ xmlName = destWsdl.registerQName(xmlName);
+ String key = srcMessage.getQName() + "->" + srcPart.getName();
+ messagePartToElementMap.put(key, xmlName);
+
+ return xmlName;
+ }
+
+ private BindingOperation getBindingOperation(Definition srcWsdl, PortType srcPortType,
Operation srcOperation)
+ {
+ Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
+
+ if (srcBinding == null)
+ throw new WSException("Cannot find binding for: " +
srcPortType.getQName());
+
+ String srcOperationName = srcOperation.getName();
+ BindingOperation srcBindingOperation =
srcBinding.getBindingOperation(srcOperationName, null, null);
+ if (srcBindingOperation == null)
+ throw new WSException("Cannot find binding operation for: " +
srcOperationName);
+ return srcBindingOperation;
+ }
+
+ private String getOperationStyle(Definition srcWsdl, PortType srcPortType, Operation
srcOperation)
+ {
+ Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
+ BindingOperation srcBindingOperation = getBindingOperation(srcWsdl, srcPortType,
srcOperation);
+
+ String operationStyle = null;
+ List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPOperation)
+ {
+ SOAPOperation soapOp = (SOAPOperation)extElement;
+ operationStyle = soapOp.getStyle();
+ }
+ else if (SOAP12_OPERATION.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ operationStyle = getOptionalAttribute(domElement, "style");
+ }
+ }
+
+ if (operationStyle == null)
+ {
+ for (ExtensibilityElement extElement : (List<ExtensibilityElement>)
srcBinding.getExtensibilityElements())
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPBinding)
+ {
+ SOAPBinding soapBinding = (SOAPBinding) extElement;
+ operationStyle = soapBinding.getStyle();
+ }
+ else if (SOAP12_BINDING.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)
extElement).getElement();
+ operationStyle = getOptionalAttribute(domElement, "style");
+ }
+ }
+ }
+
+ return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC :
Constants.URI_STYLE_IRI;
+ }
+
+ private void processBinding(Definition srcWsdl, Binding srcBinding)
+ {
+ QName srcBindingQName = srcBinding.getQName();
+ log.trace("processBinding: " + srcBindingQName);
+
+ NCName ncName = new NCName(srcBindingQName);
+ if (destWsdl.getBinding(ncName) == null)
+ {
+ PortType srcPortType = srcBinding.getPortType();
+ if (srcPortType == null)
+ throw new WSException("Cannot find port type for binding: " +
ncName);
+
+ processPortType(srcWsdl, srcPortType);
+
+ WSDLBinding destBinding = new WSDLBinding(destWsdl);
+ destBinding.setQName(srcBindingQName);
+ destBinding.setName(ncName);
+ destBinding.setInterfaceName(srcPortType.getQName());
+
+ String bindingStyle = Style.getDefaultStyle().toString();
+ List<ExtensibilityElement> extList =
srcBinding.getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPBinding)
+ {
+ destBinding.setType(Constants.NS_SOAP11);
+ SOAPBinding soapBinding = (SOAPBinding)extElement;
+ bindingStyle = soapBinding.getStyle();
+ }
+ else if (SOAP12_BINDING.equals(elementType))
+ {
+ destBinding.setType(Constants.NS_SOAP12);
+ Element domElement =
((UnknownExtensibilityElement)extElement).getElement();
+ bindingStyle = getOptionalAttribute(domElement, "style");
+ }
+ }
+ destWsdl.addBinding(destBinding);
+ processBindingOperations(destBinding, srcBinding, bindingStyle);
+ }
+ }
+
+ private Map<QName, Binding> getPortTypeBindings(Definition srcWsdl)
+ {
+ getAllDefinedBindings(srcWsdl);
+ return portTypeBindings;
+ }
+
+ private Map<QName, Binding> getAllDefinedBindings(Definition srcWsdl)
+ {
+ if (allBindings != null)
+ return allBindings;
+
+ allBindings = new LinkedHashMap<QName, Binding>();
+ portTypeBindings = new LinkedHashMap<QName, Binding>();
+ Map srcBindings = srcWsdl.getBindings();
+ Iterator itBinding = srcBindings.values().iterator();
+ while (itBinding.hasNext())
+ {
+ Binding srcBinding = (Binding)itBinding.next();
+ allBindings.put(srcBinding.getQName(), srcBinding);
+ portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
+ }
+
+ // Bindings not available when pulled in through <wsdl:import>
+ //
http://sourceforge.net/tracker/index.php?func=detail&aid=1240323&...
+ Iterator itService = srcWsdl.getServices().values().iterator();
+ while (itService.hasNext())
+ {
+ Service srcService = (Service)itService.next();
+ Iterator itPort = srcService.getPorts().values().iterator();
+ while (itPort.hasNext())
+ {
+ Port srcPort = (Port)itPort.next();
+ Binding srcBinding = srcPort.getBinding();
+ allBindings.put(srcBinding.getQName(), srcBinding);
+ portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
+ }
+ }
+
+ return allBindings;
+ }
+
+ private void processBindingOperations(WSDLBinding destBinding, Binding srcBinding,
String bindingStyle)
+ {
+ Iterator it = srcBinding.getBindingOperations().iterator();
+ while (it.hasNext())
+ {
+ BindingOperation srcBindingOperation = (BindingOperation)it.next();
+ processBindingOperation(destBinding, bindingStyle, srcBindingOperation);
+ }
+ }
+
+ private void processBindingOperation(WSDLBinding destBinding, String bindingStyle,
BindingOperation srcBindingOperation)
+ {
+ String srcBindingName = srcBindingOperation.getName();
+ log.trace("processBindingOperation: " + srcBindingName);
+
+ WSDLInterface destInterface = destBinding.getInterface();
+ String namespaceURI = destInterface.getQName().getNamespaceURI();
+
+ WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
+ QName refQName = new QName(namespaceURI, srcBindingName);
+ destBindingOperation.setRef(refQName);
+ destBinding.addOperation(destBindingOperation);
+
+ String opName = srcBindingName;
+ WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(new
NCName(opName));
+
+ // Process soap:operation@soapAction, soap:operation@style
+ List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPOperation)
+ {
+ SOAPOperation soapOp = (SOAPOperation)extElement;
+ destBindingOperation.setSOAPAction(soapOp.getSoapActionURI());
+ }
+ else if (SOAP12_OPERATION.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ destBindingOperation.setSOAPAction(getOptionalAttribute(domElement,
"soapAction"));
+ }
+ }
+
+ BindingInput srcBindingInput = srcBindingOperation.getBindingInput();
+ if (srcBindingInput != null)
+ {
+ processBindingInput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingInput);
+ }
+
+ BindingOutput srcBindingOutput = srcBindingOperation.getBindingOutput();
+ if (srcBindingOutput != null)
+ {
+ processBindingOutput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingOutput);
+ }
+ }
+
+ interface ReferenceCallback
+ {
+ void removeReference(QName element);
+ void removeRPCPart(String partName);
+ QName getXmlType(String partName);
+ }
+
+ private void processBindingInput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingInput srcBindingInput)
+ {
+ log.trace("processBindingInput");
+
+ QName soap11Body = new QName(Constants.NS_SOAP11, "body");
+ List<ExtensibilityElement> extList =
srcBindingInput.getExtensibilityElements();
+ WSDLBindingOperationInput input = new
WSDLBindingOperationInput(destBindingOperation);
+ destBindingOperation.addInput(input);
+
+ ReferenceCallback cb = new ReferenceCallback()
+ {
+ public QName getXmlType(String partName)
+ {
+ return
srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName();
+ }
+
+ public void removeReference(QName element)
+ {
+ WSDLInterfaceOperationInput destIntfInput =
destIntfOperation.getInput(element);
+ if (destIntfInput == null)
+ destIntfOperation.removeInput(element);
+ }
+
+ public void removeRPCPart(String partName)
+ {
+ WSDLInterfaceOperationInput operationInput =
destIntfOperation.getInput(destIntfOperation.getQName());
+ operationInput.removeChildPart(partName);
+ }
+ };
+
+ processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, input, cb);
+ }
+
+ private void processBindingOutput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingOutput srcBindingOutput)
+ {
+ log.trace("processBindingInput");
+
+ QName soap11Body = new QName(Constants.NS_SOAP11, "body");
+ List<ExtensibilityElement> extList =
srcBindingOutput.getExtensibilityElements();
+ WSDLBindingOperationOutput output = new
WSDLBindingOperationOutput(destBindingOperation);
+ destBindingOperation.addOutput(output);
+
+ ReferenceCallback cb = new ReferenceCallback()
+ {
+ public QName getXmlType(String partName)
+ {
+ return
srcBindingOperation.getOperation().getOutput().getMessage().getPart(partName).getTypeName();
+ }
+
+ public void removeReference(QName element)
+ {
+ WSDLInterfaceOperationOutput destIntfOutput =
destIntfOperation.getOutput(element);
+ if (destIntfOutput == null)
+ destIntfOperation.removeInput(element);
+ }
+
+ public void removeRPCPart(String partName)
+ {
+ QName name = destIntfOperation.getQName();
+ WSDLInterfaceOperationOutput operationOutput =
destIntfOperation.getOutput(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
+ operationOutput.removeChildPart(partName);
+ }
+ };
+
+ processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, output, cb);
+ }
+
+
+ private void processBindingReference(WSDLBindingOperation destBindingOperation,
WSDLInterfaceOperation destIntfOperation,
+ QName soap11Body, List<ExtensibilityElement> extList,
WSDLBindingMessageReference reference, ReferenceCallback callback)
+ {
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (soap11Body.equals(elementType) || SOAP12_BODY.equals(elementType))
+ {
+ processEncodingStyle(extElement, destBindingOperation);
+ }
+ else if (extElement instanceof SOAPHeader)
+ {
+ SOAPHeader header = (SOAPHeader)extElement;
+ QName messageQName = header.getMessage();
+ String partName = header.getPart();
+
+ String key = messageQName + "->" + partName;
+ QName elementName = (QName)messagePartToElementMap.get(key);
+ if (elementName == null)
+ throw new WSException("Could not determine element name from header:
" + partName);
+
+ reference.addSoapHeader(new WSDLSOAPHeader(elementName, partName));
+ if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ {
+ callback.removeReference(elementName);
+ }
+ else
+ {
+ // Just in case
+ callback.removeRPCPart(partName);
+ }
+ }
+ else if (extElement instanceof MIMEMultipartRelated)
+ {
+ MIMEMultipartRelated related = (MIMEMultipartRelated)extElement;
+ Iterator i = related.getMIMEParts().iterator();
+ while (i.hasNext())
+ {
+ MIMEPart part = (MIMEPart)i.next();
+ Iterator j = part.getExtensibilityElements().iterator();
+ String name = null;
+ String types = null;
+
+ while (j.hasNext())
+ {
+ ExtensibilityElement inner = (ExtensibilityElement)j.next();
+ if (inner instanceof MIMEContent)
+ {
+ MIMEContent content = (MIMEContent)inner;
+ name = content.getPart();
+ if (types == null)
+ {
+ types = content.getType();
+ }
+ else
+ {
+ types += "," + content.getType();
+ }
+ }
+ }
+
+ // Found content types in this part
+ if (name != null)
+ {
+ QName xmlType = callback.getXmlType(name);
+ reference.addMimePart(new WSDLMIMEPart(name, xmlType, types));
+ if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ {
+ // A mime part must be defined as <part type="">
+ callback.removeReference(new QName(name));
+ }
+ else
+ {
+ callback.removeRPCPart(name);
+ }
+ }
+ }
+ }
+ }
+ }
+
+
+ private void processEncodingStyle(ExtensibilityElement extElement,
WSDLBindingOperation destBindingOperation)
+ {
+ log.trace("processEncodingStyle");
+
+ String encStyle = null;
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPBody)
+ {
+ SOAPBody body = (SOAPBody)extElement;
+ List encStyleList = body.getEncodingStyles();
+ if (encStyleList != null)
+ {
+ if (encStyleList.size() > 1)
+ log.warn("Multiple encoding styles not supported: " +
encStyleList);
+
+ if (encStyleList.size() > 0)
+ {
+ encStyle = (String)encStyleList.get(0);
+ }
+ }
+ }
+ else if (SOAP12_BODY.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ encStyle = getOptionalAttribute(domElement, "encodingStyle");
+ }
+
+ if (encStyle != null)
+ {
+ String setStyle = destBindingOperation.getEncodingStyle();
+ if (encStyle.equals(setStyle) == false)
+ log.warn("Encoding style '" + encStyle + "' not
supported for: " + destBindingOperation.getRef());
+
+ destBindingOperation.setEncodingStyle(encStyle);
+ }
+ }
+
+ private void processServices(Definition srcWsdl)
+ {
+ log.trace("BEGIN processServices: " + srcWsdl.getDocumentBaseURI());
+
+ // Each definition needs a clear binding cache
+ allBindings = null;
+
+ if (srcWsdl.getServices().size() > 0)
+ {
+ Iterator it = srcWsdl.getServices().values().iterator();
+ while (it.hasNext())
+ {
+ Service srcService = (Service)it.next();
+ QName qname = srcService.getQName();
+ WSDLService destService = new WSDLService(destWsdl);
+ destService.setName(new NCName(qname));
+ destService.setQName(qname);
+ destWsdl.addService(destService);
+ processPorts(srcWsdl, destService, srcService);
+ }
+ }
+ else
+ {
+ log.trace("Empty wsdl services, processing imports");
+ Iterator it = srcWsdl.getImports().values().iterator();
+ while (it.hasNext())
+ {
+ List<Import> srcImports = (List<Import>)it.next();
+ for (Import srcImport : srcImports)
+ {
+ Definition importDefinition = srcImport.getDefinition();
+ processServices(importDefinition);
+ }
+ }
+
+ // The binding cache must be clear after imports, so that undefined bindings can
be located
+ allBindings = null;
+ }
+
+ log.trace("END processServices: " + srcWsdl.getDocumentBaseURI());
+ }
+
+ private void processPorts(Definition srcWsdl, WSDLService destService, Service
srcService)
+ {
+ Iterator it = srcService.getPorts().values().iterator();
+ while (it.hasNext())
+ {
+ Port srcPort = (Port)it.next();
+ processPort(srcWsdl, destService, srcPort);
+ }
+ }
+
+ private void processPort(Definition srcWsdl, WSDLService destService, Port srcPort)
+ {
+ log.trace("processPort: " + srcPort.getName());
+
+ Binding srcBinding = srcPort.getBinding();
+
+ WSDLEndpoint destEndpoint = new WSDLEndpoint(destService);
+ destEndpoint.setName(new NCName(srcPort.getName()));
+ destEndpoint.setBinding(srcBinding.getQName());
+ destEndpoint.setQName(new QName(srcWsdl.getTargetNamespace(), srcPort.getName()));
+ destEndpoint.setAddress(getSOAPAddress(srcPort));
+ destService.addEndpoint(destEndpoint);
+
+ processBinding(srcWsdl, srcBinding);
+ }
+
+ /** Get the endpoint address from the ports extensible element
+ */
+ private String getSOAPAddress(Port srcPort)
+ {
+ String soapAddress = "dummy";
+
+ Iterator it = srcPort.getExtensibilityElements().iterator();
+ while (it.hasNext())
+ {
+ ExtensibilityElement extElement = (ExtensibilityElement)it.next();
+ QName elementType = extElement.getElementType();
+
+ if (extElement instanceof SOAPAddress)
+ {
+ SOAPAddress addr = (SOAPAddress)extElement;
+ soapAddress = addr.getLocationURI();
+ break;
+ }
+ else if (SOAP12_ADDRESS.equals(elementType))
+ {
+ Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
+ soapAddress = getOptionalAttribute(domElement, "location");
+ break;
+ }
+ else if ("address".equals(elementType.getLocalPart()))
+ {
+ log.warn("Unprocessed extension element: " + elementType);
+ }
+ }
+
+ if (soapAddress == null)
+ throw new WSException("Cannot obtain SOAP address");
+
+ return soapAddress;
+ }
+
+ private String getOptionalAttribute(Element domElement, String attrName)
+ {
+ String attrValue = domElement.getAttribute(attrName);
+ return (attrValue.length() > 0 ? attrValue : null);
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL11Writer.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Writer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Writer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL11Writer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,519 @@
+/*
+* 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;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+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.WSDLRPCSignatureItem.Direction;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * A WSDL Writer that writes a WSDL 1.1 file. It works off
+ * of the WSDL20 Object Graph.
+ * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ */
+public class WSDL11Writer extends WSDLWriter
+{
+ //Used Internally
+ private String wsdlStyle = Constants.RPC_LITERAL;
+
+ // Used to prevent duplicates
+ private HashSet<String> writtenFaultMessages = new HashSet<String>();
+
+ /** Use WSDLDefinitions.writeWSDL instead. */
+ public WSDL11Writer(WSDLDefinitions wsdl)
+ {
+ super(wsdl);
+ }
+
+ public void write(Writer writer) throws IOException
+ {
+ write(writer, null);
+ }
+
+
+ public void write(Writer writer, String charset) throws IOException
+ {
+ write(writer, charset, null);
+ }
+
+ public void write(Writer writer, String charset, WriterResolver resolver) throws
IOException
+ {
+ // Write out the wsdl-1.1 represention (only path to obtain is from WSDL11Reader)
+ if (wsdl.getWsdlOneOneDefinition() != null)
+ {
+ Definition wsdlDefinition = wsdl.getWsdlOneOneDefinition();
+ try
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
+ wsdlWriter.writeWSDL(wsdlDefinition, writer);
+ }
+ catch (WSDLException e)
+ {
+ this.logException(e);
+ throw new IOException(e.toString());
+ }
+ }
+ else
+ {
+ StringBuilder buffer = new StringBuilder();
+
+ //Detect the WSDL Style early
+ wsdlStyle = utils.getWSDLStyle(wsdl);
+
+ StringBuilder importBuffer = new StringBuilder();
+ for (WSDLImport wsdlImport : wsdl.getImports())
+ {
+ if (resolver == null)
+ continue;
+
+ ResolvedWriter resolved = resolver.resolve(wsdlImport.getLocation());
+ if (resolved == null)
+ continue;
+
+ String namespace = wsdlImport.getNamespace();
+ importBuffer.append("<import namespace='" + namespace +
"' location='" + resolved.actualFile + "'/>");
+ if (resolved != null)
+ {
+ StringBuilder builder = new StringBuilder();
+
+ appendDefinitions(builder, namespace);
+ appendBody(builder, namespace);
+ writeBuilder(builder, resolved.writer, resolved.charset);
+ resolved.writer.close();
+ }
+ }
+
+ appendDefinitions(buffer, wsdl.getTargetNamespace());
+ if (importBuffer.length() > 0)
+ buffer.append(importBuffer);
+
+ appendBody(buffer, wsdl.getTargetNamespace());
+ writeBuilder(buffer, writer, charset);
+ }
+ }
+
+ private void writeBuilder(StringBuilder builder, Writer writer, String charset) throws
IOException
+ {
+ Element element = DOMUtils.parse(builder.toString());
+
+ if (charset != null)
+ writer.write("<?xml version=\"1.0\" encoding=\"" +
charset + "\"?>\n");
+ new DOMWriter(writer).setPrettyprint(true).print(element);
+ }
+
+ protected void appendBody(StringBuilder builder, String namespace)
+ {
+ writtenFaultMessages.clear();
+
+ appendTypes(builder, namespace);
+ appendMessages(builder, namespace);
+ appendInterfaces(builder, namespace);
+ appendBindings(builder, namespace);
+ appendServices(builder, namespace);
+ builder.append("</definitions>");
+ }
+
+ protected void appendMessages(StringBuilder buffer, String namespace)
+ {
+ WSDLInterface[] interfaces = wsdl.getInterfaces();
+ int len = interfaces != null ? interfaces.length : 0;
+ for (int i = 0; i < len; i++)
+ {
+ WSDLInterface intf = interfaces[i];
+ if (! namespace.equals(intf.getQName().getNamespaceURI()))
+ continue;
+
+ WSDLInterfaceOperation[] operations = intf.getSortedOperations();
+ int lenOps = operations.length;
+ for (int j = 0; j < lenOps; j++)
+ {
+ appendMessage(buffer, operations[j]);
+ appendMessagesForExceptions(buffer, operations[j]);
+ }
+ }
+ }
+
+ private void appendMessage(StringBuilder buffer, WSDLInterfaceOperation operation)
+ {
+ String opname = operation.getName().toString();
+ //Determine the style of the wsdl
+ if (Constants.URI_STYLE_RPC.equals(operation.getStyle()) == false)
+ wsdlStyle = Constants.DOCUMENT_LITERAL; //Not RPC/Literal
+
+ String interfaceName = operation.getWsdlInterface().getName().toString();
+ buffer.append("<message name='" + interfaceName + "_" +
opname + "' >");
+ for (WSDLInterfaceOperationInput input : operation.getInputs())
+ appendMessageParts(buffer, input);
+ buffer.append("</message>");
+
+ if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
+ {
+ buffer.append("<message name='" + interfaceName + "_"
+ opname + "Response' >");
+ WSDLInterfaceOperationOutput[] outputs = operation.getOutputs();
+ for (WSDLInterfaceOperationOutput output : outputs)
+ appendMessageParts(buffer, output);
+ buffer.append("</message>");
+ }
+ }
+
+ private void appendMessagesForExceptions(StringBuilder buffer, WSDLInterfaceOperation
operation)
+ {
+ //Get the outfaults
+ WSDLInterfaceOperationOutfault[] faults = operation.getOutfaults();
+ int len = faults != null ? faults.length : 0;
+
+ for (int i = 0; i < len; i++)
+ {
+ WSDLInterfaceOperationOutfault fault = faults[i];
+ String exceptionName = fault.getRef().getLocalPart();
+ if (writtenFaultMessages.contains(exceptionName))
+ continue;
+
+ WSDLInterfaceFault interfaceFault = operation.getWsdlInterface().getFault(new
NCName(exceptionName));
+ QName xmlName = interfaceFault.getElement();
+
+ buffer.append("<message name='" + exceptionName + "'
>");
+ String prefix = wsdl.getPrefix(xmlName.getNamespaceURI());
+ String xmlNameStr = prefix + ":" + xmlName.getLocalPart();
+ buffer.append("<part name='" + exceptionName + "'
element='" + xmlNameStr + "' />");
+ buffer.append("</message>");
+
+ writtenFaultMessages.add(exceptionName);
+ }
+ }
+
+ private String getReferenceString(QName name)
+ {
+ String namespaceURI = name.getNamespaceURI();
+ String prefix = wsdl.getPrefix(namespaceURI);
+ if (prefix == null)
+ throw new WSException("Prefix not bound for namespace: " +
namespaceURI);
+
+ return prefix + ":" + name.getLocalPart();
+ }
+
+ private void appendMessageParts(StringBuilder buffer, WSDLInterfaceMessageReference
reference)
+ {
+ if (wsdlStyle.equals(Constants.RPC_LITERAL))
+ {
+ for (WSDLRPCPart part : reference.getChildParts())
+ {
+ buffer.append("<part name='" +
part.getName()).append('\'');
+ buffer.append(" type='" + getReferenceString(part.getType()) +
"'/>");
+ }
+ }
+ else
+ {
+ QName element = reference.getElement();
+ // Null represents empty message
+ if (element != null)
+ {
+ buffer.append("<part name='" + reference.getPartName() +
'\'');
+ buffer.append(" element='" + getReferenceString(element) +
"'/>");
+ }
+ }
+
+ WSDLBindingMessageReference bindingReference = getBindingReference(reference);
+ if (bindingReference == null)
+ return;
+
+ for (WSDLSOAPHeader header : bindingReference.getSoapHeaders())
+ {
+ if (header.isIncludeInSignature());
+ {
+ QName element = header.getElement();
+ buffer.append("<part name='" + header.getPartName() +
'\'');
+ buffer.append(" element='" + getReferenceString(element) +
"'/>");
+ }
+ }
+ }
+
+ private WSDLBindingMessageReference getBindingReference(WSDLInterfaceMessageReference
reference)
+ {
+ WSDLInterfaceOperation operation = reference.getWsdlOperation();
+ WSDLInterface wsdlInterface = operation.getWsdlInterface();
+ WSDLBinding binding =
wsdlInterface.getWsdlDefinitions().getBindingByInterfaceName(wsdlInterface.getQName());
+ WSDLBindingOperation bindingOperation =
binding.getOperationByRef(operation.getQName());
+ WSDLBindingMessageReference[] bindingReferences;
+
+ if (reference instanceof WSDLInterfaceOperationInput)
+ bindingReferences = bindingOperation.getInputs();
+ else
+ bindingReferences = bindingOperation.getOutputs();
+
+ if (bindingReferences.length > 1)
+ throw new IllegalArgumentException("WSDl 1.1 only supports In-Only, and
In-Out MEPS, more than reference input found");
+
+ if (bindingReferences.length == 1)
+ return bindingReferences[0];
+
+ return null;
+ }
+
+ protected void appendInterfaces(StringBuilder buffer, String namespace)
+ {
+ WSDLInterface[] intfs = wsdl.getInterfaces();
+ for (int i = 0; i < intfs.length; i++)
+ {
+ WSDLInterface intf = intfs[i];
+ if (!namespace.equals(intf.getQName().getNamespaceURI()))
+ continue;
+
+ buffer.append("<portType name='" + intf.getName() +
"'>");
+ appendPortOperations(buffer, intf);
+ buffer.append("</portType>");
+ }
+ }
+
+ private String getParameterOrder(WSDLInterfaceOperation operation)
+ {
+ StringBuilder builder = new StringBuilder();
+ for (WSDLRPCSignatureItem item : operation.getRpcSignatureItems())
+ {
+ if (item.getDirection() != Direction.RETURN)
+ {
+ if (builder.length() > 0)
+ builder.append(' ');
+ builder.append(item.getName());
+ }
+ }
+
+ return builder.toString();
+ }
+
+ protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
+ {
+ String prefix = wsdl.getPrefix(intf.getQName().getNamespaceURI());
+ WSDLInterfaceOperation[] operations = intf.getSortedOperations();
+ for (int i = 0; i < operations.length; i++)
+ {
+ WSDLInterfaceOperation operation = operations[i];
+ buffer.append("<operation name='" +
operation.getName().toString() + "'");
+
+ String parameterOrder = getParameterOrder(operation);
+ if (parameterOrder.length() > 0)
+ buffer.append("
parameterOrder='").append(parameterOrder).append("'");
+ buffer.append(">");
+
+ String opname = operation.getName().toString();
+ String interfaceName = operation.getWsdlInterface().getName().toString();
+ String msgEl = prefix + ":" + interfaceName + "_" + opname;
+
+ buffer.append("<input message='" + msgEl +
"'>").append("</input>");
+
+ if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
+ {
+ buffer.append("<output message='" + msgEl +
"Response'>");
+ buffer.append("</output>");
+ }
+
+ //Append the Faults
+ for (WSDLInterfaceOperationOutfault fault : operation.getOutfaults())
+ {
+ QName element = fault.getRef();
+ buffer.append("<fault message='" +
utils.getFormattedString(element));
+ buffer.append("' name='" + element.getLocalPart() +
"'/>");
+ }
+
+ buffer.append("</operation>");
+ }
+ }
+
+ protected void appendBindings(StringBuilder buffer, String namespace)
+ {
+ WSDLBinding[] bindings = wsdl.getBindings();
+ for (int i = 0; i < bindings.length; i++)
+ {
+ WSDLBinding binding = bindings[i];
+ if (!namespace.equals(binding.getQName().getNamespaceURI()))
+ continue;
+ buffer.append("<binding name='" + binding.getName() +
"' type='" + getQNameRef(binding.getInterfaceName()) +
"'>");
+ //TODO:Need to derive the WSDLStyle from the Style attribute of
InterfaceOperation
+ if (wsdlStyle == null)
+ throw new IllegalArgumentException("WSDL Style is null (should be rpc or
document");
+ String style = "rpc";
+ if (wsdlStyle.equals(Constants.DOCUMENT_LITERAL))
+ style = "document";
+ buffer.append("<" + soapPrefix + ":binding
transport='http://schemas.xmlsoap.org/soap/http' style='" + style +
"'/>");
+ appendBindingOperations(buffer, binding);
+ buffer.append("</binding>");
+ }
+ }
+
+ protected void appendBindingOperations(StringBuilder buffer, WSDLBinding binding)
+ {
+ WSDLBindingOperation[] operations = binding.getOperations();
+ Arrays.sort(operations);
+
+ for (int i = 0; i < operations.length; i++)
+ {
+ WSDLBindingOperation operation = operations[i];
+ String interfaceName =
operation.getWsdlBinding().getInterfaceName().getLocalPart();
+
+ WSDLInterface wsdlInterface = wsdl.getInterface(new NCName(interfaceName));
+ if (wsdlInterface == null)
+ throw new WSException("WSDL Interface should not be null");
+ WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
+
+ buffer.append("<operation name='" +
interfaceOperation.getName() + "'>");
+ String soapAction = (operation.getSOAPAction() != null ?
operation.getSOAPAction() : "");
+ buffer.append("<" + soapPrefix + ":operation
soapAction=\"" + soapAction + "\"/>");
+
+ WSDLBindingOperationInput[] inputs = operation.getInputs();
+ if (inputs.length != 1)
+ throw new WSException("WSDl 1.1 only supports In-Only, and In-Out
MEPS.");
+
+ buffer.append("<input>");
+ appendSOAPBinding(buffer, wsdlInterface, operation, inputs);
+ buffer.append("</input>");
+
+ if (!
Constants.WSDL20_PATTERN_IN_ONLY.equals(getBindingOperationPattern(operation)))
+ {
+ buffer.append("<output>");
+ WSDLBindingOperationOutput[] outputs = operation.getOutputs();
+ appendSOAPBinding(buffer, wsdlInterface, operation, outputs);
+ buffer.append("</output>");
+ }
+
+ //Append faults
+ WSDLInterfaceOperationOutfault[] faults = interfaceOperation.getOutfaults();
+ if (faults != null)
+ {
+ for (WSDLInterfaceOperationOutfault fault : faults)
+ {
+ String n = "name='" + fault.getRef().getLocalPart() +
"'";
+ buffer.append("<fault " + n + ">");
+ buffer.append("<" + soapPrefix + ":fault " + n +
" use='literal' />");
+ buffer.append("</fault>");
+ }
+ buffer.append("</operation>");
+ }
+ }
+ }
+
+ private void appendSOAPBinding(StringBuilder buffer, WSDLInterface wsdlInterface,
WSDLBindingOperation operation, WSDLBindingMessageReference[] inputs)
+ {
+ String tns = wsdl.getTargetNamespace();
+ WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
+ WSDLInterfaceMessageReference reference = (inputs instanceof
WSDLBindingOperationInput[]) ? interfaceOperation.getInputs()[0]
+ : interfaceOperation.getOutputs()[0];
+
+ StringBuilder bodyParts = new StringBuilder();
+ if (Constants.DOCUMENT_LITERAL == wsdlStyle)
+ {
+ bodyParts.append(reference.getPartName());
+ }
+ else
+ {
+ for (WSDLRPCPart part : reference.getChildParts())
+ {
+ if (bodyParts.length() > 0)
+ bodyParts.append(" ");
+ bodyParts.append(part.getName());
+ }
+ }
+
+ StringBuilder soapHeader = new StringBuilder();
+ for (WSDLSOAPHeader header : inputs[0].getSoapHeaders())
+ {
+ if (header.isIncludeInSignature())
+ {
+ String messageName = wsdlInterface.getName() + "_" +
operation.getRef().getLocalPart();
+ if (reference instanceof WSDLInterfaceOperationOutput)
+ messageName += "Response";
+ soapHeader.append("<").append(soapPrefix).append(":header
use='literal' message='tns:").append(messageName);
+ soapHeader.append("'
part='").append(header.getElement().getLocalPart()).append("'/>");
+ }
+ }
+
+ buffer.append("<" + soapPrefix + ":body
use='literal'");
+ if (wsdlStyle != Constants.DOCUMENT_LITERAL)
+ buffer.append(" namespace='" + tns + "'");
+ if (soapHeader.length() > 0)
+ {
+ buffer.append("
parts='").append(bodyParts).append("'/>");
+ buffer.append(soapHeader);
+ }
+ else
+ {
+ buffer.append("/>");
+ }
+ }
+
+ private String getBindingOperationPattern(WSDLBindingOperation operation)
+ {
+ WSDLBinding binding = operation.getWsdlBinding();
+ String pattern = binding.getInterface().getOperation(new
NCName(operation.getRef().getLocalPart())).getPattern();
+
+ return pattern;
+ }
+
+ protected void appendServices(StringBuilder buffer, String namespace)
+ {
+ WSDLService[] services = wsdl.getServices();
+ int len = services.length;
+ for (int i = 0; i < len; i++)
+ {
+
+ WSDLService service = services[i];
+ if (!namespace.equals(service.getQName().getNamespaceURI()))
+ continue;
+ buffer.append("<service name='" + service.getName() +
"'>");
+ WSDLEndpoint[] endpoints = service.getEndpoints();
+ int lenend = endpoints.length;
+ for (int j = 0; j < lenend; j++)
+ {
+ WSDLEndpoint endpoint = endpoints[j];
+ appendServicePort(buffer, endpoint);
+ }
+
+ buffer.append("</service>");
+ }
+ }
+
+ protected void appendServicePort(StringBuilder buffer, WSDLEndpoint endpoint)
+ {
+ String name = endpoint.getName().toString();
+ QName endpointBinding = endpoint.getBinding();
+ String prefix = endpointBinding.getPrefix();
+ prefix = wsdl.getPrefix(endpointBinding.getNamespaceURI());
+ String ebname = prefix + ":" + endpointBinding.getLocalPart();
+ buffer.append("<port name='" + name + "'
binding='" + ebname + "'>");
+ buffer.append("<" + soapPrefix + ":address location='" +
endpoint.getAddress() + "'/>");
+ buffer.append("</port>");
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL20Reader.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Reader.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Reader.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL20Reader.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,557 @@
+/*
+* 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;
+
+// $Id$
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+
+import javax.wsdl.xml.WSDLLocator;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
+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;
+import org.xml.sax.InputSource;
+
+/**
+ * A factory that creates a WSDL <code>Definition</code> from an URL.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDL20Reader implements ObjectModelFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDL20Reader.class);
+
+ private WSDLLocator locator = null;
+
+ public WSDLDefinitions readWSDL(WSDLLocator wsdlLocator) throws WSDLException,
IOException
+ {
+ locator = wsdlLocator;
+
+ String wsdlURI = wsdlLocator.getBaseURI();
+ InputSource inputSource = wsdlLocator.getBaseInputSource();
+ if (inputSource == null)
+ throw new WSException("Cannot obtain WSDL input source for: " +
wsdlURI);
+
+ InputStream is = inputSource.getByteStream();
+ try
+ {
+ Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setNamespaceAware(true);
+ unmarshaller.setValidation(true);
+
+ WSDLDefinitions wsdl = new WSDLDefinitions();
+ wsdl.setWsdlNamespace(Constants.NS_WSDL20);
+
+ unmarshaller.unmarshal(is, this, wsdl);
+ return wsdl;
+ }
+ catch (RuntimeException re)
+ {
+ throw re;
+ }
+ catch (Exception e)
+ {
+ throw new WSDLException("Cannot unmarshal: " + wsdlURI, e);
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public void setFeature(String name, boolean value)
+ {
+ }
+
+ /**
+ * This method is called by the object model factory and returns the root of the
object graph.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ /**
+ * WSDL2.0 Assertions (
http://www.w3.org/TR/wsdl20-primer)
+ * The value of the WSDL target namespace MUST be an absolute URI.
+ */
+ WSDLDefinitions wsdl = null;
+
+ StringBuilder buf = null;
+
+ if (root instanceof WSDLDefinitions)
+ {
+ wsdl = (WSDLDefinitions)root;
+
+ String targetNamespace = attrs.getValue("targetNamespace");
+ boolean abs = (targetNamespace.startsWith("http"));
+ if (targetNamespace == null || abs == false)
+ throw new RuntimeException("WSDL 2.0 Assertion: targetNamespace must be
an absolute uri");
+
+ wsdl.setWsdlNamespace(Constants.NS_WSDL20);
+ wsdl.setTargetNamespace(targetNamespace);
+
+ Iterator uris = navigator.getNamespaceURIs();
+ while (uris.hasNext())
+ {
+ String namespace = (String)uris.next();
+ String prefix = navigator.getNamespaceContext().getPrefix(namespace);
+ if (prefix.length() > 0)
+ wsdl.registerNamespaceURI(namespace, prefix);
+ }
+ return wsdl;
+ }
+ else if (root instanceof WSDLTypes)
+ {
+ wsdl = ((WSDLTypes)root).getWsdlDefinitions();
+ if ("import".equalsIgnoreCase(localName))
+ {
+ importTypes(wsdl, attrs);
+ return null;
+ }
+ if ("schema".equalsIgnoreCase(localName))
+ {
+ //Included Schema - wsdl 2.0
+ //We will start writing whatever the parser has obtained
+ buf = new StringBuilder("<schema ");
+ Iterator uris = navigator.getNamespaceURIs();
+ String targetNS = attrs.getValue("targetNamespace");
+ buf.append(" targetNamespace='" + targetNS +
"'");
+ while (uris.hasNext())
+ {
+ String namespace = (String)uris.next();
+ Iterator iter = navigator.getNamespaceContext().getPrefixes(namespace);
+ if (namespace.equals(Constants.NS_WSDL20))
+ continue;
+ if (iter == null)
+ buf.append(" xmlns='" + namespace + "'");
+ else
+ {
+ while (iter.hasNext())
+ {
+ String prefix = (String)iter.next();
+ if (prefix.length() == 0)
+ buf.append(" xmlns='" + namespace +
"'");
+ else buf.append(" xmlns:" + prefix + "='" +
namespace + "'");
+ }
+ }
+ }
+ buf.append(">");
+ return buf;
+ }
+ }
+ else if (root instanceof StringBuilder)
+ {
+ return newChild((StringBuilder)root, navigator, namespaceURI, localName,
attrs);
+ }
+ else
+ {
+ throw new IllegalArgumentException("Invalid root for namespace: " +
namespaceURI);
+ }
+
+ return null;
+ }
+
+ /**
+ * This method is called by the object model factory and returns the root of the
object graph.
+ */
+ public Object newChild(WSDLTypes types, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ /**
+ * WSDL2.0 Assertions (
http://www.w3.org/TR/wsdl20-primer)
+ * The value of the WSDL target namespace MUST be an absolute URI.
+ */
+ WSDLDefinitions wsdl = types.getWsdlDefinitions();
+
+ StringBuilder buf = null;
+ if ("import".equalsIgnoreCase(localName))
+ {
+ importTypes(wsdl, attrs);
+ return null;
+ }
+ if ("schema".equalsIgnoreCase(localName))
+ {
+ //Included Schema - wsdl 2.0
+ //We will start writing whatever the parser has obtained
+ buf = new StringBuilder("<schema ");
+ Iterator uris = navigator.getNamespaceURIs();
+ String targetNS = attrs.getValue("targetNamespace");
+ buf.append(" targetNamespace='" + targetNS + "'");
+ while (uris.hasNext())
+ {
+ String namespace = (String)uris.next();
+ Iterator iter = navigator.getNamespaceContext().getPrefixes(namespace);
+ if (namespace.equals(Constants.NS_WSDL20))
+ continue;
+ if (iter == null)
+ buf.append(" xmlns='" + namespace + "'");
+ else
+ {
+ while (iter.hasNext())
+ {
+ String prefix = (String)iter.next();
+ if (prefix.length() == 0)
+ buf.append(" xmlns='" + namespace +
"'");
+ else buf.append(" xmlns:" + prefix + "='" +
namespace + "'");
+ }
+ }
+ }
+ buf.append(">");
+ return buf;
+ }
+
+ return null;
+ }
+
+ /**
+ * The JBossXB has completed the parsing of the WSDL 2.0 document
+ * @param root
+ * @param ctx
+ * @param uri
+ * @param name
+ * @return
+ */
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
+ {
+ return root;
+ }
+
+ /**
+ * Used in the parsing of the included XML Schema in WSDL 2.0
+ * @param buf
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @param attrs
+ * @return
+ */
+ public Object newChild(StringBuilder buf, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ int len = attrs.getLength();
+ buf.append("<" + localName);
+ for (int i = 0; i < len; i++)
+ {
+ String val = attrs.getValue(i);
+ String attrname = attrs.getLocalName(i);
+ buf.append(" " + attrname + "='" + val +
"'");
+ }
+ buf.append(">");
+ return buf;
+ }
+
+ /**
+ * Used in the parsing of the included XML Schema in WSDL 2.0
+ * We have reached the end of an xml element.
+ * @param buf
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @return
+ */
+ public Object addChild(StringBuilder buf, StringBuilder buf1, UnmarshallingContext
navigator, String namespaceURI, String localName) throws WSDLException
+ {
+ buf.append("</" + localName + ">");
+ return buf;
+
+ }
+
+ /**
+ * Used in the parsing of the included XML Schema in WSDL 2.0
+ * We have parsed the schema completely. Write it into a file and update WSDLTypes
(schemaLocation)
+ * @param types
+ * @param buf
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @return
+ * @throws WSDLException
+ */
+ public Object addChild(WSDLTypes types, StringBuilder buf, UnmarshallingContext
navigator, String namespaceURI, String localName) throws WSDLException
+ {
+ buf.append("</schema>");
+ String targetNS = types.getWsdlDefinitions().getTargetNamespace();
+ try
+ {
+ File file = SchemaUtils.getSchemaTempFile(targetNS);
+ file.deleteOnExit();
+ FileWriter fwrite = new FileWriter(file);
+ fwrite.write(buf.toString());
+ fwrite.flush();
+ fwrite.close();
+ }
+ catch (IOException e)
+ {
+ String msg = "Cannot extract schema definition for target namespace: "
+ targetNS;
+ log.error(msg, e);
+ throw new WSException(msg);
+ }
+ return types;
+ }
+
+ /**
+ * Parsing the WSDL 2.0 document
+ * @param wsdl20
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @param attrs
+ * @return
+ * @throws WSDLException
+ */
+ public Object newChild(WSDLDefinitions wsdl20, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs) throws WSDLException
+ {
+ /**
+ * WSDL 20 Assertions
+ * Each interface must be given a name that is unique within the set of interfaces
defined in this WSDL target NS
+ * Interface names are tokens that must not contain a space or colon
(":")
+ */
+ String defaultNamespace = wsdl20.getWsdlNamespace();
+ if (Constants.NS_WSDL20.equals(defaultNamespace))
+ {
+ if ("types".equals(localName))
+ {
+ WSDLTypes wsdlTypes = new XSModelTypes();
+ wsdl20.setWsdlTypes(wsdlTypes);
+ return wsdlTypes;
+ }
+ else if ("interface".equals(localName))
+ {
+ WSDLInterface wsdlInterface = new WSDLInterface(wsdl20);
+ String name = attrs.getValue("name");
+ if (name == null)
+ throw new RuntimeException("Interface name should not be
null");
+ if (name.indexOf(" ") > -1 || name.indexOf(":") >
-1)
+ throw new RuntimeException("WSDL 2.0 Assertion:Interface names are
tokens " + "that must not contain a space or colon");
+
+ NCName ncname = new NCName(name);
+ if (wsdl20.getInterface(ncname) != null)
+ throw new RuntimeException("WSDL 2.0 Assertion:Each interface must be
given a name that is "
+ + "unique within the set of interfaces defined in this WSDL
target namespace");
+
+ wsdlInterface.setName(ncname);
+ wsdl20.addInterface(wsdlInterface);
+
+ return wsdlInterface;
+ }
+ else if ("binding".equals(localName))
+ {
+ /**
+ * WSDL 2.0 Assertion: Each name must be unique among all bindings in this
WSDL target namespace
+ */
+ String name = attrs.getValue("name");
+ NCName ncname = new NCName(name);
+ if (wsdl20.getBinding(ncname) != null)
+ throw new RuntimeException("WSDL 2.0 Assertion:Each name must be
unique among " + "all bindings in this WSDL target namespace");
+ WSDLBinding wsdlBinding = new WSDLBinding(wsdl20);
+ wsdlBinding.setName(ncname);
+ wsdl20.addBinding(wsdlBinding);
+
+ return wsdlBinding;
+ }
+ else if ("service".equals(localName))
+ {
+ WSDLService wsdlService = new WSDLService(wsdl20);
+ wsdlService.setName(new NCName(attrs.getValue("name")));
+ wsdl20.addService(wsdlService);
+
wsdlService.setInterfaceName(navigator.resolveQName(attrs.getValue("interface")));
+ return wsdlService;
+ }
+ else log.warn("Unrecogized child element: " + localName);
+ }
+ else throw new WSDLException("Invalid default namespace: " +
defaultNamespace);
+
+ return null;
+ }
+
+ /**
+ * Parsing the WSDL 2.0 document
+ * @param wsdlInterface
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @param attrs
+ * @return
+ */
+ public Object newChild(WSDLInterface wsdlInterface, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
+ {
+ /**
+ * WSDL .0 Assertion: Operation names must also be unique within an interface
+ */
+ if ("operation".equals(localName))
+ {
+ String name = attrs.getValue("name");
+ if (name == null)
+ throw new RuntimeException("Operation name must not be null");
+ NCName ncname = new NCName(name);
+ if (wsdlInterface.containsInterfaceOperation(ncname))
+ throw new RuntimeException("WSDL 2.0 Assertion:Each operation must be
given a name that is "
+ + "unique within an interface defined in this WSDL target
namespace");
+ WSDLInterfaceOperation wsdlOperation = new
WSDLInterfaceOperation(wsdlInterface);
+ wsdlOperation.setName(ncname);
+ wsdlInterface.addOperation(wsdlOperation);
+ return wsdlOperation;
+ }
+
+ log.warn("Unrecogized child element: " + localName);
+ return null;
+ }
+
+ /**
+ * Parsing the WSDL 2.0 document
+ * @param wsdlOperation
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @param attrs
+ * @return
+ */
+ public Object newChild(WSDLInterfaceOperation wsdlOperation, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("input".equals(localName))
+ {
+ WSDLInterfaceOperationInput wsdlInterfaceOperationInput = new
WSDLInterfaceOperationInput(wsdlOperation);
+
wsdlInterfaceOperationInput.setElement(navigator.resolveQName(attrs.getValue("element")));
+ wsdlInterfaceOperationInput.setMessageLabel(new
NCName(attrs.getValue("messageLabel")));
+ wsdlOperation.addInput(wsdlInterfaceOperationInput);
+ return wsdlInterfaceOperationInput;
+ }
+ else if ("output".equals(localName))
+ {
+ WSDLInterfaceOperationOutput output = new
WSDLInterfaceOperationOutput(wsdlOperation);
+ output.setElement(navigator.resolveQName(attrs.getValue("element")));
+ output.setMessageLabel(new NCName(attrs.getValue("messageLabel")));
+ wsdlOperation.addOutput(output);
+ return output;
+ }
+ else if ("outfault".equals(localName))
+ {
+ WSDLInterfaceOperationOutfault fault = new
WSDLInterfaceOperationOutfault(wsdlOperation);
+ String messageLabel = attrs.getValue("messageLabel");
+ fault.setRef(navigator.resolveQName(attrs.getValue("ref")));
+ if (messageLabel != null)
+ fault.setMessageLabel(new NCName(messageLabel));
+ wsdlOperation.addOutfault(fault);
+ return wsdlOperation;
+ }
+
+ log.warn("Unrecogized child element: " + localName);
+ return null;
+ }
+
+ /**
+ * Parsing the WSDL 2.0 document
+ * @param wsdlBinding
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @param attrs
+ * @return
+ */
+ public Object newChild(WSDLBinding wsdlBinding, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ if ("operation".equals(localName))
+ {
+ WSDLBindingOperation wsdlBindingOperation = new
WSDLBindingOperation(wsdlBinding);
+
wsdlBindingOperation.setRef(navigator.resolveQName(attrs.getValue("ref")));
+ wsdlBinding.addOperation(wsdlBindingOperation);
+ return wsdlBindingOperation;
+ }
+
+ log.warn("Unrecogized child element: " + localName);
+ return null;
+ }
+
+ /**
+ * Parsing the WSDL 2.0 document
+ * @param wsdlBindingOperation
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @param attrs
+ * @return
+ */
+ public Object newChild(WSDLBindingOperation wsdlBindingOperation, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ if ("input".equals(localName))
+ {
+ WSDLBindingOperationInput wsdlBindingOperationInput = new
WSDLBindingOperationInput(wsdlBindingOperation);
+ wsdlBindingOperationInput.setMessageLabel(new
NCName(attrs.getValue("messageLabel")));
+ wsdlBindingOperation.addInput(wsdlBindingOperationInput);
+ return wsdlBindingOperationInput;
+ }
+ if ("output".equals(localName))
+ {
+ WSDLBindingOperationOutput wsdlBindingOperationOutput = new
WSDLBindingOperationOutput(wsdlBindingOperation);
+ wsdlBindingOperationOutput.setMessageLabel(new
NCName(attrs.getValue("messageLabel")));
+ wsdlBindingOperation.addOutput(wsdlBindingOperationOutput);
+ return wsdlBindingOperationOutput;
+ }
+
+ log.warn("Unrecogized child element: " + localName);
+ return null;
+ }
+
+ /**
+ * Parsing the WSDL 2.0 document
+ * @param wsdlService
+ * @param navigator
+ * @param namespaceURI
+ * @param localName
+ * @param attrs
+ * @return
+ */
+ public Object newChild(WSDLService wsdlService, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ if ("endpoint".equals(localName))
+ {
+ WSDLEndpoint wsdlEndpoint = new WSDLEndpoint(wsdlService);
+ wsdlEndpoint.setName(new NCName(attrs.getValue("name")));
+
wsdlEndpoint.setBinding(navigator.resolveQName(attrs.getValue("binding")));
+ wsdlService.addEndpoint(wsdlEndpoint);
+ return wsdlEndpoint;
+ }
+
+ log.warn("Unrecogized child element: " + localName);
+ return null;
+ }
+
+ /**
+ * Method that deals with importing schema
+ * @param wsdl
+ * @param attrs
+ */
+ private void importTypes(WSDLDefinitions wsdl, Attributes attrs)
+ {
+ // [TODO]
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL20Writer.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Writer.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Writer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDL20Writer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,200 @@
+/*
+* 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;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+
+/**
+ * A WSDL writer that writes out a WSDL-2.0 compliant wsdl.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDL20Writer extends WSDLWriter
+{
+ // provide logging
+ protected static final Logger log = Logger.getLogger(WSDL20Writer.class);
+
+ protected WSDLUtils utils = WSDLUtils.getInstance();
+
+ /** Use WSDLDefinitions.writeWSDL instead. */
+ public WSDL20Writer(WSDLDefinitions wsdl)
+ {
+ super(wsdl);
+ }
+
+
+ protected void appendInterfaces(StringBuilder buffer, String namespace)
+ {
+ WSDLInterface[] interfaces = wsdl.getInterfaces();
+ for (int i = 0; i < interfaces.length; i++)
+ {
+ WSDLInterface intf = interfaces[i];
+ buffer.append("<interface name='" + intf.getName() +
"'>");
+ appendInterfaceFaults(buffer, intf);
+ appendInterfaceOperations(buffer, intf);
+ buffer.append("</interface>");
+ }
+ }
+
+ private void appendInterfaceFaults(StringBuilder buffer, WSDLInterface intf)
+ {
+ WSDLInterfaceFault[] faults = intf.getFaults();
+ for (int i = 0; i < faults.length; i++)
+ {
+ WSDLInterfaceFault fault = faults[i];
+ buffer.append("<fault name='" + fault.getName() +
"'");
+ buffer.append(" element='" + getQNameRef(fault.getElement()) +
"'>");
+ if (fault.getDocumentation() != null)
+ {
+ buffer.append(fault.getDocumentation());
+ }
+ buffer.append("</fault>");
+ }
+ }
+
+ private void appendInterfaceOperations(StringBuilder buffer, WSDLInterface intf)
+ {
+ WSDLInterfaceOperation[] operations = intf.getOperations();
+ for (int i = 0; i < operations.length; i++)
+ {
+ WSDLInterfaceOperation operation = operations[i];
+ buffer.append("<operation name='" + operation.getName() +
"'>");
+
+ WSDLInterfaceOperationInput[] inputs = operation.getInputs();
+ for (int j = 0; j < inputs.length; j++)
+ {
+ WSDLInterfaceOperationInput ip = inputs[j];
+ buffer.append("<input element='" +
getQNameRef(ip.getElement()) + "'");
+ if (ip.getMessageLabel() != null)
+ {
+ buffer.append(" messageLabel='" + ip.getMessageLabel() +
"'");
+ }
+ buffer.append(">");
+ appendProperties(buffer, ip.getProperties());
+ buffer.append("</input>");
+ }
+
+ WSDLInterfaceOperationOutput[] outputs = operation.getOutputs();
+ for (int j = 0; j < outputs.length; j++)
+ {
+ WSDLInterfaceOperationOutput op = outputs[j];
+ buffer.append("<output element='" +
getQNameRef(op.getElement()) + "'");
+ if (op.getMessageLabel() != null)
+ {
+ buffer.append(" messageLabel='" + op.getMessageLabel() +
"'");
+ }
+ buffer.append(">");
+ appendProperties(buffer, op.getProperties());
+ buffer.append("</output>");
+ }
+
+ WSDLInterfaceOperationOutfault[] outfaults = operation.getOutfaults();
+ for (int j = 0; j < outfaults.length; j++)
+ {
+ WSDLInterfaceOperationOutfault outfault = outfaults[j];
+ buffer.append("<outfault ref='" +
getQNameRef(outfault.getRef()) + "'>");
+ if (outfault.getMessageLabel() != null)
+ {
+ buffer.append(" messageLabel='" + outfault.getMessageLabel()
+ "'");
+ }
+ buffer.append("</outfault>");
+ }
+ buffer.append("</operation>");
+ }
+ }
+
+ private void appendProperties(StringBuilder buffer, WSDLProperty[] wsdlProperties)
+ {
+ for (int i = 0; i < wsdlProperties.length; i++)
+ {
+ WSDLProperty wsdlProperty = wsdlProperties[i];
+ String uri = wsdlProperty.getURI();
+ String value = wsdlProperty.getValue();
+ buffer.append("<property uri='" + uri + "'>" +
(value != null ? "<value>" + value + "</value>" :
"") + "</property>");
+ }
+ }
+
+ protected void appendBindings(StringBuilder buffer, String namespace)
+ {
+ WSDLBinding[] bindings = wsdl.getBindings();
+ for (int i = 0; i < bindings.length; i++)
+ {
+ WSDLBinding binding = bindings[i];
+ buffer.append("<binding name='" + binding.getName() +
"'");
+ if (binding.getInterfaceName() != null)
+ {
+ buffer.append(" interface='" +
getQNameRef(binding.getInterfaceName()) + "'");
+ }
+ buffer.append(">");
+ appendBindingOperations(buffer, binding);
+ buffer.append("</binding>");
+ }
+ }
+
+ protected void appendBindingOperations(StringBuilder buffer, WSDLBinding binding)
+ {
+ WSDLBindingOperation[] operations = binding.getOperations();
+ for (int i = 0; i < operations.length; i++)
+ {
+ WSDLBindingOperation operation = operations[i];
+ buffer.append("<operation ref='" +
getQNameRef(operation.getRef()) + "'>");
+ buffer.append("</operation>");
+ }
+ }
+
+ protected void appendServices(StringBuilder buffer, String namespace)
+ {
+ WSDLService[] services = wsdl.getServices();
+ for (int i = 0; i < services.length; i++)
+ {
+ WSDLService service = services[i];
+ buffer.append("<service name='" + service.getName() +
"'");
+ if (service.getInterfaceName() != null)
+ {
+ buffer.append(" interface='" +
getQNameRef(service.getInterfaceName()) + "'");
+ }
+ buffer.append(">");
+
+ WSDLEndpoint[] endpoints = service.getEndpoints();
+ for (int j = 0; j < endpoints.length; j++)
+ {
+ WSDLEndpoint endpoint = endpoints[j];
+ buffer.append("<endpoint name='" + endpoint.getName() +
"'");
+ if (endpoint.getBinding() != null)
+ {
+ buffer.append(" binding='" +
getQNameRef(endpoint.getBinding()) + "'");
+ }
+ if (endpoint.getAddress() != null)
+ {
+ buffer.append(" address='" + endpoint.getAddress() +
"'");
+ }
+ buffer.append("></endpoint>");
+ }
+
+ buffer.append("</service>");
+ }
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBinding.java
(from rev 1566,
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/WSDLBinding.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBinding.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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.common.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/common/metadata/wsdl/WSDLBindingFault.java
(from rev 1566,
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/WSDLBindingFault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingFault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLBindingMessageReference.java
(from rev 1566,
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/WSDLBindingMessageReference.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingMessageReference.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLBindingOperation.java
(from rev 1566,
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/WSDLBindingOperation.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperation.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.metadata.wsdl;
+
+// $Id$
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.common.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/common/metadata/wsdl/WSDLBindingOperationInput.java
(from rev 1566,
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/WSDLBindingOperationInput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperationInput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLBindingOperationOutput.java
(from rev 1566,
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/WSDLBindingOperationOutput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLBindingOperationOutput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLDefinitions.java
(from rev 1566,
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/WSDLDefinitions.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDefinitions.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,326 @@
+/*
+* 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;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.io.Writer;
+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.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.wsdl.WSDLWriter.WriterResolver;
+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);
+ }
+
+ /** Write the wsdl definition to the given writer, clients should not care about the
wsdl version. */
+ public void write(Writer writer, String charset) throws IOException
+ {
+ write(writer, charset, null);
+ }
+
+ public void write(Writer writer, String charset, WriterResolver resolver) throws
IOException
+ {
+ if (Constants.NS_WSDL11.equals(wsdlNamespace))
+ {
+ WSDL11Writer wsdl11Writer = new WSDL11Writer(this);
+ wsdl11Writer.write(writer, charset, resolver);
+ }
+ else if (Constants.NS_WSDL20.equals(wsdlNamespace))
+ {
+ WSDL20Writer wsdl20Writer = new WSDL20Writer(this);
+ wsdl20Writer.write(writer);
+ }
+ else
+ {
+ throw new WSException("Unsupported wsdl version: " + wsdlNamespace);
+ }
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDefinitionsFactory.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitionsFactory.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitionsFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDefinitionsFactory.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,212 @@
+/*
+* 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;
+
+// $Id$
+
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.ConnectException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.bind.JAXBContext;
+import javax.xml.parsers.DocumentBuilder;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.EntityResolver;
+
+import com.ibm.wsdl.xml.WSDLReaderImpl;
+
+/**
+ * A factory that creates a <code>WSDLDefinitions</code> object from an URL.
+ *
+ * This implementations deals with different WSDL versions so that clients of this
+ * factory do need to know about WSDL version specifics. The Java object view of the
+ * WSDL document (WSDLDefinitions) is modeled on WSDL-2.0
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public class WSDLDefinitionsFactory
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
+
+ // This feature is set by default in wsdl4j, it means the object structure contains
the imported arguments
+ public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
+ // Set this feature for additional debugging output
+ public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
+
+ // The WSDL reader features
+ private Map features = new HashMap();
+
+ // Hide constructor
+ private WSDLDefinitionsFactory()
+ {
+ }
+
+ /**
+ * Create a new instance of a wsdl factory
+ */
+ public static WSDLDefinitionsFactory newInstance()
+ {
+ return new WSDLDefinitionsFactory();
+ }
+
+ /**
+ * Set a feature on the underlying reader
+ */
+ public void setFeature(String name, boolean value) throws IllegalArgumentException
+ {
+ features.put(name, new Boolean(value));
+ }
+
+ /**
+ * Read the wsdl document from the given URL
+ */
+ public WSDLDefinitions parse(URL wsdlLocation) throws WSDLException
+ {
+ if (wsdlLocation == null)
+ throw new IllegalArgumentException("URL cannot be null");
+
+ log.debug("parse: " + wsdlLocation.toExternalForm());
+
+ EntityResolver entityResolver = new JBossWSEntityResolver();
+ WSDLDefinitions wsdlDefinitions = null;
+ try
+ {
+ Document wsdlDoc = getDocument(wsdlLocation);
+ String defaultNamespace = getDefaultNamespace(wsdlDoc);
+ if (Constants.NS_WSDL20.equals(defaultNamespace))
+ {
+ WSDL20Reader wsdlReader = new WSDL20Reader();
+
+ // Setup reader features
+ Iterator it = features.entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)it.next();
+ String key = (String)entry.getKey();
+ Boolean flag = (Boolean)entry.getValue();
+ wsdlReader.setFeature(key, flag.booleanValue());
+ }
+
+ wsdlDefinitions = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver,
wsdlLocation));
+ wsdlDefinitions.setWsdlDocument(wsdlDoc);
+ }
+ else if (Constants.NS_WSDL11.equals(defaultNamespace))
+ {
+ WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+ WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose", false);
+
+ // Setup reader features
+ Iterator it = features.entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Map.Entry)it.next();
+ String key = (String)entry.getKey();
+ Boolean flag = (Boolean)entry.getValue();
+ wsdlReader.setFeature(key, flag.booleanValue());
+ }
+
+ // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
+ ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
+
+ Definition definition = wsdlReader.readWSDL(new
WSDLLocatorImpl(entityResolver, wsdlLocation));
+ wsdlDefinitions = new WSDL11Reader().processDefinition(definition,
wsdlLocation);
+ wsdlDefinitions.setWsdlDocument(wsdlDoc);
+ }
+ else
+ throw new WSDLException("Invalid default namespace: " +
defaultNamespace);
+
+ if (log.isTraceEnabled())
+ {
+ StringWriter stwr = new StringWriter();
+ WSDL20Writer wsdl20Writer = new WSDL20Writer(wsdlDefinitions);
+ wsdl20Writer.write(stwr);
+ log.trace("\n" + stwr.toString());
+ }
+ }
+ catch (WSDLException e)
+ {
+ throw e;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WSDLException(e);
+ }
+
+ return wsdlDefinitions;
+ }
+
+ /** Get the WSDL document.
+ */
+ private Document getDocument(URL wsdlLocation) throws WSDLException
+ {
+ try
+ {
+ InputStream wsdlInputStream = wsdlLocation.openStream();
+ try
+ {
+ DocumentBuilder builder = DOMUtils.getDocumentBuilder();
+ return builder.parse(wsdlInputStream);
+ }
+ finally
+ {
+ wsdlInputStream.close();
+ }
+ }
+ catch (ConnectException ex)
+ {
+ throw new WSDLException("Cannot connect to: " + wsdlLocation);
+ }
+ catch (Exception ex)
+ {
+ throw new WSDLException("Cannot parse wsdlLocation: " + wsdlLocation,
ex);
+ }
+ }
+
+ /** Get the default namespace for the given WSDL
+ */
+ private String getDefaultNamespace(Document wsdlDoc) throws WSDLException
+ {
+ Element root = wsdlDoc.getDocumentElement();
+ String defaultNamespace = root.getNamespaceURI();
+ return defaultNamespace;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDocumentation.java
(from rev 1566,
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/WSDLDocumentation.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLDocumentation.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLEndpoint.java
(from rev 1566,
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/WSDLEndpoint.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLEndpoint.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.metadata.wsdl;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.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/common/metadata/wsdl/WSDLException.java
(from rev 1566,
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/WSDLException.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLException.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLFeature.java
(from rev 1566,
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/WSDLFeature.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLFeature.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLImport.java
(from rev 1566,
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/WSDLImport.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLImport.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLInclude.java
(from rev 1566,
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/WSDLInclude.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInclude.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLInterface.java
(from rev 1566,
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/WSDLInterface.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterface.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLInterfaceFault.java
(from rev 1566,
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/WSDLInterfaceFault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceFault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,106 @@
+/*
+* 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;
+
+// $Id$
+
+import java.io.Serializable;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.common.WSException;
+
+/**
+ * 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/common/metadata/wsdl/WSDLInterfaceMessageReference.java
(from rev 1566,
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/WSDLInterfaceMessageReference.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceMessageReference.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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.common.Constants;
+import org.jboss.ws.common.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/common/metadata/wsdl/WSDLInterfaceOperation.java
(from rev 1566,
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/WSDLInterfaceOperation.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperation.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.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/common/metadata/wsdl/WSDLInterfaceOperationInfault.java
(from rev 1566,
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/WSDLInterfaceOperationInfault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationInfault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLInterfaceOperationInput.java
(from rev 1566,
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/WSDLInterfaceOperationInput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationInput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLInterfaceOperationOutfault.java
(from rev 1566,
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/WSDLInterfaceOperationOutfault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationOutfault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLInterfaceOperationOutput.java
(from rev 1566,
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/WSDLInterfaceOperationOutput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLInterfaceOperationOutput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLLocatorImpl.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLLocatorImpl.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLLocatorImpl.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLLocatorImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,159 @@
+/*
+ * 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;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.wsdl.xml.WSDLLocator;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.WSException;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+
+/* A WSDLLocator that can handle wsdl imports
+ */
+class WSDLLocatorImpl implements WSDLLocator
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
+
+ private EntityResolver entityResolver;
+ private URL wsdlURL;
+ private String latestImportURI;
+
+ public WSDLLocatorImpl(EntityResolver entityResolver, URL wsdlFile)
+ {
+ if (wsdlFile == null)
+ throw new IllegalArgumentException("WSDL file argument cannot be
null");
+
+ this.entityResolver = entityResolver;
+ this.wsdlURL = wsdlFile;
+ }
+
+ public InputSource getBaseInputSource()
+ {
+ log.trace("getBaseInputSource [wsdlUrl=" + wsdlURL + "]");
+ try
+ {
+ InputStream is = wsdlURL.openStream();
+ if (is == null)
+ throw new IllegalArgumentException("Cannot obtain wsdl from [" +
wsdlURL + "]");
+
+ return new InputSource(is);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Cannot access wsdl from [" + wsdlURL +
"], " + e.getMessage());
+ }
+ }
+
+ public String getBaseURI()
+ {
+ return wsdlURL.toExternalForm();
+ }
+
+ public InputSource getImportInputSource(String parent, String resource)
+ {
+ log.trace("getImportInputSource [parent=" + parent +
",resource=" + resource + "]");
+
+ URL parentURL = null;
+ try
+ {
+ parentURL = new URL(parent);
+ }
+ catch (MalformedURLException e)
+ {
+ log.error("Not a valid URL: " + parent);
+ return null;
+ }
+
+ String wsdlImport = null;
+ String external = parentURL.toExternalForm();
+
+ // An external URL
+ if (resource.startsWith("http://") ||
resource.startsWith("https://"))
+ {
+ wsdlImport = resource;
+ }
+
+ // Absolute path
+ else if (resource.startsWith("/"))
+ {
+ String beforePath = external.substring(0,
external.indexOf(parentURL.getPath()));
+ wsdlImport = beforePath + resource;
+ }
+
+ // A relative path
+ else
+ {
+ String parentDir = external.substring(0, external.lastIndexOf("/"));
+
+ // remove references to current dir
+ while (resource.startsWith("./"))
+ resource = resource.substring(2);
+
+ // remove references to parentdir
+ while (resource.startsWith("../"))
+ {
+ parentDir = parentDir.substring(0, parentDir.lastIndexOf("/"));
+ resource = resource.substring(3);
+ }
+
+ wsdlImport = parentDir + "/" + resource;
+ }
+
+ try
+ {
+ log.trace("Trying to resolve: " + wsdlImport);
+ InputSource inputSource = entityResolver.resolveEntity(wsdlImport, wsdlImport);
+ if (inputSource != null)
+ {
+ latestImportURI = wsdlImport;
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot resolve imported resource:
" + wsdlImport);
+ }
+
+ return inputSource;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WSException("Cannot access imported wsdl [" + wsdlImport +
"], " + e.getMessage());
+ }
+ }
+
+ public String getLatestImportURI()
+ {
+ return latestImportURI;
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLMIMEPart.java
(from rev 1566,
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/WSDLMIMEPart.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLMIMEPart.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLProperty.java
(from rev 1566,
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/WSDLProperty.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLProperty.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLRPCPart.java
(from rev 1566,
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/WSDLRPCPart.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLRPCPart.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLRPCSignatureItem.java
(from rev 1566,
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/WSDLRPCSignatureItem.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLRPCSignatureItem.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLSOAPHeader.java
(from rev 1566,
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/WSDLSOAPHeader.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLSOAPHeader.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLService.java
(from rev 1566,
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/WSDLService.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLService.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLTypes.java
(from rev 1566,
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/WSDLTypes.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLTypes.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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/common/metadata/wsdl/WSDLUtils.java
(from rev 1566,
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/WSDLUtils.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLUtils.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,889 @@
+/*
+* 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;
+
+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.EmptyStackException;
+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.XSModel;
+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.xmlschema.JBossXSModel;
+import org.jboss.ws.common.utils.HolderUtils;
+import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+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/common/metadata/wsdl/WSDLWriter.java
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLWriter.java)
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLWriter.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/WSDLWriter.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -0,0 +1,207 @@
+/*
+* 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;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+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.common.utils.DOMWriter;
+import org.w3c.dom.Element;
+
+/**
+ * A helper that writes out a WSDL definition
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public abstract class WSDLWriter
+{
+ // provide logging
+ protected static final Logger log = Logger.getLogger(WSDLWriter.class);
+
+ protected WSDLDefinitions wsdl;
+ protected WSDLUtils utils = WSDLUtils.getInstance();
+
+ // The soap prefix
+ protected String soapPrefix = "soap";
+
+ /**
+ * Include or import WSDL Types
+ */
+ protected boolean includeSchemaInWSDL = true;
+
+ public static class ResolvedWriter
+ {
+ public String actualFile;
+ public String charset;
+ public Writer writer;
+ }
+
+ public static interface WriterResolver
+ {
+ public ResolvedWriter resolve(String suggestedFile) throws IOException;
+ }
+
+ /** Use WSDLDefinitions.writeWSDL instead. */
+ protected WSDLWriter(WSDLDefinitions wsdl)
+ {
+ if (wsdl == null)
+ throw new IllegalArgumentException("WSDL definitions is NULL");
+
+ this.wsdl = wsdl;
+ }
+
+ public void write(Writer writer) throws IOException
+ {
+ StringBuilder buffer = new StringBuilder();
+ buffer.append(Constants.XML_HEADER);
+
+ appendDefinitions(buffer, wsdl.getTargetNamespace());
+ appendTypes(buffer, wsdl.getTargetNamespace());
+ appendInterfaces(buffer, wsdl.getTargetNamespace());
+ appendBindings(buffer, wsdl.getTargetNamespace());
+ appendServices(buffer, wsdl.getTargetNamespace());
+
+ buffer.append("</definitions>");
+
+ Element element = DOMUtils.parse(buffer.toString());
+ new DOMWriter(writer).setPrettyprint(true).print(element);
+ }
+
+ protected void appendDefinitions(StringBuilder buffer, String namespace)
+ {
+ buffer.append("<definitions");
+ //Append service name as done by wscompile, if there is just one
+ WSDLService[] services = wsdl.getServices();
+ if (services != null && services.length == 1)
+ {
+ WSDLService ser = services[0];
+ buffer.append(" name='" + ser.getName() + "'");
+ }
+ buffer.append(" targetNamespace='" + namespace + "'");
+ buffer.append(" xmlns='" + wsdl.getWsdlNamespace() +
"'");
+
+ Iterator it = wsdl.getRegisteredNamespaceURIs();
+ while (it.hasNext())
+ {
+ String namespaceURI = (String)it.next();
+ String prefix = wsdl.getPrefix(namespaceURI);
+ if (prefix.length() > 0)
+ {
+ buffer.append(" xmlns:" + prefix + "='" +
namespaceURI + "'");
+ if (Constants.PREFIX_SOAP11.equals(prefix) ||
Constants.PREFIX_SOAP12.equals(prefix))
+ soapPrefix = prefix;
+ }
+ }
+ buffer.append(">");
+ }
+
+ protected void appendTypes(StringBuilder buffer, String namespace)
+ {
+ WSDLTypes wsdlTypes = wsdl.getWsdlTypes();
+ // If the type section is bound to a particular namespace, verify it mataches,
otherwise skip
+ if (wsdlTypes.getNamespace() != null &&
!wsdlTypes.getNamespace().equals(namespace))
+ return;
+
+ if (wsdlTypes instanceof XSModelTypes)
+ {
+ buffer.append("<types>");
+ JBossXSModel xsM = WSDLUtils.getSchemaModel(wsdlTypes);
+ String schema = xsM.serialize();
+ buffer.append(schema);
+ buffer.append("</types>");
+ }
+ else if (wsdlTypes instanceof DOMTypes)
+ {
+ synchronized (wsdlTypes)
+ {
+ buffer.append(DOMWriter.printNode(((DOMTypes)wsdlTypes).getElement(),
true));
+ }
+ }
+ }
+
+ protected abstract void appendInterfaces(StringBuilder buffer, String namespace);
+
+ protected abstract void appendBindings(StringBuilder buffer, String namespace);
+
+ protected abstract void appendServices(StringBuilder buffer, String namespace);
+
+ /** Get a prefixed name of form prefix:localPart */
+ protected String getQNameRef(QName qname)
+ {
+ String retStr = qname.getLocalPart();
+
+ String prefix = qname.getPrefix();
+ String nsURI = qname.getNamespaceURI();
+ if (prefix.length() == 0 && nsURI.length() > 0)
+ {
+ qname = wsdl.registerQName(qname);
+ prefix = qname.getPrefix();
+ }
+
+ if (prefix.length() > 0)
+ retStr = prefix + ":" + retStr;
+
+ return retStr;
+ }
+
+ public WSDLDefinitions getWsdl()
+ {
+ return wsdl;
+ }
+
+ public void setWsdl(WSDLDefinitions wsdl)
+ {
+ this.wsdl = wsdl;
+ }
+
+ public boolean isIncludeTypesInWSDL()
+ {
+ return includeSchemaInWSDL;
+ }
+
+ public void logException(Exception e)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace(e);
+ }
+ }
+
+ public void logMessage(String msg)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace(msg);
+ }
+ }
+}
Copied:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/XSModelTypes.java
(from rev 1566,
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/XSModelTypes.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/XSModelTypes.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.common.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.common.WSException;
+import org.jboss.ws.common.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/common/metadata/wsdl/xmlschema
(from rev 1566,
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema)
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSComplexTypeDefinition.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.ArrayList;
import java.util.List;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSElementDeclaration.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import org.apache.xerces.xs.ShortList;
import org.apache.xerces.xs.XSAnnotation;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
// $Id$
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSErrorHandler.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSErrorHandler.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.parser.XMLErrorHandler;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModel.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModel.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModel.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.io.IOException;
import java.io.OutputStream;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModelGroup.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSModelGroup.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSModelGroup.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.Iterator;
import java.util.List;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamedMap.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamedMap.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamedMap.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.ArrayList;
import java.util.Collection;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItem.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.ArrayList;
import java.util.Collection;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSNamespaceItemList.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.ArrayList;
import java.util.Collection;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObject.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObject.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObject.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import org.apache.xerces.xs.XSNamespaceItem;
import org.apache.xerces.xs.XSObject;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObjectList.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSObjectList.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSObjectList.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.ArrayList;
import java.util.Collections;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSParticle.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSParticle.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSParticle.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import org.apache.xerces.xs.XSConstants;
import org.apache.xerces.xs.XSParticle;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSSimpleTypeDefinition.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.ArrayList;
import java.util.List;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSStringList.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSStringList.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSStringList.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.util.ArrayList;
import java.util.Collection;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/JBossXSTypeDefinition.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.common.WSException;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/WSSchemaUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xmlschema/WSSchemaUtils.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xmlschema;
import java.io.IOException;
import java.io.Writer;
@@ -47,8 +47,8 @@
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.ws.core.metadata.wsdl.xsd.SchemaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
/**
Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd (from
rev 1566, branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd)
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/SchemaUtils.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/SchemaUtils.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/SchemaUtils.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xsd;
import java.io.File;
import java.io.IOException;
@@ -49,12 +49,12 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.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.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;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/XSDWriter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/xsd/XSDWriter.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/XSDWriter.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -19,7 +19,7 @@
* 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;
+package org.jboss.ws.common.metadata.wsdl.xsd;
import java.io.File;
import java.io.FileWriter;
@@ -31,9 +31,9 @@
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;
+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
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/EndpointMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -39,11 +39,11 @@
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.umdm.HandlerMetaData.HandlerType;
import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.core.CommonSOAPBinding;
-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.jaxrpc.encoding.SOAPArrayDeserializerFactory;
import org.jboss.ws.core.jaxrpc.encoding.SOAPArraySerializerFactory;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/OperationMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/OperationMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/OperationMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -35,9 +35,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.umdm.EndpointMetaData.Type;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.Use;
import org.w3c.dom.Element;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/ServiceMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -37,18 +37,18 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+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.umdm.HandlerMetaData.HandlerType;
-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.jbossxb.SchemaBindingBuilder;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
-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.xb.binding.sunday.unmarshalling.SchemaBinding;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/TypesMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/TypesMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/TypesMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,8 +32,8 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
/**
* Types meta data
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/UnifiedMetaData.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/UnifiedMetaData.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/umdm/UnifiedMetaData.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -30,8 +30,8 @@
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.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.core.server.ServiceEndpointManager;
/**
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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -37,6 +37,7 @@
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.umdm.ClientEndpointMetaData;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
@@ -49,7 +50,6 @@
import org.jboss.ws.core.binding.EndpointInvocation;
import org.jboss.ws.core.binding.UnboundHeader;
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.soap.EndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -48,6 +48,7 @@
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.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.umdm.TypesMetaData;
@@ -59,7 +60,6 @@
import org.jboss.ws.core.binding.UnboundHeader;
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.jaxrpc.Use;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,7 +26,7 @@
import java.util.HashMap;
import java.util.Map;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.xb.binding.NamespaceRegistry;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -46,6 +46,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
@@ -59,7 +61,6 @@
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.jbossxb.JBossXBDeserializerFactory;
import org.jboss.ws.core.jbossxb.JBossXBSerializerFactory;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extras.xop.XOPContext;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,6 +34,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.encoding.Base64DeserializerFactory;
import org.jboss.ws.core.jaxrpc.encoding.Base64SerializerFactory;
import org.jboss.ws.core.jaxrpc.encoding.CalendarDeserializerFactory;
Deleted:
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,114 +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.core.jaxrpc;
-
-// $Id$
-
-import javax.activation.DataHandler;
-import javax.mail.internet.MimeMultipart;
-import javax.xml.soap.SOAPElement;
-import javax.xml.transform.Source;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.jaxrpc.encoding.*;
-import org.jboss.ws.core.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.core.jbossxb.JBossXBSerializerFactory;
-import org.w3c.dom.Element;
-import java.awt.*;
-
-/**
- * This is the representation of a type mapping.
- * This TypeMapping implementation supports the literal encoding style.
- *
- * The TypeMapping instance maintains a tuple of the type
- * {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public class LiteralTypeMapping extends TypeMappingImpl
-{
-
- /**
- * Construct the default literal type mapping.
- * Registers javaTypes for all standard XMLSchema types specified by JAXRPC.
- *
- * Note, the order of registered types is important
- * The last xmlType wins for a given javaType
- *
- */
- public LiteralTypeMapping()
- {
- // XOP default mapping
- JBossXBSerializerFactory jbxbSF = new JBossXBSerializerFactory();
- JBossXBDeserializerFactory jbxbDF = new JBossXBDeserializerFactory();
-
- registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
- registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
- registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
- registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
- registerInternal(DataHandler.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
-
- registerInternal(String.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
- registerInternal(Image.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
- registerInternal(Source.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF, jbxbDF);
- registerInternal(MimeMultipart.class, Constants.TYPE_XMIME_DEFAULT, jbxbSF,
jbxbDF);
-
- registerStandardLiteralTypes();
-
- // register default mime mappings
- registerInternal(DataHandler.class, Constants.TYPE_MIME_APPLICATION_XML, null,
null);
- registerInternal(DataHandler.class, Constants.TYPE_MIME_IMAGE_GIF, null, null);
- registerInternal(DataHandler.class, Constants.TYPE_MIME_IMAGE_JPEG, null, null);
- registerInternal(DataHandler.class, Constants.TYPE_MIME_TEXT_PLAIN, null, null);
- registerInternal(DataHandler.class, Constants.TYPE_MIME_TEXT_XML, null, null);
- registerInternal(MimeMultipart.class, Constants.TYPE_MIME_MULTIPART_MIXED, null,
null);
-
- // register mapping for xsd:anyType
- registerInternal(SOAPElement.class, Constants.TYPE_LITERAL_ANYTYPE, new
SOAPElementSerializerFactory(), new SOAPElementDeserializerFactory());
- registerInternal(Element.class, Constants.TYPE_LITERAL_ANYTYPE, new
ElementSerializerFactory(), new ElementDeserializerFactory());
- }
-
- /**
- * Returns the encodingStyle URIs (as String[]) supported by this TypeMapping
instance.
- * A TypeMapping that contains only encoding style independent serializers and
deserializers
- * returns null from this method.
- *
- * @return Array of encodingStyle URIs for the supported encoding styles
- */
- public String[] getSupportedEncodings()
- {
- return new String[] { "" };
- }
-
- /**
- * Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping
that contains only encoding
- * independent serializers and deserializers requires null as the parameter for this
method.
- *
- * @param encodingStyleURIs Array of encodingStyle URIs for the supported encoding
styles
- */
- public void setSupportedEncodings(String[] encodingStyleURIs)
- {
- throw new NotImplementedException();
- }
-}
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -41,6 +41,8 @@
import org.jboss.logging.Logger;
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.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,7 +31,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -29,15 +29,15 @@
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.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.common.umdm.TypesMetaData;
import org.jboss.ws.common.utils.JavaUtils;
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.soap.MessageContextAssociation;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -39,13 +39,13 @@
import javax.xml.rpc.handler.HandlerChain;
import javax.xml.rpc.handler.HandlerRegistry;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.common.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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ServiceObjectFactory.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -58,6 +58,7 @@
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.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.HandlerMetaData;
import org.jboss.ws.common.umdm.HandlerMetaDataJAXRPC;
@@ -66,7 +67,6 @@
import org.jboss.ws.common.umdm.HandlerMetaData.HandlerType;
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.wsse.WSSecurityConfiguration;
import org.jboss.ws.core.server.ServiceEndpoint;
import org.jboss.ws.core.server.ServiceEndpointManager;
Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java 2006-12-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.core.jaxrpc;
-
-// $Id$
-
-/** A type-safe enumeration for encoding style.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Oct-2004
- */
-public class Style
-{
- private String style;
-
- public static final Style RPC = new Style("rpc");
- public static final Style DOCUMENT = new Style("document");
-
- private Style(String style)
- {
- this.style = style;
- }
-
- public static Style getDefaultStyle()
- {
- return DOCUMENT;
- }
-
- public static Style valueOf(String style)
- {
- if (RPC.style.equals(style))
- return RPC;
- if (DOCUMENT.style.equals(style))
- return DOCUMENT;
-
- throw new IllegalArgumentException("Unsupported style: " + style);
- }
-
- public String toString()
- {
- return style;
- }
-}
Deleted:
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,624 +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.core.jaxrpc;
-
-// $Id$
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.DeserializerFactory;
-import javax.xml.rpc.encoding.SerializerFactory;
-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.core.jaxrpc.encoding.Base64DeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.Base64SerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
-
-/**
- * This is the representation of a type mapping.
- * This TypeMapping implementation supports the literal encoding style.
- *
- * The TypeMapping instance maintains a tuple of the type
- * {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public abstract class TypeMappingImpl implements TypeMapping
-{
- // provide logging
- private static final Logger log = Logger.getLogger(TypeMappingImpl.class);
-
- // Map<KeyPair,FactoryPair>
- private Map<KeyPair, FactoryPair> tupleMap = new LinkedHashMap<KeyPair,
FactoryPair>();
-
- /**
- * Gets the DeserializerFactory registered for the specified pair of Java type and XML
data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @return Registered DeserializerFactory or null if there is no registered factory
- */
- public DeserializerFactory getDeserializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(xmlType, javaType);
- return (fPair != null ? fPair.getDeserializerFactory() : null);
- }
-
- /**
- * Gets the SerializerFactory registered for the specified pair of Java type and XML
data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @return Registered SerializerFactory or null if there is no registered factory
- */
- public SerializerFactory getSerializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(xmlType, javaType);
- return (fPair != null ? fPair.getSerializerFactory() : null);
- }
-
- /**
- * Returns the encodingStyle URIs (as String[]) supported by this TypeMapping
instance.
- * A TypeMapping that contains only encoding style independent serializers and
deserializers
- * returns null from this method.
- *
- * @return Array of encodingStyle URIs for the supported encoding styles
- */
- public abstract String[] getSupportedEncodings();
-
- /**
- * Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping
that contains only encoding
- * independent serializers and deserializers requires null as the parameter for this
method.
- *
- * @param encodingStyleURIs Array of encodingStyle URIs for the supported encoding
styles
- */
- public abstract void setSupportedEncodings(String[] encodingStyleURIs);
-
- /**
- * Checks whether or not type mapping between specified XML type and Java type is
registered.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @return boolean; true if type mapping between the specified XML type and Java type
is registered; otherwise false
- */
- public boolean isRegistered(Class javaType, QName xmlType)
- {
- return getFactoryPair(xmlType, javaType) != null;
- }
-
- /**
- * Registers SerializerFactory and DeserializerFactory for a specific type mapping
between an XML type and Java type.
- * This method replaces any existing registered SerializerFactory DeserializerFactory
instances.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @param sf SerializerFactory
- * @param df DeserializerFactory
- * @throws javax.xml.rpc.JAXRPCException If any error during the registration
- */
- public void register(Class javaType, QName xmlType, SerializerFactory sf,
DeserializerFactory df)
- {
- log.debug("register: TypeMappingImpl@" + hashCode() + "
[xmlType=" + xmlType + ",javaType=" + javaType.getName() + ",sf="
+ sf + ",df=" + df + "]");
- registerInternal(javaType, xmlType, sf, df);
- }
-
- void registerInternal(Class javaType, QName xmlType, SerializerFactory sf,
DeserializerFactory df)
- {
- if (javaType == null)
- throw new IllegalArgumentException("javaType cannot be null for: " +
xmlType);
- if (xmlType == null)
- throw new IllegalArgumentException("xmlType cannot be null for: " +
javaType);
-
- KeyPair kPair = new KeyPair(xmlType, javaType);
- FactoryPair fPair = new FactoryPair(sf, df);
- tupleMap.put(kPair, fPair);
- }
-
- /**
- * Removes the DeserializerFactory registered for the specified pair of Java type and
XML data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered
DeserializerFactory
- */
- public void removeDeserializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(xmlType, javaType);
- if (fPair != null)
- fPair.setDeserializerFactory(null);
- }
-
- /**
- * Removes the SerializerFactory registered for the specified pair of Java type and
XML data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered
SerializerFactory
- */
- public void removeSerializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(xmlType, javaType);
- if (fPair != null)
- fPair.setSerializerFactory(null);
- }
-
- /** Get the list of registered XML types */
- public List<QName> getRegisteredXmlTypes()
- {
- List<QName> types = new ArrayList<QName>();
- for (KeyPair keyPair : getKeyPairs(null, null))
- {
- types.add(keyPair.getXmlType());
- }
- return types;
- }
-
- /** Get the list of registered Java types */
- public List<Class> getRegisteredJavaTypes()
- {
- List<Class> types = new ArrayList<Class>();
- for (KeyPair keyPair : getKeyPairs(null, null))
- {
- types.add(keyPair.getJavaType());
- }
- return types;
- }
-
- /** Get the Class that was registered last for this xmlType */
- public Class getJavaType(QName xmlType)
- {
- Class javaType = null;
-
- List keyPairList = getKeyPairs(xmlType, null);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
- javaType = kPair.getJavaType();
- }
-
- return javaType;
- }
-
- /**
- * Get all of the Classes registered for this xmlType.
- */
- public List<Class> getJavaTypes(QName xmlType)
- {
- List<KeyPair> keyPairList = getKeyPairs(xmlType, null);
- List<Class> classes = new ArrayList<Class>(keyPairList.size());
-
- for (KeyPair current : keyPairList)
- {
- classes.add(current.getJavaType());
- }
-
- return classes;
- }
-
- /**
- * Get the Class that was registered last for this xmlType
- * If there are two Java Types registered for the xmlType
- * return the primitive type rather than the wrapper,
- * if available
- */
- public Class getJavaType(QName xmlType,boolean getPrimitive)
- {
- //Lets get the primitive type if available
- Class javaType = null;
-
- List keyPairList = getKeyPairs(xmlType, null);
- int size = keyPairList.size();
- if (size == 2 && getPrimitive)
- {
- KeyPair kPair1 = (KeyPair)keyPairList.get(0);
- Class javaType1 = kPair1.getJavaType();
- KeyPair kPair2 = (KeyPair)keyPairList.get(1);
- Class javaType2 = kPair2.getJavaType();
- if(javaType2.isPrimitive() && !javaType1.isPrimitive())
- javaType = javaType2;
- else
- if(javaType1.isPrimitive() && !javaType2.isPrimitive())
- javaType = javaType1;
- else
- javaType = javaType2; //Fallback on the most latest
- }
- else
- return getJavaType(xmlType);
-
- return javaType;
- }
-
- /** Get the Class name that was registered last for this xmlType */
- public String getJavaTypeName(QName xmlType)
- {
- Class javaType = getJavaType(xmlType);
- return (javaType != null ? javaType.getName() : null);
- }
-
- /** Get the QName that was registered last for this javaType */
- public QName getXMLType(Class javaType)
- {
- QName xmlType = null;
-
- List keyPairList = getKeyPairs(null, javaType);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
- xmlType = kPair.getXmlType();
- }
-
- return xmlType;
- }
-
- /**
- * Get the QName that was registered last for this javaType
- * @param javaType class for which XML Type is needed
- * @param tryAssignable If the xmlType is not registered for javaType
- * should a base class type be checked?
- *
- */
- public QName getXMLType(Class javaType, boolean tryAssignable)
- {
- if(tryAssignable) return getXMLType(javaType);
-
- QName xmlType = null;
-
- List keyPairList = getKeyPairs(null, javaType, tryAssignable);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
- xmlType = kPair.getXmlType();
- }
-
- return xmlType;
- }
-
- /**
- * Get the serializer/deserializer factory pair for the given xmlType, javaType
- * Both xmlType, javaType may be null. In that case, this implementation still
- * returns a FactoryPair if there is only one possible match.
- */
- List<KeyPair> getKeyPairs(QName xmlType, Class javaType)
- {
- List<KeyPair> keyPairList = new ArrayList<KeyPair>();
-
- // Getting the exact matching pair
- if (xmlType != null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() ==
javaType)
- {
- keyPairList.add(entry);
- }
- }
- // No exact match, try assignable
- if (keyPairList.size() == 0)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()) &&
JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
- {
- keyPairList.add(entry);
- }
- }
- }
- }
-
- // Getting the pair for a given xmlType
- else if (xmlType != null && javaType == null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()))
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the pair for a given javaType
- else if (xmlType == null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (entry.getJavaType() == javaType)
- {
- keyPairList.add(entry);
- }
- }
- // No exact match, try assignable
- if (keyPairList.size() == 0)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
- {
- keyPairList.add(entry);
- }
- }
- }
- }
-
- // Getting the all pairs
- else if (xmlType == null && javaType == null)
- {
- keyPairList.addAll(tupleMap.keySet());
- }
-
- return keyPairList;
- }
-
- /**
- * Get the serializer/deserializer factory pair for the given xmlType, javaType
- * Both xmlType, javaType may be null. In that case, this implementation still
- * returns a FactoryPair if there is only one possible match.
- * <br>Note: This method does not try for the base class, if no keypair exists
for the
- * javaType in question.
- */
- List<KeyPair> getKeyPairs(QName xmlType, Class javaType, boolean tryAssignable)
- {
- if(tryAssignable) return getKeyPairs( xmlType, javaType);
-
- List<KeyPair> keyPairList = new ArrayList<KeyPair>();
-
- // Getting the exact matching pair
- if (xmlType != null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() ==
javaType)
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the pair for a given xmlType
- else if (xmlType != null && javaType == null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()))
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the pair for a given javaType
- else if (xmlType == null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (entry.getJavaType() == javaType)
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the all pairs
- else if (xmlType == null && javaType == null)
- {
- keyPairList.addAll(tupleMap.keySet());
- }
-
- return keyPairList;
- }
-
- /**
- * Get the serializer/deserializer factory pair for the given xmlType, javaType
- * Both xmlType, javaType may be null. In that case, this implementation still
- * returns a FactoryPair that was last registered
- */
- FactoryPair getFactoryPair(QName xmlType, Class javaType)
- {
- FactoryPair fPair = null;
-
- List<KeyPair> keyPairList = getKeyPairs(xmlType, javaType);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = keyPairList.get(size - 1);
- fPair = (FactoryPair)tupleMap.get(kPair);
- }
-
- return fPair;
- }
-
- protected void registerStandardLiteralTypes()
- {
- registerInternal(BigDecimal.class, Constants.TYPE_LITERAL_DECIMAL, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(BigInteger.class, Constants.TYPE_LITERAL_POSITIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(BigInteger.class, Constants.TYPE_LITERAL_NEGATIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(BigInteger.class, Constants.TYPE_LITERAL_NONPOSITIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(BigInteger.class, Constants.TYPE_LITERAL_NONNEGATIVEINTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(BigInteger.class, Constants.TYPE_LITERAL_UNSIGNEDLONG, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(BigInteger.class, Constants.TYPE_LITERAL_INTEGER, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(Date.class, Constants.TYPE_LITERAL_DATETIME, new
DateSerializerFactory(), new DateDeserializerFactory());
-
- registerInternal(Calendar.class, Constants.TYPE_LITERAL_DATE, new
CalendarSerializerFactory(), new CalendarDeserializerFactory());
- registerInternal(Calendar.class, Constants.TYPE_LITERAL_TIME, new
CalendarSerializerFactory(), new CalendarDeserializerFactory());
- registerInternal(Calendar.class, Constants.TYPE_LITERAL_DATETIME, new
CalendarSerializerFactory(), new CalendarDeserializerFactory());
-
- registerInternal(QName.class, Constants.TYPE_LITERAL_QNAME, new
QNameSerializerFactory(), new QNameDeserializerFactory());
-
- registerInternal(String.class, Constants.TYPE_LITERAL_ANYSIMPLETYPE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_DURATION, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_GDAY, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_GMONTH, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_GMONTHDAY, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_GYEAR, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_GYEARMONTH, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_ID, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_LANGUAGE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_NAME, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_NCNAME, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_NMTOKEN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_NORMALIZEDSTRING, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_TOKEN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(String.class, Constants.TYPE_LITERAL_STRING, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(String[].class, Constants.TYPE_LITERAL_NMTOKENS, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(URI.class, Constants.TYPE_LITERAL_ANYURI, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(byte.class, Constants.TYPE_LITERAL_BYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Byte.class, Constants.TYPE_LITERAL_BYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(Byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new
HexSerializerFactory(), new HexDeserializerFactory());
- registerInternal(byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new
HexSerializerFactory(), new HexDeserializerFactory());
-
- registerInternal(Byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new
Base64SerializerFactory(), new Base64DeserializerFactory());
- registerInternal(byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new
Base64SerializerFactory(), new Base64DeserializerFactory());
-
- registerInternal(double.class, Constants.TYPE_LITERAL_DOUBLE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Double.class, Constants.TYPE_LITERAL_DOUBLE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(float.class, Constants.TYPE_LITERAL_FLOAT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Float.class, Constants.TYPE_LITERAL_FLOAT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(int.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Integer.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(int.class, Constants.TYPE_LITERAL_INT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Integer.class, Constants.TYPE_LITERAL_INT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(long.class, Constants.TYPE_LITERAL_LONG, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Long.class, Constants.TYPE_LITERAL_LONG, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- registerInternal(short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(short.class, Constants.TYPE_LITERAL_SHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- registerInternal(Short.class, Constants.TYPE_LITERAL_SHORT, new
SimpleSerializerFactory(), new SimpleDeserializerFactory());
- }
-
- /** A tuple of the type {XML typeQName, Java Class, SerializerFactory,
DeserializerFactory}.
- */
- public static class KeyPair
- {
- private QName xmlType;
- private Class javaType;
-
- public KeyPair(QName xmlType, Class javaType)
- {
- this.javaType = javaType;
- this.xmlType = xmlType;
- }
-
- public Class getJavaType()
- {
- return javaType;
- }
-
- public QName getXmlType()
- {
- return xmlType;
- }
-
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (!(o instanceof KeyPair)) return false;
-
- final KeyPair keyPair = (KeyPair)o;
-
- if (!javaType.equals(keyPair.javaType)) return false;
- if (!xmlType.equals(keyPair.xmlType)) return false;
-
- return true;
- }
-
- public int hashCode()
- {
- int result;
- result = xmlType.hashCode();
- result = 29 * result + javaType.hashCode();
- return result;
- }
-
- public String toString()
- {
- return "[xmlType=" + xmlType + ",javaType=" +
javaType.getName() + "]";
- }
- }
-
- /** A tuple of the type {XML typeQName, Java Class, SerializerFactory,
DeserializerFactory}.
- */
- public static class FactoryPair
- {
- private SerializerFactory serializerFactory;
- private DeserializerFactory deserializerFactory;
-
- FactoryPair(SerializerFactory sf, DeserializerFactory df)
- {
- this.deserializerFactory = df;
- this.serializerFactory = sf;
- }
-
- public DeserializerFactory getDeserializerFactory()
- {
- return deserializerFactory;
- }
-
- public SerializerFactory getSerializerFactory()
- {
- return serializerFactory;
- }
-
- public void setDeserializerFactory(DeserializerFactory df)
- {
- this.deserializerFactory = df;
- }
-
- public void setSerializerFactory(SerializerFactory sf)
- {
- this.serializerFactory = sf;
- }
- }
-}
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,6 +32,8 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
/**
* This defines a registry of TypeMapping instances for encoding styles.
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -33,6 +33,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.DOMWriter;
@@ -40,7 +41,6 @@
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.w3c.dom.Element;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -28,12 +28,12 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.ws.common.umdm.ParameterMetaData;
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.jaxrpc.TypeMappingImpl;
import org.w3c.dom.NamedNodeMap;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -33,10 +33,10 @@
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeDeserializer;
import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.extras.xop.jaxws.AttachmentUnmarshallerImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,10 +32,10 @@
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.binding.ComplexTypeSerializer;
import org.jboss.ws.core.binding.SerializationContext;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.extras.xop.jaxws.AttachmentMarshallerImpl;
import org.w3c.dom.NamedNodeMap;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,10 +34,10 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.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.soap.SOAPEnvelopeImpl;
/**
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBDeserializer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -29,11 +29,11 @@
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;
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/jbossxb/JBossXBMarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBMarshallerImpl.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBMarshallerImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,10 +26,10 @@
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.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
import org.jboss.xb.binding.Constants;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSerializer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,11 +25,11 @@
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;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.w3c.dom.NamedNodeMap;
import javax.xml.namespace.QName;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSupport.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSupport.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/JBossXBSupport.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -4,12 +4,12 @@
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.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-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/jbossxb/SchemaBindingBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/SchemaBindingBuilder.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/SchemaBindingBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -28,8 +28,8 @@
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.*;
import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.jboss.ws.core.metadata.jaxrpcmapping.*;
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/jbossxb/XercesXSMarshallerImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/XercesXSMarshallerImpl.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jbossxb/XercesXSMarshallerImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -27,10 +27,10 @@
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.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.VariableMapping;
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/metadata/builder/MetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/MetaDataBuilder.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/MetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -45,6 +45,13 @@
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.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.umdm.ClientEndpointMetaData;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.ServerEndpointMetaData;
@@ -58,13 +65,6 @@
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.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;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,6 +34,13 @@
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.JavaWsdlMappingFactory;
+import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+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.common.umdm.ClientEndpointMetaData;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
@@ -43,13 +50,6 @@
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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCDeployment.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -24,8 +24,8 @@
import java.io.InputStream;
import java.net.URL;
-import org.jboss.ws.core.metadata.jsr109.WebservicesFactory;
-import org.jboss.ws.core.metadata.jsr109.WebservicesMetaData;
+import org.jboss.ws.common.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.common.metadata.webservices.WebservicesMetaData;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
import org.jboss.xb.binding.ObjectModelFactory;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -38,6 +38,40 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
+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.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.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
@@ -48,44 +82,10 @@
import org.jboss.ws.common.umdm.TypesMetaData;
import org.jboss.ws.common.umdm.WrappedParameter;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.jaxrpc.Style;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
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.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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,6 +32,13 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
+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.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.ServerEndpointMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
@@ -46,13 +53,6 @@
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.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
-import org.jboss.ws.core.metadata.jsr109.PortComponentMetaData;
-import org.jboss.ws.core.metadata.jsr109.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;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,23 +31,23 @@
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.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.common.umdm.ClientEndpointMetaData;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.umdm.EndpointMetaData.Type;
-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.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/JAXWSProviderMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -36,6 +36,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.umdm.ServerEndpointMetaData;
@@ -43,9 +45,7 @@
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.umdm.EndpointMetaData.Type;
import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.metadata.builder.MetaDataBuilder;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -61,6 +61,12 @@
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.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.metadata.wsdl.WSDLWriter;
+import org.jboss.ws.common.metadata.wsdl.WSDLWriter.ResolvedWriter;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
@@ -76,7 +82,6 @@
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.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
import org.jboss.ws.core.jaxws.WrapperGenerator;
@@ -87,11 +92,6 @@
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.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.core.metadata.wsdl.WSDLWriter;
-import org.jboss.ws.core.metadata.wsdl.WSDLWriter.ResolvedWriter;
-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.extras.addressing.AddressingPropertiesImpl;
Deleted:
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/DOMTypes.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/DOMTypes.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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
Deleted:
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/Extendable.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/Extendable.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,86 +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.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;
- }
-}
Deleted:
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/NCName.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/NCName.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,76 +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.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;
- }
-}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11DefinitionFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11DefinitionFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11DefinitionFactory.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.core.metadata.wsdl;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-import com.ibm.wsdl.xml.WSDLReaderImpl;
-
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLLocator;
-import javax.wsdl.xml.WSDLReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * A factory that creates a WSDL-1.1 <code>Definition</code> from an URL.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-April-2004
- */
-public class WSDL11DefinitionFactory
-{
- // provide logging
- private static Logger log = Logger.getLogger(WSDL11DefinitionFactory.class);
-
- // This feature is set by default in wsdl4j, it means the object structore contains
the imported arguments
- public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
- // Set this feature for additional debugging output
- public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
-
- // The WSDLReader that is used by this factory
- private WSDLReader wsdlReader;
-
- // Hide constructor
- private WSDL11DefinitionFactory() throws WSDLException
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- wsdlReader = wsdlFactory.newWSDLReader();
- wsdlReader.setFeature(WSDL11DefinitionFactory.FEATURE_VERBOSE, false);
- }
-
- /** Create a new instance of a wsdl factory */
- public static WSDL11DefinitionFactory newInstance() throws WSDLException
- {
- return new WSDL11DefinitionFactory();
- }
-
- /** Set a feature on the underlying reader */
- public void setFeature(String name, boolean value) throws IllegalArgumentException
- {
- wsdlReader.setFeature(name, value);
- }
-
- /**
- * Read the wsdl document from the given URL
- */
- public Definition parse(URL wsdlLocation) throws WSDLException
- {
- if (wsdlLocation == null)
- throw new IllegalArgumentException("URL cannot be null");
-
- log.trace("parse: " + wsdlLocation.toExternalForm());
-
- EntityResolver entityResolver = new JBossWSEntityResolver();
-
- // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
- ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
-
- Definition wsdlDefinition = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver,
wsdlLocation));
- return wsdlDefinition;
- }
-}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Reader.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Reader.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Reader.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,1197 +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.core.metadata.wsdl;
-
-// $Id$
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.wsdl.Binding;
-import javax.wsdl.BindingInput;
-import javax.wsdl.BindingOperation;
-import javax.wsdl.BindingOutput;
-import javax.wsdl.Definition;
-import javax.wsdl.Fault;
-import javax.wsdl.Import;
-import javax.wsdl.Input;
-import javax.wsdl.Message;
-import javax.wsdl.Operation;
-import javax.wsdl.Output;
-import javax.wsdl.Part;
-import javax.wsdl.Port;
-import javax.wsdl.PortType;
-import javax.wsdl.Service;
-import javax.wsdl.Types;
-import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.UnknownExtensibilityElement;
-import javax.wsdl.extensions.mime.MIMEContent;
-import javax.wsdl.extensions.mime.MIMEMultipartRelated;
-import javax.wsdl.extensions.mime.MIMEPart;
-import javax.wsdl.extensions.schema.Schema;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.extensions.soap.SOAPBinding;
-import javax.wsdl.extensions.soap.SOAPBody;
-import javax.wsdl.extensions.soap.SOAPHeader;
-import javax.wsdl.extensions.soap.SOAPOperation;
-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.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.core.jaxrpc.Style;
-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.tools.JavaToXSD;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * A helper that translates a WSDL-1.1 object graph into a WSDL-2.0 object graph.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
- * @since 10-Oct-2004
- */
-public class WSDL11Reader
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDL11Reader.class);
-
- private static QName SOAP12_BINDING = new QName(Constants.NS_SOAP12,
"binding");
- private static QName SOAP12_BODY = new QName(Constants.NS_SOAP12, "body");
- private static QName SOAP12_OPERATION = new QName(Constants.NS_SOAP12,
"operation");
- private static QName SOAP12_ADDRESS = new QName(Constants.NS_SOAP12,
"address");
-
- private WSDLDefinitions destWsdl;
-
- // Maps wsdl message parts to their corresponding element names
- private Map<String, QName> messagePartToElementMap = new HashMap<String,
QName>();
-
- // Map of <ns,URL> for schemalocation keyed by namespace
- private Map<String, URL> schemaLocationsMap = new HashMap<String, URL>();
-
- private LinkedHashMap<QName, Binding> allBindings;
- private LinkedHashMap<QName, Binding> portTypeBindings;
-
- // Temporary files used by this reader.
- private List<File> tempFiles = new ArrayList<File>();
-
- /**
- * Takes a WSDL11 Definition element and converts into
- * our object graph that has been developed for WSDL20
- *
- * @param srcWsdl The src WSDL11 definition
- * @param wsdlLoc The source location, if null we cannot process imports or includes
- */
- public WSDLDefinitions processDefinition(Definition srcWsdl, URL wsdlLoc) throws
IOException
- {
- log.trace("processDefinition: " + wsdlLoc);
-
- destWsdl = new WSDLDefinitions();
- destWsdl.setWsdlTypes(new XSModelTypes());
- destWsdl.setWsdlOneOneDefinition(srcWsdl);
- destWsdl.setWsdlNamespace(Constants.NS_WSDL11);
-
- processNamespaces(srcWsdl);
- processTypes(srcWsdl, wsdlLoc);
- processServices(srcWsdl);
-
- if (getAllDefinedBindings(srcWsdl).size() != destWsdl.getBindings().length)
- processUnreachableBindings(srcWsdl);
-
- cleanupTemporaryFiles();
-
- return destWsdl;
- }
-
- private void cleanupTemporaryFiles()
- {
- for (File current : tempFiles)
- {
- current.delete();
- }
- }
-
- // process all bindings not within service separetly
- private void processUnreachableBindings(Definition srcWsdl)
- {
- log.trace("processUnreachableBindings");
-
- Iterator it = getAllDefinedBindings(srcWsdl).values().iterator();
- while (it.hasNext())
- {
- Binding srcBinding = (Binding)it.next();
- QName srcQName = srcBinding.getQName();
-
- WSDLBinding destBinding = destWsdl.getBinding(new NCName(srcQName));
- if (destBinding == null)
- {
- processBinding(srcWsdl, srcBinding);
- }
- }
- }
-
- private void processNamespaces(Definition srcWsdl)
- {
- String targetNS = srcWsdl.getTargetNamespace();
- destWsdl.setTargetNamespace(targetNS);
-
- // Copy wsdl namespaces
- Map nsMap = srcWsdl.getNamespaces();
- Iterator iter = nsMap.entrySet().iterator();
- while (iter.hasNext())
- {
- Map.Entry entry = (Map.Entry)iter.next();
- String prefix = (String)entry.getKey();
- String nsURI = (String)entry.getValue();
- destWsdl.registerNamespaceURI(nsURI, prefix);
- }
- }
-
- private void processTypes(Definition srcWsdl, URL wsdlLoc) throws IOException
- {
- log.trace("BEGIN processTypes: " + wsdlLoc);
-
- WSDLTypes destTypes = destWsdl.getWsdlTypes();
-
- Types srcTypes = srcWsdl.getTypes();
- if (srcTypes != null && srcTypes.getExtensibilityElements().size() > 0)
- {
- List extElements = srcTypes.getExtensibilityElements();
- int len = extElements.size();
-
- for (int i = 0; i < len; i++)
- {
- ExtensibilityElement extElement = (ExtensibilityElement)extElements.get(i);
-
- Element domElement;
- if (extElement instanceof Schema)
- {
- domElement = ((Schema)extElement).getElement();
- }
- else if (extElement instanceof UnknownExtensibilityElement)
- {
- domElement = ((UnknownExtensibilityElement)extElement).getElement();
- }
- else
- {
- throw new WSException("Unsupported extensibility element: " +
extElement);
- }
-
- Element domElementClone = (Element)domElement.cloneNode(true);
- copyParentNamespaceDeclarations(domElementClone, domElement);
-
- String localname = domElementClone.getLocalName();
- try
- {
- if ("import".equals(localname))
- {
- processSchemaImport(destTypes, wsdlLoc, domElementClone);
- }
- else if ("schema".equals(localname))
- {
- processSchemaInclude(destTypes, wsdlLoc, domElementClone);
- }
- else
- {
- throw new IllegalArgumentException("Unsuported schema element:
" + localname);
- }
- }
- catch (IOException e)
- {
- throw new WSException("Cannot extract schema definition", e);
- }
- }
-
- if (len > 0)
- {
- JavaToXSD jxsd = new JavaToXSD();
- JBossXSModel xsmodel = jxsd.parseSchema(schemaLocationsMap);
- WSDLUtils.addSchemaModel(destTypes, destWsdl.getTargetNamespace(), xsmodel);
- }
- }
- else
- {
- log.trace("Empty wsdl types element, processing imports");
- Iterator it = srcWsdl.getImports().values().iterator();
- while (it.hasNext())
- {
- List<Import> srcImports = (List<Import>)it.next();
- for (Import srcImport : srcImports)
- {
- Definition impDefinition = srcImport.getDefinition();
- String impLoc = impDefinition.getDocumentBaseURI();
- processTypes(impDefinition, new URL(impLoc));
- }
- }
- }
-
- log.trace("END processTypes: " + wsdlLoc + "\n" + destTypes);
- }
-
- private void copyParentNamespaceDeclarations(Element destElement, Element srcElement)
- {
- Node parent = srcElement.getParentNode();
- while (parent != null)
- {
- if (parent.hasAttributes())
- {
- NamedNodeMap attributes = parent.getAttributes();
- for (int i = 0; i < attributes.getLength(); i++)
- {
- Attr attr = (Attr)attributes.item(i);
- String name = attr.getName();
- String value = attr.getValue();
- if (name.startsWith("xmlns:") &&
destElement.hasAttribute(name) == false)
- destElement.setAttribute(name, value);
- }
- }
- parent = parent.getParentNode();
- }
- }
-
- private void processSchemaImport(WSDLTypes types, URL wsdlLoc, Element importEl)
throws IOException
- {
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process import, parent location
not set");
-
- log.trace("processSchemaImport: " + wsdlLoc);
-
- String location = getOptionalAttribute(importEl, "schemaLocation");
- if (location == null)
- throw new IllegalArgumentException("schemaLocation is null for
xsd:import");
-
- URL locationURL = getLocationURL(wsdlLoc, location);
- Element rootElement = DOMUtils.parse(locationURL.openStream());
- URL newloc = processSchemaInclude(types, locationURL, rootElement);
- if (newloc != null)
- importEl.setAttribute("schemaLocation", newloc.toExternalForm());
- }
-
- private URL processSchemaInclude(WSDLTypes types, URL wsdlLoc, Element schemaEl)
throws IOException
- {
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process iclude, parent location
not set");
-
- File tmpFile = null;
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process include, parent location
not set");
-
- log.trace("processSchemaInclude: " + wsdlLoc);
-
- String schemaPrefix = schemaEl.getPrefix();
-
- String importTag = (schemaPrefix == null) ? "import" : schemaPrefix +
":import";
- Element importElement =
schemaEl.getOwnerDocument().createElementNS(Constants.NS_SCHEMA_XSD, importTag);
- importElement.setAttribute("namespace", Constants.URI_SOAP11_ENC);
- schemaEl.insertBefore(importElement, DOMUtils.getFirstChildElement(schemaEl));
-
- // Handle schema includes
- Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "include"));
- while (it.hasNext())
- {
- Element includeEl = (Element)it.next();
- String location = getOptionalAttribute(includeEl, "schemaLocation");
- if (location == null)
- throw new IllegalArgumentException("schemaLocation is null for
xsd:include");
-
- URL locationURL = getLocationURL(wsdlLoc, location);
- Element rootElement = DOMUtils.parse(locationURL.openStream());
- URL newloc = processSchemaInclude(types, locationURL, rootElement);
- if (newloc != null)
- includeEl.setAttribute("schemaLocation", newloc.toExternalForm());
- }
-
- String targetNS = getOptionalAttribute(schemaEl, "targetNamespace");
- if (targetNS != null)
- {
- log.trace("processSchemaInclude: [targetNS=" + targetNS +
",parentURL=" + wsdlLoc + "]");
-
- tmpFile = SchemaUtils.getSchemaTempFile(targetNS);
- tempFiles.add(tmpFile);
-
- FileWriter fwrite = new FileWriter(tmpFile);
- new DOMWriter(fwrite).setPrettyprint(true).print(schemaEl);
- fwrite.close();
-
- schemaLocationsMap.put(targetNS, tmpFile.toURL());
- }
-
- // schema elements that have no target namespace are skipped
- //
- // <xsd:schema>
- // <xsd:import
namespace="http://org.jboss.webservice/example/types"
schemaLocation="Hello.xsd"/>
- // <xsd:import
namespace="http://org.jboss.webservice/example/types/arrays/org/jboss/test/webservice/admindevel"
schemaLocation="subdir/HelloArr.xsd"/>
- // </xsd:schema>
- if (targetNS == null)
- {
- log.trace("Schema element without target namespace in: " + wsdlLoc);
- }
-
- handleSchemaImports(schemaEl, wsdlLoc);
-
- return tmpFile != null ? tmpFile.toURL() : null;
- }
-
- private void handleSchemaImports(Element schemaEl, URL wsdlLoc) throws
MalformedURLException
- {
- if (wsdlLoc == null)
- throw new IllegalArgumentException("Cannot process import, parent location
not set");
-
- Iterator it = DOMUtils.getChildElements(schemaEl, new
QName(Constants.NS_SCHEMA_XSD, "import"));
- while (it.hasNext())
- {
- Element includeEl = (Element)it.next();
- String schemaLocation = getOptionalAttribute(includeEl,
"schemaLocation");
- String namespace = getOptionalAttribute(includeEl, "namespace");
-
- log.trace("handleSchemaImport: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
-
- // Skip, let the entity resolver resolve these
- if (namespace != null && schemaLocation != null)
- {
- URL currLoc = getLocationURL(wsdlLoc, schemaLocation);
- schemaLocationsMap.put(namespace, currLoc);
- }
- else
- {
- log.trace("Skip schema import: [namespace=" + namespace +
",schemaLocation=" + schemaLocation + "]");
- }
- }
- }
-
- private URL getLocationURL(URL parentURL, String location) throws
MalformedURLException
- {
- log.trace("getLocationURL: [location=" + location + ",parent="
+ parentURL + "]");
-
- URL locationURL = null;
- try
- {
- locationURL = new URL(location);
- }
- catch (MalformedURLException e)
- {
- // ignore malformed URL
- }
-
- if (locationURL == null)
- {
- String parentProtocol = parentURL.getProtocol();
- if (parentProtocol.equals("file") &&
!location.startsWith("/"))
- {
- String path = parentURL.toExternalForm();
- path = path.substring(0, path.lastIndexOf("/"));
- locationURL = new URL(path + "/" + location);
- }
- else if (parentProtocol.startsWith("http") &&
location.startsWith("/"))
- {
- String path = parentProtocol + "://" + parentURL.getHost() +
":" + parentURL.getPort();
- locationURL = new URL(path + location);
- }
- else if (parentProtocol.equals("jar") &&
!location.startsWith("/"))
- {
- String path = parentURL.toExternalForm();
- path = path.substring(0, path.lastIndexOf("/"));
- locationURL = new URL(path + "/" + location);
- }
- else
- {
- throw new WSException("Unsupported schemaLocation: " + location);
- }
- }
-
- log.trace("Modified schemaLocation: " + locationURL);
- return locationURL;
- }
-
- private void processPortType(Definition srcWsdl, PortType srcPortType)
- {
- log.trace("processPortType: " + srcPortType.getQName());
-
- QName qname = srcPortType.getQName();
- NCName ncName = new NCName(qname);
- if (destWsdl.getInterface(ncName) == null)
- {
- WSDLInterface destInterface = new WSDLInterface(destWsdl);
- destInterface.setName(ncName);
- destInterface.setQName(qname);
-
- // eventing extensions
- QName eventSourceProp =
(QName)srcPortType.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSE_EVENTSOURCE);
- if (eventSourceProp != null &&
eventSourceProp.getLocalPart().equals(Boolean.TRUE.toString()))
- {
- destInterface.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_EVENTSOURCE, eventSourceProp.getLocalPart()));
- }
-
- destWsdl.addInterface(destInterface);
-
- processPortTypeOperations(srcWsdl, destInterface, srcPortType);
- }
- }
-
- private void processPortTypeOperations(Definition srcWsdl, WSDLInterface
destInterface, PortType srcPortType)
- {
- Iterator itOperations = srcPortType.getOperations().iterator();
- while (itOperations.hasNext())
- {
- Operation srcOperation = (Operation)itOperations.next();
-
- WSDLInterfaceOperation destOperation = new
WSDLInterfaceOperation(destInterface);
- destOperation.setName(new NCName(srcOperation.getName()));
- destOperation.setStyle(getOperationStyle(srcWsdl, srcPortType, srcOperation));
-
- processOperationInput(srcWsdl, srcOperation, destOperation, srcPortType);
- processOperationOutput(srcWsdl, srcOperation, destOperation, srcPortType);
- processOperationFaults(srcOperation, destOperation, destInterface);
-
- destInterface.addOperation(destOperation);
- }
- }
-
- private void processOperationInput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
- {
- Input srcInput = srcOperation.getInput();
- if (srcInput != null)
- {
- Message srcMessage = srcInput.getMessage();
- log.trace("processOperationInput: " + srcMessage.getQName());
-
- QName wsaAction =
(QName)srcInput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
- if (wsaAction != null)
- destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN,
wsaAction.getLocalPart()));
-
- List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
- if (paramOrder != null)
- {
- for (String name : paramOrder)
- {
- if (srcMessage.getPart(name) != null)
- destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name));
- }
- }
-
- WSDLInterfaceOperationInput rpcInput = new
WSDLInterfaceOperationInput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(paramOrder))
- {
- if (Constants.URI_STYLE_IRI == destOperation.getStyle())
- {
- WSDLInterfaceOperationInput destInput = new
WSDLInterfaceOperationInput(destOperation);
- QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
- destInput.setElement(elementName);
-
- //Lets remember the Message name
- destInput.setMessageName(srcMessage.getQName());
- destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_IN,
srcMessage.getQName().getLocalPart()));
-
- destInput.setPartName(srcPart.getName());
-
- destOperation.addInput(destInput);
- }
- else
- {
- // If we don't have a type then we aren't a valid RPC parameter
- // This could happen on a header element, in which case the
- // binding will pick it up
- QName xmlType = srcPart.getTypeName();
- if (xmlType != null)
- rpcInput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
- else
- messagePartToElementName(srcWsdl, srcPortType, srcOperation,
srcMessage, srcPart);
- }
- }
- if (Constants.URI_STYLE_RPC == destOperation.getStyle())
- {
- // This is really a place holder, but also the actual value used in
- // WSDL 2.0 RPC bindings
- rpcInput.setElement(destOperation.getQName());
- rpcInput.setMessageName(srcMessage.getQName());
- destOperation.addInput(rpcInput);
- }
- }
- }
-
- private void processOperationOutput(Definition srcWsdl, Operation srcOperation,
WSDLInterfaceOperation destOperation, PortType srcPortType)
- {
- Output srcOutput = srcOperation.getOutput();
- if (srcOutput == null)
- {
- destOperation.setPattern(Constants.WSDL20_PATTERN_IN_ONLY);
- return;
- }
-
- Message srcMessage = srcOutput.getMessage();
- log.trace("processOperationOutput: " + srcMessage.getQName());
-
- destOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
- QName wsaAction = (QName)
srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
- if (wsaAction != null)
- destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT,
wsaAction.getLocalPart()));
-
- List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
- if (paramOrder != null)
- {
- for (String name : paramOrder)
- {
- if (srcMessage.getPart(name) != null)
- {
- WSDLRPCSignatureItem item = destOperation.getRpcSignatureitem(name);
- if (item != null)
- item.setDirection(Direction.INOUT);
- else
- destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name,
Direction.OUT));
- }
- }
- }
-
- WSDLInterfaceOperationOutput rpcOutput = new
WSDLInterfaceOperationOutput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(null))
- {
- if (Constants.URI_STYLE_IRI == destOperation.getStyle())
- {
- WSDLInterfaceOperationOutput destOutput = new
WSDLInterfaceOperationOutput(destOperation);
-
- QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
- destOutput.setElement(elementName);
-
- // Lets remember the Message name
- destOutput.setMessageName(srcMessage.getQName());
- destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT, srcMessage.getQName()
- .getLocalPart()));
-
- // Remember the original part name
- destOutput.setPartName(srcPart.getName());
-
- destOperation.addOutput(destOutput);
- }
- else
- {
- // If we don't have a type then we aren't a valid RPC parameter
- // This could happen on a header element, in which case the
- // binding will pick it up
- QName xmlType = srcPart.getTypeName();
- if (xmlType != null)
- rpcOutput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
- else
- messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage,
srcPart);
- }
- }
-
- if (Constants.URI_STYLE_RPC == destOperation.getStyle())
- {
- // This is really a place holder, but also the actual value used in
- // WSDL 2.0 RPC bindings
- QName name = destOperation.getQName();
- rpcOutput.setElement(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
- rpcOutput.setMessageName(srcMessage.getQName());
- destOperation.addOutput(rpcOutput);
- }
- }
-
- private void processOperationFaults(Operation srcOperation, WSDLInterfaceOperation
destOperation, WSDLInterface destInterface)
- {
-
- Map faults = srcOperation.getFaults();
- Iterator itFaults = faults.values().iterator();
- while (itFaults.hasNext())
- {
- Fault srcFault = (Fault)itFaults.next();
- processOperationFault(destOperation, destInterface, srcFault);
- }
- }
-
- private void processOperationFault(WSDLInterfaceOperation destOperation, WSDLInterface
destInterface, Fault srcFault)
- {
- String faultName = srcFault.getName();
- log.trace("processOperationFault: " + faultName);
-
- WSDLInterfaceFault destFault = new WSDLInterfaceFault(destInterface);
- NCName ncName = new NCName(faultName);
- destFault.setName(ncName);
-
- Message message = srcFault.getMessage();
- QName messageName = message.getQName();
-
- Map partsMap = message.getParts();
- if (partsMap.size() != 1)
- throw new WSException("Unsupported number of fault parts in message "
+ messageName);
-
- Part part = (Part)partsMap.values().iterator().next();
- QName xmlName = part.getElementName();
-
- if (xmlName != null)
- {
- destFault.setElement(xmlName);
- }
- else
- {
- destFault.setElement(messageName);
- log.warn("Unsupported fault message part in message: " +
messageName);
- }
-
- WSDLInterfaceFault prevFault = destInterface.getFault(ncName);
- if (prevFault != null && prevFault.getName().equals(ncName) == false)
- throw new WSException("Fault name must be unique: " + faultName);
-
- // Add the fault to the interface
- destInterface.addFault(destFault);
-
- // Add the fault refererence to the operation
- WSDLInterfaceOperationOutfault opOutFault = new
WSDLInterfaceOperationOutfault(destOperation);
- opOutFault.setRef(new QName(destWsdl.getTargetNamespace(), faultName));
- destOperation.addOutfault(opOutFault);
- }
-
- /** Translate the message part name into an XML element name.
- */
- private QName messagePartToElementName(Definition srcWsdl, PortType srcPortType,
Operation srcOperation, Message srcMessage, Part srcPart)
- {
- // <part name="param" element="tns:SomeType" />
- QName xmlName = srcPart.getElementName();
-
- // <part name="param" type="xsd:string" />
- if (xmlName == null)
- xmlName = new QName(srcPart.getName());
-
- xmlName = destWsdl.registerQName(xmlName);
- String key = srcMessage.getQName() + "->" + srcPart.getName();
- messagePartToElementMap.put(key, xmlName);
-
- return xmlName;
- }
-
- private BindingOperation getBindingOperation(Definition srcWsdl, PortType srcPortType,
Operation srcOperation)
- {
- Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
-
- if (srcBinding == null)
- throw new WSException("Cannot find binding for: " +
srcPortType.getQName());
-
- String srcOperationName = srcOperation.getName();
- BindingOperation srcBindingOperation =
srcBinding.getBindingOperation(srcOperationName, null, null);
- if (srcBindingOperation == null)
- throw new WSException("Cannot find binding operation for: " +
srcOperationName);
- return srcBindingOperation;
- }
-
- private String getOperationStyle(Definition srcWsdl, PortType srcPortType, Operation
srcOperation)
- {
- Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
- BindingOperation srcBindingOperation = getBindingOperation(srcWsdl, srcPortType,
srcOperation);
-
- String operationStyle = null;
- List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPOperation)
- {
- SOAPOperation soapOp = (SOAPOperation)extElement;
- operationStyle = soapOp.getStyle();
- }
- else if (SOAP12_OPERATION.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- operationStyle = getOptionalAttribute(domElement, "style");
- }
- }
-
- if (operationStyle == null)
- {
- for (ExtensibilityElement extElement : (List<ExtensibilityElement>)
srcBinding.getExtensibilityElements())
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPBinding)
- {
- SOAPBinding soapBinding = (SOAPBinding) extElement;
- operationStyle = soapBinding.getStyle();
- }
- else if (SOAP12_BINDING.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)
extElement).getElement();
- operationStyle = getOptionalAttribute(domElement, "style");
- }
- }
- }
-
- return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC :
Constants.URI_STYLE_IRI;
- }
-
- private void processBinding(Definition srcWsdl, Binding srcBinding)
- {
- QName srcBindingQName = srcBinding.getQName();
- log.trace("processBinding: " + srcBindingQName);
-
- NCName ncName = new NCName(srcBindingQName);
- if (destWsdl.getBinding(ncName) == null)
- {
- PortType srcPortType = srcBinding.getPortType();
- if (srcPortType == null)
- throw new WSException("Cannot find port type for binding: " +
ncName);
-
- processPortType(srcWsdl, srcPortType);
-
- WSDLBinding destBinding = new WSDLBinding(destWsdl);
- destBinding.setQName(srcBindingQName);
- destBinding.setName(ncName);
- destBinding.setInterfaceName(srcPortType.getQName());
-
- String bindingStyle = Style.getDefaultStyle().toString();
- List<ExtensibilityElement> extList =
srcBinding.getExtensibilityElements();
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPBinding)
- {
- destBinding.setType(Constants.NS_SOAP11);
- SOAPBinding soapBinding = (SOAPBinding)extElement;
- bindingStyle = soapBinding.getStyle();
- }
- else if (SOAP12_BINDING.equals(elementType))
- {
- destBinding.setType(Constants.NS_SOAP12);
- Element domElement =
((UnknownExtensibilityElement)extElement).getElement();
- bindingStyle = getOptionalAttribute(domElement, "style");
- }
- }
- destWsdl.addBinding(destBinding);
- processBindingOperations(destBinding, srcBinding, bindingStyle);
- }
- }
-
- private Map<QName, Binding> getPortTypeBindings(Definition srcWsdl)
- {
- getAllDefinedBindings(srcWsdl);
- return portTypeBindings;
- }
-
- private Map<QName, Binding> getAllDefinedBindings(Definition srcWsdl)
- {
- if (allBindings != null)
- return allBindings;
-
- allBindings = new LinkedHashMap<QName, Binding>();
- portTypeBindings = new LinkedHashMap<QName, Binding>();
- Map srcBindings = srcWsdl.getBindings();
- Iterator itBinding = srcBindings.values().iterator();
- while (itBinding.hasNext())
- {
- Binding srcBinding = (Binding)itBinding.next();
- allBindings.put(srcBinding.getQName(), srcBinding);
- portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
- }
-
- // Bindings not available when pulled in through <wsdl:import>
- //
http://sourceforge.net/tracker/index.php?func=detail&aid=1240323&...
- Iterator itService = srcWsdl.getServices().values().iterator();
- while (itService.hasNext())
- {
- Service srcService = (Service)itService.next();
- Iterator itPort = srcService.getPorts().values().iterator();
- while (itPort.hasNext())
- {
- Port srcPort = (Port)itPort.next();
- Binding srcBinding = srcPort.getBinding();
- allBindings.put(srcBinding.getQName(), srcBinding);
- portTypeBindings.put(srcBinding.getPortType().getQName(), srcBinding);
- }
- }
-
- return allBindings;
- }
-
- private void processBindingOperations(WSDLBinding destBinding, Binding srcBinding,
String bindingStyle)
- {
- Iterator it = srcBinding.getBindingOperations().iterator();
- while (it.hasNext())
- {
- BindingOperation srcBindingOperation = (BindingOperation)it.next();
- processBindingOperation(destBinding, bindingStyle, srcBindingOperation);
- }
- }
-
- private void processBindingOperation(WSDLBinding destBinding, String bindingStyle,
BindingOperation srcBindingOperation)
- {
- String srcBindingName = srcBindingOperation.getName();
- log.trace("processBindingOperation: " + srcBindingName);
-
- WSDLInterface destInterface = destBinding.getInterface();
- String namespaceURI = destInterface.getQName().getNamespaceURI();
-
- WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
- QName refQName = new QName(namespaceURI, srcBindingName);
- destBindingOperation.setRef(refQName);
- destBinding.addOperation(destBindingOperation);
-
- String opName = srcBindingName;
- WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(new
NCName(opName));
-
- // Process soap:operation@soapAction, soap:operation@style
- List<ExtensibilityElement> extList =
srcBindingOperation.getExtensibilityElements();
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPOperation)
- {
- SOAPOperation soapOp = (SOAPOperation)extElement;
- destBindingOperation.setSOAPAction(soapOp.getSoapActionURI());
- }
- else if (SOAP12_OPERATION.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- destBindingOperation.setSOAPAction(getOptionalAttribute(domElement,
"soapAction"));
- }
- }
-
- BindingInput srcBindingInput = srcBindingOperation.getBindingInput();
- if (srcBindingInput != null)
- {
- processBindingInput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingInput);
- }
-
- BindingOutput srcBindingOutput = srcBindingOperation.getBindingOutput();
- if (srcBindingOutput != null)
- {
- processBindingOutput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingOutput);
- }
- }
-
- interface ReferenceCallback
- {
- void removeReference(QName element);
- void removeRPCPart(String partName);
- QName getXmlType(String partName);
- }
-
- private void processBindingInput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingInput srcBindingInput)
- {
- log.trace("processBindingInput");
-
- QName soap11Body = new QName(Constants.NS_SOAP11, "body");
- List<ExtensibilityElement> extList =
srcBindingInput.getExtensibilityElements();
- WSDLBindingOperationInput input = new
WSDLBindingOperationInput(destBindingOperation);
- destBindingOperation.addInput(input);
-
- ReferenceCallback cb = new ReferenceCallback()
- {
- public QName getXmlType(String partName)
- {
- return
srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName();
- }
-
- public void removeReference(QName element)
- {
- WSDLInterfaceOperationInput destIntfInput =
destIntfOperation.getInput(element);
- if (destIntfInput == null)
- destIntfOperation.removeInput(element);
- }
-
- public void removeRPCPart(String partName)
- {
- WSDLInterfaceOperationInput operationInput =
destIntfOperation.getInput(destIntfOperation.getQName());
- operationInput.removeChildPart(partName);
- }
- };
-
- processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, input, cb);
- }
-
- private void processBindingOutput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingOutput srcBindingOutput)
- {
- log.trace("processBindingInput");
-
- QName soap11Body = new QName(Constants.NS_SOAP11, "body");
- List<ExtensibilityElement> extList =
srcBindingOutput.getExtensibilityElements();
- WSDLBindingOperationOutput output = new
WSDLBindingOperationOutput(destBindingOperation);
- destBindingOperation.addOutput(output);
-
- ReferenceCallback cb = new ReferenceCallback()
- {
- public QName getXmlType(String partName)
- {
- return
srcBindingOperation.getOperation().getOutput().getMessage().getPart(partName).getTypeName();
- }
-
- public void removeReference(QName element)
- {
- WSDLInterfaceOperationOutput destIntfOutput =
destIntfOperation.getOutput(element);
- if (destIntfOutput == null)
- destIntfOperation.removeInput(element);
- }
-
- public void removeRPCPart(String partName)
- {
- QName name = destIntfOperation.getQName();
- WSDLInterfaceOperationOutput operationOutput =
destIntfOperation.getOutput(new QName(name.getNamespaceURI(), name.getLocalPart() +
"Response"));
- operationOutput.removeChildPart(partName);
- }
- };
-
- processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, output, cb);
- }
-
-
- private void processBindingReference(WSDLBindingOperation destBindingOperation,
WSDLInterfaceOperation destIntfOperation,
- QName soap11Body, List<ExtensibilityElement> extList,
WSDLBindingMessageReference reference, ReferenceCallback callback)
- {
- for (ExtensibilityElement extElement : extList)
- {
- QName elementType = extElement.getElementType();
- if (soap11Body.equals(elementType) || SOAP12_BODY.equals(elementType))
- {
- processEncodingStyle(extElement, destBindingOperation);
- }
- else if (extElement instanceof SOAPHeader)
- {
- SOAPHeader header = (SOAPHeader)extElement;
- QName messageQName = header.getMessage();
- String partName = header.getPart();
-
- String key = messageQName + "->" + partName;
- QName elementName = (QName)messagePartToElementMap.get(key);
- if (elementName == null)
- throw new WSException("Could not determine element name from header:
" + partName);
-
- reference.addSoapHeader(new WSDLSOAPHeader(elementName, partName));
- if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
- {
- callback.removeReference(elementName);
- }
- else
- {
- // Just in case
- callback.removeRPCPart(partName);
- }
- }
- else if (extElement instanceof MIMEMultipartRelated)
- {
- MIMEMultipartRelated related = (MIMEMultipartRelated)extElement;
- Iterator i = related.getMIMEParts().iterator();
- while (i.hasNext())
- {
- MIMEPart part = (MIMEPart)i.next();
- Iterator j = part.getExtensibilityElements().iterator();
- String name = null;
- String types = null;
-
- while (j.hasNext())
- {
- ExtensibilityElement inner = (ExtensibilityElement)j.next();
- if (inner instanceof MIMEContent)
- {
- MIMEContent content = (MIMEContent)inner;
- name = content.getPart();
- if (types == null)
- {
- types = content.getType();
- }
- else
- {
- types += "," + content.getType();
- }
- }
- }
-
- // Found content types in this part
- if (name != null)
- {
- QName xmlType = callback.getXmlType(name);
- reference.addMimePart(new WSDLMIMEPart(name, xmlType, types));
- if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
- {
- // A mime part must be defined as <part type="">
- callback.removeReference(new QName(name));
- }
- else
- {
- callback.removeRPCPart(name);
- }
- }
- }
- }
- }
- }
-
-
- private void processEncodingStyle(ExtensibilityElement extElement,
WSDLBindingOperation destBindingOperation)
- {
- log.trace("processEncodingStyle");
-
- String encStyle = null;
- QName elementType = extElement.getElementType();
- if (extElement instanceof SOAPBody)
- {
- SOAPBody body = (SOAPBody)extElement;
- List encStyleList = body.getEncodingStyles();
- if (encStyleList != null)
- {
- if (encStyleList.size() > 1)
- log.warn("Multiple encoding styles not supported: " +
encStyleList);
-
- if (encStyleList.size() > 0)
- {
- encStyle = (String)encStyleList.get(0);
- }
- }
- }
- else if (SOAP12_BODY.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- encStyle = getOptionalAttribute(domElement, "encodingStyle");
- }
-
- if (encStyle != null)
- {
- String setStyle = destBindingOperation.getEncodingStyle();
- if (encStyle.equals(setStyle) == false)
- log.warn("Encoding style '" + encStyle + "' not
supported for: " + destBindingOperation.getRef());
-
- destBindingOperation.setEncodingStyle(encStyle);
- }
- }
-
- private void processServices(Definition srcWsdl)
- {
- log.trace("BEGIN processServices: " + srcWsdl.getDocumentBaseURI());
-
- // Each definition needs a clear binding cache
- allBindings = null;
-
- if (srcWsdl.getServices().size() > 0)
- {
- Iterator it = srcWsdl.getServices().values().iterator();
- while (it.hasNext())
- {
- Service srcService = (Service)it.next();
- QName qname = srcService.getQName();
- WSDLService destService = new WSDLService(destWsdl);
- destService.setName(new NCName(qname));
- destService.setQName(qname);
- destWsdl.addService(destService);
- processPorts(srcWsdl, destService, srcService);
- }
- }
- else
- {
- log.trace("Empty wsdl services, processing imports");
- Iterator it = srcWsdl.getImports().values().iterator();
- while (it.hasNext())
- {
- List<Import> srcImports = (List<Import>)it.next();
- for (Import srcImport : srcImports)
- {
- Definition importDefinition = srcImport.getDefinition();
- processServices(importDefinition);
- }
- }
-
- // The binding cache must be clear after imports, so that undefined bindings can
be located
- allBindings = null;
- }
-
- log.trace("END processServices: " + srcWsdl.getDocumentBaseURI());
- }
-
- private void processPorts(Definition srcWsdl, WSDLService destService, Service
srcService)
- {
- Iterator it = srcService.getPorts().values().iterator();
- while (it.hasNext())
- {
- Port srcPort = (Port)it.next();
- processPort(srcWsdl, destService, srcPort);
- }
- }
-
- private void processPort(Definition srcWsdl, WSDLService destService, Port srcPort)
- {
- log.trace("processPort: " + srcPort.getName());
-
- Binding srcBinding = srcPort.getBinding();
-
- WSDLEndpoint destEndpoint = new WSDLEndpoint(destService);
- destEndpoint.setName(new NCName(srcPort.getName()));
- destEndpoint.setBinding(srcBinding.getQName());
- destEndpoint.setQName(new QName(srcWsdl.getTargetNamespace(), srcPort.getName()));
- destEndpoint.setAddress(getSOAPAddress(srcPort));
- destService.addEndpoint(destEndpoint);
-
- processBinding(srcWsdl, srcBinding);
- }
-
- /** Get the endpoint address from the ports extensible element
- */
- private String getSOAPAddress(Port srcPort)
- {
- String soapAddress = "dummy";
-
- Iterator it = srcPort.getExtensibilityElements().iterator();
- while (it.hasNext())
- {
- ExtensibilityElement extElement = (ExtensibilityElement)it.next();
- QName elementType = extElement.getElementType();
-
- if (extElement instanceof SOAPAddress)
- {
- SOAPAddress addr = (SOAPAddress)extElement;
- soapAddress = addr.getLocationURI();
- break;
- }
- else if (SOAP12_ADDRESS.equals(elementType))
- {
- Element domElement = ((UnknownExtensibilityElement)extElement).getElement();
- soapAddress = getOptionalAttribute(domElement, "location");
- break;
- }
- else if ("address".equals(elementType.getLocalPart()))
- {
- log.warn("Unprocessed extension element: " + elementType);
- }
- }
-
- if (soapAddress == null)
- throw new WSException("Cannot obtain SOAP address");
-
- return soapAddress;
- }
-
- private String getOptionalAttribute(Element domElement, String attrName)
- {
- String attrValue = domElement.getAttribute(attrName);
- return (attrValue.length() > 0 ? attrValue : null);
- }
-}
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Writer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Writer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL11Writer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,519 +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.core.metadata.wsdl;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.wsdl.Definition;
-import javax.wsdl.WSDLException;
-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.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.core.metadata.wsdl.WSDLRPCSignatureItem.Direction;
-import org.w3c.dom.Element;
-
-/**
- * A WSDL Writer that writes a WSDL 1.1 file. It works off
- * of the WSDL20 Object Graph.
- * @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
- */
-public class WSDL11Writer extends WSDLWriter
-{
- //Used Internally
- private String wsdlStyle = Constants.RPC_LITERAL;
-
- // Used to prevent duplicates
- private HashSet<String> writtenFaultMessages = new HashSet<String>();
-
- /** Use WSDLDefinitions.writeWSDL instead. */
- public WSDL11Writer(WSDLDefinitions wsdl)
- {
- super(wsdl);
- }
-
- public void write(Writer writer) throws IOException
- {
- write(writer, null);
- }
-
-
- public void write(Writer writer, String charset) throws IOException
- {
- write(writer, charset, null);
- }
-
- public void write(Writer writer, String charset, WriterResolver resolver) throws
IOException
- {
- // Write out the wsdl-1.1 represention (only path to obtain is from WSDL11Reader)
- if (wsdl.getWsdlOneOneDefinition() != null)
- {
- Definition wsdlDefinition = wsdl.getWsdlOneOneDefinition();
- try
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- javax.wsdl.xml.WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter();
- wsdlWriter.writeWSDL(wsdlDefinition, writer);
- }
- catch (WSDLException e)
- {
- this.logException(e);
- throw new IOException(e.toString());
- }
- }
- else
- {
- StringBuilder buffer = new StringBuilder();
-
- //Detect the WSDL Style early
- wsdlStyle = utils.getWSDLStyle(wsdl);
-
- StringBuilder importBuffer = new StringBuilder();
- for (WSDLImport wsdlImport : wsdl.getImports())
- {
- if (resolver == null)
- continue;
-
- ResolvedWriter resolved = resolver.resolve(wsdlImport.getLocation());
- if (resolved == null)
- continue;
-
- String namespace = wsdlImport.getNamespace();
- importBuffer.append("<import namespace='" + namespace +
"' location='" + resolved.actualFile + "'/>");
- if (resolved != null)
- {
- StringBuilder builder = new StringBuilder();
-
- appendDefinitions(builder, namespace);
- appendBody(builder, namespace);
- writeBuilder(builder, resolved.writer, resolved.charset);
- resolved.writer.close();
- }
- }
-
- appendDefinitions(buffer, wsdl.getTargetNamespace());
- if (importBuffer.length() > 0)
- buffer.append(importBuffer);
-
- appendBody(buffer, wsdl.getTargetNamespace());
- writeBuilder(buffer, writer, charset);
- }
- }
-
- private void writeBuilder(StringBuilder builder, Writer writer, String charset) throws
IOException
- {
- Element element = DOMUtils.parse(builder.toString());
-
- if (charset != null)
- writer.write("<?xml version=\"1.0\" encoding=\"" +
charset + "\"?>\n");
- new DOMWriter(writer).setPrettyprint(true).print(element);
- }
-
- protected void appendBody(StringBuilder builder, String namespace)
- {
- writtenFaultMessages.clear();
-
- appendTypes(builder, namespace);
- appendMessages(builder, namespace);
- appendInterfaces(builder, namespace);
- appendBindings(builder, namespace);
- appendServices(builder, namespace);
- builder.append("</definitions>");
- }
-
- protected void appendMessages(StringBuilder buffer, String namespace)
- {
- WSDLInterface[] interfaces = wsdl.getInterfaces();
- int len = interfaces != null ? interfaces.length : 0;
- for (int i = 0; i < len; i++)
- {
- WSDLInterface intf = interfaces[i];
- if (! namespace.equals(intf.getQName().getNamespaceURI()))
- continue;
-
- WSDLInterfaceOperation[] operations = intf.getSortedOperations();
- int lenOps = operations.length;
- for (int j = 0; j < lenOps; j++)
- {
- appendMessage(buffer, operations[j]);
- appendMessagesForExceptions(buffer, operations[j]);
- }
- }
- }
-
- private void appendMessage(StringBuilder buffer, WSDLInterfaceOperation operation)
- {
- String opname = operation.getName().toString();
- //Determine the style of the wsdl
- if (Constants.URI_STYLE_RPC.equals(operation.getStyle()) == false)
- wsdlStyle = Constants.DOCUMENT_LITERAL; //Not RPC/Literal
-
- String interfaceName = operation.getWsdlInterface().getName().toString();
- buffer.append("<message name='" + interfaceName + "_" +
opname + "' >");
- for (WSDLInterfaceOperationInput input : operation.getInputs())
- appendMessageParts(buffer, input);
- buffer.append("</message>");
-
- if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
- {
- buffer.append("<message name='" + interfaceName + "_"
+ opname + "Response' >");
- WSDLInterfaceOperationOutput[] outputs = operation.getOutputs();
- for (WSDLInterfaceOperationOutput output : outputs)
- appendMessageParts(buffer, output);
- buffer.append("</message>");
- }
- }
-
- private void appendMessagesForExceptions(StringBuilder buffer, WSDLInterfaceOperation
operation)
- {
- //Get the outfaults
- WSDLInterfaceOperationOutfault[] faults = operation.getOutfaults();
- int len = faults != null ? faults.length : 0;
-
- for (int i = 0; i < len; i++)
- {
- WSDLInterfaceOperationOutfault fault = faults[i];
- String exceptionName = fault.getRef().getLocalPart();
- if (writtenFaultMessages.contains(exceptionName))
- continue;
-
- WSDLInterfaceFault interfaceFault = operation.getWsdlInterface().getFault(new
NCName(exceptionName));
- QName xmlName = interfaceFault.getElement();
-
- buffer.append("<message name='" + exceptionName + "'
>");
- String prefix = wsdl.getPrefix(xmlName.getNamespaceURI());
- String xmlNameStr = prefix + ":" + xmlName.getLocalPart();
- buffer.append("<part name='" + exceptionName + "'
element='" + xmlNameStr + "' />");
- buffer.append("</message>");
-
- writtenFaultMessages.add(exceptionName);
- }
- }
-
- private String getReferenceString(QName name)
- {
- String namespaceURI = name.getNamespaceURI();
- String prefix = wsdl.getPrefix(namespaceURI);
- if (prefix == null)
- throw new WSException("Prefix not bound for namespace: " +
namespaceURI);
-
- return prefix + ":" + name.getLocalPart();
- }
-
- private void appendMessageParts(StringBuilder buffer, WSDLInterfaceMessageReference
reference)
- {
- if (wsdlStyle.equals(Constants.RPC_LITERAL))
- {
- for (WSDLRPCPart part : reference.getChildParts())
- {
- buffer.append("<part name='" +
part.getName()).append('\'');
- buffer.append(" type='" + getReferenceString(part.getType()) +
"'/>");
- }
- }
- else
- {
- QName element = reference.getElement();
- // Null represents empty message
- if (element != null)
- {
- buffer.append("<part name='" + reference.getPartName() +
'\'');
- buffer.append(" element='" + getReferenceString(element) +
"'/>");
- }
- }
-
- WSDLBindingMessageReference bindingReference = getBindingReference(reference);
- if (bindingReference == null)
- return;
-
- for (WSDLSOAPHeader header : bindingReference.getSoapHeaders())
- {
- if (header.isIncludeInSignature());
- {
- QName element = header.getElement();
- buffer.append("<part name='" + header.getPartName() +
'\'');
- buffer.append(" element='" + getReferenceString(element) +
"'/>");
- }
- }
- }
-
- private WSDLBindingMessageReference getBindingReference(WSDLInterfaceMessageReference
reference)
- {
- WSDLInterfaceOperation operation = reference.getWsdlOperation();
- WSDLInterface wsdlInterface = operation.getWsdlInterface();
- WSDLBinding binding =
wsdlInterface.getWsdlDefinitions().getBindingByInterfaceName(wsdlInterface.getQName());
- WSDLBindingOperation bindingOperation =
binding.getOperationByRef(operation.getQName());
- WSDLBindingMessageReference[] bindingReferences;
-
- if (reference instanceof WSDLInterfaceOperationInput)
- bindingReferences = bindingOperation.getInputs();
- else
- bindingReferences = bindingOperation.getOutputs();
-
- if (bindingReferences.length > 1)
- throw new IllegalArgumentException("WSDl 1.1 only supports In-Only, and
In-Out MEPS, more than reference input found");
-
- if (bindingReferences.length == 1)
- return bindingReferences[0];
-
- return null;
- }
-
- protected void appendInterfaces(StringBuilder buffer, String namespace)
- {
- WSDLInterface[] intfs = wsdl.getInterfaces();
- for (int i = 0; i < intfs.length; i++)
- {
- WSDLInterface intf = intfs[i];
- if (!namespace.equals(intf.getQName().getNamespaceURI()))
- continue;
-
- buffer.append("<portType name='" + intf.getName() +
"'>");
- appendPortOperations(buffer, intf);
- buffer.append("</portType>");
- }
- }
-
- private String getParameterOrder(WSDLInterfaceOperation operation)
- {
- StringBuilder builder = new StringBuilder();
- for (WSDLRPCSignatureItem item : operation.getRpcSignatureItems())
- {
- if (item.getDirection() != Direction.RETURN)
- {
- if (builder.length() > 0)
- builder.append(' ');
- builder.append(item.getName());
- }
- }
-
- return builder.toString();
- }
-
- protected void appendPortOperations(StringBuilder buffer, WSDLInterface intf)
- {
- String prefix = wsdl.getPrefix(intf.getQName().getNamespaceURI());
- WSDLInterfaceOperation[] operations = intf.getSortedOperations();
- for (int i = 0; i < operations.length; i++)
- {
- WSDLInterfaceOperation operation = operations[i];
- buffer.append("<operation name='" +
operation.getName().toString() + "'");
-
- String parameterOrder = getParameterOrder(operation);
- if (parameterOrder.length() > 0)
- buffer.append("
parameterOrder='").append(parameterOrder).append("'");
- buffer.append(">");
-
- String opname = operation.getName().toString();
- String interfaceName = operation.getWsdlInterface().getName().toString();
- String msgEl = prefix + ":" + interfaceName + "_" + opname;
-
- buffer.append("<input message='" + msgEl +
"'>").append("</input>");
-
- if (! Constants.WSDL20_PATTERN_IN_ONLY.equals(operation.getPattern()))
- {
- buffer.append("<output message='" + msgEl +
"Response'>");
- buffer.append("</output>");
- }
-
- //Append the Faults
- for (WSDLInterfaceOperationOutfault fault : operation.getOutfaults())
- {
- QName element = fault.getRef();
- buffer.append("<fault message='" +
utils.getFormattedString(element));
- buffer.append("' name='" + element.getLocalPart() +
"'/>");
- }
-
- buffer.append("</operation>");
- }
- }
-
- protected void appendBindings(StringBuilder buffer, String namespace)
- {
- WSDLBinding[] bindings = wsdl.getBindings();
- for (int i = 0; i < bindings.length; i++)
- {
- WSDLBinding binding = bindings[i];
- if (!namespace.equals(binding.getQName().getNamespaceURI()))
- continue;
- buffer.append("<binding name='" + binding.getName() +
"' type='" + getQNameRef(binding.getInterfaceName()) +
"'>");
- //TODO:Need to derive the WSDLStyle from the Style attribute of
InterfaceOperation
- if (wsdlStyle == null)
- throw new IllegalArgumentException("WSDL Style is null (should be rpc or
document");
- String style = "rpc";
- if (wsdlStyle.equals(Constants.DOCUMENT_LITERAL))
- style = "document";
- buffer.append("<" + soapPrefix + ":binding
transport='http://schemas.xmlsoap.org/soap/http' style='" + style +
"'/>");
- appendBindingOperations(buffer, binding);
- buffer.append("</binding>");
- }
- }
-
- protected void appendBindingOperations(StringBuilder buffer, WSDLBinding binding)
- {
- WSDLBindingOperation[] operations = binding.getOperations();
- Arrays.sort(operations);
-
- for (int i = 0; i < operations.length; i++)
- {
- WSDLBindingOperation operation = operations[i];
- String interfaceName =
operation.getWsdlBinding().getInterfaceName().getLocalPart();
-
- WSDLInterface wsdlInterface = wsdl.getInterface(new NCName(interfaceName));
- if (wsdlInterface == null)
- throw new WSException("WSDL Interface should not be null");
- WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
-
- buffer.append("<operation name='" +
interfaceOperation.getName() + "'>");
- String soapAction = (operation.getSOAPAction() != null ?
operation.getSOAPAction() : "");
- buffer.append("<" + soapPrefix + ":operation
soapAction=\"" + soapAction + "\"/>");
-
- WSDLBindingOperationInput[] inputs = operation.getInputs();
- if (inputs.length != 1)
- throw new WSException("WSDl 1.1 only supports In-Only, and In-Out
MEPS.");
-
- buffer.append("<input>");
- appendSOAPBinding(buffer, wsdlInterface, operation, inputs);
- buffer.append("</input>");
-
- if (!
Constants.WSDL20_PATTERN_IN_ONLY.equals(getBindingOperationPattern(operation)))
- {
- buffer.append("<output>");
- WSDLBindingOperationOutput[] outputs = operation.getOutputs();
- appendSOAPBinding(buffer, wsdlInterface, operation, outputs);
- buffer.append("</output>");
- }
-
- //Append faults
- WSDLInterfaceOperationOutfault[] faults = interfaceOperation.getOutfaults();
- if (faults != null)
- {
- for (WSDLInterfaceOperationOutfault fault : faults)
- {
- String n = "name='" + fault.getRef().getLocalPart() +
"'";
- buffer.append("<fault " + n + ">");
- buffer.append("<" + soapPrefix + ":fault " + n +
" use='literal' />");
- buffer.append("</fault>");
- }
- buffer.append("</operation>");
- }
- }
- }
-
- private void appendSOAPBinding(StringBuilder buffer, WSDLInterface wsdlInterface,
WSDLBindingOperation operation, WSDLBindingMessageReference[] inputs)
- {
- String tns = wsdl.getTargetNamespace();
- WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(new
NCName(operation.getRef().getLocalPart()));
- WSDLInterfaceMessageReference reference = (inputs instanceof
WSDLBindingOperationInput[]) ? interfaceOperation.getInputs()[0]
- : interfaceOperation.getOutputs()[0];
-
- StringBuilder bodyParts = new StringBuilder();
- if (Constants.DOCUMENT_LITERAL == wsdlStyle)
- {
- bodyParts.append(reference.getPartName());
- }
- else
- {
- for (WSDLRPCPart part : reference.getChildParts())
- {
- if (bodyParts.length() > 0)
- bodyParts.append(" ");
- bodyParts.append(part.getName());
- }
- }
-
- StringBuilder soapHeader = new StringBuilder();
- for (WSDLSOAPHeader header : inputs[0].getSoapHeaders())
- {
- if (header.isIncludeInSignature())
- {
- String messageName = wsdlInterface.getName() + "_" +
operation.getRef().getLocalPart();
- if (reference instanceof WSDLInterfaceOperationOutput)
- messageName += "Response";
- soapHeader.append("<").append(soapPrefix).append(":header
use='literal' message='tns:").append(messageName);
- soapHeader.append("'
part='").append(header.getElement().getLocalPart()).append("'/>");
- }
- }
-
- buffer.append("<" + soapPrefix + ":body
use='literal'");
- if (wsdlStyle != Constants.DOCUMENT_LITERAL)
- buffer.append(" namespace='" + tns + "'");
- if (soapHeader.length() > 0)
- {
- buffer.append("
parts='").append(bodyParts).append("'/>");
- buffer.append(soapHeader);
- }
- else
- {
- buffer.append("/>");
- }
- }
-
- private String getBindingOperationPattern(WSDLBindingOperation operation)
- {
- WSDLBinding binding = operation.getWsdlBinding();
- String pattern = binding.getInterface().getOperation(new
NCName(operation.getRef().getLocalPart())).getPattern();
-
- return pattern;
- }
-
- protected void appendServices(StringBuilder buffer, String namespace)
- {
- WSDLService[] services = wsdl.getServices();
- int len = services.length;
- for (int i = 0; i < len; i++)
- {
-
- WSDLService service = services[i];
- if (!namespace.equals(service.getQName().getNamespaceURI()))
- continue;
- buffer.append("<service name='" + service.getName() +
"'>");
- WSDLEndpoint[] endpoints = service.getEndpoints();
- int lenend = endpoints.length;
- for (int j = 0; j < lenend; j++)
- {
- WSDLEndpoint endpoint = endpoints[j];
- appendServicePort(buffer, endpoint);
- }
-
- buffer.append("</service>");
- }
- }
-
- protected void appendServicePort(StringBuilder buffer, WSDLEndpoint endpoint)
- {
- String name = endpoint.getName().toString();
- QName endpointBinding = endpoint.getBinding();
- String prefix = endpointBinding.getPrefix();
- prefix = wsdl.getPrefix(endpointBinding.getNamespaceURI());
- String ebname = prefix + ":" + endpointBinding.getLocalPart();
- buffer.append("<port name='" + name + "'
binding='" + ebname + "'>");
- buffer.append("<" + soapPrefix + ":address location='" +
endpoint.getAddress() + "'/>");
- buffer.append("</port>");
- }
-}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Reader.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Reader.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Reader.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,557 +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.core.metadata.wsdl;
-
-// $Id$
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-
-import javax.wsdl.xml.WSDLLocator;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
-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;
-import org.xml.sax.InputSource;
-
-/**
- * A factory that creates a WSDL <code>Definition</code> from an URL.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 10-Oct-2004
- */
-public class WSDL20Reader implements ObjectModelFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDL20Reader.class);
-
- private WSDLLocator locator = null;
-
- public WSDLDefinitions readWSDL(WSDLLocator wsdlLocator) throws WSDLException,
IOException
- {
- locator = wsdlLocator;
-
- String wsdlURI = wsdlLocator.getBaseURI();
- InputSource inputSource = wsdlLocator.getBaseInputSource();
- if (inputSource == null)
- throw new WSException("Cannot obtain WSDL input source for: " +
wsdlURI);
-
- InputStream is = inputSource.getByteStream();
- try
- {
- Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
- unmarshaller.setNamespaceAware(true);
- unmarshaller.setValidation(true);
-
- WSDLDefinitions wsdl = new WSDLDefinitions();
- wsdl.setWsdlNamespace(Constants.NS_WSDL20);
-
- unmarshaller.unmarshal(is, this, wsdl);
- return wsdl;
- }
- catch (RuntimeException re)
- {
- throw re;
- }
- catch (Exception e)
- {
- throw new WSDLException("Cannot unmarshal: " + wsdlURI, e);
- }
- finally
- {
- is.close();
- }
- }
-
- public void setFeature(String name, boolean value)
- {
- }
-
- /**
- * This method is called by the object model factory and returns the root of the
object graph.
- */
- public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- /**
- * WSDL2.0 Assertions (
http://www.w3.org/TR/wsdl20-primer)
- * The value of the WSDL target namespace MUST be an absolute URI.
- */
- WSDLDefinitions wsdl = null;
-
- StringBuilder buf = null;
-
- if (root instanceof WSDLDefinitions)
- {
- wsdl = (WSDLDefinitions)root;
-
- String targetNamespace = attrs.getValue("targetNamespace");
- boolean abs = (targetNamespace.startsWith("http"));
- if (targetNamespace == null || abs == false)
- throw new RuntimeException("WSDL 2.0 Assertion: targetNamespace must be
an absolute uri");
-
- wsdl.setWsdlNamespace(Constants.NS_WSDL20);
- wsdl.setTargetNamespace(targetNamespace);
-
- Iterator uris = navigator.getNamespaceURIs();
- while (uris.hasNext())
- {
- String namespace = (String)uris.next();
- String prefix = navigator.getNamespaceContext().getPrefix(namespace);
- if (prefix.length() > 0)
- wsdl.registerNamespaceURI(namespace, prefix);
- }
- return wsdl;
- }
- else if (root instanceof WSDLTypes)
- {
- wsdl = ((WSDLTypes)root).getWsdlDefinitions();
- if ("import".equalsIgnoreCase(localName))
- {
- importTypes(wsdl, attrs);
- return null;
- }
- if ("schema".equalsIgnoreCase(localName))
- {
- //Included Schema - wsdl 2.0
- //We will start writing whatever the parser has obtained
- buf = new StringBuilder("<schema ");
- Iterator uris = navigator.getNamespaceURIs();
- String targetNS = attrs.getValue("targetNamespace");
- buf.append(" targetNamespace='" + targetNS +
"'");
- while (uris.hasNext())
- {
- String namespace = (String)uris.next();
- Iterator iter = navigator.getNamespaceContext().getPrefixes(namespace);
- if (namespace.equals(Constants.NS_WSDL20))
- continue;
- if (iter == null)
- buf.append(" xmlns='" + namespace + "'");
- else
- {
- while (iter.hasNext())
- {
- String prefix = (String)iter.next();
- if (prefix.length() == 0)
- buf.append(" xmlns='" + namespace +
"'");
- else buf.append(" xmlns:" + prefix + "='" +
namespace + "'");
- }
- }
- }
- buf.append(">");
- return buf;
- }
- }
- else if (root instanceof StringBuilder)
- {
- return newChild((StringBuilder)root, navigator, namespaceURI, localName,
attrs);
- }
- else
- {
- throw new IllegalArgumentException("Invalid root for namespace: " +
namespaceURI);
- }
-
- return null;
- }
-
- /**
- * This method is called by the object model factory and returns the root of the
object graph.
- */
- public Object newChild(WSDLTypes types, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- /**
- * WSDL2.0 Assertions (
http://www.w3.org/TR/wsdl20-primer)
- * The value of the WSDL target namespace MUST be an absolute URI.
- */
- WSDLDefinitions wsdl = types.getWsdlDefinitions();
-
- StringBuilder buf = null;
- if ("import".equalsIgnoreCase(localName))
- {
- importTypes(wsdl, attrs);
- return null;
- }
- if ("schema".equalsIgnoreCase(localName))
- {
- //Included Schema - wsdl 2.0
- //We will start writing whatever the parser has obtained
- buf = new StringBuilder("<schema ");
- Iterator uris = navigator.getNamespaceURIs();
- String targetNS = attrs.getValue("targetNamespace");
- buf.append(" targetNamespace='" + targetNS + "'");
- while (uris.hasNext())
- {
- String namespace = (String)uris.next();
- Iterator iter = navigator.getNamespaceContext().getPrefixes(namespace);
- if (namespace.equals(Constants.NS_WSDL20))
- continue;
- if (iter == null)
- buf.append(" xmlns='" + namespace + "'");
- else
- {
- while (iter.hasNext())
- {
- String prefix = (String)iter.next();
- if (prefix.length() == 0)
- buf.append(" xmlns='" + namespace +
"'");
- else buf.append(" xmlns:" + prefix + "='" +
namespace + "'");
- }
- }
- }
- buf.append(">");
- return buf;
- }
-
- return null;
- }
-
- /**
- * The JBossXB has completed the parsing of the WSDL 2.0 document
- * @param root
- * @param ctx
- * @param uri
- * @param name
- * @return
- */
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
- {
- return root;
- }
-
- /**
- * Used in the parsing of the included XML Schema in WSDL 2.0
- * @param buf
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @param attrs
- * @return
- */
- public Object newChild(StringBuilder buf, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- int len = attrs.getLength();
- buf.append("<" + localName);
- for (int i = 0; i < len; i++)
- {
- String val = attrs.getValue(i);
- String attrname = attrs.getLocalName(i);
- buf.append(" " + attrname + "='" + val +
"'");
- }
- buf.append(">");
- return buf;
- }
-
- /**
- * Used in the parsing of the included XML Schema in WSDL 2.0
- * We have reached the end of an xml element.
- * @param buf
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @return
- */
- public Object addChild(StringBuilder buf, StringBuilder buf1, UnmarshallingContext
navigator, String namespaceURI, String localName) throws WSDLException
- {
- buf.append("</" + localName + ">");
- return buf;
-
- }
-
- /**
- * Used in the parsing of the included XML Schema in WSDL 2.0
- * We have parsed the schema completely. Write it into a file and update WSDLTypes
(schemaLocation)
- * @param types
- * @param buf
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @return
- * @throws WSDLException
- */
- public Object addChild(WSDLTypes types, StringBuilder buf, UnmarshallingContext
navigator, String namespaceURI, String localName) throws WSDLException
- {
- buf.append("</schema>");
- String targetNS = types.getWsdlDefinitions().getTargetNamespace();
- try
- {
- File file = SchemaUtils.getSchemaTempFile(targetNS);
- file.deleteOnExit();
- FileWriter fwrite = new FileWriter(file);
- fwrite.write(buf.toString());
- fwrite.flush();
- fwrite.close();
- }
- catch (IOException e)
- {
- String msg = "Cannot extract schema definition for target namespace: "
+ targetNS;
- log.error(msg, e);
- throw new WSException(msg);
- }
- return types;
- }
-
- /**
- * Parsing the WSDL 2.0 document
- * @param wsdl20
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @param attrs
- * @return
- * @throws WSDLException
- */
- public Object newChild(WSDLDefinitions wsdl20, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs) throws WSDLException
- {
- /**
- * WSDL 20 Assertions
- * Each interface must be given a name that is unique within the set of interfaces
defined in this WSDL target NS
- * Interface names are tokens that must not contain a space or colon
(":")
- */
- String defaultNamespace = wsdl20.getWsdlNamespace();
- if (Constants.NS_WSDL20.equals(defaultNamespace))
- {
- if ("types".equals(localName))
- {
- WSDLTypes wsdlTypes = new XSModelTypes();
- wsdl20.setWsdlTypes(wsdlTypes);
- return wsdlTypes;
- }
- else if ("interface".equals(localName))
- {
- WSDLInterface wsdlInterface = new WSDLInterface(wsdl20);
- String name = attrs.getValue("name");
- if (name == null)
- throw new RuntimeException("Interface name should not be
null");
- if (name.indexOf(" ") > -1 || name.indexOf(":") >
-1)
- throw new RuntimeException("WSDL 2.0 Assertion:Interface names are
tokens " + "that must not contain a space or colon");
-
- NCName ncname = new NCName(name);
- if (wsdl20.getInterface(ncname) != null)
- throw new RuntimeException("WSDL 2.0 Assertion:Each interface must be
given a name that is "
- + "unique within the set of interfaces defined in this WSDL
target namespace");
-
- wsdlInterface.setName(ncname);
- wsdl20.addInterface(wsdlInterface);
-
- return wsdlInterface;
- }
- else if ("binding".equals(localName))
- {
- /**
- * WSDL 2.0 Assertion: Each name must be unique among all bindings in this
WSDL target namespace
- */
- String name = attrs.getValue("name");
- NCName ncname = new NCName(name);
- if (wsdl20.getBinding(ncname) != null)
- throw new RuntimeException("WSDL 2.0 Assertion:Each name must be
unique among " + "all bindings in this WSDL target namespace");
- WSDLBinding wsdlBinding = new WSDLBinding(wsdl20);
- wsdlBinding.setName(ncname);
- wsdl20.addBinding(wsdlBinding);
-
- return wsdlBinding;
- }
- else if ("service".equals(localName))
- {
- WSDLService wsdlService = new WSDLService(wsdl20);
- wsdlService.setName(new NCName(attrs.getValue("name")));
- wsdl20.addService(wsdlService);
-
wsdlService.setInterfaceName(navigator.resolveQName(attrs.getValue("interface")));
- return wsdlService;
- }
- else log.warn("Unrecogized child element: " + localName);
- }
- else throw new WSDLException("Invalid default namespace: " +
defaultNamespace);
-
- return null;
- }
-
- /**
- * Parsing the WSDL 2.0 document
- * @param wsdlInterface
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @param attrs
- * @return
- */
- public Object newChild(WSDLInterface wsdlInterface, UnmarshallingContext navigator,
String namespaceURI, String localName, Attributes attrs)
- {
- /**
- * WSDL .0 Assertion: Operation names must also be unique within an interface
- */
- if ("operation".equals(localName))
- {
- String name = attrs.getValue("name");
- if (name == null)
- throw new RuntimeException("Operation name must not be null");
- NCName ncname = new NCName(name);
- if (wsdlInterface.containsInterfaceOperation(ncname))
- throw new RuntimeException("WSDL 2.0 Assertion:Each operation must be
given a name that is "
- + "unique within an interface defined in this WSDL target
namespace");
- WSDLInterfaceOperation wsdlOperation = new
WSDLInterfaceOperation(wsdlInterface);
- wsdlOperation.setName(ncname);
- wsdlInterface.addOperation(wsdlOperation);
- return wsdlOperation;
- }
-
- log.warn("Unrecogized child element: " + localName);
- return null;
- }
-
- /**
- * Parsing the WSDL 2.0 document
- * @param wsdlOperation
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @param attrs
- * @return
- */
- public Object newChild(WSDLInterfaceOperation wsdlOperation, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- if ("input".equals(localName))
- {
- WSDLInterfaceOperationInput wsdlInterfaceOperationInput = new
WSDLInterfaceOperationInput(wsdlOperation);
-
wsdlInterfaceOperationInput.setElement(navigator.resolveQName(attrs.getValue("element")));
- wsdlInterfaceOperationInput.setMessageLabel(new
NCName(attrs.getValue("messageLabel")));
- wsdlOperation.addInput(wsdlInterfaceOperationInput);
- return wsdlInterfaceOperationInput;
- }
- else if ("output".equals(localName))
- {
- WSDLInterfaceOperationOutput output = new
WSDLInterfaceOperationOutput(wsdlOperation);
- output.setElement(navigator.resolveQName(attrs.getValue("element")));
- output.setMessageLabel(new NCName(attrs.getValue("messageLabel")));
- wsdlOperation.addOutput(output);
- return output;
- }
- else if ("outfault".equals(localName))
- {
- WSDLInterfaceOperationOutfault fault = new
WSDLInterfaceOperationOutfault(wsdlOperation);
- String messageLabel = attrs.getValue("messageLabel");
- fault.setRef(navigator.resolveQName(attrs.getValue("ref")));
- if (messageLabel != null)
- fault.setMessageLabel(new NCName(messageLabel));
- wsdlOperation.addOutfault(fault);
- return wsdlOperation;
- }
-
- log.warn("Unrecogized child element: " + localName);
- return null;
- }
-
- /**
- * Parsing the WSDL 2.0 document
- * @param wsdlBinding
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @param attrs
- * @return
- */
- public Object newChild(WSDLBinding wsdlBinding, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- if ("operation".equals(localName))
- {
- WSDLBindingOperation wsdlBindingOperation = new
WSDLBindingOperation(wsdlBinding);
-
wsdlBindingOperation.setRef(navigator.resolveQName(attrs.getValue("ref")));
- wsdlBinding.addOperation(wsdlBindingOperation);
- return wsdlBindingOperation;
- }
-
- log.warn("Unrecogized child element: " + localName);
- return null;
- }
-
- /**
- * Parsing the WSDL 2.0 document
- * @param wsdlBindingOperation
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @param attrs
- * @return
- */
- public Object newChild(WSDLBindingOperation wsdlBindingOperation, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
- {
- if ("input".equals(localName))
- {
- WSDLBindingOperationInput wsdlBindingOperationInput = new
WSDLBindingOperationInput(wsdlBindingOperation);
- wsdlBindingOperationInput.setMessageLabel(new
NCName(attrs.getValue("messageLabel")));
- wsdlBindingOperation.addInput(wsdlBindingOperationInput);
- return wsdlBindingOperationInput;
- }
- if ("output".equals(localName))
- {
- WSDLBindingOperationOutput wsdlBindingOperationOutput = new
WSDLBindingOperationOutput(wsdlBindingOperation);
- wsdlBindingOperationOutput.setMessageLabel(new
NCName(attrs.getValue("messageLabel")));
- wsdlBindingOperation.addOutput(wsdlBindingOperationOutput);
- return wsdlBindingOperationOutput;
- }
-
- log.warn("Unrecogized child element: " + localName);
- return null;
- }
-
- /**
- * Parsing the WSDL 2.0 document
- * @param wsdlService
- * @param navigator
- * @param namespaceURI
- * @param localName
- * @param attrs
- * @return
- */
- public Object newChild(WSDLService wsdlService, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
- {
- if ("endpoint".equals(localName))
- {
- WSDLEndpoint wsdlEndpoint = new WSDLEndpoint(wsdlService);
- wsdlEndpoint.setName(new NCName(attrs.getValue("name")));
-
wsdlEndpoint.setBinding(navigator.resolveQName(attrs.getValue("binding")));
- wsdlService.addEndpoint(wsdlEndpoint);
- return wsdlEndpoint;
- }
-
- log.warn("Unrecogized child element: " + localName);
- return null;
- }
-
- /**
- * Method that deals with importing schema
- * @param wsdl
- * @param attrs
- */
- private void importTypes(WSDLDefinitions wsdl, Attributes attrs)
- {
- // [TODO]
- }
-}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Writer.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Writer.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDL20Writer.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,200 +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.core.metadata.wsdl;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-
-/**
- * A WSDL writer that writes out a WSDL-2.0 compliant wsdl.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 10-Oct-2004
- */
-public class WSDL20Writer extends WSDLWriter
-{
- // provide logging
- protected static final Logger log = Logger.getLogger(WSDL20Writer.class);
-
- protected WSDLUtils utils = WSDLUtils.getInstance();
-
- /** Use WSDLDefinitions.writeWSDL instead. */
- public WSDL20Writer(WSDLDefinitions wsdl)
- {
- super(wsdl);
- }
-
-
- protected void appendInterfaces(StringBuilder buffer, String namespace)
- {
- WSDLInterface[] interfaces = wsdl.getInterfaces();
- for (int i = 0; i < interfaces.length; i++)
- {
- WSDLInterface intf = interfaces[i];
- buffer.append("<interface name='" + intf.getName() +
"'>");
- appendInterfaceFaults(buffer, intf);
- appendInterfaceOperations(buffer, intf);
- buffer.append("</interface>");
- }
- }
-
- private void appendInterfaceFaults(StringBuilder buffer, WSDLInterface intf)
- {
- WSDLInterfaceFault[] faults = intf.getFaults();
- for (int i = 0; i < faults.length; i++)
- {
- WSDLInterfaceFault fault = faults[i];
- buffer.append("<fault name='" + fault.getName() +
"'");
- buffer.append(" element='" + getQNameRef(fault.getElement()) +
"'>");
- if (fault.getDocumentation() != null)
- {
- buffer.append(fault.getDocumentation());
- }
- buffer.append("</fault>");
- }
- }
-
- private void appendInterfaceOperations(StringBuilder buffer, WSDLInterface intf)
- {
- WSDLInterfaceOperation[] operations = intf.getOperations();
- for (int i = 0; i < operations.length; i++)
- {
- WSDLInterfaceOperation operation = operations[i];
- buffer.append("<operation name='" + operation.getName() +
"'>");
-
- WSDLInterfaceOperationInput[] inputs = operation.getInputs();
- for (int j = 0; j < inputs.length; j++)
- {
- WSDLInterfaceOperationInput ip = inputs[j];
- buffer.append("<input element='" +
getQNameRef(ip.getElement()) + "'");
- if (ip.getMessageLabel() != null)
- {
- buffer.append(" messageLabel='" + ip.getMessageLabel() +
"'");
- }
- buffer.append(">");
- appendProperties(buffer, ip.getProperties());
- buffer.append("</input>");
- }
-
- WSDLInterfaceOperationOutput[] outputs = operation.getOutputs();
- for (int j = 0; j < outputs.length; j++)
- {
- WSDLInterfaceOperationOutput op = outputs[j];
- buffer.append("<output element='" +
getQNameRef(op.getElement()) + "'");
- if (op.getMessageLabel() != null)
- {
- buffer.append(" messageLabel='" + op.getMessageLabel() +
"'");
- }
- buffer.append(">");
- appendProperties(buffer, op.getProperties());
- buffer.append("</output>");
- }
-
- WSDLInterfaceOperationOutfault[] outfaults = operation.getOutfaults();
- for (int j = 0; j < outfaults.length; j++)
- {
- WSDLInterfaceOperationOutfault outfault = outfaults[j];
- buffer.append("<outfault ref='" +
getQNameRef(outfault.getRef()) + "'>");
- if (outfault.getMessageLabel() != null)
- {
- buffer.append(" messageLabel='" + outfault.getMessageLabel()
+ "'");
- }
- buffer.append("</outfault>");
- }
- buffer.append("</operation>");
- }
- }
-
- private void appendProperties(StringBuilder buffer, WSDLProperty[] wsdlProperties)
- {
- for (int i = 0; i < wsdlProperties.length; i++)
- {
- WSDLProperty wsdlProperty = wsdlProperties[i];
- String uri = wsdlProperty.getURI();
- String value = wsdlProperty.getValue();
- buffer.append("<property uri='" + uri + "'>" +
(value != null ? "<value>" + value + "</value>" :
"") + "</property>");
- }
- }
-
- protected void appendBindings(StringBuilder buffer, String namespace)
- {
- WSDLBinding[] bindings = wsdl.getBindings();
- for (int i = 0; i < bindings.length; i++)
- {
- WSDLBinding binding = bindings[i];
- buffer.append("<binding name='" + binding.getName() +
"'");
- if (binding.getInterfaceName() != null)
- {
- buffer.append(" interface='" +
getQNameRef(binding.getInterfaceName()) + "'");
- }
- buffer.append(">");
- appendBindingOperations(buffer, binding);
- buffer.append("</binding>");
- }
- }
-
- protected void appendBindingOperations(StringBuilder buffer, WSDLBinding binding)
- {
- WSDLBindingOperation[] operations = binding.getOperations();
- for (int i = 0; i < operations.length; i++)
- {
- WSDLBindingOperation operation = operations[i];
- buffer.append("<operation ref='" +
getQNameRef(operation.getRef()) + "'>");
- buffer.append("</operation>");
- }
- }
-
- protected void appendServices(StringBuilder buffer, String namespace)
- {
- WSDLService[] services = wsdl.getServices();
- for (int i = 0; i < services.length; i++)
- {
- WSDLService service = services[i];
- buffer.append("<service name='" + service.getName() +
"'");
- if (service.getInterfaceName() != null)
- {
- buffer.append(" interface='" +
getQNameRef(service.getInterfaceName()) + "'");
- }
- buffer.append(">");
-
- WSDLEndpoint[] endpoints = service.getEndpoints();
- for (int j = 0; j < endpoints.length; j++)
- {
- WSDLEndpoint endpoint = endpoints[j];
- buffer.append("<endpoint name='" + endpoint.getName() +
"'");
- if (endpoint.getBinding() != null)
- {
- buffer.append(" binding='" +
getQNameRef(endpoint.getBinding()) + "'");
- }
- if (endpoint.getAddress() != null)
- {
- buffer.append(" address='" + endpoint.getAddress() +
"'");
- }
- buffer.append("></endpoint>");
- }
-
- buffer.append("</service>");
- }
- }
-}
Deleted:
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/WSDLBinding.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBinding.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,185 +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.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.common.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
Deleted:
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/WSDLBindingFault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingFault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,69 +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.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;
- }
-}
Deleted:
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/WSDLBindingMessageReference.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingMessageReference.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,126 +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.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
Deleted:
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/WSDLBindingOperation.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperation.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,146 +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.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.common.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;
- }
-}
Deleted:
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/WSDLBindingOperationInput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationInput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,44 +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.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);
- }
-}
Deleted:
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/WSDLBindingOperationOutput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLBindingOperationOutput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,44 +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.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);
- }
-}
Deleted:
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/WSDLDefinitions.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitions.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,326 +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.core.metadata.wsdl;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.io.Writer;
-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.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.core.metadata.wsdl.WSDLWriter.WriterResolver;
-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);
- }
-
- /** Write the wsdl definition to the given writer, clients should not care about the
wsdl version. */
- public void write(Writer writer, String charset) throws IOException
- {
- write(writer, charset, null);
- }
-
- public void write(Writer writer, String charset, WriterResolver resolver) throws
IOException
- {
- if (Constants.NS_WSDL11.equals(wsdlNamespace))
- {
- WSDL11Writer wsdl11Writer = new WSDL11Writer(this);
- wsdl11Writer.write(writer, charset, resolver);
- }
- else if (Constants.NS_WSDL20.equals(wsdlNamespace))
- {
- WSDL20Writer wsdl20Writer = new WSDL20Writer(this);
- wsdl20Writer.write(writer);
- }
- else
- {
- throw new WSException("Unsupported wsdl version: " + wsdlNamespace);
- }
- }
-}
\ No newline at end of file
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitionsFactory.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitionsFactory.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDefinitionsFactory.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,212 +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.core.metadata.wsdl;
-
-// $Id$
-
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.net.ConnectException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.bind.JAXBContext;
-import javax.xml.parsers.DocumentBuilder;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.EntityResolver;
-
-import com.ibm.wsdl.xml.WSDLReaderImpl;
-
-/**
- * A factory that creates a <code>WSDLDefinitions</code> object from an URL.
- *
- * This implementations deals with different WSDL versions so that clients of this
- * factory do need to know about WSDL version specifics. The Java object view of the
- * WSDL document (WSDLDefinitions) is modeled on WSDL-2.0
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public class WSDLDefinitionsFactory
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
-
- // This feature is set by default in wsdl4j, it means the object structure contains
the imported arguments
- public static final String FEATURE_IMPORT_DOCUMENTS =
"javax.wsdl.importDocuments";
- // Set this feature for additional debugging output
- public static final String FEATURE_VERBOSE = "javax.wsdl.verbose";
-
- // The WSDL reader features
- private Map features = new HashMap();
-
- // Hide constructor
- private WSDLDefinitionsFactory()
- {
- }
-
- /**
- * Create a new instance of a wsdl factory
- */
- public static WSDLDefinitionsFactory newInstance()
- {
- return new WSDLDefinitionsFactory();
- }
-
- /**
- * Set a feature on the underlying reader
- */
- public void setFeature(String name, boolean value) throws IllegalArgumentException
- {
- features.put(name, new Boolean(value));
- }
-
- /**
- * Read the wsdl document from the given URL
- */
- public WSDLDefinitions parse(URL wsdlLocation) throws WSDLException
- {
- if (wsdlLocation == null)
- throw new IllegalArgumentException("URL cannot be null");
-
- log.debug("parse: " + wsdlLocation.toExternalForm());
-
- EntityResolver entityResolver = new JBossWSEntityResolver();
- WSDLDefinitions wsdlDefinitions = null;
- try
- {
- Document wsdlDoc = getDocument(wsdlLocation);
- String defaultNamespace = getDefaultNamespace(wsdlDoc);
- if (Constants.NS_WSDL20.equals(defaultNamespace))
- {
- WSDL20Reader wsdlReader = new WSDL20Reader();
-
- // Setup reader features
- Iterator it = features.entrySet().iterator();
- while (it.hasNext())
- {
- Map.Entry entry = (Map.Entry)it.next();
- String key = (String)entry.getKey();
- Boolean flag = (Boolean)entry.getValue();
- wsdlReader.setFeature(key, flag.booleanValue());
- }
-
- wsdlDefinitions = wsdlReader.readWSDL(new WSDLLocatorImpl(entityResolver,
wsdlLocation));
- wsdlDefinitions.setWsdlDocument(wsdlDoc);
- }
- else if (Constants.NS_WSDL11.equals(defaultNamespace))
- {
- WSDLFactory wsdlFactory = WSDLFactory.newInstance();
- WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
- wsdlReader.setFeature("javax.wsdl.verbose", false);
-
- // Setup reader features
- Iterator it = features.entrySet().iterator();
- while (it.hasNext())
- {
- Map.Entry entry = (Map.Entry)it.next();
- String key = (String)entry.getKey();
- Boolean flag = (Boolean)entry.getValue();
- wsdlReader.setFeature(key, flag.booleanValue());
- }
-
- // Set EntityResolver in patched version of wsdl4j-1.5.2jboss
- ((WSDLReaderImpl)wsdlReader).setEntityResolver(entityResolver);
-
- Definition definition = wsdlReader.readWSDL(new
WSDLLocatorImpl(entityResolver, wsdlLocation));
- wsdlDefinitions = new WSDL11Reader().processDefinition(definition,
wsdlLocation);
- wsdlDefinitions.setWsdlDocument(wsdlDoc);
- }
- else
- throw new WSDLException("Invalid default namespace: " +
defaultNamespace);
-
- if (log.isTraceEnabled())
- {
- StringWriter stwr = new StringWriter();
- WSDL20Writer wsdl20Writer = new WSDL20Writer(wsdlDefinitions);
- wsdl20Writer.write(stwr);
- log.trace("\n" + stwr.toString());
- }
- }
- catch (WSDLException e)
- {
- throw e;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WSDLException(e);
- }
-
- return wsdlDefinitions;
- }
-
- /** Get the WSDL document.
- */
- private Document getDocument(URL wsdlLocation) throws WSDLException
- {
- try
- {
- InputStream wsdlInputStream = wsdlLocation.openStream();
- try
- {
- DocumentBuilder builder = DOMUtils.getDocumentBuilder();
- return builder.parse(wsdlInputStream);
- }
- finally
- {
- wsdlInputStream.close();
- }
- }
- catch (ConnectException ex)
- {
- throw new WSDLException("Cannot connect to: " + wsdlLocation);
- }
- catch (Exception ex)
- {
- throw new WSDLException("Cannot parse wsdlLocation: " + wsdlLocation,
ex);
- }
- }
-
- /** Get the default namespace for the given WSDL
- */
- private String getDefaultNamespace(Document wsdlDoc) throws WSDLException
- {
- Element root = wsdlDoc.getDocumentElement();
- String defaultNamespace = root.getNamespaceURI();
- return defaultNamespace;
- }
-}
Deleted:
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/WSDLDocumentation.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLDocumentation.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,46 +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.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;
- }
-}
Deleted:
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/WSDLEndpoint.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLEndpoint.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,166 +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.core.metadata.wsdl;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.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;
- }
-}
Deleted:
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/WSDLException.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLException.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,93 +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.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);
- }
-}
Deleted:
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/WSDLFeature.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLFeature.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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;
- }
-}
Deleted:
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/WSDLImport.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLImport.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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;
- }
-}
Deleted:
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/WSDLInclude.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInclude.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,69 +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.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;
- }
-}
Deleted:
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/WSDLInterface.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterface.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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);
- }
-}
Deleted:
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/WSDLInterfaceFault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceFault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,106 +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.core.metadata.wsdl;
-
-// $Id$
-
-import java.io.Serializable;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.common.WSException;
-
-/**
- * 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);
- }
-}
Deleted:
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/WSDLInterfaceMessageReference.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceMessageReference.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,246 +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.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.common.Constants;
-import org.jboss.ws.common.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
Deleted:
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/WSDLInterfaceOperation.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperation.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,284 +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.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.common.Constants;
-import org.jboss.ws.common.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;
- }
-}
Deleted:
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/WSDLInterfaceOperationInfault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInfault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,83 +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.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;
- }
-}
Deleted:
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/WSDLInterfaceOperationInput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationInput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,41 +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.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
Deleted:
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/WSDLInterfaceOperationOutfault.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutfault.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,83 +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.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;
- }
-}
Deleted:
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/WSDLInterfaceOperationOutput.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLInterfaceOperationOutput.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,41 +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.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
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLLocatorImpl.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLLocatorImpl.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLLocatorImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,159 +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.core.metadata.wsdl;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.wsdl.xml.WSDLLocator;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.WSException;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-/* A WSDLLocator that can handle wsdl imports
- */
-class WSDLLocatorImpl implements WSDLLocator
-{
- // provide logging
- private static final Logger log = Logger.getLogger(WSDLDefinitionsFactory.class);
-
- private EntityResolver entityResolver;
- private URL wsdlURL;
- private String latestImportURI;
-
- public WSDLLocatorImpl(EntityResolver entityResolver, URL wsdlFile)
- {
- if (wsdlFile == null)
- throw new IllegalArgumentException("WSDL file argument cannot be
null");
-
- this.entityResolver = entityResolver;
- this.wsdlURL = wsdlFile;
- }
-
- public InputSource getBaseInputSource()
- {
- log.trace("getBaseInputSource [wsdlUrl=" + wsdlURL + "]");
- try
- {
- InputStream is = wsdlURL.openStream();
- if (is == null)
- throw new IllegalArgumentException("Cannot obtain wsdl from [" +
wsdlURL + "]");
-
- return new InputSource(is);
- }
- catch (IOException e)
- {
- throw new RuntimeException("Cannot access wsdl from [" + wsdlURL +
"], " + e.getMessage());
- }
- }
-
- public String getBaseURI()
- {
- return wsdlURL.toExternalForm();
- }
-
- public InputSource getImportInputSource(String parent, String resource)
- {
- log.trace("getImportInputSource [parent=" + parent +
",resource=" + resource + "]");
-
- URL parentURL = null;
- try
- {
- parentURL = new URL(parent);
- }
- catch (MalformedURLException e)
- {
- log.error("Not a valid URL: " + parent);
- return null;
- }
-
- String wsdlImport = null;
- String external = parentURL.toExternalForm();
-
- // An external URL
- if (resource.startsWith("http://") ||
resource.startsWith("https://"))
- {
- wsdlImport = resource;
- }
-
- // Absolute path
- else if (resource.startsWith("/"))
- {
- String beforePath = external.substring(0,
external.indexOf(parentURL.getPath()));
- wsdlImport = beforePath + resource;
- }
-
- // A relative path
- else
- {
- String parentDir = external.substring(0, external.lastIndexOf("/"));
-
- // remove references to current dir
- while (resource.startsWith("./"))
- resource = resource.substring(2);
-
- // remove references to parentdir
- while (resource.startsWith("../"))
- {
- parentDir = parentDir.substring(0, parentDir.lastIndexOf("/"));
- resource = resource.substring(3);
- }
-
- wsdlImport = parentDir + "/" + resource;
- }
-
- try
- {
- log.trace("Trying to resolve: " + wsdlImport);
- InputSource inputSource = entityResolver.resolveEntity(wsdlImport, wsdlImport);
- if (inputSource != null)
- {
- latestImportURI = wsdlImport;
- }
- else
- {
- throw new IllegalArgumentException("Cannot resolve imported resource:
" + wsdlImport);
- }
-
- return inputSource;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WSException("Cannot access imported wsdl [" + wsdlImport +
"], " + e.getMessage());
- }
- }
-
- public String getLatestImportURI()
- {
- return latestImportURI;
- }
-}
Deleted:
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/WSDLMIMEPart.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLMIMEPart.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,78 +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.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
Deleted:
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/WSDLProperty.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLProperty.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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 + "]";
- }
-}
Deleted:
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/WSDLRPCPart.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCPart.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,63 +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.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
Deleted:
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/WSDLRPCSignatureItem.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLRPCSignatureItem.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,75 +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.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;
- }
-}
Deleted:
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/WSDLSOAPHeader.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLSOAPHeader.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,144 +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.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
Deleted:
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/WSDLService.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLService.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,139 +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.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;
- }
-}
Deleted:
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/WSDLTypes.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLTypes.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,76 +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.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;
- }
-}
Deleted:
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/WSDLUtils.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLUtils.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,889 +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.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.EmptyStackException;
-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.XSModel;
-import org.apache.xerces.xs.XSTypeDefinition;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.utils.HolderUtils;
-import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
-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
Deleted:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLWriter.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLWriter.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/WSDLWriter.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -1,207 +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.core.metadata.wsdl;
-
-// $Id$
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.utils.DOMUtils;
-import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
-import org.w3c.dom.Element;
-
-/**
- * A helper that writes out a WSDL definition
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Anil.Saldhana(a)jboss.org
- * @since 10-Oct-2004
- */
-public abstract class WSDLWriter
-{
- // provide logging
- protected static final Logger log = Logger.getLogger(WSDLWriter.class);
-
- protected WSDLDefinitions wsdl;
- protected WSDLUtils utils = WSDLUtils.getInstance();
-
- // The soap prefix
- protected String soapPrefix = "soap";
-
- /**
- * Include or import WSDL Types
- */
- protected boolean includeSchemaInWSDL = true;
-
- public static class ResolvedWriter
- {
- public String actualFile;
- public String charset;
- public Writer writer;
- }
-
- public static interface WriterResolver
- {
- public ResolvedWriter resolve(String suggestedFile) throws IOException;
- }
-
- /** Use WSDLDefinitions.writeWSDL instead. */
- protected WSDLWriter(WSDLDefinitions wsdl)
- {
- if (wsdl == null)
- throw new IllegalArgumentException("WSDL definitions is NULL");
-
- this.wsdl = wsdl;
- }
-
- public void write(Writer writer) throws IOException
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append(Constants.XML_HEADER);
-
- appendDefinitions(buffer, wsdl.getTargetNamespace());
- appendTypes(buffer, wsdl.getTargetNamespace());
- appendInterfaces(buffer, wsdl.getTargetNamespace());
- appendBindings(buffer, wsdl.getTargetNamespace());
- appendServices(buffer, wsdl.getTargetNamespace());
-
- buffer.append("</definitions>");
-
- Element element = DOMUtils.parse(buffer.toString());
- new DOMWriter(writer).setPrettyprint(true).print(element);
- }
-
- protected void appendDefinitions(StringBuilder buffer, String namespace)
- {
- buffer.append("<definitions");
- //Append service name as done by wscompile, if there is just one
- WSDLService[] services = wsdl.getServices();
- if (services != null && services.length == 1)
- {
- WSDLService ser = services[0];
- buffer.append(" name='" + ser.getName() + "'");
- }
- buffer.append(" targetNamespace='" + namespace + "'");
- buffer.append(" xmlns='" + wsdl.getWsdlNamespace() +
"'");
-
- Iterator it = wsdl.getRegisteredNamespaceURIs();
- while (it.hasNext())
- {
- String namespaceURI = (String)it.next();
- String prefix = wsdl.getPrefix(namespaceURI);
- if (prefix.length() > 0)
- {
- buffer.append(" xmlns:" + prefix + "='" +
namespaceURI + "'");
- if (Constants.PREFIX_SOAP11.equals(prefix) ||
Constants.PREFIX_SOAP12.equals(prefix))
- soapPrefix = prefix;
- }
- }
- buffer.append(">");
- }
-
- protected void appendTypes(StringBuilder buffer, String namespace)
- {
- WSDLTypes wsdlTypes = wsdl.getWsdlTypes();
- // If the type section is bound to a particular namespace, verify it mataches,
otherwise skip
- if (wsdlTypes.getNamespace() != null &&
!wsdlTypes.getNamespace().equals(namespace))
- return;
-
- if (wsdlTypes instanceof XSModelTypes)
- {
- buffer.append("<types>");
- JBossXSModel xsM = WSDLUtils.getSchemaModel(wsdlTypes);
- String schema = xsM.serialize();
- buffer.append(schema);
- buffer.append("</types>");
- }
- else if (wsdlTypes instanceof DOMTypes)
- {
- synchronized (wsdlTypes)
- {
- buffer.append(DOMWriter.printNode(((DOMTypes)wsdlTypes).getElement(),
true));
- }
- }
- }
-
- protected abstract void appendInterfaces(StringBuilder buffer, String namespace);
-
- protected abstract void appendBindings(StringBuilder buffer, String namespace);
-
- protected abstract void appendServices(StringBuilder buffer, String namespace);
-
- /** Get a prefixed name of form prefix:localPart */
- protected String getQNameRef(QName qname)
- {
- String retStr = qname.getLocalPart();
-
- String prefix = qname.getPrefix();
- String nsURI = qname.getNamespaceURI();
- if (prefix.length() == 0 && nsURI.length() > 0)
- {
- qname = wsdl.registerQName(qname);
- prefix = qname.getPrefix();
- }
-
- if (prefix.length() > 0)
- retStr = prefix + ":" + retStr;
-
- return retStr;
- }
-
- public WSDLDefinitions getWsdl()
- {
- return wsdl;
- }
-
- public void setWsdl(WSDLDefinitions wsdl)
- {
- this.wsdl = wsdl;
- }
-
- public boolean isIncludeTypesInWSDL()
- {
- return includeSchemaInWSDL;
- }
-
- public void logException(Exception e)
- {
- if (log.isTraceEnabled())
- {
- log.trace(e);
- }
- }
-
- public void logMessage(String msg)
- {
- if (log.isTraceEnabled())
- {
- log.trace(msg);
- }
- }
-}
Deleted:
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/XSModelTypes.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/XSModelTypes.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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.common.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();
- }
-}
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -43,11 +43,11 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.IOUtils;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.w3c.dom.Document;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -42,9 +42,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.utils.IOUtils;
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;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -36,9 +36,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.DOMWriter;
-import org.jboss.ws.core.jaxrpc.Style;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,6 +26,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.utils.DOMUtils;
@@ -37,7 +38,6 @@
import org.jboss.ws.core.binding.DeserializerSupport;
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.jaxrpc.encoding.DeserializerFactoryBase;
import org.jboss.ws.core.jaxrpc.encoding.NullValueSerializer;
import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -35,10 +35,10 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.jaxrpc.Style;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.Style;
/**
* Derive the operation meta data from incomming SOAP message
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceRefHandler.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -38,12 +38,12 @@
import org.jboss.naming.Util;
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.WSException;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDL11DefinitionFactory;
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.metadata.wsdl.WSDL11DefinitionFactory;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
/**
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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,12 +34,12 @@
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.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.common.umdm.UnifiedMetaData;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.DOMWriter;
-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.tools.Configuration.OperationConfig;
import org.jboss.ws.tools.metadata.ToolsUnifiedMetaDataBuilder;
import org.w3c.dom.Element;
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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -30,13 +30,13 @@
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.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
import org.jboss.ws.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.common.umdm.UnifiedMetaData;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -27,7 +27,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -35,14 +35,14 @@
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.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.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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaWriter.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,7 +32,7 @@
import org.apache.xerces.xs.StringList;
import org.apache.xerces.xs.XSSimpleTypeDefinition;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/RPCSignature.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -24,13 +24,13 @@
import java.util.ArrayList;
import java.util.Collection;
-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;
+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;
public class RPCSignature
{
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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -45,12 +45,12 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+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.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -43,22 +43,22 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.metadata.wsdl.NCName;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+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.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.WSDLDefinitionsFactory;
-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.tools.interfaces.WSDLToJavaIntf;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDotXMLCreator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,11 +31,11 @@
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.core.metadata.jsr109.PortComponentMetaData;
-import org.jboss.ws.core.metadata.jsr109.WebserviceDescriptionMetaData;
-import org.jboss.ws.core.metadata.jsr109.WebservicesMetaData;
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/XSDToJava.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java 2006-12-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,9 +34,9 @@
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -49,10 +49,10 @@
import org.apache.xerces.xs.XSWildcard;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+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.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.core.metadata.wsdl.xsd.SchemaUtils;
/** 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/client/ServiceCreator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -28,12 +28,12 @@
import javax.xml.namespace.QName;
import org.jboss.ws.common.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.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.tools.interfaces.ServiceCreatorIntf;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -40,6 +40,43 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.Style;
+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.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.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.WSDLProperty;
+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.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
@@ -48,43 +85,6 @@
import org.jboss.ws.common.umdm.WrappedParameter;
import org.jboss.ws.common.utils.JavaUtils;
import org.jboss.ws.core.CommonSOAPBinding;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-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.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.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.WSDLProperty;
-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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToXSDHelper.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -27,9 +27,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.ws.common.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.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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -41,37 +41,37 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+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.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.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/ToolsHelper.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -38,6 +38,13 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+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.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
@@ -48,13 +55,6 @@
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.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.wsdl.NCName;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLService;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/JavaToXSDIntf.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,7 +26,7 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/SchemaCreatorIntf.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,10 +26,10 @@
import javax.xml.namespace.QName;
-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;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+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;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/ServiceCreatorIntf.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -23,7 +23,7 @@
import java.io.IOException;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,9 +26,9 @@
import java.net.URL;
import java.util.Map;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLException;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.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.core.metadata.wsdl.WSDLException
+ * @throws org.jboss.ws.common.metadata.wsdl.WSDLException
*/
public WSDLDefinitions convertWSDL2Java(URL wsdlfileurl)
throws WSDLException;
Modified:
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,7 +25,7 @@
import java.io.IOException;
import org.apache.xerces.xs.XSModel;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
/**
* Defines the contract for all Schema Types to Java Types converters
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,7 +31,7 @@
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
-import org.jboss.ws.core.metadata.wsdl.DOMTypes;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -27,33 +27,33 @@
import javax.xml.rpc.ParameterMode;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.Style;
+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.common.umdm.EndpointMetaData;
import org.jboss.ws.common.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
import org.jboss.ws.common.umdm.ServerEndpointMetaData;
import org.jboss.ws.common.umdm.ServiceMetaData;
-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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,15 +32,15 @@
import org.apache.xerces.xs.XSSimpleTypeDefinition;
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.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.common.jaxrpc.LiteralTypeMapping;
+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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -35,6 +35,7 @@
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.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
@@ -42,7 +43,6 @@
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.metadata.wsdl.WSDLUtils;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsAnnotationMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -36,11 +36,11 @@
import javax.xml.rpc.holders.Holder;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
import org.jboss.ws.common.umdm.FaultMetaData;
import org.jboss.ws.common.umdm.OperationMetaData;
import org.jboss.ws.common.umdm.ParameterMetaData;
-import org.jboss.ws.core.jaxrpc.Style;
-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/ToolsUnifiedMetaDataBuilder.java
===================================================================
---
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,10 +32,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
import org.jboss.ws.common.umdm.ServiceMetaData;
import org.jboss.ws.common.umdm.UnifiedMetaData;
-import org.jboss.ws.core.jaxrpc.Style;
-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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -53,22 +53,22 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.WSException;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+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.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/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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,11 +32,11 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.binding.DeserializerSupport;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBUnmarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBUnmarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBUnmarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jbossxb.JBossXBUnmarshallerImpl;
-import org.jboss.ws.core.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.core.metadata.jaxrpcmapping.PackageMapping;
/**
* Test the JAXB unmarshalling of a SimpleUserType
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MicrosoftGeneratedWSDLTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -24,10 +24,10 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
-import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
/**
* Tests WSDL11Reader ability to parse WSDL Files
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/MultiSchemaTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -24,10 +24,10 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
-import org.jboss.ws.core.metadata.wsdl.WSDLTypes;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
/**
* Test the XSModel, and how it handles multiple schemas
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/SimpleFileImportTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,7 +31,7 @@
import org.jboss.net.protocol.URLStreamHandlerFactory;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDL11DefinitionFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDL11DefinitionFactory;
/**
* Test a wsdl import functionality.
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDL11TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -27,18 +27,18 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.common.Constants;
-import org.jboss.ws.core.metadata.wsdl.NCName;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
-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.common.metadata.wsdl.NCName;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+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.extras.eventing.EventingConstants;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,10 +25,10 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
/**
* The WSDL may contain or import XSD schema definitions.
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/wsdl11/WSDLWithAnonTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.w3c.dom.Element;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1068/JBWS1068TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -24,8 +24,8 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Cannot handle xsd:import of xml schema
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,10 +25,10 @@
import java.io.FilenameFilter;
import java.net.MalformedURLException;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
-import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.common.metadata.wsdl.WSDLService;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws958/JBWS958TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,8 +25,8 @@
import java.net.URL;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* XML entity usage in wsdl contained schema
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefClientTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,9 +34,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXRPC <service-ref>
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXRPC <service-ref>
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefServletTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,9 +34,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXRPC <service-ref>
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/DIIClientTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -43,11 +43,11 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
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.core.metadata.wsdl.WSDLDefinitionsFactory;
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/EventingSupport.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wseventing/EventingSupport.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -35,9 +35,9 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.test.ws.JBossWSTest;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.StubExt;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
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/xop/XOPTypeDefTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/xop/XOPTypeDefTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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.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.extras.xop.jaxrpc.XOPScanner;
import org.jboss.xb.binding.NamespaceRegistry;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/context/WebServiceContextTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test JAXWS WebServiceContext
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/endpoint/EndpointTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -42,8 +42,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test JAXWS Endpoint deployment
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -27,10 +27,10 @@
import javax.jws.WebService;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
-import org.jboss.ws.core.metadata.wsdl.WSDLEndpoint;
-import org.jboss.ws.core.metadata.wsdl.WSDLService;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
+import org.jboss.ws.common.metadata.wsdl.WSDLService;
import org.jboss.ws.core.server.ServerConfig;
import org.jboss.ws.core.server.ServerConfigFactory;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws860/JBWS860TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,8 +32,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Investigate "Is Not A Servlet" error with multiple servlets in the web.xml
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,8 +32,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* EJB3 jmx name is incorrectly derrived
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -29,8 +29,8 @@
import javax.xml.ws.Service;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
// $Id$
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderJAXBTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -47,8 +47,8 @@
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.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderMessageTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -36,8 +36,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test a Provider<SOAPMessage>
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/provider/ProviderPayloadTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -36,8 +36,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test a Provider<SOAPMessage>
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,8 +34,8 @@
import org.jboss.security.SimplePrincipal;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JSR-181 annotation: javax.jws.WebService
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/jsr181pojo/JSR181WebServiceJSETestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -33,9 +33,9 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.core.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JSR-181 annotation: javax.jws.WebService
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/retail/RetailSampleTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -24,8 +24,8 @@
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import javax.xml.namespace.QName;
import java.net.MalformedURLException;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -32,8 +32,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceref
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -33,8 +33,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceref
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefServletTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,8 +34,8 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
/**
* Test the JAXWS annotation: javax.xml.ws.WebServiceref
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -34,11 +34,11 @@
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.jaxrpc.Style;
+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.core.jaxrpc.Style;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSToolsConstants;
import org.w3c.dom.Element;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,9 +31,9 @@
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.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.metadata.wsdl.WSDL20Writer;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.metadata.wsdl.WSDL20Writer;
+import org.jboss.ws.common.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/WSDL11ToWSDL20TestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToWSDL20TestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToWSDL20TestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,10 +31,10 @@
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.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.metadata.wsdl.WSDL20Writer;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.metadata.wsdl.WSDL20Writer;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
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/WSToolsTest.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -39,15 +39,15 @@
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.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
+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.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.WSDLDefinitionsFactory;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.JBossXSModel;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/Jaxrpc20AssertionsTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -29,7 +29,7 @@
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.core.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/assertions/WSDL20AssertionsTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -24,7 +24,7 @@
import java.io.File;
import org.jboss.test.ws.JBossWSTest;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jaxrpc.LiteralTypeMapping;
+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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/config/globalconfig/GlobalConfigTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -29,9 +29,9 @@
import java.io.IOException;
import org.jboss.test.ws.tools.WSToolsTest;
-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.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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,10 +26,10 @@
import org.jboss.test.ws.tools.WSToolsTest;
import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.jaxrpc.Style;
+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.core.jaxrpc.Style;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
import org.jboss.ws.tools.JavaToWSDL;
import org.jboss.ws.tools.WSToolsConstants;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -30,12 +30,12 @@
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.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.Style;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.common.utils.DOMUtils;
import org.jboss.ws.common.utils.IOUtils;
-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.metadata.wsdl.WSDLDefinitionsFactory;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaModelTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,8 +31,8 @@
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.core.metadata.wsdl.xmlschema.JBossXSModel;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/java2xsd/SchemaTypesCreatorTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.tools.schema.SchemaTypeCreator;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/jbws_204/NillableTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -31,9 +31,9 @@
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.core.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.core.metadata.wsdl.xmlschema.WSSchemaUtils;
import org.jboss.ws.tools.JavaToXSD;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/JavaWsdlMappingMetaDataTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/metadata/WebServicesMetaDataTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.jsr109.PortComponentMetaData;
-import org.jboss.ws.core.metadata.jsr109.WebserviceDescriptionMetaData;
-import org.jboss.ws.core.metadata.jsr109.WebservicesFactory;
-import org.jboss.ws.core.metadata.jsr109.WebservicesMetaData;
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/JaxrpcMappingValidator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -26,19 +26,19 @@
import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
-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;
+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;
/**
* 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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11ValidationTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,8 +25,8 @@
import junit.framework.TestCase;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.core.metadata.wsdl.WSDLDefinitionsFactory;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.common.metadata.wsdl.WSDLDefinitionsFactory;
import org.jboss.ws.tools.exceptions.JBossWSToolsException;
/**
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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDL11Validator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -36,16 +36,16 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.logging.Logger;
import org.jboss.ws.common.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.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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidationHelper.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,20 +25,20 @@
import javax.xml.namespace.QName;
-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.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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/validation/WSDLValidator.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -28,15 +28,15 @@
import org.jboss.logging.Logger;
import org.jboss.ws.common.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.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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -27,11 +27,11 @@
import javax.xml.namespace.QName;
import org.jboss.test.ws.JBossWSTest;
-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.common.jaxrpc.LiteralTypeMapping;
+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.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-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/XercesSchemaParserTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -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.tools.JavaToXSD;
import org.jboss.xb.binding.sunday.unmarshalling.LSInputAdaptor;
import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/AnonymousTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/AnonymousTypesTestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/AnonymousTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,7 +25,7 @@
import org.jboss.test.ws.tools.WSToolsTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.tools.XSDToJava;
import org.jboss.ws.tools.interfaces.XSDToJavaIntf;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ComplexTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ComplexTypesTestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ComplexTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,7 +25,7 @@
import org.jboss.test.ws.tools.WSToolsTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.tools.XSDToJava;
import org.jboss.ws.tools.interfaces.XSDToJavaIntf;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/NillableTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/NillableTypesTestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/NillableTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,7 +25,7 @@
import org.jboss.test.ws.tools.WSToolsTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.tools.XSDToJava;
import org.jboss.ws.tools.interfaces.XSDToJavaIntf;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ReferencesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ReferencesTestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ReferencesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,7 +25,7 @@
import org.jboss.test.ws.tools.WSToolsTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.tools.XSDToJava;
import org.jboss.ws.tools.interfaces.XSDToJavaIntf;
Modified:
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/SimpleTypesTestCase.java
===================================================================
---
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/SimpleTypesTestCase.java 2006-12-06
01:24:09 UTC (rev 1566)
+++
branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/SimpleTypesTestCase.java 2006-12-06
01:43:00 UTC (rev 1567)
@@ -25,7 +25,7 @@
import org.jboss.test.ws.tools.WSToolsTest;
import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.tools.XSDToJava;
import org.jboss.ws.tools.interfaces.XSDToJavaIntf;