[jbossws-commits] JBossWS SVN: r1584 - in branches/tdiesler/trunk/src: main/java/org/jboss/ws/common main/java/org/jboss/ws/common/metadata/umdm main/java/org/jboss/ws/common/metadata/wsdl/xsd main/java/org/jboss/ws/common/utils main/java/org/jboss/ws/core main/java/org/jboss/ws/core/binding main/java/org/jboss/ws/core/binding/jbossxb main/java/org/jboss/ws/core/jaxrpc main/java/org/jboss/ws/core/jaxrpc/handler main/java/org/jboss/ws/core/jaxws main/java/org/jboss/ws/core/jaxws/core main/java/org/jboss/ws/core/jaxws/handler main/java/org/jboss/ws/core/metadata main/java/org/jboss/ws/core/metadata/builder main/java/org/jboss/ws/core/metadata/builder/jaxrpc main/java/org/jboss/ws/core/metadata/builder/jaxws main/java/org/jboss/ws/core/server main/java/org/jboss/ws/core/soap main/java/org/jboss/ws/integration/jboss50 main/java/org/jboss/ws/integration/tomcat main/java/org/jboss/ws/tools main/java/org/jboss/ws/tools/helpers main/java/org/jboss/ws/tools/interfaces main/java/org/jboss/ws/! tools/jaxws main/java/org/jboss/ws/tools/mapping main/java/org/jboss/ws/tools/metadata main/java/org/jboss/ws/tools/schema main/java/org/jboss/ws/tools/wsdl test/java/org/jboss/test/ws/common/jbossxb test/java/org/jboss/test/ws/common/jbossxb/array test/java/org/jboss/test/ws/common/jbossxb/complex test/java/org/jboss/test/ws/common/jbossxb/docstyle test/java/org/jboss/test/ws/common/jbossxb/simple test/java/org/jboss/test/ws/jaxrpc/jbws1190 test/java/org/jboss/test/ws/jaxrpc/jbws1205 test/java/org/jboss/test/ws/jaxws/jbws1190 test/java/org/jboss/test/ws/tools test/java/org/jboss/test/ws/tools/clientside test/java/org/jboss/test/ws/tools/doclit test/java/org/jboss/test/ws/tools/holders test/java/org/jboss/test/ws/tools/xmlschema test/java/org/jboss/test/ws/tools/xsdjava

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Dec 6 19:16:19 EST 2006


Author: thomas.diesler at jboss.com
Date: 2006-12-06 19:15:01 -0500 (Wed, 06 Dec 2006)
New Revision: 1584

Added:
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Deserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64DeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Serializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64SerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerFactoryBase.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/NullValueSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerFactoryBase.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleDeserializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBConstants.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshaller.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshaller.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/MarshalException.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/UnmarshalException.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/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/jaxrpc/TypeMappingRegistryImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Use.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServerConfig.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServerConfigFactory.java
Removed:
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/config/
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBConstants.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshaller.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshaller.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/MarshalException.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/UnmarshalException.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/config/
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/wsdl/
Modified:
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/EndpointMetaData.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/OperationMetaData.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServiceMetaData.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypesMetaData.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/utils/IOUtils.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.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/ParameterWrapping.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.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/JAXBSerializerFactory.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.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/JAXRPCMetaDataBuilder.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/ServiceEndpoint.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/SOAPFactoryImpl.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/AbstractJSEDeployer.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/ServerConfigImpl.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.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/XSDToJava.java
   branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.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/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/SchemaCreatorIntf.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/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/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/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.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/jaxrpc/jbws1190/TestEndpointImpl.java
   branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.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/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/WSToolsTest.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/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/xmlschema/WSDLTypesTestCase.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:


Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/EndpointMetaData.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/EndpointMetaData.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/EndpointMetaData.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -39,16 +39,16 @@
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.Style;
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.common.jaxrpc.Use;
-import org.jboss.ws.common.jaxrpc.encoding.JBossXBDeserializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.JBossXBSerializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.SOAPArrayDeserializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.SOAPArraySerializerFactory;
 import org.jboss.ws.common.metadata.config.WSCommonConfig;
 import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
 import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
+import org.jboss.ws.core.binding.JBossXBSerializerFactory;
+import org.jboss.ws.core.binding.SOAPArrayDeserializerFactory;
+import org.jboss.ws.core.binding.SOAPArraySerializerFactory;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.jaxrpc.Use;
 import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
 import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
 

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/OperationMetaData.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/OperationMetaData.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/OperationMetaData.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -35,10 +35,10 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.Style;
-import org.jboss.ws.common.jaxrpc.Use;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
 import org.jboss.ws.common.utils.JavaUtils;
+import org.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/metadata/umdm/ServiceMetaData.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServiceMetaData.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/ServiceMetaData.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -37,10 +37,6 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.common.jaxrpc.TypeMappingRegistryImpl;
-import org.jboss.ws.common.jaxrpc.Use;
-import org.jboss.ws.common.jbossxb.SchemaBindingBuilder;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
 import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
@@ -48,6 +44,10 @@
 import org.jboss.ws.common.metadata.wsdl.WSDLTypes;
 import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.binding.jbossxb.SchemaBindingBuilder;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
+import org.jboss.ws.core.jaxrpc.Use;
 import org.jboss.ws.core.metadata.wsse.WSSecurityConfiguration;
 import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypesMetaData.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypesMetaData.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/umdm/TypesMetaData.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.common.jaxrpc.LiteralTypeMapping;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
 
 /**
  * Types meta data

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/common/metadata/wsdl/xsd/SchemaUtils.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/metadata/wsdl/xsd/SchemaUtils.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -49,14 +49,14 @@
 import org.apache.xerces.xs.XSTypeDefinition;
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSComplexTypeDefinition;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSElementDeclaration;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSErrorHandler;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSSimpleTypeDefinition;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSStringList;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSTypeDefinition;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
 
 /**
  *  Util class that deals with XML Schema

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/IOUtils.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/IOUtils.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/utils/IOUtils.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -38,8 +38,8 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
 
 /**
  * IO utilites

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonBinding.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,8 +27,8 @@
 
 import javax.xml.namespace.QName;
 
-import org.jboss.ws.common.binding.BindingException;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.binding.BindingException;
 import org.jboss.ws.core.soap.UnboundHeader;
 
 /**

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonClient.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -37,7 +37,6 @@
 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.umdm.ClientEndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
@@ -48,6 +47,7 @@
 import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
 import org.jboss.ws.common.utils.HolderUtils;
 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/CommonMessageContext.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonMessageContext.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -29,9 +29,9 @@
 
 import javax.xml.soap.SOAPMessage;
 
-import org.jboss.ws.common.binding.SerializationContext;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.binding.SerializationContext;
 import org.jboss.ws.core.server.MessageContextPropertyHelper;
 import org.jboss.xb.binding.NamespaceRegistry;
 

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAP11Binding.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -28,8 +28,8 @@
 import javax.xml.soap.SOAPMessage;
 
 import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.jaxrpc.Use;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
+import org.jboss.ws.core.jaxrpc.Use;
 import org.jboss.ws.core.soap.MessageFactoryImpl;
 
 /**

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -49,16 +49,16 @@
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.NameImpl;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.jaxrpc.Style;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
 import org.jboss.ws.common.metadata.umdm.TypesMetaData;
 import org.jboss.ws.common.utils.DOMUtils;
 import org.jboss.ws.common.utils.JavaUtils;
 import org.jboss.ws.common.utils.MimeUtils;
+import org.jboss.ws.core.binding.BindingException;
 import org.jboss.ws.core.jaxrpc.ParameterWrapping;
 import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.jaxrpc.Style;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.core.soap.MessageFactoryImpl;
 import org.jboss.ws.core.soap.SOAPBodyElementDoc;

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding)

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Deserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Deserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Deserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,79 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.extras.xop.XOPContext;
+import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
+import org.w3c.dom.Element;
+/**
+ * Deserializer for Base64
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64Deserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(Base64Deserializer.class);
+   
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      
+      byte[] value = null;
+      
+      String valueStr = unwrapValueStr(xmlFragment);
+      if(XOPContext.isXOPMessage())
+      {
+         try
+         {
+            Element xopInclude = DOMUtils.parse(valueStr);
+            String cid = xopInclude.getAttribute("href");
+            XOPUnmarshaller xopUnmarshaller = new XOPUnmarshallerImpl();
+            value = xopUnmarshaller.getAttachmentAsByteArray(cid);
+         }
+         catch (IOException e)
+         {
+            throw new WSException("Failed to parse xopInclude element");
+         }
+      }
+      else if (valueStr != null)
+      {
+         value = SimpleTypeBindings.unmarshalBase64(valueStr);
+      }
+      return value;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64DeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64DeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64DeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * DeserializerFactory for base64.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64DeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer()
+   {
+      return new Base64Deserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Serializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64Serializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64Serializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,76 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.extras.xop.XOPContext;
+import org.jboss.ws.extras.xop.jaxrpc.XOPMarshallerImpl;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.jboss.xb.binding.sunday.xop.XOPMarshaller;
+import org.jboss.xb.binding.sunday.xop.XOPObject;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for base64
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64Serializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(Base64Serializer.class);
+
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      String xmlFragment = null;
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+
+      if(XOPContext.isXOPMessage())
+      {
+         XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
+         XOPObject xopObject = new XOPObject(value);
+         xopObject.setContentType("application/octet-stream");
+         String cid = xopMarshaller.addMtomAttachment(xopObject, xmlName.getNamespaceURI(), xmlType.getLocalPart() );
+         String xopInclude = "<xop:Include xmlns:xop='http://www.w3.org/2004/08/xop/include' href='"+cid+"'/>";
+         xmlFragment = wrapValueStr(xmlName, xopInclude, nsRegistry, attributes, false);
+      }
+      else
+      {
+         value = JavaUtils.getPrimitiveValueArray(value);
+         String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
+         xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+      }
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64SerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/Base64SerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/Base64SerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for base64Binary.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64SerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new Base64Serializer();
+   }
+}
\ No newline at end of file

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/BindingException.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,92 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.common.binding;
-
-// $Id$
-
-/** An exception that may occur during message binding
- *
- * @author Thomas.Diesler at jboss.org
- * @since 16-Oct-2004
- */
-public class BindingException extends Exception
-{
-   /**
-    * 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 BindingException()
-   {
-   }
-
-   /**
-    * 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 BindingException(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 BindingException(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 BindingException(String message, Throwable cause)
-   {
-      super(message, cause);
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/BindingException.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/BindingException.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/BindingException.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+/** An exception that may occur during message binding
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 16-Oct-2004
+ */
+public class BindingException extends Exception
+{
+   /**
+    * 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 BindingException()
+   {
+   }
+
+   /**
+    * 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 BindingException(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 BindingException(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 BindingException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.util.Calendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema 3.2.16</a>
+ */
+public class CalendarDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(CalendarDeserializer.class);
+
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      Calendar value = null;
+
+      String valueStr = unwrapValueStr(xmlFragment);
+      if (valueStr != null)
+      {
+         value = SimpleTypeBindings.unmarshalDateTime(valueStr);
+      }
+
+      return value;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A CalendarDeserializer Factory
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class CalendarDeserializerFactory extends DeserializerFactoryBase
+{
+
+   public DeserializerSupport getDeserializer()
+   {
+      return new CalendarDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,58 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.util.Calendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema 3.2.16</a>
+ */
+public class CalendarSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(CalendarSerializer.class);
+
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      
+      String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
+
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/CalendarSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/CalendarSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class CalendarSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new CalendarSerializer();
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/ComplexTypeDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.binding;
-
-
-// $Id$
-
-/**
- * A Deserializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 04-Dec-2004
- */
-public abstract class ComplexTypeDeserializer extends DeserializerSupport
-{
-
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/ComplexTypeDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/ComplexTypeDeserializer.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+
+// $Id$
+
+/**
+ * A Deserializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class ComplexTypeDeserializer extends DeserializerSupport
+{
+
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/ComplexTypeSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.binding;
-
-
-// $Id$
-
-/**
- * A Serializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 04-Dec-2004
- */
-public abstract class ComplexTypeSerializer extends SerializerSupport
-{
-
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/ComplexTypeSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/ComplexTypeSerializer.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+
+// $Id$
+
+/**
+ * A Serializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class ComplexTypeSerializer extends SerializerSupport
+{
+
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,61 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(DateDeserializer.class);
+
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      Date value = null;
+
+      String valueStr = unwrapValueStr(xmlFragment);
+      if (valueStr != null)
+      {
+         Calendar cal = SimpleTypeBindings.unmarshalDateTime(valueStr);
+         value = cal.getTime();
+      }
+
+      return value;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A DateDeserializer Factory
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer()
+   {
+      return new DateDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for Dates.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">XML Schema 3.2.16</a>
+ */
+public class DateSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(DateSerializer.class);
+
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      if (value != null)
+      {
+         Calendar cal = new GregorianCalendar();
+         cal.setTime((Date)value);
+         value = cal;
+      }
+
+      String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
+
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DateSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DateSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for Date primitives
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new DateSerializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerFactoryBase.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/DeserializerFactoryBase.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerFactoryBase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.xml.rpc.encoding.Deserializer;
+import javax.xml.rpc.encoding.DeserializerFactory;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class DeserializerFactoryBase implements DeserializerFactory
+{
+   public abstract DeserializerSupport getDeserializer() throws BindingException;
+
+   public Deserializer getDeserializerAs(String mechanismType)
+   {
+      throw new NotImplementedException();
+   }
+
+   public Iterator getSupportedMechanismTypes()
+   {
+      throw new NotImplementedException();
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/DeserializerSupport.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.common.binding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.Deserializer;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.utils.XMLPredefinedEntityReferenceResolver;
-
-/** The base class for all Deserializers.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 04-Dec-2004
- */
-public abstract class DeserializerSupport implements Deserializer
-{
-
-   /** Deserialize an XML fragment to an object value
-    *
-    * @param xmlName The root element name of the resulting fragment
-    * @param xmlType The associated schema type
-    * @param xmlFragment The XML fragment to deserialize
-    * @param serContext The serialization context
-    */
-   public abstract Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException;
-
-   /** Unwrap the value string from the XML fragment
-    *
-    * @return The value string or null if the startTag contains a xsi:nil='true' attribute
-    */
-   protected String unwrapValueStr(String xmlFragment)
-   {
-      // We only scan for :nil if the xmlFragment is an empty element
-      if (isEmptyElement(xmlFragment))
-      {
-         return (isNil(xmlFragment) ? null : "");
-      }
-
-      int endOfStartTag = xmlFragment.indexOf(">");
-      int startOfEndTag = xmlFragment.lastIndexOf("</");
-      if (endOfStartTag < 0 || startOfEndTag < 0)
-         throw new IllegalArgumentException("Invalid XML fragment: " + xmlFragment);
-
-      String valueStr = xmlFragment.substring(endOfStartTag + 1, startOfEndTag);
-
-      return XMLPredefinedEntityReferenceResolver.resolve(valueStr);
-   }
-
-   protected boolean isEmptyElement(String xmlFragment)
-   {
-      return xmlFragment.startsWith("<") && xmlFragment.endsWith("/>");
-   }
-
-   protected boolean isNil(String xmlFragment)
-   {
-      boolean isNil = false;
-      if (isEmptyElement(xmlFragment))
-      {
-         int endOfStartTag = xmlFragment.indexOf(">");
-         String startTag = xmlFragment.substring(0, endOfStartTag);
-         isNil = startTag.indexOf(":nil='1'") > 0 || startTag.indexOf(":nil=\"1\"") > 0;
-         isNil = isNil || startTag.indexOf(":nil='true'") > 0 || startTag.indexOf(":nil=\"true\"") > 0;
-      }
-      return isNil;
-   }
-
-   public String getMechanismType()
-   {
-      throw new NotImplementedException();
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/DeserializerSupport.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/DeserializerSupport.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Deserializer;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.utils.XMLPredefinedEntityReferenceResolver;
+
+/** The base class for all Deserializers.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class DeserializerSupport implements Deserializer
+{
+
+   /** Deserialize an XML fragment to an object value
+    *
+    * @param xmlName The root element name of the resulting fragment
+    * @param xmlType The associated schema type
+    * @param xmlFragment The XML fragment to deserialize
+    * @param serContext The serialization context
+    */
+   public abstract Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException;
+
+   /** Unwrap the value string from the XML fragment
+    *
+    * @return The value string or null if the startTag contains a xsi:nil='true' attribute
+    */
+   protected String unwrapValueStr(String xmlFragment)
+   {
+      // We only scan for :nil if the xmlFragment is an empty element
+      if (isEmptyElement(xmlFragment))
+      {
+         return (isNil(xmlFragment) ? null : "");
+      }
+
+      int endOfStartTag = xmlFragment.indexOf(">");
+      int startOfEndTag = xmlFragment.lastIndexOf("</");
+      if (endOfStartTag < 0 || startOfEndTag < 0)
+         throw new IllegalArgumentException("Invalid XML fragment: " + xmlFragment);
+
+      String valueStr = xmlFragment.substring(endOfStartTag + 1, startOfEndTag);
+
+      return XMLPredefinedEntityReferenceResolver.resolve(valueStr);
+   }
+
+   protected boolean isEmptyElement(String xmlFragment)
+   {
+      return xmlFragment.startsWith("<") && xmlFragment.endsWith("/>");
+   }
+
+   protected boolean isNil(String xmlFragment)
+   {
+      boolean isNil = false;
+      if (isEmptyElement(xmlFragment))
+      {
+         int endOfStartTag = xmlFragment.indexOf(">");
+         String startTag = xmlFragment.substring(0, endOfStartTag);
+         isNil = startTag.indexOf(":nil='1'") > 0 || startTag.indexOf(":nil=\"1\"") > 0;
+         isNil = isNil || startTag.indexOf(":nil='true'") > 0 || startTag.indexOf(":nil=\"true\"") > 0;
+      }
+      return isNil;
+   }
+
+   public String getMechanismType()
+   {
+      throw new NotImplementedException();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.w3c.dom.Element;
+
+/**
+ * A deserializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 23-Jun-2005
+ */
+public class ElementDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(ElementDeserializer.class);
+   
+   /** Deserialize the given simple xmlString
+    */
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      try
+      {
+         Element domElement = DOMUtils.parse(xmlFragment);
+         return domElement;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new BindingException();
+      }
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class ElementDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer()
+   {
+      return new ElementDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class ElementSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(ElementSerializer.class);
+
+   /** Marshal the value for a given XMLSchema type
+    * @param xmlType local part of the schema type
+    * @param value the value to marshal
+    * @param serContext
+    * @return the string representation od the value
+    */
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes)
+         throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      if (value == null)
+         throw new IllegalArgumentException("Element value cannot be null");
+      if ((value instanceof Element) == false)
+         throw new IllegalArgumentException("Value is not a Element: " + value.getClass().getName());
+
+      String xmlFragment = DOMWriter.printNode((Element)value, false);
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/ElementSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/ElementSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 23-Jun-2005
+ */
+public class ElementSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new ElementSerializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * Deserializer for hexBinary.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#hexBinary">XML Schema 3.2.16</a>
+ */
+public class HexDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(HexDeserializer.class);
+
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      byte[] value = null;
+
+      String valueStr = unwrapValueStr(xmlFragment);
+      if (valueStr != null)
+      {
+         value = SimpleTypeBindings.unmarshalHexBinary(valueStr);
+      }
+
+      return value;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * DeserializerFactory for hexBinary.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class HexDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer()
+   {
+      return new HexDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for hexBinary.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ * @see <a href="http://www.w3.org/TR/xmlschema-2/#hexBinary">XML Schema 3.2.16</a>
+ */
+public class HexSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(HexSerializer.class);
+
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      value = JavaUtils.getPrimitiveValueArray(value);
+      String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
+
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/HexSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/HexSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for hexBinary.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class HexSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new HexSerializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.io.ByteArrayInputStream;
+
+import javax.xml.namespace.QName;
+
+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.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshaller;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+
+/**
+ * A Deserializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBDeserializer extends ComplexTypeDeserializer
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(JBossXBDeserializer.class);
+
+   private JBossXBUnmarshaller unmarshaller;
+
+   public JBossXBDeserializer() throws BindingException
+   {
+      // Get the JAXB marshaller for complex objects
+      unmarshaller = new JBossXBUnmarshallerImpl();
+   }
+
+   /**
+    * For unmarshalling the WS layer passes to the JAXB layer
+    *
+    *    - required self contained xml content
+    *    - required map of packaged or generated XSDSchema
+    *    - optional QName of the root complex type
+    *    - optional instance of JavaWsdlMapping
+    *
+    * The xmlType is redundant if the root element name corresponds to a global element definition in schema.
+    * If the java mapping is null, default mapping rules apply.
+    *
+    * The result is an object instance or null.
+    * In case of an unmarshalling problem a descriptive exception is thrown.
+    */
+   public Object deserialize(QName xmlName, QName xmlType, String val, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      // Expect the specific JAXRPC serialization context
+      SerializationContextJAXRPC jaxrpcContext = (SerializationContextJAXRPC)serContext;
+
+      Object value = null;
+      String typeName = xmlType.getLocalPart();
+
+      try
+      {
+         // Get the parsed model
+         XSModel model = jaxrpcContext.getXsModel();
+
+         // Get the jaxrpc-mapping.xml meta data
+         JavaWsdlMapping jaxrpcMapping = jaxrpcContext.getJavaWsdlMapping();
+
+         unmarshaller.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
+         unmarshaller.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
+         unmarshaller.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
+         unmarshaller.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, jaxrpcMapping);
+
+         ByteArrayInputStream ins = new ByteArrayInputStream(val.getBytes("UTF-8"));
+         value = unmarshaller.unmarshal(ins);
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new BindingException(ex);
+      }
+
+      log.debug("deserialized: " + (value != null ? value.getClass().getName() : null));
+      return value;
+
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Deserializer that can handle complex types
+ * by delegating to JAXB.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer() throws BindingException
+   {
+      return new JBossXBDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+
+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.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshaller;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
+import org.jboss.ws.core.binding.jbossxb.XercesXSMarshallerImpl;
+import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A Serializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBSerializer extends ComplexTypeSerializer
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(JBossXBSerializer.class);
+
+   private JBossXBMarshaller marshaller;
+
+   public JBossXBSerializer() throws BindingException
+   {
+      // Get the JAXB marshaller for complex objects
+      marshaller = new JBossXBMarshallerImpl();
+   }
+
+   /**
+    * For marshalling the WS layer passes to the JAXB layer
+    *
+    *    - optional java object instance
+    *    - required map of packaged or generated XSDSchema
+    *    - required QName of the root element
+    *    - optional QName of the root complex type
+    *    - optional instance of JavaWsdlMapping
+    *
+    * If the object value is null, the corresponding XML representation of the nillable element should be marshalled.
+    * The xmlType is redundant if the xmlName corresponds to a global element definition in schema.
+    * If the java mapping is null, default mapping rules apply.
+    *
+    * The result is a self contained (i.e. contains all namespace definitions) XML document without the XML declaration.
+    * In case of an marshalling problem a descriptive exception is thrown.
+    */
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      // Expect the specific JAXRPC serialization context
+      SerializationContextJAXRPC jaxrpcContext = (SerializationContextJAXRPC)serContext;
+
+      try
+      {
+         // Get the parsed model
+         XSModel model = jaxrpcContext.getXsModel();
+
+         // Get the jaxrpc-mapping.xml object graph
+         JavaWsdlMapping jaxrpcMapping = jaxrpcContext.getJavaWsdlMapping();
+
+         // schemabinding marshaller is the default delegate
+         JBossXBMarshaller delegate = marshaller;
+
+         if(value instanceof Exception)
+         {
+            // todo: CTS workaround for custom exceptions, clarify when Alexey is back
+            // causes NPE in MarshallerImpl:458
+            delegate = new XercesXSMarshallerImpl();
+         }
+
+         // marshalling context
+         delegate.setProperty(JBossXBConstants.JBXB_XS_MODEL, model);
+         delegate.setProperty(JBossXBConstants.JBXB_TYPE_QNAME, xmlType);
+         delegate.setProperty(JBossXBConstants.JBXB_ROOT_QNAME, xmlName);
+         delegate.setProperty(JBossXBConstants.JBXB_JAVA_MAPPING, jaxrpcMapping);
+
+         // marshall
+         StringWriter strwr = new StringWriter();
+         delegate.marshal(value, strwr);
+         String xmlFragment = strwr.toString();
+
+         log.debug("serialized: " + xmlFragment);
+         return xmlFragment;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new BindingException(ex);
+      }
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/JBossXBSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/JBossXBSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle complex types 
+ * by delegating to JAXB.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer() throws BindingException
+   {
+      return new JBossXBSerializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/NullValueSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/NullValueSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/NullValueSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for null values.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Jun-2005
+ */
+public class NullValueSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(NullValueSerializer.class);
+
+   /**
+    *  Serializes an object null value.
+    *  
+    *  If a message part of an RPC parameter is defined like this
+    *  
+    *  <message name='SomeMessage'>
+    *   <part name='partName' element='someElement'/>
+    *  </message>
+    *  
+    *  it is possible that the element definition does not allow
+    *  null values. In that case an error should be generated.
+    */
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+      nsRegistry.registerURI(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
+      String xmlFragment = wrapValueStr(xmlName, null, nsRegistry, attributes, true);
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(QNameDeserializer.class);
+
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      QName value = null;
+
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+      String valueStr = unwrapValueStr(xmlFragment, nsRegistry);
+      if (valueStr != null)
+      {
+         value = SimpleTypeBindings.unmarshalQName(valueStr, nsRegistry);
+      }
+
+      return value;
+   }
+
+   /** Unwrap the value string from the XML fragment
+    * @return The value string or null if the startTag contains a xsi:nil='true' attribute
+    */
+   protected String unwrapValueStr(String xmlFragment, NamespaceRegistry nsRegistry)
+   {
+      if (isEmptyElement(xmlFragment) == false)
+      {
+         // Register namespace declarations
+         try
+         {
+            Element el = DOMUtils.parse(xmlFragment);
+            NamedNodeMap attribs = el.getAttributes();
+            for (int i = 0; i < attribs.getLength(); i++)
+            {
+               Node attr = attribs.item(i);
+               String nodeName = attr.getNodeName();
+               if (nodeName.startsWith("xmlns:"))
+               {
+                  String prefix = nodeName.substring(6);
+                  String nsURI = attr.getNodeValue();
+                  nsRegistry.registerURI(nsURI, prefix);
+               }
+            }
+         }
+         catch (IOException e)
+         {
+            throw new IllegalArgumentException("Cannot parse xmlFragment: " + xmlFragment);
+         }
+      }
+
+      return super.unwrapValueStr(xmlFragment);
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer()
+   {
+      return new QNameDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,78 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for QNames.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(QNameSerializer.class);
+
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      QName qnameValue = (QName)value;
+      String nsURI = qnameValue.getNamespaceURI();
+
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+
+      // Remove prefix and register again
+      if (nsURI.length() > 0)
+      {
+         qnameValue = new QName(qnameValue.getNamespaceURI(), qnameValue.getLocalPart());
+         qnameValue = nsRegistry.registerQName(qnameValue);
+      }
+
+      String valueStr = SimpleTypeBindings.marshalQName(qnameValue, nsRegistry);
+      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+
+      // Insert the NS declaration for the qnameValue
+      if (nsURI.length() > 0)
+      {
+         StringBuilder buffer = new StringBuilder(xmlFragment);
+         int indexGT = xmlFragment.indexOf(">");
+         String prefix = qnameValue.getPrefix();
+         buffer.insert(indexGT, " xmlns:" + prefix + "='" + nsURI + "'");
+         xmlFragment = buffer.toString();
+      }
+
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/QNameSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/QNameSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * SerializerFactory for QName primitive
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new QNameSerializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializer.java (from rev 1582, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializer.java	2006-12-06 19:15:10 UTC (rev 1582)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,189 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.lang.reflect.Array;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.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;
+
+/**
+ * A Deserializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArrayDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(SOAPArrayDeserializer.class);
+
+   private DeserializerSupport compDeserializer;
+
+   public SOAPArrayDeserializer() throws BindingException
+   {
+   }
+
+   /**
+    */
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      try
+      {
+         ParameterMetaData paramMetaData = (ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
+         QName compXmlType = paramMetaData.getSOAPArrayCompType();
+         QName compXmlName = paramMetaData.getXmlName();
+
+         Element arrayElement = DOMUtils.parse(xmlFragment);
+         int[] arrDims = getDimensionsFromAttribute(arrayElement);
+         Class compJavaType = getComponentTypeFromAttribute(arrayElement, serContext);
+         Object[] retArray = (Object[])Array.newInstance(compJavaType, arrDims);
+
+         TypeMappingImpl typeMapping = serContext.getTypeMapping();
+         if (compXmlType == null)
+         {
+            compXmlType = typeMapping.getXMLType(compJavaType);
+            paramMetaData.setSOAPArrayCompType(compXmlType);
+         }
+
+         if (compXmlType == null)
+            throw new WSException("Cannot obtain component xmlType for: " + compJavaType);
+
+         // Get the component type deserializer factory
+         log.debug("Get component deserializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+         DeserializerFactoryBase compDeserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(compJavaType, compXmlType);
+         if (compDeserializerFactory == null)
+         {
+            log.warn("Cannot obtain component deserializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+            compDeserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(null, compXmlType);
+         }
+         if (compDeserializerFactory == null)
+            throw new WSException("Cannot obtain component deserializer for: " + compXmlType);
+
+         // Get the component type deserializer
+         compDeserializer = (DeserializerSupport)compDeserializerFactory.getDeserializer();
+
+         if (arrDims.length < 1 || 2 < arrDims.length)
+            throw new WSException("Unsupported array dimensions: " + Arrays.asList(arrDims));
+         
+         Iterator it = DOMUtils.getChildElements(arrayElement);
+         if (arrDims.length == 1)
+         {
+            Object[] subArr = retArray;
+            deserializeMemberValues(compXmlName, compXmlType, serContext, it, subArr);
+         }
+         if (arrDims.length == 2)
+         {
+            for (int i = 0; i < arrDims[0]; i++)
+            {
+               Object[] subArr = (Object[])retArray[i];
+               deserializeMemberValues(compXmlName, compXmlType, serContext, it, subArr);
+            }
+         }
+
+         log.debug("deserialized: " + retArray.getClass().getName());
+         return retArray;
+      }
+      catch (RuntimeException e)
+      {
+         throw e;
+      }
+      catch (Exception e)
+      {
+         throw new BindingException(e);
+      }
+   }
+
+   private void deserializeMemberValues(QName compXmlName, QName compXmlType, SerializationContext serContext, Iterator it, Object[] subArr) throws BindingException
+   {
+      int dim = subArr.length;
+      for (int i = 0; i < dim; i++)
+      {
+         Object compValue = null;
+         if (it.hasNext())
+         {
+            Element childElement = (Element)it.next();
+            String compXMLFragment = DOMWriter.printNode(childElement, false);
+            compValue = compDeserializer.deserialize(compXmlName, compXmlType, compXMLFragment, serContext);
+            compValue = JavaUtils.getWrapperValueArray(compValue);
+         }
+         subArr[i] = compValue;
+      }
+   }
+
+   private int[] getDimensionsFromAttribute(Element arrayElement)
+   {
+      QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
+      QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
+      if (arrayType == null)
+         throw new WSException("Cannot obtain attribute: " + attrQName);
+
+      String localPart = arrayType.getLocalPart();
+      int dimIndex = localPart.indexOf("[");
+
+      String dimStr = localPart.substring(dimIndex);
+      StringTokenizer st = new StringTokenizer(dimStr, "[,]");
+      int[] arrDims = new int[st.countTokens()];
+      for (int i = 0; st.hasMoreTokens(); i++)
+         arrDims[i] = new Integer(st.nextToken()).intValue();
+
+      return arrDims;
+   }
+
+   private Class getComponentTypeFromAttribute(Element arrayElement, SerializationContext serContext)
+   {
+      QName attrQName = new QName(Constants.URI_SOAP11_ENC, "arrayType");
+      QName arrayType = DOMUtils.getAttributeValueAsQName(arrayElement, attrQName);
+      if (arrayType == null)
+         throw new WSException("Cannot obtain attribute: " + attrQName);
+
+      String nsURI = arrayType.getNamespaceURI();
+      String localPart = arrayType.getLocalPart();
+      int dimIndex = localPart.indexOf("[");
+      QName compXmlType = new QName(nsURI, localPart.substring(0, dimIndex));
+
+      TypeMappingImpl typeMapping = serContext.getTypeMapping();
+      Class javaType = typeMapping.getJavaType(compXmlType);
+      if (javaType == null)
+         throw new WSException("Cannot obtain javaType for: " + compXmlType);
+
+      return JavaUtils.getWrapperType(javaType);
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArrayDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArrayDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Deserializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArrayDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer() throws BindingException
+   {
+      return new SOAPArrayDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializer.java (from rev 1582, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializer.java	2006-12-06 19:15:10 UTC (rev 1582)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.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;
+
+/**
+ * A Serializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArraySerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(SOAPArraySerializer.class);
+
+   private SerializerSupport compSerializer;
+   private NullValueSerializer nullSerializer;
+   private boolean isArrayComponentType;
+   private boolean xsiNamespaceInserted;
+   private StringBuilder xmlFragment;
+
+   public SOAPArraySerializer() throws BindingException
+   {
+      nullSerializer = new NullValueSerializer();
+   }
+
+   /**
+    */
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + ",valueType=" + value.getClass().getName() + "]");
+      try
+      {
+         ParameterMetaData paramMetaData = (ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
+         QName compXmlType = paramMetaData.getSOAPArrayCompType();
+         QName compXmlName = paramMetaData.getXmlName();
+         Class javaType = paramMetaData.getJavaType();
+
+         Class compJavaType = javaType.getComponentType();
+         isArrayComponentType = isArrayJavaType(compJavaType) && isArrayXmlType(compXmlType);
+         while (compJavaType.getComponentType() != null && isArrayComponentType == false)
+         {
+            compJavaType = compJavaType.getComponentType();
+            isArrayComponentType = isArrayJavaType(compJavaType) && isArrayXmlType(compXmlType);
+         }
+
+         TypeMappingImpl typeMapping = serContext.getTypeMapping();
+         if (compXmlType == null)
+         {
+            compXmlType = typeMapping.getXMLType(compJavaType);
+            paramMetaData.setSOAPArrayCompType(compXmlType);
+         }
+
+         if (compXmlType == null)
+            throw new WSException("Cannot obtain component xmlType for: " + compJavaType);
+
+         // Get the component type serializer factory
+         log.debug("Get component serializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+         SerializerFactoryBase compSerializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(compJavaType, compXmlType);
+         if (compSerializerFactory == null)
+         {
+            log.warn("Cannot obtain component serializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+            compSerializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(null, compXmlType);
+         }
+         if (compSerializerFactory == null)
+            throw new WSException("Cannot obtain component serializer for: " + compXmlType);
+
+         // Get the component type serializer
+         compSerializer = (SerializerSupport)compSerializerFactory.getSerializer();
+
+         // Get the corresponding wrapper type
+         if (JavaUtils.isPrimitive(value.getClass()))
+            value = JavaUtils.getWrapperValueArray(value);
+
+         xmlFragment = new StringBuilder("<" + Constants.PREFIX_SOAP11_ENC + ":Array ");
+         if (value instanceof Object[])
+         {
+            Object[] objArr = (Object[])value;
+            String arrayDim = "" + objArr.length;
+
+            // Get multiple array dimension
+            Object[] subArr = (Object[])value;
+            while (isArrayComponentType == false && subArr.length > 0 && subArr[0] instanceof Object[])
+            {
+               subArr = (Object[])subArr[0];
+               arrayDim += "," + subArr.length;
+            }
+
+            compXmlType = serContext.getNamespaceRegistry().registerQName(compXmlType);
+            String arrayType = Constants.PREFIX_SOAP11_ENC + ":arrayType='" + compXmlType.getPrefix() + ":" + compXmlType.getLocalPart() + "[" + arrayDim + "]'";
+            String compns = " xmlns:" + compXmlType.getPrefix() + "='" + compXmlType.getNamespaceURI() + "'";
+            xmlFragment.append(arrayType + compns + ">");
+
+            serializeArrayComponents(compXmlName, compXmlType, serContext, objArr);
+         }
+         else
+         {
+            throw new WSException("Unsupported array type: " + javaType);
+         }
+         xmlFragment.append("</" + Constants.PREFIX_SOAP11_ENC + ":Array>");
+
+         log.debug("serialized: " + xmlFragment);
+         return xmlFragment.toString();
+      }
+      catch (RuntimeException e)
+      {
+         throw e;
+      }
+      catch (Exception e)
+      {
+         throw new BindingException(e);
+      }
+   }
+
+   private void serializeArrayComponents(QName compXmlName, QName compXmlType, SerializationContext serContext, Object[] objArr) throws BindingException
+   {
+      for (Object compValue : objArr)
+      {
+         if (isArrayComponentType == false && compValue instanceof Object[])
+         {
+            serializeArrayComponents(compXmlName, compXmlType, serContext, (Object[])compValue);
+         }
+         else
+         {
+            SerializerSupport ser = compSerializer;
+
+            // Null component value
+            if (compValue == null)
+            {
+               ser = nullSerializer;
+               if (xsiNamespaceInserted == false)
+               {
+                  xsiNamespaceInserted = true;
+                  int insIndex = ("<" + Constants.PREFIX_SOAP11_ENC + ":Array ").length();
+                  xmlFragment.insert(insIndex, "xmlns:" + Constants.PREFIX_XSI + "='" + Constants.NS_SCHEMA_XSI + "' ");
+               }
+            }
+
+            String compFragment = ser.serialize(compXmlName, compXmlType, compValue, serContext, null);
+            xmlFragment.append(compFragment);
+         }
+      }
+   }
+
+   /** True for all array xmlTypes, i.e. nmtokens, base64Binary, hexBinary
+    * 
+    *  FIXME: This method should be removed as soon as we can reliably get the SOAP
+    *  arrayType from wsdl + schema. 
+    */
+   private boolean isArrayXmlType(QName xmlType)
+   {
+      boolean isArrayType = Constants.TYPE_SOAP11_BASE64.equals(xmlType);
+      isArrayType = isArrayType || Constants.TYPE_SOAP11_BASE64.equals(xmlType);
+      isArrayType = isArrayType || Constants.TYPE_SOAP11_BASE64BINARY.equals(xmlType);
+      isArrayType = isArrayType || Constants.TYPE_SOAP11_HEXBINARY.equals(xmlType);
+      isArrayType = isArrayType || Constants.TYPE_SOAP11_NMTOKENS.equals(xmlType);
+      isArrayType = isArrayType || Constants.TYPE_LITERAL_BASE64BINARY.equals(xmlType);
+      isArrayType = isArrayType || Constants.TYPE_LITERAL_HEXBINARY.equals(xmlType);
+      isArrayType = isArrayType || Constants.TYPE_LITERAL_NMTOKENS.equals(xmlType);
+      return isArrayType;
+   }
+
+   /** True for all array javaTypes, i.e. String[], Byte[], byte[] 
+    * 
+    *  FIXME: This method should be removed as soon as we can reliably get the SOAP
+    *  arrayType from wsdl + schema. 
+    */
+   private boolean isArrayJavaType(Class javaType)
+   {
+      boolean isBinaryType = String[].class.equals(javaType) || Byte[].class.equals(javaType) || byte[].class.equals(javaType);
+      return isBinaryType;
+   }
+
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPArraySerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPArraySerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArraySerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer() throws BindingException
+   {
+      return new SOAPArraySerializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,121 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * A deserializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 23-Jun-2005
+ */
+public class SOAPElementDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(SOAPElementDeserializer.class);
+   
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      try
+      {
+         Element domElement = DOMUtils.parse(xmlFragment);
+         SOAPElement soapElement = createElement(domElement, true);
+         return soapElement;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new BindingException();
+      }
+   }
+   
+   /**
+    * Create a SOAPElement from a DOM Element.
+    * This method is not part of the javax.xml.soap.SOAPFactory interface.
+    */
+   public SOAPElement createElement(Element domNode, boolean deep) throws SOAPException
+   {
+      if (domNode == null)
+         throw new IllegalArgumentException("Source node cannot be null");
+      
+      String localName = domNode.getLocalName();
+      String prefix = domNode.getPrefix() != null ? domNode.getPrefix() : "";
+      String nsURI = domNode.getNamespaceURI() != null ? domNode.getNamespaceURI() : "";
+
+      SOAPFactory factory = SOAPFactory.newInstance();
+      SOAPElement soapElement = factory.createElement(localName, prefix, nsURI);
+
+      // Add the child elements as well
+      if (deep)
+      {
+         if (domNode instanceof Element)
+            DOMUtils.copyAttributes(soapElement, (Element)domNode);
+         
+         NodeList nlist = domNode.getChildNodes();
+         for (int i = 0; i < nlist.getLength(); i++)
+         {
+            Node child = nlist.item(i);
+            short nodeType = child.getNodeType();
+            if (nodeType == Node.ELEMENT_NODE)
+            {
+               SOAPElement soapChild = createElement((Element)child, true);
+               soapElement.addChildElement(soapChild);
+            }
+            else if (nodeType == Node.TEXT_NODE)
+            {
+               String nodeValue = child.getNodeValue();
+               soapElement.addTextNode(nodeValue);
+            }
+            else if (nodeType == Node.CDATA_SECTION_NODE)
+            {
+               String nodeValue = child.getNodeValue();
+               soapElement.addTextNode(nodeValue);
+            }
+            else
+            {
+               log.trace("Ignore child type: " + nodeType);
+            }
+         }
+      }
+
+      return soapElement;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class SOAPElementDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer()
+   {
+      return new SOAPElementDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class SOAPElementSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(SOAPElementSerializer.class);
+
+   /** Marshal the value for a given XMLSchema type
+    * @param xmlType local part of the schema type
+    * @param value the value to marshal
+    * @param serContext
+    * @return the string representation od the value
+    */
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+      if (value == null)
+         throw new IllegalArgumentException("SOAPElement value cannot be null");
+      if ((value instanceof SOAPElement) == false)
+         throw new IllegalArgumentException("Value is not a SOAPElement: " + value.getClass().getName());
+
+      String xmlFragment = DOMWriter.printNode((SOAPElement)value, false);
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SOAPElementSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SOAPElementSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 23-Jun-2005
+ */
+public class SOAPElementSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new SOAPElementSerializer();
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializationContext.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.binding;
-
-// $Id$
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.xb.binding.NamespaceRegistry;
-
-/**
- * An abstract serialization context
- * 
- * @author Thomas.Diesler at jboss.org
- * @since 04-Dec-2004
- */
-public abstract class SerializationContext
-{
-   // The type mapping that is valid for this serialization context
-   private TypeMappingImpl typeMapping;
-   // The namespace registry that is valid for this serialization context
-   private NamespaceRegistry namespaceRegistry = new NamespaceRegistry();
-   // An arbitrary property bag
-   private Map<Object, Object> properties = new HashMap<Object, Object>();
-
-   public Object getProperty(Object key)
-   {
-      return properties.get(key);
-   }
-
-   public void setProperty(Object key, Object value)
-   {
-      properties.put(key, value);
-   }
-
-   public TypeMappingImpl getTypeMapping()
-   {
-      return typeMapping;
-   }
-
-   public void setTypeMapping(TypeMappingImpl typeMapping)
-   {
-      this.typeMapping = typeMapping;
-   }
-
-   public NamespaceRegistry getNamespaceRegistry()
-   {
-      return namespaceRegistry;
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializationContext.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializationContext.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializationContext.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.xb.binding.NamespaceRegistry;
+
+/**
+ * An abstract serialization context
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class SerializationContext
+{
+   // The type mapping that is valid for this serialization context
+   private TypeMappingImpl typeMapping;
+   // The namespace registry that is valid for this serialization context
+   private NamespaceRegistry namespaceRegistry = new NamespaceRegistry();
+   // An arbitrary property bag
+   private Map<Object, Object> properties = new HashMap<Object, Object>();
+
+   public Object getProperty(Object key)
+   {
+      return properties.get(key);
+   }
+
+   public void setProperty(Object key, Object value)
+   {
+      properties.put(key, value);
+   }
+
+   public TypeMappingImpl getTypeMapping()
+   {
+      return typeMapping;
+   }
+
+   public void setTypeMapping(TypeMappingImpl typeMapping)
+   {
+      this.typeMapping = typeMapping;
+   }
+
+   public NamespaceRegistry getNamespaceRegistry()
+   {
+      return namespaceRegistry;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerFactoryBase.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SerializerFactoryBase.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerFactoryBase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.xml.rpc.encoding.Serializer;
+import javax.xml.rpc.encoding.SerializerFactory;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializerSupport;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class SerializerFactoryBase implements SerializerFactory
+{
+   public abstract SerializerSupport getSerializer() throws BindingException;
+
+   public Serializer getSerializerAs(String mechanismType)
+   {
+      throw new NotImplementedException();
+   }
+
+   public Iterator getSupportedMechanismTypes()
+   {
+      throw new NotImplementedException();
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializerSupport.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,164 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.binding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.Serializer;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.Constants;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * The base class for all Serializers.
- *
- * @author Thomas.Diesler at jboss.org
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- * @since 04-Dec-2004
- */
-public abstract class SerializerSupport implements Serializer
-{
-   /** Serialize an object value to an XML fragment
-    *
-    * @param xmlName The root element name of the resulting fragment
-    * @param xmlType The associated schema type
-    * @param value The value to serialize
-    * @param serContext The serialization context
-    * @param attributes TODO
-    * @param attributes The attributes on this element
-    */
-   public abstract String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException;
-
-   /** Wrap the value string in a XML fragment with the given name
-    */
-   protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry nsRegistry, NamedNodeMap attributes, boolean normalize)
-   {
-      String nsURI = xmlName.getNamespaceURI();
-      String localPart = xmlName.getLocalPart();
-      String prefix = xmlName.getPrefix();
-
-      StringBuilder nsAttr = new StringBuilder("");
-      if (attributes != null)
-      {
-         for (int i = 0; i < attributes.getLength(); i++)
-         {
-            Node attr = attributes.item(i);
-            String attrName = attr.getNodeName();
-            String attrValue = attr.getNodeValue();
-            nsAttr.append(" " + attrName + "='" + attrValue + "'");
-         }
-      }
-
-      String elName;
-      if (nsURI.length() > 0)
-      {
-         xmlName = nsRegistry.registerQName(xmlName);
-         prefix = xmlName.getPrefix();
-         elName = prefix + ":" + localPart;
-
-         String xmlns = " xmlns:" + prefix + "='" + nsURI + "'";
-         if (nsAttr.indexOf(xmlns) < 0)
-         {
-            nsAttr.append(xmlns);
-         }
-      }
-      else
-      {
-         elName = localPart;
-      }
-
-      String xmlFragment;
-      if (valueStr == null)
-      {
-         String xmlns = " xmlns:" + Constants.PREFIX_XSI + "='" + Constants.NS_SCHEMA_XSI + "'";
-         xmlFragment = "<" + elName + nsAttr + " " + Constants.PREFIX_XSI + ":nil='1'" + xmlns + "/>";
-      }
-      else
-      {
-         if(normalize)
-            valueStr = normalize(valueStr);
-         xmlFragment = "<" + elName + nsAttr + ">" + valueStr + "</" + elName + ">";
-      }
-
-      return xmlFragment;
-   }
-
-   public String getMechanismType()
-   {
-      throw new NotImplementedException();
-   }
-
-   private String normalize(String valueStr)
-   {
-      // We assume most strings will not contain characters that need "escaping",
-      // and optimize for this case.
-      boolean found = false;
-      int i = 0;
-
-      outer: for (; i < valueStr.length(); i++)
-      {
-         switch (valueStr.charAt(i))
-         {
-            case '<':
-            case '>':
-            case '&':
-            case '"':
-               found = true;
-               break outer;
-         }
-      }
-
-      if (!found)
-         return valueStr;
-
-      // Resume where we left off
-      StringBuilder builder = new StringBuilder();
-      builder.append(valueStr.substring(0, i));
-      for (; i < valueStr.length(); i++)
-      {
-         char c = valueStr.charAt(i);
-         switch (c)
-         {
-            case '<':
-               builder.append("&lt;");
-               break;
-            case '>':
-               builder.append("&gt;");
-               break;
-            case '&':
-               builder.append("&amp;");
-               break;
-            case '"':
-               builder.append("&quot;");
-               break;
-            default:
-               builder.append(c);
-         }
-      }
-
-      return builder.toString();
-   }
-}
\ No newline at end of file

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializerSupport.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/binding/SerializerSupport.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,164 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Serializer;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.Constants;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * The base class for all Serializers.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @since 04-Dec-2004
+ */
+public abstract class SerializerSupport implements Serializer
+{
+   /** Serialize an object value to an XML fragment
+    *
+    * @param xmlName The root element name of the resulting fragment
+    * @param xmlType The associated schema type
+    * @param value The value to serialize
+    * @param serContext The serialization context
+    * @param attributes TODO
+    * @param attributes The attributes on this element
+    */
+   public abstract String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException;
+
+   /** Wrap the value string in a XML fragment with the given name
+    */
+   protected String wrapValueStr(QName xmlName, String valueStr, NamespaceRegistry nsRegistry, NamedNodeMap attributes, boolean normalize)
+   {
+      String nsURI = xmlName.getNamespaceURI();
+      String localPart = xmlName.getLocalPart();
+      String prefix = xmlName.getPrefix();
+
+      StringBuilder nsAttr = new StringBuilder("");
+      if (attributes != null)
+      {
+         for (int i = 0; i < attributes.getLength(); i++)
+         {
+            Node attr = attributes.item(i);
+            String attrName = attr.getNodeName();
+            String attrValue = attr.getNodeValue();
+            nsAttr.append(" " + attrName + "='" + attrValue + "'");
+         }
+      }
+
+      String elName;
+      if (nsURI.length() > 0)
+      {
+         xmlName = nsRegistry.registerQName(xmlName);
+         prefix = xmlName.getPrefix();
+         elName = prefix + ":" + localPart;
+
+         String xmlns = " xmlns:" + prefix + "='" + nsURI + "'";
+         if (nsAttr.indexOf(xmlns) < 0)
+         {
+            nsAttr.append(xmlns);
+         }
+      }
+      else
+      {
+         elName = localPart;
+      }
+
+      String xmlFragment;
+      if (valueStr == null)
+      {
+         String xmlns = " xmlns:" + Constants.PREFIX_XSI + "='" + Constants.NS_SCHEMA_XSI + "'";
+         xmlFragment = "<" + elName + nsAttr + " " + Constants.PREFIX_XSI + ":nil='1'" + xmlns + "/>";
+      }
+      else
+      {
+         if(normalize)
+            valueStr = normalize(valueStr);
+         xmlFragment = "<" + elName + nsAttr + ">" + valueStr + "</" + elName + ">";
+      }
+
+      return xmlFragment;
+   }
+
+   public String getMechanismType()
+   {
+      throw new NotImplementedException();
+   }
+
+   private String normalize(String valueStr)
+   {
+      // We assume most strings will not contain characters that need "escaping",
+      // and optimize for this case.
+      boolean found = false;
+      int i = 0;
+
+      outer: for (; i < valueStr.length(); i++)
+      {
+         switch (valueStr.charAt(i))
+         {
+            case '<':
+            case '>':
+            case '&':
+            case '"':
+               found = true;
+               break outer;
+         }
+      }
+
+      if (!found)
+         return valueStr;
+
+      // Resume where we left off
+      StringBuilder builder = new StringBuilder();
+      builder.append(valueStr.substring(0, i));
+      for (; i < valueStr.length(); i++)
+      {
+         char c = valueStr.charAt(i);
+         switch (c)
+         {
+            case '<':
+               builder.append("&lt;");
+               break;
+            case '>':
+               builder.append("&gt;");
+               break;
+            case '&':
+               builder.append("&amp;");
+               break;
+            case '"':
+               builder.append("&quot;");
+               break;
+            default:
+               builder.append(c);
+         }
+      }
+
+      return builder.toString();
+   }
+}
\ No newline at end of file

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleDeserializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * A deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 22-Oct-2004
+ */
+public class SimpleDeserializer extends DeserializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(SimpleDeserializer.class);
+
+   public Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
+   {
+      log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      Object value = null;
+      String valueStr = unwrapValueStr(xmlFragment);
+
+      if (valueStr != null)
+      {
+         value = SimpleTypeBindings.unmarshal(xmlType.getLocalPart(), valueStr, serContext.getNamespaceRegistry());
+      }
+
+      return value;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleDeserializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleDeserializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.DeserializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleDeserializerFactory extends DeserializerFactoryBase
+{
+   public DeserializerSupport getDeserializer()
+   {
+      return new SimpleDeserializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleSerializer.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializer.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleSerializer extends SerializerSupport
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(SimpleSerializer.class);
+
+   /** Marshal the value for a given XMLSchema type
+    * @param xmlType local part of the schema type
+    * @param value the value to marshal
+    * @param serContext
+    * @return the string representation od the value
+    */
+   public String serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
+   {
+      log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+
+      String valueStr;
+      String typeName = xmlType.getLocalPart();
+      NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+
+      if ("base64Binary".equals(typeName))
+      {
+         throw new NotImplementedException();
+      }
+      else
+      {
+         valueStr = SimpleTypeBindings.marshal(xmlType.getLocalPart(), value, nsRegistry);
+      }
+
+      String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+      return xmlFragment;
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleSerializerFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/encoding/SimpleSerializerFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/SimpleSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+import org.jboss.ws.core.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleSerializerFactory extends SerializerFactoryBase
+{
+   public SerializerSupport getSerializer()
+   {
+      return new SimpleSerializer();
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb)

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBConstants.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBConstants.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBConstants.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,43 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.common.jbossxb;
-
-// $Id$
-
-/** JBossXB Constants
- *
- * @author Thomas.Diesler at jboss.org
- * @since 18-Oct-2004
- */
-public interface JBossXBConstants
-{
-   /** Set this property with a Reader to the xsdSchema */
-   String JBXB_SCHEMA_READER = "org.jboss.xb.xsd.reader";
-   /** Set this property with a the QName of the root element */
-   String JBXB_ROOT_QNAME = "org.jboss.xb.root.qname";
-   /** Set this property with a the QName of the root type */
-   String JBXB_TYPE_QNAME = "org.jboss.xb.type.qname";
-   /** Set this property with an instance of JavaWsdlMapping */
-   String JBXB_JAVA_MAPPING = "org.jboss.xb.java.mapping";
-   /** Set this property to the XSModel to pull schema info from */
-   String JBXB_XS_MODEL = "org.jboss.xb.xsd.xsmodel";
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBConstants.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBConstants.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBConstants.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBConstants.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding.jbossxb;
+
+// $Id$
+
+/** JBossXB Constants
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public interface JBossXBConstants
+{
+   /** Set this property with a Reader to the xsdSchema */
+   String JBXB_SCHEMA_READER = "org.jboss.xb.xsd.reader";
+   /** Set this property with a the QName of the root element */
+   String JBXB_ROOT_QNAME = "org.jboss.xb.root.qname";
+   /** Set this property with a the QName of the root type */
+   String JBXB_TYPE_QNAME = "org.jboss.xb.type.qname";
+   /** Set this property with an instance of JavaWsdlMapping */
+   String JBXB_JAVA_MAPPING = "org.jboss.xb.java.mapping";
+   /** Set this property to the XSModel to pull schema info from */
+   String JBXB_XS_MODEL = "org.jboss.xb.xsd.xsmodel";
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshaller.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBMarshaller.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshaller.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,48 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.common.jbossxb;
-
-import java.io.OutputStream;
-import java.io.Writer;
-
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-/**
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @version $Id$
- * @since Jul 5, 2006
- */
-public interface JBossXBMarshaller {
-
-   void marshal(Object obj, Writer writer) throws MarshalException;
-
-   void marshal(Object obj, ContentHandler handler);
-
-   void marshal(Object obj, Node node);
-
-   void marshal(Object obj, OutputStream os) throws MarshalException;
-
-   Object getProperty(String name);
-
-   void setProperty(String name, Object value);
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshaller.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBMarshaller.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBMarshaller.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshaller.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,48 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding.jbossxb;
+
+import java.io.OutputStream;
+import java.io.Writer;
+
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @version $Id$
+ * @since Jul 5, 2006
+ */
+public interface JBossXBMarshaller {
+
+   void marshal(Object obj, Writer writer) throws MarshalException;
+
+   void marshal(Object obj, ContentHandler handler);
+
+   void marshal(Object obj, Node node);
+
+   void marshal(Object obj, OutputStream os) throws MarshalException;
+
+   Object getProperty(String name);
+
+   void setProperty(String name, Object value);
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBMarshallerImpl.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,233 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.jbossxb;
-
-// $Id$
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.HashMap;
-
-import javax.xml.namespace.QName;
-
-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.extras.xop.jaxrpc.XOPMarshallerImpl;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.sunday.marshalling.MarshallerImpl;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-/**
- * An implementation of a JAXB Marshaller that uses the JBossXB schema binding marshaller.
- *
- * @author Thomas.Diesler at jboss.org
- * @author Heiko.Braun at jboss.org
- * @since 05-Jul-2006
- */
-public class JBossXBMarshallerImpl implements JBossXBMarshaller {
-
-   // provide logging
-   private static final Logger log = Logger.getLogger(JBossXBMarshallerImpl.class);
-
-   // The marshaller properties
-   private HashMap properties = new HashMap();
-
-   private MarshallerImpl delegate;
-
-   public JBossXBMarshallerImpl()
-   {
-
-      //ClassInfos.disableCache();
-
-      delegate = new MarshallerImpl();
-      delegate.setProperty(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_XML_VERSION, "false");
-      delegate.setProperty(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_INDENTATION, "false");
-      delegate.declareNamespace("xsi", Constants.NS_XML_SCHEMA_INSTANCE);
-      delegate.setSupportNil(true);
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into a Writer.
-    */
-   public void marshal(Object obj, Writer writer) throws MarshalException
-   {
-      assertRequiredProperties();
-
-      try
-      {
-         QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
-         delegate.addRootElement(xmlName);
-
-         QName xmlType = (QName)getProperty(JBossXBConstants.JBXB_TYPE_QNAME);
-         boolean isAnonymousType = (xmlType != null && xmlType.getLocalPart().startsWith(">"));
-         if (xmlType != null && !isAnonymousType)
-         {
-            delegate.setRootTypeQName(xmlType);
-         }
-
-         if (xmlName.getNamespaceURI().length() > 0)
-         {
-            String prefix = xmlName.getPrefix();
-            String nsURI = xmlName.getNamespaceURI();
-            delegate.declareNamespace(prefix, nsURI);
-         }
-
-         // wildcards still need to be mapped
-         // todo: cleanup XB API
-         JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)getProperty(JBossXBConstants.JBXB_JAVA_MAPPING);
-         if (wsdlMapping != null)
-         {
-            JavaXmlTypeMapping[] javaXmlMappings = wsdlMapping.getJavaXmlTypeMappings();
-            if (javaXmlMappings != null)
-            {
-               for (int i = 0; i < javaXmlMappings.length; ++i)
-               {
-                  JavaXmlTypeMapping javaXmlMapping = javaXmlMappings[i];
-                  VariableMapping[] variableMappings = javaXmlMapping.getVariableMappings();
-
-                  if (variableMappings != null)
-                  {
-                     String clsName = javaXmlMapping.getJavaType();
-                     Class cls = JavaUtils.loadJavaType(clsName, Thread.currentThread().getContextClassLoader());
-                     QName clsQName = javaXmlMapping.getRootTypeQName();
-
-                     if (clsQName != null)
-                     {
-                        // TODO: legacy API usage, see JBWS-1091
-                        if ("complexType".equalsIgnoreCase(javaXmlMapping.getQnameScope()))
-                        {
-                           delegate.mapClassToXsiType(cls, clsQName.getNamespaceURI(), clsQName.getLocalPart());
-                        }
-                     }
-
-                     for (int j = 0; j < variableMappings.length; ++j)
-                     {
-                        VariableMapping variableMapping = variableMappings[j];
-                        if (variableMapping.getXmlWildcard())
-                        {
-                           delegate.mapFieldToWildcard(cls, "_any", JBossXBSupport.getWildcardMarshaller());
-                        }
-                     }
-                  }
-               }
-            }
-         }
-
-         // the actual marshalling
-         SchemaBinding schemaBinding = JBossXBSupport.getOrCreateSchemaBinding(properties);
-         schemaBinding.setXopMarshaller(new XOPMarshallerImpl());
-         delegate.marshal(schemaBinding, null, obj, writer);
-      }
-      catch (RuntimeException e)
-      {
-         throw e;
-      }
-      catch (Exception e)
-      {
-         throw new MarshalException(e);
-      }
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into SAX2 events.
-    */
-   public void marshal(Object obj, ContentHandler handler)
-   {
-      throw new NotImplementedException();
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into a DOM tree.
-    */
-   public void marshal(Object obj, Node node)
-   {
-      throw new NotImplementedException();
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into an output stream.
-    */
-   public void marshal(Object obj, OutputStream os) throws MarshalException
-   {
-      marshal(obj, new OutputStreamWriter(os));
-   }
-
-   /**
-    * Get the particular property in the underlying implementation of
-    * Marshaller.
-    */
-   public Object getProperty(String name)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("name parameter is null");
-
-      return properties.get(name);
-   }
-
-   /**
-    * Set the particular property in the underlying implementation of
-    * Marshaller.
-    *
-    */
-   public void setProperty(String name, Object value)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("name parameter is null");
-
-      properties.put(name, value);
-   }
-
-   /**
-    * Get a DOM tree view of the content tree(Optional).
-    */
-   public Node getNode(Object contentTree)
-   {
-      throw new NotImplementedException();
-   }
-
-   /**
-    * Assert the required properties
-    */
-   private void assertRequiredProperties()
-   {
-      if (getProperty(JBossXBConstants.JBXB_SCHEMA_READER) == null && getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_XS_MODEL);
-
-      if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_JAVA_MAPPING);
-
-      QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
-      if (xmlName == null)
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_ROOT_QNAME);
-
-      if (xmlName.getNamespaceURI().length() > 0 && xmlName.getPrefix().length() == 0)
-         throw new IllegalArgumentException("The given root element name must be prefix qualified: " + xmlName);
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBMarshallerImpl.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBMarshallerImpl.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBMarshallerImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,233 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding.jbossxb;
+
+// $Id$
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+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.extras.xop.jaxrpc.XOPMarshallerImpl;
+import org.jboss.xb.binding.Constants;
+import org.jboss.xb.binding.sunday.marshalling.MarshallerImpl;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+
+/**
+ * An implementation of a JAXB Marshaller that uses the JBossXB schema binding marshaller.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author Heiko.Braun at jboss.org
+ * @since 05-Jul-2006
+ */
+public class JBossXBMarshallerImpl implements JBossXBMarshaller {
+
+   // provide logging
+   private static final Logger log = Logger.getLogger(JBossXBMarshallerImpl.class);
+
+   // The marshaller properties
+   private HashMap properties = new HashMap();
+
+   private MarshallerImpl delegate;
+
+   public JBossXBMarshallerImpl()
+   {
+
+      //ClassInfos.disableCache();
+
+      delegate = new MarshallerImpl();
+      delegate.setProperty(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_XML_VERSION, "false");
+      delegate.setProperty(org.jboss.xb.binding.Marshaller.PROP_OUTPUT_INDENTATION, "false");
+      delegate.declareNamespace("xsi", Constants.NS_XML_SCHEMA_INSTANCE);
+      delegate.setSupportNil(true);
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into a Writer.
+    */
+   public void marshal(Object obj, Writer writer) throws MarshalException
+   {
+      assertRequiredProperties();
+
+      try
+      {
+         QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
+         delegate.addRootElement(xmlName);
+
+         QName xmlType = (QName)getProperty(JBossXBConstants.JBXB_TYPE_QNAME);
+         boolean isAnonymousType = (xmlType != null && xmlType.getLocalPart().startsWith(">"));
+         if (xmlType != null && !isAnonymousType)
+         {
+            delegate.setRootTypeQName(xmlType);
+         }
+
+         if (xmlName.getNamespaceURI().length() > 0)
+         {
+            String prefix = xmlName.getPrefix();
+            String nsURI = xmlName.getNamespaceURI();
+            delegate.declareNamespace(prefix, nsURI);
+         }
+
+         // wildcards still need to be mapped
+         // todo: cleanup XB API
+         JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)getProperty(JBossXBConstants.JBXB_JAVA_MAPPING);
+         if (wsdlMapping != null)
+         {
+            JavaXmlTypeMapping[] javaXmlMappings = wsdlMapping.getJavaXmlTypeMappings();
+            if (javaXmlMappings != null)
+            {
+               for (int i = 0; i < javaXmlMappings.length; ++i)
+               {
+                  JavaXmlTypeMapping javaXmlMapping = javaXmlMappings[i];
+                  VariableMapping[] variableMappings = javaXmlMapping.getVariableMappings();
+
+                  if (variableMappings != null)
+                  {
+                     String clsName = javaXmlMapping.getJavaType();
+                     Class cls = JavaUtils.loadJavaType(clsName, Thread.currentThread().getContextClassLoader());
+                     QName clsQName = javaXmlMapping.getRootTypeQName();
+
+                     if (clsQName != null)
+                     {
+                        // TODO: legacy API usage, see JBWS-1091
+                        if ("complexType".equalsIgnoreCase(javaXmlMapping.getQnameScope()))
+                        {
+                           delegate.mapClassToXsiType(cls, clsQName.getNamespaceURI(), clsQName.getLocalPart());
+                        }
+                     }
+
+                     for (int j = 0; j < variableMappings.length; ++j)
+                     {
+                        VariableMapping variableMapping = variableMappings[j];
+                        if (variableMapping.getXmlWildcard())
+                        {
+                           delegate.mapFieldToWildcard(cls, "_any", JBossXBSupport.getWildcardMarshaller());
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         // the actual marshalling
+         SchemaBinding schemaBinding = JBossXBSupport.getOrCreateSchemaBinding(properties);
+         schemaBinding.setXopMarshaller(new XOPMarshallerImpl());
+         delegate.marshal(schemaBinding, null, obj, writer);
+      }
+      catch (RuntimeException e)
+      {
+         throw e;
+      }
+      catch (Exception e)
+      {
+         throw new MarshalException(e);
+      }
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into SAX2 events.
+    */
+   public void marshal(Object obj, ContentHandler handler)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into a DOM tree.
+    */
+   public void marshal(Object obj, Node node)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into an output stream.
+    */
+   public void marshal(Object obj, OutputStream os) throws MarshalException
+   {
+      marshal(obj, new OutputStreamWriter(os));
+   }
+
+   /**
+    * Get the particular property in the underlying implementation of
+    * Marshaller.
+    */
+   public Object getProperty(String name)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("name parameter is null");
+
+      return properties.get(name);
+   }
+
+   /**
+    * Set the particular property in the underlying implementation of
+    * Marshaller.
+    *
+    */
+   public void setProperty(String name, Object value)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("name parameter is null");
+
+      properties.put(name, value);
+   }
+
+   /**
+    * Get a DOM tree view of the content tree(Optional).
+    */
+   public Node getNode(Object contentTree)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Assert the required properties
+    */
+   private void assertRequiredProperties()
+   {
+      if (getProperty(JBossXBConstants.JBXB_SCHEMA_READER) == null && getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_XS_MODEL);
+
+      if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_JAVA_MAPPING);
+
+      QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
+      if (xmlName == null)
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_ROOT_QNAME);
+
+      if (xmlName.getNamespaceURI().length() > 0 && xmlName.getPrefix().length() == 0)
+         throw new IllegalArgumentException("The given root element name must be prefix qualified: " + xmlName);
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBSupport.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,106 +0,0 @@
-package org.jboss.ws.common.jbossxb;
-
-import java.util.Map;
-
-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.soap.MessageContextAssociation;
-import org.jboss.xb.binding.MarshallingContext;
-import org.jboss.xb.binding.ObjectLocalMarshaller;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.util.Dom2Sax;
-import org.w3c.dom.Element;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
-
-/**
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @since May 31, 2006
- */
-public class JBossXBSupport {
-
-   /**
-    * Setup SchemaBinding associated with the ServiceMetaData.
-    * In case of an unconfigured call it will be generated from JAXB properties.
-    * <p>
-    * The SchemaBinding expects to have an element binding for the
-    * incomming xml element. Because the same element name can be reused
-    * by various operations with different xml types, we have to add the
-    * element binding on every invocation.
-    *
-    * @see JBossXBConstants#JBXB_ROOT_QNAME
-    * @see JBossXBConstants#JBXB_TYPE_QNAME
-    */
-   public static SchemaBinding getOrCreateSchemaBinding(Map properties)
-   {
-      SchemaBinding schemaBinding = null;
-      SchemaBindingBuilder bindingBuilder = new SchemaBindingBuilder();
-
-      QName xmlName = (QName)properties.get(JBossXBConstants.JBXB_ROOT_QNAME);
-      QName xmlType = (QName)properties.get(JBossXBConstants.JBXB_TYPE_QNAME);
-
-      // Get the eagerly initialized SchemaBinding from the ServiceMetaData
-      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
-      if (msgContext != null)
-      {
-         OperationMetaData opMetaData = msgContext.getOperationMetaData();
-         EndpointMetaData epMetaData = opMetaData.getEndpointMetaData();
-         ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
-         schemaBinding = serviceMetaData.getSchemaBinding();
-      }
-
-      // In case of an unconfigured call generate the SchemaBinding from JAXB properties
-      if (schemaBinding == null)
-      {
-         JBossXSModel xsModel = (JBossXSModel)properties.get(JBossXBConstants.JBXB_XS_MODEL);
-         JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)properties.get(JBossXBConstants.JBXB_JAVA_MAPPING);
-         schemaBinding = bindingBuilder.buildSchemaBinding(xsModel, wsdlMapping);
-      }
-
-      // The SchemaBinding expects to have an element binding for the
-      // incomming xml element. Because the same element name can be reused
-      // by various operations with different xml types, we have to add the
-      // element binding on every invocation.
-      bindingBuilder.bindParameterToElement(schemaBinding, xmlName, xmlType);
-
-      return schemaBinding;
-   }
-
-   /**
-    * Create a Marshaller that serializes
-    * <code>org.w3c.dom.Element</code>'s to a <code>org.xml.sax.ContentHandler</code>
-    *
-    * @return ObjectLocalMarshaller
-    *
-    * @see org.jboss.xb.binding.MarshallingContext#getContentHandler() 
-    */
-   public static ObjectLocalMarshaller getWildcardMarshaller()
-   {
-      return new ObjectLocalMarshaller() {
-         public void marshal(MarshallingContext ctx, Object o)
-         {
-            if (o == null)
-            {
-               return;
-            }
-
-            Element e = (Element)o;
-            ContentHandler ch = ctx.getContentHandler();
-            try
-            {
-               Dom2Sax.dom2sax(e, ch);
-            }
-            catch (SAXException e1)
-            {
-               throw new IllegalStateException("Failed to marshal DOM element " + new QName(e.getNamespaceURI(), e.getLocalName()) + ": " + e1.getMessage());
-            }
-         }
-      };
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBSupport.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBSupport.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBSupport.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,106 @@
+package org.jboss.ws.core.binding.jbossxb;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
+import org.jboss.ws.common.metadata.umdm.OperationMetaData;
+import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.xb.binding.MarshallingContext;
+import org.jboss.xb.binding.ObjectLocalMarshaller;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.util.Dom2Sax;
+import org.w3c.dom.Element;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @since May 31, 2006
+ */
+public class JBossXBSupport {
+
+   /**
+    * Setup SchemaBinding associated with the ServiceMetaData.
+    * In case of an unconfigured call it will be generated from JAXB properties.
+    * <p>
+    * The SchemaBinding expects to have an element binding for the
+    * incomming xml element. Because the same element name can be reused
+    * by various operations with different xml types, we have to add the
+    * element binding on every invocation.
+    *
+    * @see JBossXBConstants#JBXB_ROOT_QNAME
+    * @see JBossXBConstants#JBXB_TYPE_QNAME
+    */
+   public static SchemaBinding getOrCreateSchemaBinding(Map properties)
+   {
+      SchemaBinding schemaBinding = null;
+      SchemaBindingBuilder bindingBuilder = new SchemaBindingBuilder();
+
+      QName xmlName = (QName)properties.get(JBossXBConstants.JBXB_ROOT_QNAME);
+      QName xmlType = (QName)properties.get(JBossXBConstants.JBXB_TYPE_QNAME);
+
+      // Get the eagerly initialized SchemaBinding from the ServiceMetaData
+      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+      if (msgContext != null)
+      {
+         OperationMetaData opMetaData = msgContext.getOperationMetaData();
+         EndpointMetaData epMetaData = opMetaData.getEndpointMetaData();
+         ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
+         schemaBinding = serviceMetaData.getSchemaBinding();
+      }
+
+      // In case of an unconfigured call generate the SchemaBinding from JAXB properties
+      if (schemaBinding == null)
+      {
+         JBossXSModel xsModel = (JBossXSModel)properties.get(JBossXBConstants.JBXB_XS_MODEL);
+         JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)properties.get(JBossXBConstants.JBXB_JAVA_MAPPING);
+         schemaBinding = bindingBuilder.buildSchemaBinding(xsModel, wsdlMapping);
+      }
+
+      // The SchemaBinding expects to have an element binding for the
+      // incomming xml element. Because the same element name can be reused
+      // by various operations with different xml types, we have to add the
+      // element binding on every invocation.
+      bindingBuilder.bindParameterToElement(schemaBinding, xmlName, xmlType);
+
+      return schemaBinding;
+   }
+
+   /**
+    * Create a Marshaller that serializes
+    * <code>org.w3c.dom.Element</code>'s to a <code>org.xml.sax.ContentHandler</code>
+    *
+    * @return ObjectLocalMarshaller
+    *
+    * @see org.jboss.xb.binding.MarshallingContext#getContentHandler() 
+    */
+   public static ObjectLocalMarshaller getWildcardMarshaller()
+   {
+      return new ObjectLocalMarshaller() {
+         public void marshal(MarshallingContext ctx, Object o)
+         {
+            if (o == null)
+            {
+               return;
+            }
+
+            Element e = (Element)o;
+            ContentHandler ch = ctx.getContentHandler();
+            try
+            {
+               Dom2Sax.dom2sax(e, ch);
+            }
+            catch (SAXException e1)
+            {
+               throw new IllegalStateException("Failed to marshal DOM element " + new QName(e.getNamespaceURI(), e.getLocalName()) + ": " + e1.getMessage());
+            }
+         }
+      };
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshaller.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBUnmarshaller.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshaller.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,37 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.common.jbossxb;
-
-import java.io.InputStream;
-
-/**
- * @author Heiko Braun <heiko.braun at jboss.com>
- * @version $Id$
- * @since Jul 5, 2006
- */
-public interface JBossXBUnmarshaller {
-   Object unmarshal(InputStream is) throws UnmarshalException;
-
-   Object getProperty(String name);
-
-   void setProperty(String name, Object value);
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshaller.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBUnmarshaller.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBUnmarshaller.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshaller.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding.jbossxb;
+
+import java.io.InputStream;
+
+/**
+ * @author Heiko Braun <heiko.braun at jboss.com>
+ * @version $Id$
+ * @since Jul 5, 2006
+ */
+public interface JBossXBUnmarshaller {
+   Object unmarshal(InputStream is) throws UnmarshalException;
+
+   Object getProperty(String name);
+
+   void setProperty(String name, Object value);
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBUnmarshallerImpl.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.common.jbossxb;
-
-// $Id$
-
-import java.io.InputStream;
-import java.util.HashMap;
-
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-
-/**
- * An implementation of a JAXB Unmarshaller.
- *
- * @author Thomas.Diesler at jboss.org
- * @author Alexey.Loubyansky at jboss.org
- * @since 18-Oct-2004
- */
-public class JBossXBUnmarshallerImpl implements JBossXBUnmarshaller
-{
-   // The marshaller properties
-   private HashMap<String, Object> properties = new HashMap<String, Object>();
-
-   /**
-    * Unmarshal XML data from the specified InputStream and return the resulting content tree.
-    */
-   public Object unmarshal(InputStream is) throws UnmarshalException
-   {
-      assertRequiredProperties();
-
-      org.jboss.xb.binding.Unmarshaller unm = UnmarshallerFactory.newInstance().newUnmarshaller();
-      SchemaBinding schemaBinding = JBossXBSupport.getOrCreateSchemaBinding(properties);
-      XOPUnmarshallerImpl xopUnmarshaller = new XOPUnmarshallerImpl();
-      schemaBinding.setXopUnmarshaller(xopUnmarshaller);
-
-      try
-      {
-         return unm.unmarshal(is, schemaBinding);
-      }
-      catch (JBossXBException e)
-      {
-         throw new UnmarshalException(e.getMessage(), e);
-      }
-   }
-
-   /**
-    * Get the particular property in the underlying implementation of Unmarshaller.
-    */
-   public Object getProperty(String name)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("name parameter is null");
-
-      return properties.get(name);
-   }
-
-   /**
-    * Set the particular property in the underlying implementation of Unmarshaller.
-    */
-   public void setProperty(String name, Object value)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("name parameter is null");
-
-      properties.put(name, value);
-   }
-
-
-   /** Assert the required properties
-    */
-   private void assertRequiredProperties()
-   {
-      if (getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
-      {
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_XS_MODEL);
-      }
-
-      if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
-      {
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_JAVA_MAPPING);
-      }
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBUnmarshallerImpl.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/JBossXBUnmarshallerImpl.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/JBossXBUnmarshallerImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.core.binding.jbossxb;
+
+// $Id$
+
+import java.io.InputStream;
+import java.util.HashMap;
+
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.extras.xop.jaxrpc.XOPUnmarshallerImpl;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+
+/**
+ * An implementation of a JAXB Unmarshaller.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author Alexey.Loubyansky at jboss.org
+ * @since 18-Oct-2004
+ */
+public class JBossXBUnmarshallerImpl implements JBossXBUnmarshaller
+{
+   // The marshaller properties
+   private HashMap<String, Object> properties = new HashMap<String, Object>();
+
+   /**
+    * Unmarshal XML data from the specified InputStream and return the resulting content tree.
+    */
+   public Object unmarshal(InputStream is) throws UnmarshalException
+   {
+      assertRequiredProperties();
+
+      org.jboss.xb.binding.Unmarshaller unm = UnmarshallerFactory.newInstance().newUnmarshaller();
+      SchemaBinding schemaBinding = JBossXBSupport.getOrCreateSchemaBinding(properties);
+      XOPUnmarshallerImpl xopUnmarshaller = new XOPUnmarshallerImpl();
+      schemaBinding.setXopUnmarshaller(xopUnmarshaller);
+
+      try
+      {
+         return unm.unmarshal(is, schemaBinding);
+      }
+      catch (JBossXBException e)
+      {
+         throw new UnmarshalException(e.getMessage(), e);
+      }
+   }
+
+   /**
+    * Get the particular property in the underlying implementation of Unmarshaller.
+    */
+   public Object getProperty(String name)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("name parameter is null");
+
+      return properties.get(name);
+   }
+
+   /**
+    * Set the particular property in the underlying implementation of Unmarshaller.
+    */
+   public void setProperty(String name, Object value)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("name parameter is null");
+
+      properties.put(name, value);
+   }
+
+
+   /** Assert the required properties
+    */
+   private void assertRequiredProperties()
+   {
+      if (getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
+      {
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_XS_MODEL);
+      }
+
+      if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
+      {
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_JAVA_MAPPING);
+      }
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/MarshalException.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/MarshalException.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/MarshalException.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.jbossxb;
-
-/**
- * A marshal exception.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 06-Jun-2006
- */
-public class MarshalException extends Exception
-{
-
-   public MarshalException()
-   {
-      super();
-   }
-
-   public MarshalException(String msg, Throwable th)
-   {
-      super(msg, th);
-   }
-
-   public MarshalException(String msg)
-   {
-      super(msg);
-   }
-
-   public MarshalException(Throwable th)
-   {
-      super(th);
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/MarshalException.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/MarshalException.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/MarshalException.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/MarshalException.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding.jbossxb;
+
+/**
+ * A marshal exception.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 06-Jun-2006
+ */
+public class MarshalException extends Exception
+{
+
+   public MarshalException()
+   {
+      super();
+   }
+
+   public MarshalException(String msg, Throwable th)
+   {
+      super(msg, th);
+   }
+
+   public MarshalException(String msg)
+   {
+      super(msg);
+   }
+
+   public MarshalException(Throwable th)
+   {
+      super(th);
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/SchemaBindingBuilder.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,630 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.jbossxb;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import javax.xml.namespace.NamespaceContext;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPFactory;
-
-import org.apache.xerces.xs.XSModel;
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.ExceptionMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.utils.JBossWSEntityResolver;
-import org.jboss.ws.extras.xop.jaxrpc.JBossXBContentAdapter;
-import org.jboss.xb.binding.metadata.ClassMetaData;
-import org.jboss.xb.binding.metadata.PackageMetaData;
-import org.jboss.xb.binding.metadata.PropertyMetaData;
-import org.jboss.xb.binding.metadata.ValueMetaData;
-import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.SimpleTypeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TermBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
-import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
-import org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler;
-import org.w3c.dom.Element;
-import org.w3c.dom.Text;
-import org.xml.sax.Attributes;
-
-/**
- * Create SchemaBinding from XSModel and jaxrpc-mapping.
- *
- * @author Thomas.Diesler at jboss.org
- * @author Alexey.Loubyansky at jboss.org
- * @since 18-Oct-2004
- * @see XSModel
- * @see JavaWsdlMapping
- */
-public class SchemaBindingBuilder
-{
-   // provide logging
-   private static final Logger log = Logger.getLogger(SchemaBindingBuilder.class);
-
-   /**
-    * Creates and initializes an instance of SchemaBinding
-    */
-   public SchemaBinding buildSchemaBinding(XSModel model, JavaWsdlMapping wsdlMapping)
-   {
-      JBossEntityResolver resolver = new JBossWSEntityResolver();
-      SchemaBinding schemaBinding = XsdBinder.bind(model, new DefaultSchemaResolver(resolver));
-
-      schemaBinding.setIgnoreLowLine(false);
-      schemaBinding.setIgnoreUnresolvedFieldOrClass(false);
-      schemaBinding.setUnmarshalListsToArrays(true); // note: default jaxb2.0 is false!
-      schemaBinding.setSimpleContentProperty("_value");
-      schemaBinding.setUseNoArgCtorIfFound(true);
-      if (wsdlMapping != null)
-      {
-         bindSchemaToJava(schemaBinding, wsdlMapping);
-      }
-
-      // setup MTOM handler
-      JBossXBContentAdapter.register(schemaBinding);
-
-      return schemaBinding;
-   }
-
-   /** Merges JavaWsdlMapping into SchemaBinding
-    */
-   private void bindSchemaToJava(SchemaBinding schemaBinding, JavaWsdlMapping wsdlMapping)
-   {
-      if (log.isTraceEnabled())
-         log.trace("bindSchemaToJava: " + schemaBinding);
-
-      for (PackageMapping packageMapping : wsdlMapping.getPackageMappings())
-      {
-         processPackageMapping(schemaBinding, packageMapping);
-      }
-
-      for (JavaXmlTypeMapping typeMapping : wsdlMapping.getJavaXmlTypeMappings())
-      {
-         processJavaXmlTypeMapping(schemaBinding, typeMapping);
-      }
-   }
-
-   private void processPackageMapping(SchemaBinding schemaBinding, PackageMapping packageMapping)
-   {
-      PackageMetaData packageMetaData = schemaBinding.getPackageMetaData();
-      if (packageMetaData == null)
-      {
-         packageMetaData = new PackageMetaData();
-         schemaBinding.setPackageMetaData(packageMetaData);
-      }
-
-      if (log.isTraceEnabled())
-         log.trace("Bound namespace " + packageMapping.getNamespaceURI() + " to package " + packageMapping.getPackageType());
-
-      packageMetaData.setName(packageMapping.getPackageType());
-   }
-
-   private void processJavaXmlTypeMapping(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
-   {
-      String javaType = typeMapping.getJavaType();
-      if (javaType.endsWith("[]"))
-      {
-         processArrayType(schemaBinding, typeMapping);
-      }
-      else
-      {
-         processNonArrayType(schemaBinding, typeMapping);
-      }
-   }
-
-   private void processArrayType(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
-   {
-      QName xmlType = getXmlType(typeMapping);
-      log.trace("Ignore array type: " + xmlType);
-   }
-
-   private void processNonArrayType(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
-   {
-      QName xmlType = getXmlType(typeMapping);
-      String javaType = typeMapping.getJavaType();
-      log.trace("processNonArrayType: [xmlType=" + xmlType + ",javaType=" + javaType + "]");
-
-      TypeBinding typeBinding = getTypeBinding(schemaBinding, typeMapping);
-      if (typeBinding != null)
-      {
-         // Set the java type, but skip SimpleTypes
-         boolean isSimpleTypeBinding = (typeBinding instanceof SimpleTypeBinding);
-         if(isSimpleTypeBinding == false)
-         {
-         ClassMetaData classMetaData = typeBinding.getClassMetaData();
-         if (classMetaData == null)
-         {
-            classMetaData = new ClassMetaData();
-            typeBinding.setClassMetaData(classMetaData);
-         }
-         classMetaData.setImpl(javaType);
-
-         // exception mapping drives whether we should use the noarg ctor
-         JavaWsdlMapping wsdlMapping = typeMapping.getJavaWsdlMapping();
-         for (ExceptionMapping aux : wsdlMapping.getExceptionMappings())
-         {
-            if (javaType.equals(aux.getExceptionType()))
-            {
-               classMetaData.setUseNoArgCtor(false);
-               break;
-            }
-         }
-
-         if (log.isTraceEnabled())
-         {
-            QName typeQName = typeBinding.getQName();
-            log.trace("Bound: [xmlType=" + typeQName + ",javaType=" + javaType + "]");
-            }
-         }
-
-         VariableMapping[] variableMappings = typeMapping.getVariableMappings();
-         for (VariableMapping varMapping : variableMappings)
-         {
-            if (varMapping.getXmlElementName() != null)
-            {
-               processXmlElementName(typeBinding, varMapping);
-            }
-            else if (varMapping.getXmlAttributeName() != null)
-            {
-               processXmlAttributeName(typeBinding, varMapping);
-            }
-            else if (varMapping.getXmlWildcard())
-            {
-               processWildcard(typeBinding, varMapping);
-            }
-         }
-      }
-      else
-      {
-         log.warn("Cannot obtain type binding for: " + xmlType);
-      }
-   }
-
-   private void processXmlAttributeName(TypeBinding typeBinding, VariableMapping varMapping)
-   {
-      String xmlAttrName = varMapping.getXmlAttributeName();
-      log.trace("processXmlAttributeName: " + xmlAttrName);
-
-      QName xmlName = new QName(xmlAttrName);
-      AttributeBinding attrBinding = typeBinding.getAttribute(xmlName);
-      if (attrBinding == null)
-      {
-         Iterator i = typeBinding.getAttributes().iterator();
-         while (i.hasNext())
-         {
-            AttributeBinding auxBinding = (AttributeBinding)i.next();
-            if (auxBinding.getQName().getLocalPart().equals(xmlAttrName))
-            {
-               if (attrBinding != null)
-                  log.warn("Ambiguous binding for attribute: " + xmlAttrName);
-
-               attrBinding = auxBinding;
-            }
-         }
-      }
-
-      if (attrBinding == null)
-      {
-         // attributeFormDefault="qualified"
-         String nsURI = typeBinding.getQName().getNamespaceURI();
-         if (Constants.SOAP11_ATTR_MUST_UNDERSTAND.equals(xmlAttrName) || Constants.SOAP11_ATTR_ACTOR.equals(xmlAttrName)
-               || Constants.SOAP11_ATTR_ROLE.equals(xmlAttrName))
-         {
-            nsURI = Constants.NS_SOAP11_ENV;
-         }
-         QName auxName = new QName(nsURI, xmlAttrName);
-         attrBinding = typeBinding.getAttribute(auxName);
-      }
-
-      if (attrBinding == null)
-      {
-         QName typeQName = typeBinding.getQName();
-         throw new WSException("Attribute " + xmlName + " found in jaxrpc-mapping but not in the schema: " + typeQName);
-      }
-
-      String javaVariableName = varMapping.getJavaVariableName();
-      PropertyMetaData prop = new PropertyMetaData();
-      prop.setName(javaVariableName);
-      attrBinding.setPropertyMetaData(prop);
-
-      if (log.isTraceEnabled())
-         log.trace("Bound attribute " + xmlName + " to property " + prop.getName());
-   }
-
-   private void processXmlElementName(TypeBinding typeBinding, VariableMapping varMapping)
-   {
-      QName xmlName = new QName(varMapping.getXmlElementName());
-      log.trace("processXmlElementName: " + xmlName);
-
-      ElementBinding element = typeBinding.getElement(xmlName);
-      QName typeQName = typeBinding.getQName();
-      if (element == null && typeQName != null)
-      {
-         // elementFormDefault="qualified"
-         String nsURI = typeQName.getNamespaceURI();
-         QName auxName = new QName(nsURI, varMapping.getXmlElementName());
-         element = typeBinding.getElement(auxName);
-      }
-
-      if (element == null)
-      {
-         // <element ref=
-         ParticleBinding particle = typeBinding.getParticle();
-         if (particle != null)
-         {
-            TermBinding term = particle.getTerm();
-            if (term instanceof ModelGroupBinding)
-            {
-               Iterator iterator = ((ModelGroupBinding)term).getParticles().iterator();
-               element = findLocalPathElement(iterator, new String[] { varMapping.getXmlElementName() }, 0);
-            }
-         }
-      }
-
-      if (element == null)
-         throw new WSException("Element " + xmlName + " found in jaxrpc-mapping but not in the schema: " + typeQName);
-
-      String javaVariableName = varMapping.getJavaVariableName();
-      if (javaVariableName != null)
-      {
-         PropertyMetaData prop = new PropertyMetaData();
-         prop.setName(javaVariableName);
-         element.setPropertyMetaData(prop);
-
-         if (log.isTraceEnabled())
-            log.trace("Bound element " + xmlName + " to property " + prop.getName());
-      }
-   }
-
-   private void processWildcard(TypeBinding typeBinding, VariableMapping varMapping)
-   {
-      log.trace("processWildcard: " + typeBinding.getQName());
-
-      PropertyMetaData prop = null;
-      String javaVariableName = varMapping.getJavaVariableName();
-      if (javaVariableName != null)
-      {
-         prop = new PropertyMetaData();
-         prop.setName(javaVariableName);
-      }
-
-      if (prop == null)
-      {
-         prop = new PropertyMetaData();
-         prop.setName("_any");
-      }
-
-      WildcardBinding wildcard = typeBinding.getWildcard();
-      wildcard.setUnresolvedElementHandler(new SoapElementHandler());
-      wildcard.setUnresolvedCharactersHandler(new SoapCharactersHandler());
-      wildcard.setPropertyMetaData(prop);
-
-      if (log.isTraceEnabled())
-         log.trace("Bound wildcard of " + typeBinding.getQName() + " to property " + prop.getName());
-   }
-
-   private TypeBinding getTypeBinding(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
-   {
-      String qnameScope = typeMapping.getQnameScope();
-      QName anonymousTypeQName = typeMapping.getAnonymousTypeQName();
-      if (anonymousTypeQName != null)
-      {
-         return getAnonymousTypeBinding(schemaBinding, anonymousTypeQName);
-      }
-
-      QName xmlType = typeMapping.getRootTypeQName();
-
-      TypeBinding typeBinding = null;
-      if ("complexType".equals(qnameScope) || "simpleType".equals(qnameScope))
-      {
-         typeBinding = schemaBinding.getType(xmlType);
-         if (typeBinding == null)
-         {
-            log.warn("Type definition not found in schema: " + xmlType);
-         }
-      }
-      else if ("element".equals(qnameScope))
-      {
-         ElementBinding element = schemaBinding.getElement(xmlType);
-         if (element != null)
-         {
-            typeBinding = element.getType();
-         }
-         else
-         {
-            log.warn("Global element not found in schema: " + xmlType);
-         }
-      }
-      else
-      {
-         throw new WSException("Unexpected qname-scope for " + typeMapping.getJavaType() + ": " + qnameScope);
-      }
-      return typeBinding;
-   }
-
-   public TypeBinding getAnonymousTypeBinding(SchemaBinding schemaBinding, QName typeQName)
-   {
-      String expression = typeQName.getLocalPart();
-      if (log.isTraceEnabled())
-         log.trace("Searching for anonymous expression: " + expression);
-
-      ArrayList list = new ArrayList(10);
-
-      for (int i = 0, begin = -1; i < expression.length(); i++)
-      {
-         if (expression.charAt(i) == '>')
-         {
-            if (begin != -1)
-            {
-               list.add(expression.substring(begin, i));
-               begin = -1;
-            }
-         }
-         else
-         {
-            if (begin == -1)
-               begin = i;
-            else if (i == expression.length() - 1)
-               list.add(expression.substring(begin));
-         }
-      }
-
-      ElementBinding element = findLocalPathElement(schemaBinding.getElements(), ((String[])list.toArray(new String[0])));
-      if (element == null)
-         element = findLocalPathElementInTypes(schemaBinding.getTypes(), ((String[])list.toArray(new String[0])));
-
-      if (element == null)
-         return null;
-
-      return element.getType();
-   }
-
-   public void bindParameterToElement(SchemaBinding schemaBinding, QName xmlName, QName xmlType)
-   {
-      TypeBinding typeBinding;
-      boolean isAnonymousType = xmlType.getLocalPart().startsWith(">");
-      if (isAnonymousType)
-      {
-         typeBinding = getAnonymousTypeBinding(schemaBinding, xmlType);
-      }
-      else
-      {
-         typeBinding = schemaBinding.getType(xmlType);
-      }
-
-      if (typeBinding != null)
-      {
-         if(!isAnonymousType)
-            schemaBinding.addElement(xmlName, typeBinding);
-      }
-      else if (xmlType.equals(Constants.TYPE_LITERAL_ANYTYPE) == false)
-      {
-         throw new WSException("Root type " + xmlType + " not found in the schema.");
-      }
-   }
-
-   private ElementBinding findLocalPathElement(Iterator elements, String[] path)
-   {
-      while (elements.hasNext())
-      {
-         ElementBinding element = (ElementBinding)elements.next();
-         element = findLocalPathElement(element, path, 0);
-         if (element != null)
-            return element;
-      }
-
-      return null;
-   }
-
-   private ElementBinding findLocalPathElementInTypes(Iterator types, String[] path)
-   {
-      while (types.hasNext())
-      {
-         TypeBinding type = (TypeBinding)types.next();
-         if (type.getQName().getLocalPart().equals(path[0]))
-         {
-            ParticleBinding particle = type.getParticle();
-            if (particle == null)
-               continue;
-
-            TermBinding term = particle.getTerm();
-            if (!term.isModelGroup())
-               continue;
-
-            return findLocalPathElement(((ModelGroupBinding)term).getParticles().iterator(), path, 1);
-         }
-      }
-
-      return null;
-   }
-
-   private ElementBinding findLocalPathElement(ElementBinding element, String[] path, int pos)
-   {
-      String name = path[pos];
-      if (!name.equals(element.getQName().getLocalPart()))
-         return null;
-
-      // End of path
-      if (path.length - 1 == pos)
-         return element;
-
-      ParticleBinding particle = element.getType().getParticle();
-      if (particle == null)
-         return null;
-
-      TermBinding term = particle.getTerm();
-      if (!term.isModelGroup())
-         return null;
-
-      ModelGroupBinding group = (ModelGroupBinding)term;
-      Iterator i = group.getParticles().iterator();
-
-      // Increase depth
-      return findLocalPathElement(i, path, pos + 1);
-   }
-
-   private ElementBinding findLocalPathElement(Iterator particles, String[] path, int pos)
-   {
-      while (particles.hasNext())
-      {
-         TermBinding term = ((ParticleBinding)particles.next()).getTerm();
-         if (term instanceof ElementBinding)
-         {
-            ElementBinding element = (ElementBinding)term;
-            element = findLocalPathElement(element, path, pos);
-            if (element != null)
-               return element;
-
-         }
-         else if (term instanceof ModelGroupBinding)
-         {
-            Iterator i = ((ModelGroupBinding)term).getParticles().iterator();
-            ElementBinding element = findLocalPathElement(i, path, pos);
-            if (element != null)
-               return element;
-         }
-      }
-
-      return null;
-   }
-
-   /** Get the <root-type-qname>, fall back to <anonymous-type-qname>
-    */
-   private QName getXmlType(JavaXmlTypeMapping typeMapping)
-   {
-      QName xmlType = typeMapping.getRootTypeQName();
-      if (xmlType == null && typeMapping.getAnonymousTypeQName() != null)
-         xmlType = typeMapping.getAnonymousTypeQName();
-
-      return xmlType;
-   }
-
-   // Inner
-
-   public static class SoapCharactersHandler extends CharactersHandler
-   {
-      public Object unmarshalEmpty(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData)
-      {
-         return "";
-      }
-
-      public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData, String value)
-      {
-         return value;
-      }
-
-      public void setValue(QName qName, ElementBinding element, Object owner, Object value)
-      {
-         SOAPElement e = (SOAPElement)owner;
-         Text textNode = e.getOwnerDocument().createTextNode((String)value);
-         e.appendChild(textNode);
-      }
-   }
-
-   public static class SoapElementHandler extends RtElementHandler implements ParticleHandler
-   {
-      private SOAPFactory factory;
-
-      public Object startParticle(Object parent, QName elementName, ParticleBinding particle, Attributes attrs, NamespaceContext nsCtx)
-      {
-         SOAPFactory factory = getFactory();
-         SOAPElement element = null;
-         try
-         {
-            String prefix = elementName.getPrefix();
-            String ns = elementName.getNamespaceURI();
-            if (ns != null && ns.length() > 0)
-            {
-               prefix = nsCtx.getPrefix(ns);
-            }
-
-            element = factory.createElement(elementName.getLocalPart(), prefix, ns);
-         }
-         catch (SOAPException e)
-         {
-            throw new IllegalStateException("Failed to create SOAPElement", e);
-         }
-
-         if (attrs != null)
-         {
-            for (int i = 0; i < attrs.getLength(); ++i)
-            {
-               element.setAttribute(attrs.getLocalName(i), attrs.getValue(i));
-            }
-         }
-
-         return element;
-      }
-
-      public Object endParticle(Object o, QName elementName, ParticleBinding particle)
-      {
-         return o;
-      }
-
-      public void setParent(Object parent, Object o, QName elementName, ParticleBinding particle, ParticleBinding parentParticle)
-      {
-         if (parent instanceof SOAPElement)
-         {
-            ((SOAPElement)parent).appendChild((Element)o);
-         }
-         else
-         {
-            super.setParent(parent, o, elementName, particle, parentParticle);
-         }
-      }
-
-      private SOAPFactory getFactory()
-      {
-         if (factory == null)
-         {
-            try
-            {
-               factory = SOAPFactory.newInstance();
-            }
-            catch (SOAPException e)
-            {
-               throw new IllegalStateException("Failed to create soap element factory", e);
-            }
-         }
-         return factory;
-      }
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/SchemaBindingBuilder.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/SchemaBindingBuilder.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/SchemaBindingBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,630 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding.jbossxb;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+
+import org.apache.xerces.xs.XSModel;
+import org.jboss.logging.Logger;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.jaxrpcmapping.ExceptionMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.common.utils.JBossWSEntityResolver;
+import org.jboss.ws.extras.xop.jaxrpc.JBossXBContentAdapter;
+import org.jboss.xb.binding.metadata.ClassMetaData;
+import org.jboss.xb.binding.metadata.PackageMetaData;
+import org.jboss.xb.binding.metadata.PropertyMetaData;
+import org.jboss.xb.binding.metadata.ValueMetaData;
+import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.SimpleTypeBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TermBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
+import org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+import org.xml.sax.Attributes;
+
+/**
+ * Create SchemaBinding from XSModel and jaxrpc-mapping.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author Alexey.Loubyansky at jboss.org
+ * @since 18-Oct-2004
+ * @see XSModel
+ * @see JavaWsdlMapping
+ */
+public class SchemaBindingBuilder
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(SchemaBindingBuilder.class);
+
+   /**
+    * Creates and initializes an instance of SchemaBinding
+    */
+   public SchemaBinding buildSchemaBinding(XSModel model, JavaWsdlMapping wsdlMapping)
+   {
+      JBossEntityResolver resolver = new JBossWSEntityResolver();
+      SchemaBinding schemaBinding = XsdBinder.bind(model, new DefaultSchemaResolver(resolver));
+
+      schemaBinding.setIgnoreLowLine(false);
+      schemaBinding.setIgnoreUnresolvedFieldOrClass(false);
+      schemaBinding.setUnmarshalListsToArrays(true); // note: default jaxb2.0 is false!
+      schemaBinding.setSimpleContentProperty("_value");
+      schemaBinding.setUseNoArgCtorIfFound(true);
+      if (wsdlMapping != null)
+      {
+         bindSchemaToJava(schemaBinding, wsdlMapping);
+      }
+
+      // setup MTOM handler
+      JBossXBContentAdapter.register(schemaBinding);
+
+      return schemaBinding;
+   }
+
+   /** Merges JavaWsdlMapping into SchemaBinding
+    */
+   private void bindSchemaToJava(SchemaBinding schemaBinding, JavaWsdlMapping wsdlMapping)
+   {
+      if (log.isTraceEnabled())
+         log.trace("bindSchemaToJava: " + schemaBinding);
+
+      for (PackageMapping packageMapping : wsdlMapping.getPackageMappings())
+      {
+         processPackageMapping(schemaBinding, packageMapping);
+      }
+
+      for (JavaXmlTypeMapping typeMapping : wsdlMapping.getJavaXmlTypeMappings())
+      {
+         processJavaXmlTypeMapping(schemaBinding, typeMapping);
+      }
+   }
+
+   private void processPackageMapping(SchemaBinding schemaBinding, PackageMapping packageMapping)
+   {
+      PackageMetaData packageMetaData = schemaBinding.getPackageMetaData();
+      if (packageMetaData == null)
+      {
+         packageMetaData = new PackageMetaData();
+         schemaBinding.setPackageMetaData(packageMetaData);
+      }
+
+      if (log.isTraceEnabled())
+         log.trace("Bound namespace " + packageMapping.getNamespaceURI() + " to package " + packageMapping.getPackageType());
+
+      packageMetaData.setName(packageMapping.getPackageType());
+   }
+
+   private void processJavaXmlTypeMapping(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
+   {
+      String javaType = typeMapping.getJavaType();
+      if (javaType.endsWith("[]"))
+      {
+         processArrayType(schemaBinding, typeMapping);
+      }
+      else
+      {
+         processNonArrayType(schemaBinding, typeMapping);
+      }
+   }
+
+   private void processArrayType(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
+   {
+      QName xmlType = getXmlType(typeMapping);
+      log.trace("Ignore array type: " + xmlType);
+   }
+
+   private void processNonArrayType(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
+   {
+      QName xmlType = getXmlType(typeMapping);
+      String javaType = typeMapping.getJavaType();
+      log.trace("processNonArrayType: [xmlType=" + xmlType + ",javaType=" + javaType + "]");
+
+      TypeBinding typeBinding = getTypeBinding(schemaBinding, typeMapping);
+      if (typeBinding != null)
+      {
+         // Set the java type, but skip SimpleTypes
+         boolean isSimpleTypeBinding = (typeBinding instanceof SimpleTypeBinding);
+         if(isSimpleTypeBinding == false)
+         {
+         ClassMetaData classMetaData = typeBinding.getClassMetaData();
+         if (classMetaData == null)
+         {
+            classMetaData = new ClassMetaData();
+            typeBinding.setClassMetaData(classMetaData);
+         }
+         classMetaData.setImpl(javaType);
+
+         // exception mapping drives whether we should use the noarg ctor
+         JavaWsdlMapping wsdlMapping = typeMapping.getJavaWsdlMapping();
+         for (ExceptionMapping aux : wsdlMapping.getExceptionMappings())
+         {
+            if (javaType.equals(aux.getExceptionType()))
+            {
+               classMetaData.setUseNoArgCtor(false);
+               break;
+            }
+         }
+
+         if (log.isTraceEnabled())
+         {
+            QName typeQName = typeBinding.getQName();
+            log.trace("Bound: [xmlType=" + typeQName + ",javaType=" + javaType + "]");
+            }
+         }
+
+         VariableMapping[] variableMappings = typeMapping.getVariableMappings();
+         for (VariableMapping varMapping : variableMappings)
+         {
+            if (varMapping.getXmlElementName() != null)
+            {
+               processXmlElementName(typeBinding, varMapping);
+            }
+            else if (varMapping.getXmlAttributeName() != null)
+            {
+               processXmlAttributeName(typeBinding, varMapping);
+            }
+            else if (varMapping.getXmlWildcard())
+            {
+               processWildcard(typeBinding, varMapping);
+            }
+         }
+      }
+      else
+      {
+         log.warn("Cannot obtain type binding for: " + xmlType);
+      }
+   }
+
+   private void processXmlAttributeName(TypeBinding typeBinding, VariableMapping varMapping)
+   {
+      String xmlAttrName = varMapping.getXmlAttributeName();
+      log.trace("processXmlAttributeName: " + xmlAttrName);
+
+      QName xmlName = new QName(xmlAttrName);
+      AttributeBinding attrBinding = typeBinding.getAttribute(xmlName);
+      if (attrBinding == null)
+      {
+         Iterator i = typeBinding.getAttributes().iterator();
+         while (i.hasNext())
+         {
+            AttributeBinding auxBinding = (AttributeBinding)i.next();
+            if (auxBinding.getQName().getLocalPart().equals(xmlAttrName))
+            {
+               if (attrBinding != null)
+                  log.warn("Ambiguous binding for attribute: " + xmlAttrName);
+
+               attrBinding = auxBinding;
+            }
+         }
+      }
+
+      if (attrBinding == null)
+      {
+         // attributeFormDefault="qualified"
+         String nsURI = typeBinding.getQName().getNamespaceURI();
+         if (Constants.SOAP11_ATTR_MUST_UNDERSTAND.equals(xmlAttrName) || Constants.SOAP11_ATTR_ACTOR.equals(xmlAttrName)
+               || Constants.SOAP11_ATTR_ROLE.equals(xmlAttrName))
+         {
+            nsURI = Constants.NS_SOAP11_ENV;
+         }
+         QName auxName = new QName(nsURI, xmlAttrName);
+         attrBinding = typeBinding.getAttribute(auxName);
+      }
+
+      if (attrBinding == null)
+      {
+         QName typeQName = typeBinding.getQName();
+         throw new WSException("Attribute " + xmlName + " found in jaxrpc-mapping but not in the schema: " + typeQName);
+      }
+
+      String javaVariableName = varMapping.getJavaVariableName();
+      PropertyMetaData prop = new PropertyMetaData();
+      prop.setName(javaVariableName);
+      attrBinding.setPropertyMetaData(prop);
+
+      if (log.isTraceEnabled())
+         log.trace("Bound attribute " + xmlName + " to property " + prop.getName());
+   }
+
+   private void processXmlElementName(TypeBinding typeBinding, VariableMapping varMapping)
+   {
+      QName xmlName = new QName(varMapping.getXmlElementName());
+      log.trace("processXmlElementName: " + xmlName);
+
+      ElementBinding element = typeBinding.getElement(xmlName);
+      QName typeQName = typeBinding.getQName();
+      if (element == null && typeQName != null)
+      {
+         // elementFormDefault="qualified"
+         String nsURI = typeQName.getNamespaceURI();
+         QName auxName = new QName(nsURI, varMapping.getXmlElementName());
+         element = typeBinding.getElement(auxName);
+      }
+
+      if (element == null)
+      {
+         // <element ref=
+         ParticleBinding particle = typeBinding.getParticle();
+         if (particle != null)
+         {
+            TermBinding term = particle.getTerm();
+            if (term instanceof ModelGroupBinding)
+            {
+               Iterator iterator = ((ModelGroupBinding)term).getParticles().iterator();
+               element = findLocalPathElement(iterator, new String[] { varMapping.getXmlElementName() }, 0);
+            }
+         }
+      }
+
+      if (element == null)
+         throw new WSException("Element " + xmlName + " found in jaxrpc-mapping but not in the schema: " + typeQName);
+
+      String javaVariableName = varMapping.getJavaVariableName();
+      if (javaVariableName != null)
+      {
+         PropertyMetaData prop = new PropertyMetaData();
+         prop.setName(javaVariableName);
+         element.setPropertyMetaData(prop);
+
+         if (log.isTraceEnabled())
+            log.trace("Bound element " + xmlName + " to property " + prop.getName());
+      }
+   }
+
+   private void processWildcard(TypeBinding typeBinding, VariableMapping varMapping)
+   {
+      log.trace("processWildcard: " + typeBinding.getQName());
+
+      PropertyMetaData prop = null;
+      String javaVariableName = varMapping.getJavaVariableName();
+      if (javaVariableName != null)
+      {
+         prop = new PropertyMetaData();
+         prop.setName(javaVariableName);
+      }
+
+      if (prop == null)
+      {
+         prop = new PropertyMetaData();
+         prop.setName("_any");
+      }
+
+      WildcardBinding wildcard = typeBinding.getWildcard();
+      wildcard.setUnresolvedElementHandler(new SoapElementHandler());
+      wildcard.setUnresolvedCharactersHandler(new SoapCharactersHandler());
+      wildcard.setPropertyMetaData(prop);
+
+      if (log.isTraceEnabled())
+         log.trace("Bound wildcard of " + typeBinding.getQName() + " to property " + prop.getName());
+   }
+
+   private TypeBinding getTypeBinding(SchemaBinding schemaBinding, JavaXmlTypeMapping typeMapping)
+   {
+      String qnameScope = typeMapping.getQnameScope();
+      QName anonymousTypeQName = typeMapping.getAnonymousTypeQName();
+      if (anonymousTypeQName != null)
+      {
+         return getAnonymousTypeBinding(schemaBinding, anonymousTypeQName);
+      }
+
+      QName xmlType = typeMapping.getRootTypeQName();
+
+      TypeBinding typeBinding = null;
+      if ("complexType".equals(qnameScope) || "simpleType".equals(qnameScope))
+      {
+         typeBinding = schemaBinding.getType(xmlType);
+         if (typeBinding == null)
+         {
+            log.warn("Type definition not found in schema: " + xmlType);
+         }
+      }
+      else if ("element".equals(qnameScope))
+      {
+         ElementBinding element = schemaBinding.getElement(xmlType);
+         if (element != null)
+         {
+            typeBinding = element.getType();
+         }
+         else
+         {
+            log.warn("Global element not found in schema: " + xmlType);
+         }
+      }
+      else
+      {
+         throw new WSException("Unexpected qname-scope for " + typeMapping.getJavaType() + ": " + qnameScope);
+      }
+      return typeBinding;
+   }
+
+   public TypeBinding getAnonymousTypeBinding(SchemaBinding schemaBinding, QName typeQName)
+   {
+      String expression = typeQName.getLocalPart();
+      if (log.isTraceEnabled())
+         log.trace("Searching for anonymous expression: " + expression);
+
+      ArrayList list = new ArrayList(10);
+
+      for (int i = 0, begin = -1; i < expression.length(); i++)
+      {
+         if (expression.charAt(i) == '>')
+         {
+            if (begin != -1)
+            {
+               list.add(expression.substring(begin, i));
+               begin = -1;
+            }
+         }
+         else
+         {
+            if (begin == -1)
+               begin = i;
+            else if (i == expression.length() - 1)
+               list.add(expression.substring(begin));
+         }
+      }
+
+      ElementBinding element = findLocalPathElement(schemaBinding.getElements(), ((String[])list.toArray(new String[0])));
+      if (element == null)
+         element = findLocalPathElementInTypes(schemaBinding.getTypes(), ((String[])list.toArray(new String[0])));
+
+      if (element == null)
+         return null;
+
+      return element.getType();
+   }
+
+   public void bindParameterToElement(SchemaBinding schemaBinding, QName xmlName, QName xmlType)
+   {
+      TypeBinding typeBinding;
+      boolean isAnonymousType = xmlType.getLocalPart().startsWith(">");
+      if (isAnonymousType)
+      {
+         typeBinding = getAnonymousTypeBinding(schemaBinding, xmlType);
+      }
+      else
+      {
+         typeBinding = schemaBinding.getType(xmlType);
+      }
+
+      if (typeBinding != null)
+      {
+         if(!isAnonymousType)
+            schemaBinding.addElement(xmlName, typeBinding);
+      }
+      else if (xmlType.equals(Constants.TYPE_LITERAL_ANYTYPE) == false)
+      {
+         throw new WSException("Root type " + xmlType + " not found in the schema.");
+      }
+   }
+
+   private ElementBinding findLocalPathElement(Iterator elements, String[] path)
+   {
+      while (elements.hasNext())
+      {
+         ElementBinding element = (ElementBinding)elements.next();
+         element = findLocalPathElement(element, path, 0);
+         if (element != null)
+            return element;
+      }
+
+      return null;
+   }
+
+   private ElementBinding findLocalPathElementInTypes(Iterator types, String[] path)
+   {
+      while (types.hasNext())
+      {
+         TypeBinding type = (TypeBinding)types.next();
+         if (type.getQName().getLocalPart().equals(path[0]))
+         {
+            ParticleBinding particle = type.getParticle();
+            if (particle == null)
+               continue;
+
+            TermBinding term = particle.getTerm();
+            if (!term.isModelGroup())
+               continue;
+
+            return findLocalPathElement(((ModelGroupBinding)term).getParticles().iterator(), path, 1);
+         }
+      }
+
+      return null;
+   }
+
+   private ElementBinding findLocalPathElement(ElementBinding element, String[] path, int pos)
+   {
+      String name = path[pos];
+      if (!name.equals(element.getQName().getLocalPart()))
+         return null;
+
+      // End of path
+      if (path.length - 1 == pos)
+         return element;
+
+      ParticleBinding particle = element.getType().getParticle();
+      if (particle == null)
+         return null;
+
+      TermBinding term = particle.getTerm();
+      if (!term.isModelGroup())
+         return null;
+
+      ModelGroupBinding group = (ModelGroupBinding)term;
+      Iterator i = group.getParticles().iterator();
+
+      // Increase depth
+      return findLocalPathElement(i, path, pos + 1);
+   }
+
+   private ElementBinding findLocalPathElement(Iterator particles, String[] path, int pos)
+   {
+      while (particles.hasNext())
+      {
+         TermBinding term = ((ParticleBinding)particles.next()).getTerm();
+         if (term instanceof ElementBinding)
+         {
+            ElementBinding element = (ElementBinding)term;
+            element = findLocalPathElement(element, path, pos);
+            if (element != null)
+               return element;
+
+         }
+         else if (term instanceof ModelGroupBinding)
+         {
+            Iterator i = ((ModelGroupBinding)term).getParticles().iterator();
+            ElementBinding element = findLocalPathElement(i, path, pos);
+            if (element != null)
+               return element;
+         }
+      }
+
+      return null;
+   }
+
+   /** Get the <root-type-qname>, fall back to <anonymous-type-qname>
+    */
+   private QName getXmlType(JavaXmlTypeMapping typeMapping)
+   {
+      QName xmlType = typeMapping.getRootTypeQName();
+      if (xmlType == null && typeMapping.getAnonymousTypeQName() != null)
+         xmlType = typeMapping.getAnonymousTypeQName();
+
+      return xmlType;
+   }
+
+   // Inner
+
+   public static class SoapCharactersHandler extends CharactersHandler
+   {
+      public Object unmarshalEmpty(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData)
+      {
+         return "";
+      }
+
+      public Object unmarshal(QName qName, TypeBinding typeBinding, NamespaceContext nsCtx, ValueMetaData valueMetaData, String value)
+      {
+         return value;
+      }
+
+      public void setValue(QName qName, ElementBinding element, Object owner, Object value)
+      {
+         SOAPElement e = (SOAPElement)owner;
+         Text textNode = e.getOwnerDocument().createTextNode((String)value);
+         e.appendChild(textNode);
+      }
+   }
+
+   public static class SoapElementHandler extends RtElementHandler implements ParticleHandler
+   {
+      private SOAPFactory factory;
+
+      public Object startParticle(Object parent, QName elementName, ParticleBinding particle, Attributes attrs, NamespaceContext nsCtx)
+      {
+         SOAPFactory factory = getFactory();
+         SOAPElement element = null;
+         try
+         {
+            String prefix = elementName.getPrefix();
+            String ns = elementName.getNamespaceURI();
+            if (ns != null && ns.length() > 0)
+            {
+               prefix = nsCtx.getPrefix(ns);
+            }
+
+            element = factory.createElement(elementName.getLocalPart(), prefix, ns);
+         }
+         catch (SOAPException e)
+         {
+            throw new IllegalStateException("Failed to create SOAPElement", e);
+         }
+
+         if (attrs != null)
+         {
+            for (int i = 0; i < attrs.getLength(); ++i)
+            {
+               element.setAttribute(attrs.getLocalName(i), attrs.getValue(i));
+            }
+         }
+
+         return element;
+      }
+
+      public Object endParticle(Object o, QName elementName, ParticleBinding particle)
+      {
+         return o;
+      }
+
+      public void setParent(Object parent, Object o, QName elementName, ParticleBinding particle, ParticleBinding parentParticle)
+      {
+         if (parent instanceof SOAPElement)
+         {
+            ((SOAPElement)parent).appendChild((Element)o);
+         }
+         else
+         {
+            super.setParent(parent, o, elementName, particle, parentParticle);
+         }
+      }
+
+      private SOAPFactory getFactory()
+      {
+         if (factory == null)
+         {
+            try
+            {
+               factory = SOAPFactory.newInstance();
+            }
+            catch (SOAPException e)
+            {
+               throw new IllegalStateException("Failed to create soap element factory", e);
+            }
+         }
+         return factory;
+      }
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/UnmarshalException.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/UnmarshalException.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/UnmarshalException.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.jbossxb;
-
-/**
- * A marshal exception.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 06-Jun-2006
- */
-public class UnmarshalException extends Exception
-{
-
-   public UnmarshalException()
-   {
-      super();
-   }
-
-   public UnmarshalException(String msg, Throwable th)
-   {
-      super(msg, th);
-   }
-
-   public UnmarshalException(String msg)
-   {
-      super(msg);
-   }
-
-   public UnmarshalException(Throwable th)
-   {
-      super(th);
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/UnmarshalException.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/UnmarshalException.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/UnmarshalException.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/UnmarshalException.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding.jbossxb;
+
+/**
+ * A marshal exception.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 06-Jun-2006
+ */
+public class UnmarshalException extends Exception
+{
+
+   public UnmarshalException()
+   {
+      super();
+   }
+
+   public UnmarshalException(String msg, Throwable th)
+   {
+      super(msg, th);
+   }
+
+   public UnmarshalException(String msg)
+   {
+      super(msg);
+   }
+
+   public UnmarshalException(Throwable th)
+   {
+      super(th);
+   }
+}

Deleted: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/XercesXSMarshallerImpl.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -1,251 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.common.jbossxb;
-
-// $Id$
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.HashMap;
-
-import javax.xml.namespace.QName;
-
-import org.apache.xerces.xs.XSModel;
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.common.utils.JavaUtils;
-import org.jboss.xb.binding.Constants;
-import org.jboss.xb.binding.MappingObjectModelProvider;
-import org.jboss.xb.binding.XercesXsMarshaller;
-import org.w3c.dom.Node;
-import org.xml.sax.ContentHandler;
-
-/**
- * An implementation of a JAXB Marshaller that user XercesXSMarshaller impl.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 18-Oct-2004
- */
-public class XercesXSMarshallerImpl implements JBossXBMarshaller
-{
-
-   // provide logging
-   private static final Logger log = Logger.getLogger(XercesXSMarshallerImpl.class);
-
-   // The marshaller properties
-   private HashMap properties = new HashMap();
-
-   private XercesXsMarshaller delegate;
-
-   public XercesXSMarshallerImpl()
-   {
-      delegate = new XercesXsMarshaller();
-      delegate.setProperty(XercesXsMarshaller.PROP_OUTPUT_XML_VERSION, "false");
-      delegate.setProperty(XercesXsMarshaller.PROP_OUTPUT_INDENTATION, "false");
-      delegate.declareNamespace("xsi", Constants.NS_XML_SCHEMA_INSTANCE);
-      delegate.setSupportNil(true);
-      delegate.setSimpleContentProperty("_value");
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into a Writer.
-    */
-   public void marshal(Object obj, Writer writer) throws MarshalException
-   {
-      assertRequiredProperties();
-
-      try
-      {
-         QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
-         delegate.addRootElement(xmlName);
-
-         QName xmlType = (QName)getProperty(JBossXBConstants.JBXB_TYPE_QNAME);
-         if (xmlType != null)
-         {
-            delegate.setRootTypeQName(xmlType);
-         }
-
-         if (xmlName.getNamespaceURI().length() > 0)
-         {
-            String prefix = xmlName.getPrefix();
-            String nsURI = xmlName.getNamespaceURI();
-            delegate.declareNamespace(prefix, nsURI);
-         }
-
-         MappingObjectModelProvider provider = new MappingObjectModelProvider();
-         provider.setIgnoreLowLine(false);
-         provider.setIgnoreNotFoundField(false);
-
-         // todo complete wsdl mapping merge
-         JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)getProperty(JBossXBConstants.JBXB_JAVA_MAPPING);
-         if (wsdlMapping != null)
-         {
-            JavaXmlTypeMapping[] javaXmlMappings = wsdlMapping.getJavaXmlTypeMappings();
-            if (javaXmlMappings != null)
-            {
-               for (int i = 0; i < javaXmlMappings.length; ++i)
-               {
-                  JavaXmlTypeMapping javaXmlMapping = javaXmlMappings[i];
-                  VariableMapping[] variableMappings = javaXmlMapping.getVariableMappings();
-                  if (variableMappings != null)
-                  {
-                     String clsName = javaXmlMapping.getJavaType();
-                     Class cls = JavaUtils.loadJavaType(clsName, Thread.currentThread().getContextClassLoader());
-                     QName clsQName = javaXmlMapping.getRootTypeQName();
-
-                     if (clsQName != null)
-                     {
-                        if ("element".equals(javaXmlMapping.getQnameScope()))
-                        {
-                           delegate.mapClassToGlobalElement(cls, clsQName.getLocalPart(), clsQName.getNamespaceURI(), null, provider);
-                        }
-                        else
-                        {
-                           delegate.mapClassToGlobalType(cls, clsQName.getLocalPart(), clsQName.getNamespaceURI(), null, provider);
-                           delegate.mapClassToXsiType(cls, clsQName.getNamespaceURI(), clsQName.getLocalPart());
-                        }
-                     }
-
-                     for (int j = 0; j < variableMappings.length; ++j)
-                     {
-                        VariableMapping variableMapping = variableMappings[j];
-                        String javaName = variableMapping.getJavaVariableName();
-                        if (variableMapping.getXmlElementName() != null)
-                        {
-                           String xmlElementName = variableMapping.getXmlElementName();
-                           provider.mapFieldToElement(cls, javaName, "", xmlElementName, null);
-                        }
-                        else if (variableMapping.getXmlAttributeName() != null)
-                        {
-                           log.trace("Unmapped attribute: " + javaName);
-                        }
-                        else if (variableMapping.getXmlWildcard())
-                        {
-                           delegate.mapFieldToWildcard(cls, "_any", JBossXBSupport.getWildcardMarshaller());
-                        }
-                        else
-                        {
-                           log.warn("Unmapped variable: " + javaName);
-                        }
-                     }
-                  }
-               }
-            }
-         }
-
-         if (getProperty(JBossXBConstants.JBXB_XS_MODEL) != null)
-         {
-            XSModel model = (XSModel)getProperty(JBossXBConstants.JBXB_XS_MODEL);
-            delegate.marshal(model, provider, obj, writer);
-         }
-      }
-      catch (RuntimeException e)
-      {
-         throw e;
-      }
-      catch (Exception e)
-      {
-         throw new MarshalException(e);
-      }
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into SAX2 events.
-    */
-   public void marshal(Object obj, ContentHandler handler)
-   {
-      throw new NotImplementedException();
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into a DOM tree.
-    */
-   public void marshal(Object obj, Node node)
-   {
-      throw new NotImplementedException();
-   }
-
-   /**
-    * Marshal the content tree rooted at obj into an output stream.
-    */
-   public void marshal(Object obj, OutputStream os) throws MarshalException
-   {
-      marshal(obj, new OutputStreamWriter(os));
-   }
-
-   /**
-    * Get the particular property in the underlying implementation of
-    * Marshaller.
-    */
-   public Object getProperty(String name)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("name parameter is null");
-
-      return properties.get(name);
-   }
-
-   /**
-    * Set the particular property in the underlying implementation of
-    * Marshaller.
-    *
-    */
-   public void setProperty(String name, Object value)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("name parameter is null");
-
-      properties.put(name, value);
-   }
-
-   /**
-    * Get a DOM tree view of the content tree(Optional).
-    */
-   public Node getNode(Object contentTree)
-   {
-      throw new NotImplementedException();
-   }
-
-   /**
-    * Assert the required properties
-    */
-   private void assertRequiredProperties()
-   {
-      if (getProperty(JBossXBConstants.JBXB_SCHEMA_READER) == null && getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_XS_MODEL);
-
-      if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_JAVA_MAPPING);
-
-      QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
-      if (xmlName == null)
-         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_ROOT_QNAME);
-
-      if (xmlName.getNamespaceURI().length() > 0 && xmlName.getPrefix().length() == 0)
-         throw new IllegalArgumentException("The given root element name must be prefix qualified: " + xmlName);
-   }
-}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java (from rev 1583, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/XercesXSMarshallerImpl.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jbossxb/XercesXSMarshallerImpl.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/binding/jbossxb/XercesXSMarshallerImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,251 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding.jbossxb;
+
+// $Id$
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.xerces.xs.XSModel;
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.WSException;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.common.metadata.jaxrpcmapping.VariableMapping;
+import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.xb.binding.Constants;
+import org.jboss.xb.binding.MappingObjectModelProvider;
+import org.jboss.xb.binding.XercesXsMarshaller;
+import org.w3c.dom.Node;
+import org.xml.sax.ContentHandler;
+
+/**
+ * An implementation of a JAXB Marshaller that user XercesXSMarshaller impl.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 18-Oct-2004
+ */
+public class XercesXSMarshallerImpl implements JBossXBMarshaller
+{
+
+   // provide logging
+   private static final Logger log = Logger.getLogger(XercesXSMarshallerImpl.class);
+
+   // The marshaller properties
+   private HashMap properties = new HashMap();
+
+   private XercesXsMarshaller delegate;
+
+   public XercesXSMarshallerImpl()
+   {
+      delegate = new XercesXsMarshaller();
+      delegate.setProperty(XercesXsMarshaller.PROP_OUTPUT_XML_VERSION, "false");
+      delegate.setProperty(XercesXsMarshaller.PROP_OUTPUT_INDENTATION, "false");
+      delegate.declareNamespace("xsi", Constants.NS_XML_SCHEMA_INSTANCE);
+      delegate.setSupportNil(true);
+      delegate.setSimpleContentProperty("_value");
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into a Writer.
+    */
+   public void marshal(Object obj, Writer writer) throws MarshalException
+   {
+      assertRequiredProperties();
+
+      try
+      {
+         QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
+         delegate.addRootElement(xmlName);
+
+         QName xmlType = (QName)getProperty(JBossXBConstants.JBXB_TYPE_QNAME);
+         if (xmlType != null)
+         {
+            delegate.setRootTypeQName(xmlType);
+         }
+
+         if (xmlName.getNamespaceURI().length() > 0)
+         {
+            String prefix = xmlName.getPrefix();
+            String nsURI = xmlName.getNamespaceURI();
+            delegate.declareNamespace(prefix, nsURI);
+         }
+
+         MappingObjectModelProvider provider = new MappingObjectModelProvider();
+         provider.setIgnoreLowLine(false);
+         provider.setIgnoreNotFoundField(false);
+
+         // todo complete wsdl mapping merge
+         JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)getProperty(JBossXBConstants.JBXB_JAVA_MAPPING);
+         if (wsdlMapping != null)
+         {
+            JavaXmlTypeMapping[] javaXmlMappings = wsdlMapping.getJavaXmlTypeMappings();
+            if (javaXmlMappings != null)
+            {
+               for (int i = 0; i < javaXmlMappings.length; ++i)
+               {
+                  JavaXmlTypeMapping javaXmlMapping = javaXmlMappings[i];
+                  VariableMapping[] variableMappings = javaXmlMapping.getVariableMappings();
+                  if (variableMappings != null)
+                  {
+                     String clsName = javaXmlMapping.getJavaType();
+                     Class cls = JavaUtils.loadJavaType(clsName, Thread.currentThread().getContextClassLoader());
+                     QName clsQName = javaXmlMapping.getRootTypeQName();
+
+                     if (clsQName != null)
+                     {
+                        if ("element".equals(javaXmlMapping.getQnameScope()))
+                        {
+                           delegate.mapClassToGlobalElement(cls, clsQName.getLocalPart(), clsQName.getNamespaceURI(), null, provider);
+                        }
+                        else
+                        {
+                           delegate.mapClassToGlobalType(cls, clsQName.getLocalPart(), clsQName.getNamespaceURI(), null, provider);
+                           delegate.mapClassToXsiType(cls, clsQName.getNamespaceURI(), clsQName.getLocalPart());
+                        }
+                     }
+
+                     for (int j = 0; j < variableMappings.length; ++j)
+                     {
+                        VariableMapping variableMapping = variableMappings[j];
+                        String javaName = variableMapping.getJavaVariableName();
+                        if (variableMapping.getXmlElementName() != null)
+                        {
+                           String xmlElementName = variableMapping.getXmlElementName();
+                           provider.mapFieldToElement(cls, javaName, "", xmlElementName, null);
+                        }
+                        else if (variableMapping.getXmlAttributeName() != null)
+                        {
+                           log.trace("Unmapped attribute: " + javaName);
+                        }
+                        else if (variableMapping.getXmlWildcard())
+                        {
+                           delegate.mapFieldToWildcard(cls, "_any", JBossXBSupport.getWildcardMarshaller());
+                        }
+                        else
+                        {
+                           log.warn("Unmapped variable: " + javaName);
+                        }
+                     }
+                  }
+               }
+            }
+         }
+
+         if (getProperty(JBossXBConstants.JBXB_XS_MODEL) != null)
+         {
+            XSModel model = (XSModel)getProperty(JBossXBConstants.JBXB_XS_MODEL);
+            delegate.marshal(model, provider, obj, writer);
+         }
+      }
+      catch (RuntimeException e)
+      {
+         throw e;
+      }
+      catch (Exception e)
+      {
+         throw new MarshalException(e);
+      }
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into SAX2 events.
+    */
+   public void marshal(Object obj, ContentHandler handler)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into a DOM tree.
+    */
+   public void marshal(Object obj, Node node)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Marshal the content tree rooted at obj into an output stream.
+    */
+   public void marshal(Object obj, OutputStream os) throws MarshalException
+   {
+      marshal(obj, new OutputStreamWriter(os));
+   }
+
+   /**
+    * Get the particular property in the underlying implementation of
+    * Marshaller.
+    */
+   public Object getProperty(String name)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("name parameter is null");
+
+      return properties.get(name);
+   }
+
+   /**
+    * Set the particular property in the underlying implementation of
+    * Marshaller.
+    *
+    */
+   public void setProperty(String name, Object value)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("name parameter is null");
+
+      properties.put(name, value);
+   }
+
+   /**
+    * Get a DOM tree view of the content tree(Optional).
+    */
+   public Node getNode(Object contentTree)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Assert the required properties
+    */
+   private void assertRequiredProperties()
+   {
+      if (getProperty(JBossXBConstants.JBXB_SCHEMA_READER) == null && getProperty(JBossXBConstants.JBXB_XS_MODEL) == null)
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_XS_MODEL);
+
+      if (getProperty(JBossXBConstants.JBXB_JAVA_MAPPING) == null)
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_JAVA_MAPPING);
+
+      QName xmlName = (QName)getProperty(JBossXBConstants.JBXB_ROOT_QNAME);
+      if (xmlName == null)
+         throw new WSException("Cannot find required property: " + JBossXBConstants.JBXB_ROOT_QNAME);
+
+      if (xmlName.getNamespaceURI().length() > 0 && xmlName.getPrefix().length() == 0)
+         throw new IllegalArgumentException("The given root element name must be prefix qualified: " + xmlName);
+   }
+}

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -46,9 +46,6 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.common.jaxrpc.encoding.JBossXBDeserializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.JBossXBSerializerFactory;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
@@ -58,6 +55,8 @@
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
 import org.jboss.ws.common.utils.JavaUtils;
 import org.jboss.ws.core.CommonClient;
+import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
+import org.jboss.ws.core.binding.JBossXBSerializerFactory;
 import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
 import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
 import org.jboss.ws.core.soap.MessageContextAssociation;

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/EncodedTypeMapping.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/EncodedTypeMapping.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,182 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, 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.Calendar;
+import java.util.Date;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.Constants;
+import org.jboss.ws.core.binding.Base64DeserializerFactory;
+import org.jboss.ws.core.binding.Base64SerializerFactory;
+import org.jboss.ws.core.binding.CalendarDeserializerFactory;
+import org.jboss.ws.core.binding.CalendarSerializerFactory;
+import org.jboss.ws.core.binding.DateDeserializerFactory;
+import org.jboss.ws.core.binding.DateSerializerFactory;
+import org.jboss.ws.core.binding.ElementDeserializerFactory;
+import org.jboss.ws.core.binding.ElementSerializerFactory;
+import org.jboss.ws.core.binding.HexDeserializerFactory;
+import org.jboss.ws.core.binding.HexSerializerFactory;
+import org.jboss.ws.core.binding.QNameDeserializerFactory;
+import org.jboss.ws.core.binding.QNameSerializerFactory;
+import org.jboss.ws.core.binding.SOAPElementDeserializerFactory;
+import org.jboss.ws.core.binding.SOAPElementSerializerFactory;
+import org.jboss.ws.core.binding.SimpleDeserializerFactory;
+import org.jboss.ws.core.binding.SimpleSerializerFactory;
+import org.w3c.dom.Element;
+
+/**
+ * This is the representation of a type mapping.
+ * This TypeMapping implementation supports the encoded encoding style.
+ *
+ * The TypeMapping instance maintains a tuple of the type
+ * {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 10-Oct-2004
+ */
+public class EncodedTypeMapping extends TypeMappingImpl
+{
+
+   /**
+    * Construct the default encoded 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 EncodedTypeMapping()
+   {
+      registerStandardLiteralTypes();
+      registerStandardSOAP11EncodedTypes();
+
+      // register mapping for xsd:anyType
+      registerInternal(SOAPElement.class, Constants.TYPE_SOAP11_ANYTYPE, new SOAPElementSerializerFactory(), new SOAPElementDeserializerFactory());
+      registerInternal(Element.class, Constants.TYPE_SOAP11_ANYTYPE, new ElementSerializerFactory(), new ElementDeserializerFactory());
+   }
+
+   private void registerStandardSOAP11EncodedTypes()
+   {
+      registerInternal(BigDecimal.class, Constants.TYPE_SOAP11_DECIMAL, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(BigInteger.class, Constants.TYPE_SOAP11_POSITIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(BigInteger.class, Constants.TYPE_SOAP11_NEGATIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(BigInteger.class, Constants.TYPE_SOAP11_NONPOSITIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(BigInteger.class, Constants.TYPE_SOAP11_NONNEGATIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(BigInteger.class, Constants.TYPE_SOAP11_UNSIGNEDLONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(BigInteger.class, Constants.TYPE_SOAP11_INTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(Date.class, Constants.TYPE_SOAP11_DATETIME, new DateSerializerFactory(), new DateDeserializerFactory());
+
+      registerInternal(Calendar.class, Constants.TYPE_SOAP11_DATE, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
+      registerInternal(Calendar.class, Constants.TYPE_SOAP11_TIME, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
+      registerInternal(Calendar.class, Constants.TYPE_SOAP11_DATETIME, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
+
+      registerInternal(QName.class, Constants.TYPE_SOAP11_QNAME, new QNameSerializerFactory(), new QNameDeserializerFactory());
+
+      registerInternal(String.class, Constants.TYPE_SOAP11_ANYSIMPLETYPE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_DURATION, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_GDAY, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_GMONTH, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_GMONTHDAY, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_GYEAR, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_GYEARMONTH, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_ID, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_LANGUAGE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_NAME, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_NCNAME, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_NMTOKEN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_NORMALIZEDSTRING, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_TOKEN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(String.class, Constants.TYPE_SOAP11_STRING, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(String[].class, Constants.TYPE_SOAP11_NMTOKENS, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(URI.class, Constants.TYPE_SOAP11_ANYURI, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(boolean.class, Constants.TYPE_SOAP11_BOOLEAN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Boolean.class, Constants.TYPE_SOAP11_BOOLEAN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(byte.class, Constants.TYPE_SOAP11_BYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Byte.class, Constants.TYPE_SOAP11_BYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(byte[].class, Constants.TYPE_SOAP11_HEXBINARY, new HexSerializerFactory(), new HexDeserializerFactory());
+      registerInternal(Byte[].class, Constants.TYPE_SOAP11_HEXBINARY, new HexSerializerFactory(), new HexDeserializerFactory());
+      registerInternal(byte[].class, Constants.TYPE_SOAP11_BASE64BINARY, new Base64SerializerFactory(), new Base64DeserializerFactory());
+      registerInternal(Byte[].class, Constants.TYPE_SOAP11_BASE64BINARY, new Base64SerializerFactory(), new Base64DeserializerFactory());
+      registerInternal(byte[].class, Constants.TYPE_SOAP11_BASE64, new Base64SerializerFactory(), new Base64DeserializerFactory());
+      registerInternal(Byte[].class, Constants.TYPE_SOAP11_BASE64, new Base64SerializerFactory(), new Base64DeserializerFactory());
+
+      registerInternal(double.class, Constants.TYPE_SOAP11_DOUBLE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Double.class, Constants.TYPE_SOAP11_DOUBLE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(float.class, Constants.TYPE_SOAP11_FLOAT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Float.class, Constants.TYPE_SOAP11_FLOAT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(int.class, Constants.TYPE_SOAP11_UNSIGNEDSHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Integer.class, Constants.TYPE_SOAP11_UNSIGNEDSHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(int.class, Constants.TYPE_SOAP11_INT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Integer.class, Constants.TYPE_SOAP11_INT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(long.class, Constants.TYPE_SOAP11_UNSIGNEDINT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Long.class, Constants.TYPE_SOAP11_UNSIGNEDINT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(long.class, Constants.TYPE_SOAP11_LONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Long.class, Constants.TYPE_SOAP11_LONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+      registerInternal(short.class, Constants.TYPE_SOAP11_UNSIGNEDBYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Short.class, Constants.TYPE_SOAP11_UNSIGNEDBYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(short.class, Constants.TYPE_SOAP11_SHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+      registerInternal(Short.class, Constants.TYPE_SOAP11_SHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+   }
+
+   /**
+    * 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[] { "encoded" };
+   }
+
+   /**
+    * 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/core/jaxrpc/LiteralTypeMapping.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/LiteralTypeMapping.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,118 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.jaxrpc;
+
+// $Id$
+
+import java.awt.Image;
+
+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.binding.ElementDeserializerFactory;
+import org.jboss.ws.core.binding.ElementSerializerFactory;
+import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
+import org.jboss.ws.core.binding.JBossXBSerializerFactory;
+import org.jboss.ws.core.binding.SOAPElementDeserializerFactory;
+import org.jboss.ws.core.binding.SOAPElementSerializerFactory;
+import org.w3c.dom.Element;
+
+/**
+ * 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 at 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -41,10 +41,6 @@
 
 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.jaxrpc.encoding.JBossXBDeserializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.JBossXBSerializerFactory;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
@@ -54,6 +50,8 @@
 import org.jboss.ws.common.metadata.umdm.WrappedParameter;
 import org.jboss.ws.common.utils.HolderUtils;
 import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.binding.JBossXBDeserializerFactory;
+import org.jboss.ws.core.binding.JBossXBSerializerFactory;
 
 /** A helper class to wrap/unwrap ducument style request/response structures.
  *

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -46,17 +46,17 @@
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.NameImpl;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.binding.DeserializerSupport;
-import org.jboss.ws.common.binding.SerializationContext;
-import org.jboss.ws.common.binding.SerializerSupport;
-import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
 import org.jboss.ws.common.metadata.umdm.FaultMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.utils.DOMUtils;
 import org.jboss.ws.common.utils.DOMWriter;
 import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerFactoryBase;
+import org.jboss.ws.core.binding.SerializerSupport;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.core.soap.MessageFactoryImpl;
 import org.jboss.ws.core.soap.SOAPEnvelopeImpl;

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -29,7 +29,6 @@
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.binding.SerializationContext;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
@@ -37,6 +36,7 @@
 import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
 import org.jboss.ws.common.metadata.umdm.TypesMetaData;
 import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.binding.SerializationContext;
 import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/Style.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/Style.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Style.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,62 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.jaxrpc;
+
+// $Id$
+
+/** A type-safe enumeration for encoding style.
+ *  
+ * @author Thomas.Diesler at 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/core/jaxrpc/TypeMappingImpl.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingImpl.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.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.binding.Base64DeserializerFactory;
+import org.jboss.ws.core.binding.Base64SerializerFactory;
+import org.jboss.ws.core.binding.CalendarDeserializerFactory;
+import org.jboss.ws.core.binding.CalendarSerializerFactory;
+import org.jboss.ws.core.binding.DateDeserializerFactory;
+import org.jboss.ws.core.binding.DateSerializerFactory;
+import org.jboss.ws.core.binding.HexDeserializerFactory;
+import org.jboss.ws.core.binding.HexSerializerFactory;
+import org.jboss.ws.core.binding.QNameDeserializerFactory;
+import org.jboss.ws.core.binding.QNameSerializerFactory;
+import org.jboss.ws.core.binding.SimpleDeserializerFactory;
+import org.jboss.ws.core.binding.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 at 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/core/jaxrpc/TypeMappingRegistryImpl.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingRegistryImpl.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/TypeMappingRegistryImpl.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,164 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.jaxrpc;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.encoding.TypeMapping;
+import javax.xml.rpc.encoding.TypeMappingRegistry;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.common.Constants;
+
+/**
+ * This defines a registry of TypeMapping instances for encoding styles.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 04-Dec-2004
+ */
+public class TypeMappingRegistryImpl implements TypeMappingRegistry
+{
+   // The registered typeMapping for the literal encoding style
+   private Map<String, TypeMappingImpl> typeMappings = new HashMap<String, TypeMappingImpl>();
+
+   public TypeMappingRegistryImpl()
+   {
+      typeMappings.put(Constants.URI_LITERAL_ENC, new LiteralTypeMapping());
+      typeMappings.put(Constants.URI_SOAP11_ENC, new EncodedTypeMapping());
+   }
+
+   /**
+    * Removes all registered TypeMappings and encodingStyleURIs from this TypeMappingRegistry.
+    */
+   public void clear()
+   {
+      typeMappings.clear();
+   }
+
+   /**
+    * Gets the registered default TypeMapping instance.
+    * This method returns null if there is no registered default TypeMapping in the registry.
+    * @return The registered default TypeMapping instance or null
+    */
+   public TypeMapping getDefaultTypeMapping()
+   {
+      return typeMappings.get(Constants.URI_LITERAL_ENC);
+   }
+
+   /**
+    * Registers the TypeMapping instance that is default for all encoding styles supported by the TypeMappingRegistry.
+    * A default TypeMapping should include serializers and deserializers that are independent of and usable with any
+    * encoding style. Successive invocations of the registerDefault method replace any existing default TypeMapping instance.
+    *
+    * If the default TypeMapping is registered, any other TypeMapping instances registered through the
+    * TypeMappingRegistry.register method (for a set of encodingStyle URIs) override the default TypeMapping.
+    *
+    * @param mapping TypeMapping instance
+    * @throws javax.xml.rpc.JAXRPCException If there is an error in the registration of the default TypeMapping
+    */
+   public void registerDefault(TypeMapping mapping)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Creates a new empty TypeMapping object.
+    * @return TypeMapping instance
+    */
+   public TypeMapping createTypeMapping()
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Returns the registered TypeMapping for the specified encodingStyle URI. If there is no registered TypeMapping for
+    * the specified encodingStyleURI, this method returns null.
+    * @param encodingStyleURI Encoding style specified as an URI
+    * @return TypeMapping for the specified encodingStyleURI or null
+    */
+   public TypeMapping getTypeMapping(String encodingStyleURI)
+   {
+      assertEncodingStyle(encodingStyleURI);
+      return typeMappings.get(encodingStyleURI);
+   }
+
+   /**
+    * Returns a list of registered encodingStyle URIs in this TypeMappingRegistry instance.
+    * @return Array of the registered encodingStyle URIs
+    */
+   public String[] getRegisteredEncodingStyleURIs()
+   {
+      return new String[]{Constants.URI_LITERAL_ENC, Constants.URI_SOAP11_ENC};
+   }
+
+   /**
+    * Registers a TypeMapping instance with the TypeMappingRegistry.
+    * This method replaces any existing registered TypeMapping instance for the specified encodingStyleURI.
+    *
+    * @param encodingStyleURI An encoding style specified as an URI.
+    * @param mapping TypeMapping instance
+    * @return Previous TypeMapping associated with the specified encodingStyleURI, or null if there was no
+    * TypeMapping associated with the specified encodingStyleURI
+    * @throws javax.xml.rpc.JAXRPCException If there is an error in the registration of the TypeMapping for the specified encodingStyleURI.
+    */
+   public TypeMapping register(String encodingStyleURI, TypeMapping mapping)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Unregisters a TypeMapping instance, if present, from the specified encodingStyleURI.
+    * @param encodingStyleURI Encoding style specified as an URI
+    * @return TypeMapping instance that has been unregistered or null if there was no
+    * TypeMapping registered for the specified encodingStyleURI
+    */
+   public TypeMapping unregisterTypeMapping(String encodingStyleURI)
+   {
+      throw new NotImplementedException();
+   }
+
+   /**
+    * Removes a TypeMapping from the TypeMappingRegistry.
+    * A TypeMapping is associated with 1 or more encodingStyleURIs. This method unregisters the specified
+    * TypeMapping instance from all associated encodingStyleURIs and then removes this TypeMapping
+    * instance from the registry.
+    *
+    * @param mapping TypeMapping to be removed
+    * @return true if specified TypeMapping is removed from the TypeMappingRegistry;
+    * false if the specified TypeMapping was not in the TypeMappingRegistry
+    */
+   public boolean removeTypeMapping(TypeMapping mapping)
+   {
+      throw new NotImplementedException();
+   }
+
+   /** Assert the literal encoding style */
+   private void assertEncodingStyle(String encURI)
+   {
+      if (Constants.URI_LITERAL_ENC.equals(encURI) == false && Constants.URI_SOAP11_ENC.equals(encURI) == false)
+         throw new JAXRPCException("Unsupported encoding style: " + encURI);
+   }
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Use.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/Use.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/jaxrpc/Use.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/Use.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, 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;
+
+import org.jboss.ws.common.Constants;
+
+// $Id$
+
+/** A type-safe enumeration for encoding use.
+ *  
+ * @author Thomas.Diesler at jboss.org
+ * @since 16-Oct-2005
+ */
+public class Use
+{
+   private String use;
+
+   public static final Use LITERAL = new Use("literal");
+   public static final Use ENCODED = new Use("encoded");
+
+   private Use(String use)
+   {
+      this.use = use;
+   }
+
+   public static Use getDefaultUse()
+   {
+      return LITERAL;
+   }
+
+   public static Use valueOf(String encodingStyle)
+   {
+      if (Constants.URI_LITERAL_ENC.equals(encodingStyle) || LITERAL.use.equals(encodingStyle))
+         return LITERAL;
+      if (Constants.URI_SOAP11_ENC.equals(encodingStyle) || ENCODED.use.equals(encodingStyle))
+         return ENCODED;
+      
+      throw new IllegalArgumentException("Unsupported encoding style: " + encodingStyle);
+   }
+
+   public String toURI()
+   {
+      String encURI = null;
+      if (this == LITERAL)
+         encURI = Constants.URI_LITERAL_ENC;
+      else if (this == ENCODED)
+         encURI = Constants.URI_SOAP11_ENC;
+      return encURI;
+   }
+   
+   public String toString()
+   {
+      return use;
+   }
+}

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -26,10 +26,10 @@
 import javax.xml.rpc.handler.MessageContext;
 import javax.xml.soap.SOAPMessage;
 
-import org.jboss.ws.common.binding.SerializationContext;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
 import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.binding.SerializationContext;
 import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
 import org.jboss.xb.binding.NamespaceRegistry;
 

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -33,10 +33,10 @@
 import javax.xml.ws.WebServiceException;
 
 import org.jboss.logging.Logger;
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.binding.ComplexTypeDeserializer;
-import org.jboss.ws.common.binding.SerializationContext;
-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/JAXBDeserializerFactory.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -21,9 +21,9 @@
 */
 package org.jboss.ws.core.jaxws;
 
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.binding.DeserializerSupport;
-import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.binding.DeserializerSupport;
 
 // $Id$
 

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -32,10 +32,10 @@
 import javax.xml.ws.WebServiceException;
 
 import org.jboss.logging.Logger;
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.binding.ComplexTypeSerializer;
-import org.jboss.ws.common.binding.SerializationContext;
-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/JAXBSerializerFactory.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -21,9 +21,9 @@
 */
 package org.jboss.ws.core.jaxws;
 
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.binding.SerializerSupport;
-import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializerFactoryBase;
+import org.jboss.ws.core.binding.SerializerSupport;
 
 // $Id$
 

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -24,7 +24,7 @@
 // $Id$
 
 import org.jboss.logging.Logger;
-import org.jboss.ws.common.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializationContext;
 
 /**
  * The serialization context for JAXWS endpoints/clients

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/HTTPBindingJAXWS.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -31,11 +31,11 @@
 import javax.xml.ws.http.HTTPBinding;
 
 import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.binding.BindingException;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
 import org.jboss.ws.core.CommonBinding;
 import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.binding.BindingException;
 import org.jboss.ws.core.soap.UnboundHeader;
 
 /**

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/MessageBinding.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -33,12 +33,12 @@
 import org.jboss.logging.Logger;
 import org.jboss.util.NotImplementedException;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.binding.BindingException;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
 import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
 import org.jboss.ws.core.CommonBinding;
 import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.binding.BindingException;
 import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.core.soap.UnboundHeader;

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/PayloadBinding.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -35,12 +35,12 @@
 import org.jboss.util.NotImplementedException;
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.binding.BindingException;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
 import org.jboss.ws.common.metadata.umdm.HandlerMetaData.HandlerType;
 import org.jboss.ws.core.CommonBinding;
 import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.binding.BindingException;
 import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.core.soap.MessageFactoryImpl;

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/core/SOAPFaultHelperJAXWS.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -40,17 +40,17 @@
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.binding.DeserializerSupport;
-import org.jboss.ws.common.binding.SerializationContext;
-import org.jboss.ws.common.binding.SerializerSupport;
-import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
 import org.jboss.ws.common.metadata.umdm.FaultMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.utils.DOMUtils;
 import org.jboss.ws.common.utils.DOMWriter;
 import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerFactoryBase;
+import org.jboss.ws.core.binding.SerializerSupport;
 import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.core.soap.SOAPFactoryImpl;

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.utils.DOMWriter;
 import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.jaxrpc.Style;
 import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
 
 /**

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,10 +30,10 @@
 
 import javax.xml.ws.handler.MessageContext;
 
-import org.jboss.ws.common.binding.SerializationContext;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
 import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.binding.SerializationContext;
 import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
 import org.jboss.xb.binding.NamespaceRegistry;
 

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/MetaDataBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -45,7 +45,6 @@
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.jaxrpc.Use;
 import org.jboss.ws.common.metadata.j2ee.UnifiedApplicationMetaData;
 import org.jboss.ws.common.metadata.j2ee.UnifiedBeanMetaData;
 import org.jboss.ws.common.metadata.j2ee.UnifiedEjbPortComponentMetaData;
@@ -65,6 +64,7 @@
 import org.jboss.ws.common.metadata.wsdl.WSDLService;
 import org.jboss.ws.common.utils.ObjectNameFactory;
 import org.jboss.ws.core.CommonSOAPBinding;
+import org.jboss.ws.core.jaxrpc.Use;
 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/JAXRPCMetaDataBuilder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -38,11 +38,6 @@
 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.jaxrpc.TypeMappingRegistryImpl;
-import org.jboss.ws.common.jaxrpc.Use;
 import org.jboss.ws.common.metadata.jaxrpcmapping.ExceptionMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
@@ -84,7 +79,12 @@
 import org.jboss.ws.common.metadata.wsdl.WSDLRPCSignatureItem.Direction;
 import org.jboss.ws.common.metadata.wsdl.xmlschema.JBossXSModel;
 import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.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.extras.addressing.AddressingPropertiesImpl;
 import org.jboss.ws.extras.addressing.metadata.AddressingOpMetaExt;

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -31,7 +31,6 @@
 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.umdm.ClientEndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
@@ -48,6 +47,7 @@
 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.core.jaxrpc.Style;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSProviderMetaDataBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -36,7 +36,6 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.jaxrpc.Style;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
 import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
@@ -45,6 +44,7 @@
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData.Type;
 import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
 import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.jaxrpc.Style;
 import org.jboss.ws.core.metadata.builder.MetaDataBuilder;
 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -61,8 +61,6 @@
 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.Use;
 import org.jboss.ws.common.metadata.config.jaxws.WSEndpointConfigJAXWS;
 import org.jboss.ws.common.metadata.j2ee.UnifiedHandlerMetaData;
 import org.jboss.ws.common.metadata.jsr181.HandlerChainFactory;
@@ -86,6 +84,8 @@
 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;
 import org.jboss.ws.core.metadata.acessor.JAXBAccessor;

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServerConfig.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/config/ServerConfig.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/config/ServerConfig.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServerConfig.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.server;
+
+// $Id: ServiceEndpointManagerFactory.java 293 2006-05-08 16:31:50Z thomas.diesler at jboss.com $
+
+import java.io.File;
+
+/**
+ * Interface to container independent config 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public interface ServerConfig
+{
+   static final String BEAN_NAME = "ServerConfig";
+
+   File getServerTempDir();
+
+   File getServerDataDir();
+}

Copied: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServerConfigFactory.java (from rev 1581, branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/config/ServerConfigFactory.java)
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/common/config/ServerConfigFactory.java	2006-12-06 19:08:25 UTC (rev 1581)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServerConfigFactory.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, 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.server;
+
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.logging.Logger;
+
+// $Id: ServiceEndpointManagerFactory.java 293 2006-05-08 16:31:50Z thomas.diesler at jboss.com $
+
+/**
+ * Factory to container independent config 
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 08-May-2006
+ */
+public class ServerConfigFactory
+{
+   // provide logging
+   private static final Logger log = Logger.getLogger(ServerConfigFactory.class);
+
+   private static ServerConfigFactory instance = new ServerConfigFactory();
+
+   // Hide ctor
+   protected ServerConfigFactory()
+   {
+   }
+
+   public static ServerConfigFactory getInstance()
+   {
+      return instance;
+   }
+
+   public ServerConfig getServerConfig()
+   {
+      KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+      return (ServerConfig)registry.getEntry(ServerConfig.BEAN_NAME).getTarget();
+   }
+}

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -38,7 +38,6 @@
 
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.binding.BindingException;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
@@ -46,6 +45,7 @@
 import org.jboss.ws.core.CommonBindingProvider;
 import org.jboss.ws.core.CommonMessageContext;
 import org.jboss.ws.core.CommonSOAPBinding;
+import org.jboss.ws.core.binding.BindingException;
 import org.jboss.ws.core.soap.MessageContextAssociation;
 import org.jboss.ws.core.soap.MessageFactoryImpl;
 import org.jboss.ws.core.soap.SOAPElementImpl;

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -42,8 +42,6 @@
 import org.jboss.util.NotImplementedException;
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
 import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
 import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
 import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SAAJPayloadBuilderDOM.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -37,9 +37,9 @@
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.NameImpl;
 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -42,14 +42,6 @@
 import org.jboss.ws.common.Constants;
 import org.jboss.ws.common.NameImpl;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.binding.BindingException;
-import org.jboss.ws.common.binding.DeserializerSupport;
-import org.jboss.ws.common.binding.SerializationContext;
-import org.jboss.ws.common.binding.SerializerSupport;
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.common.jaxrpc.encoding.NullValueSerializer;
-import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
 import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
 import org.jboss.ws.common.utils.DOMUtils;
@@ -57,6 +49,14 @@
 import org.jboss.ws.common.utils.JavaUtils;
 import org.jboss.ws.common.utils.MimeUtils;
 import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.NullValueSerializer;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerFactoryBase;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
 import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
 import org.jboss.ws.extras.xop.XOPContext;
 import org.w3c.dom.Attr;

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,7 +30,7 @@
 import javax.xml.soap.SOAPFactory;
 
 import org.jboss.ws.common.NameImpl;
-import org.jboss.ws.common.jaxrpc.encoding.SOAPElementDeserializer;
+import org.jboss.ws.core.binding.SOAPElementDeserializer;
 import org.w3c.dom.Element;
 
 /**

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.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/AbstractJSEDeployer.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -43,9 +43,9 @@
 import org.jboss.metadata.web.Servlet;
 import org.jboss.virtual.VirtualFile;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
 import org.jboss.ws.common.utils.IOUtils;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
 import org.jboss.ws.core.server.UnifiedDeploymentInfo;
 
 /**

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServerConfigImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,8 +30,8 @@
 import javax.management.ObjectName;
 
 import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.ws.common.config.ServerConfig;
 import org.jboss.ws.common.utils.ObjectNameFactory;
+import org.jboss.ws.core.server.ServerConfig;
 
 /**
  * JBoss specific implementation of a ServerConfig 

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -34,14 +34,14 @@
 import org.jboss.deployers.spi.deployer.DeploymentUnit;
 import org.jboss.logging.Logger;
 import org.jboss.ws.common.WSException;
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.ServerEndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.ServiceMetaData;
 import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
 import org.jboss.ws.common.utils.DOMUtils;
 import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
 import org.w3c.dom.Element;
 
 /**

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/ServerConfigImpl.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/ServerConfigImpl.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/integration/tomcat/ServerConfigImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -26,7 +26,7 @@
 import java.io.File;
 import java.io.IOException;
 
-import org.jboss.ws.common.config.ServerConfig;
+import org.jboss.ws.core.server.ServerConfig;
 
 /**
  * Tomcat specific implementation of a ServerConfig 

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/JavaToWSDL.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.umdm.UnifiedMetaData;
 import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
 import org.jboss.ws.common.utils.DOMUtils;
 import org.jboss.ws.common.utils.DOMWriter;
+import org.jboss.ws.core.jaxrpc.Style;
 import org.jboss.ws.tools.Configuration.OperationConfig;
 import org.jboss.ws.tools.metadata.ToolsUnifiedMetaDataBuilder;
 import org.jboss.ws.tools.wsdl.WSDLWriter;

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/ToolsUtils.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -42,12 +42,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.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.common.jaxrpc.encoding.SimpleSerializerFactory;
 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.binding.SimpleDeserializerFactory;
+import org.jboss.ws.core.binding.SimpleSerializerFactory;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/WSDLToJava.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -43,7 +43,6 @@
 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.WSDLException;
@@ -58,6 +57,7 @@
 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.tools.interfaces.WSDLToJavaIntf;
 import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
 import org.w3c.dom.Element;

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDToJava.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.common.jaxrpc.LiteralTypeMapping;
 import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
 import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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;
 
 /** Class that converts a XSD Type into Java class
  *  @author <mailto:Anil.Saldhana at jboss.org>Anil Saldhana

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -37,7 +37,6 @@
 import org.apache.xerces.xs.XSTypeDefinition;
 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.ExceptionMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
@@ -66,6 +65,7 @@
 import org.jboss.ws.common.metadata.wsdl.xmlschema.WSSchemaUtils;
 import org.jboss.ws.common.metadata.wsdl.xsd.SchemaUtils;
 import org.jboss.ws.common.utils.JavaUtils;
+import org.jboss.ws.core.jaxrpc.Style;
 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/MappingFileGeneratorHelper.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -41,7 +41,6 @@
 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;
@@ -72,6 +71,7 @@
 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.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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -38,8 +38,6 @@
 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.umdm.EndpointMetaData;
@@ -55,6 +53,8 @@
 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.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/SchemaCreatorIntf.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/SchemaCreatorIntf.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/SchemaCreatorIntf.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -26,10 +26,10 @@
 
 import javax.xml.namespace.QName;
 
-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;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
 
 /**
  * Defines the contract for Schema Creating agents (Java -> XSD Process)

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/WSDLToJavaIntf.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -26,9 +26,9 @@
 import java.net.URL;
 import java.util.Map;
 
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
 import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
 import org.jboss.ws.common.metadata.wsdl.WSDLException;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
 
 /**
  * Defines the contract for WSDL To Java Converters

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/interfaces/XSDToJavaIntf.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -25,7 +25,7 @@
 import java.io.IOException;
 
 import org.apache.xerces.xs.XSModel;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.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/WSDLGenerator.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/jaxws/WSDLGenerator.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,7 +27,6 @@
 import javax.xml.rpc.ParameterMode;
 
 import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.jaxrpc.Style;
 import org.jboss.ws.common.metadata.umdm.EndpointMetaData;
 import org.jboss.ws.common.metadata.umdm.FaultMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
@@ -53,6 +52,7 @@
 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.core.jaxrpc.Style;
 
 
 /**

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/mapping/MappingFileGenerator.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -32,7 +32,6 @@
 import org.apache.xerces.xs.XSSimpleTypeDefinition;
 import org.apache.xerces.xs.XSTypeDefinition;
 import org.jboss.ws.common.Constants;
-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;
@@ -41,6 +40,7 @@
 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.core.jaxrpc.LiteralTypeMapping;
 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/ToolsAnnotationMetaDataBuilder.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsAnnotationMetaDataBuilder.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsAnnotationMetaDataBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.umdm.FaultMetaData;
 import org.jboss.ws.common.metadata.umdm.OperationMetaData;
 import org.jboss.ws.common.metadata.umdm.ParameterMetaData;
 import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.jaxrpc.Style;
 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.umdm.ServiceMetaData;
 import org.jboss.ws.common.metadata.umdm.UnifiedMetaData;
 import org.jboss.ws.common.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.core.jaxrpc.Style;
 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -53,7 +53,6 @@
 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.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaXmlTypeMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
@@ -68,6 +67,7 @@
 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.LiteralTypeMapping;
 import org.jboss.ws.core.jaxrpc.ParameterWrapping;
 import org.jboss.ws.tools.interfaces.SchemaCreatorIntf;
 import org.jboss.xb.binding.NamespaceRegistry;

Modified: branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -67,7 +67,6 @@
 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.WSDLBindingMessageReference;
@@ -96,6 +95,7 @@
 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.core.jaxrpc.Style;
 import org.jboss.ws.tools.JavaToXSD;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -32,14 +32,14 @@
 
 import org.jboss.test.ws.JBossWSTest;
 import org.jboss.ws.common.Constants;
-import org.jboss.ws.common.binding.DeserializerSupport;
-import org.jboss.ws.common.binding.SerializationContext;
-import org.jboss.ws.common.binding.SerializerSupport;
-import org.jboss.ws.common.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.common.jaxrpc.TypeMappingRegistryImpl;
-import org.jboss.ws.common.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.common.jaxrpc.encoding.SerializerFactoryBase;
+import org.jboss.ws.core.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerFactoryBase;
+import org.jboss.ws.core.binding.SerializerSupport;
 import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
 import org.jboss.xb.binding.NamespaceRegistry;
 
 /**

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -28,10 +28,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBMarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -28,10 +28,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBUnmarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,10 +30,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBMarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,10 +30,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBUnmarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,10 +27,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBMarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,10 +27,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBUnmarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,11 +30,11 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBMarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,10 +30,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBUnmarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
 import org.jboss.ws.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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,11 +30,11 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBMarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -29,10 +29,10 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBUnmarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,11 +27,11 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBMarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBMarshallerImpl;
 
 /**
  * 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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,11 +27,11 @@
 
 import org.apache.xerces.xs.XSModel;
 import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.common.jbossxb.JBossXBConstants;
-import org.jboss.ws.common.jbossxb.JBossXBUnmarshallerImpl;
 import org.jboss.ws.common.metadata.jaxrpcmapping.JavaWsdlMapping;
 import org.jboss.ws.common.metadata.jaxrpcmapping.PackageMapping;
 import org.jboss.ws.common.utils.DOMUtils;
+import org.jboss.ws.core.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.binding.jbossxb.JBossXBUnmarshallerImpl;
 
 /**
  * Test the JAXB unmarshalling of a SimpleUserType

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1190/TestEndpointImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -25,11 +25,11 @@
 import java.io.FilenameFilter;
 import java.net.MalformedURLException;
 
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
 import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
 import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
 import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
 import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
 
 /**

Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws1205/TestEndpointImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -28,8 +28,8 @@
 import javax.naming.InitialContext;
 import javax.xml.rpc.Service;
 
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
 
 /** 
  * @author darran.lofthouse at jboss.com

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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1190/TestEndpointImpl.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,11 +27,11 @@
 
 import javax.jws.WebService;
 
-import org.jboss.ws.common.config.ServerConfig;
-import org.jboss.ws.common.config.ServerConfigFactory;
 import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
 import org.jboss.ws.common.metadata.wsdl.WSDLEndpoint;
 import org.jboss.ws.common.metadata.wsdl.WSDLService;
+import org.jboss.ws.core.server.ServerConfig;
+import org.jboss.ws.core.server.ServerConfigFactory;
 import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
 
 /**

Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/JavaToWSDL11TestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.tools.JavaToWSDL;
 import org.jboss.ws.tools.WSToolsConstants;
 import org.jboss.ws.tools.wsdl.WSDLWriter;

Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSDL11ToJavaTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -31,8 +31,8 @@
 import org.jboss.test.ws.tools.sei.StandardJavaTypes;
 import org.jboss.test.ws.tools.validation.WSDL11Validator;
 import org.jboss.test.ws.tools.validation.WSDLValidator;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
 import org.jboss.ws.common.metadata.wsdl.WSDLDefinitions;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
 import org.jboss.ws.tools.WSDLToJava;
 import org.jboss.ws.tools.interfaces.WSDLToJavaIntf;
 import org.jboss.ws.tools.wsdl.WSDLWriter;

Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/WSToolsTest.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -39,14 +39,14 @@
 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.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.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/clientside/ClientSideArtifactsTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/clientside/ClientSideArtifactsTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.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/doclit/ToolsDocLitTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/doclit/ToolsDocLitTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -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.tools.JavaToWSDL;
 import org.jboss.ws.tools.WSToolsConstants;
 import org.jboss.ws.tools.wsdl.WSDLWriter;

Modified: branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/holders/StandardHoldersTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -30,11 +30,11 @@
 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.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.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/xmlschema/WSDLTypesTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xmlschema/WSDLTypesTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -27,11 +27,11 @@
 import javax.xml.namespace.QName;
 
 import org.jboss.test.ws.JBossWSTest;
-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.core.jaxrpc.LiteralTypeMapping;
 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/xsdjava/AnonymousTypesTestCase.java
===================================================================
--- branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/AnonymousTypesTestCase.java	2006-12-06 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/AnonymousTypesTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -25,7 +25,7 @@
 
 import org.jboss.test.ws.tools.WSToolsTest;
 import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ComplexTypesTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -25,7 +25,7 @@
 
 import org.jboss.test.ws.tools.WSToolsTest;
 import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/NillableTypesTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -25,7 +25,7 @@
 
 import org.jboss.test.ws.tools.WSToolsTest;
 import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/ReferencesTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -25,7 +25,7 @@
 
 import org.jboss.test.ws.tools.WSToolsTest;
 import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.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 22:50:47 UTC (rev 1583)
+++ branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/tools/xsdjava/SimpleTypesTestCase.java	2006-12-07 00:15:01 UTC (rev 1584)
@@ -25,7 +25,7 @@
 
 import org.jboss.test.ws.tools.WSToolsTest;
 import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
-import org.jboss.ws.common.jaxrpc.LiteralTypeMapping;
+import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
 import org.jboss.ws.tools.XSDToJava;
 import org.jboss.ws.tools.interfaces.XSDToJavaIntf;
 




More information about the jbossws-commits mailing list