Author: thomas.diesler(a)jboss.com
Date: 2006-12-07 06:35:39 -0500 (Thu, 07 Dec 2006)
New Revision: 1601
Added:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonClient.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonContextServlet.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonMessageContext.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/EndpointInvocation.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonBinding.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonBindingProvider.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAP11Binding.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAP12Binding.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAPBinding.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBConstants.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshaller.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/MarshalException.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/UnmarshalException.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/XercesXSMarshallerImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/MessageContextPropertyHelper.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/UnboundHeader.java
Removed:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBConstants.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshaller.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializer.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializerFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/MarshalException.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/UnmarshalException.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/XercesXSMarshallerImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebMethod.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebParam.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebResult.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebService.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/InitParam.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPBinding.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandler.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandlers.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Call.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/JAXRPCException.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Service.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceException.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Deserializer.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Serializer.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/GenericHandler.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerChain.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerInfo.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerRegistry.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/soap/SOAPMessageContext.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigDecimalHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigIntegerHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanWrapperHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteArrayHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteWrapperHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/CalendarHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleWrapperHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatWrapperHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntegerWrapperHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongWrapperHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ObjectHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/QNameHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortWrapperHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/StringHolder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/server/ServletEndpointContext.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/AttachmentPart.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Detail.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/DetailEntry.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MessageFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeader.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeaders.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Name.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBody.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBodyElement.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConstants.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPElementFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPEnvelope.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPException.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFactory.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFault.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFaultElement.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPHeaderElement.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPMessage.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/BindingType.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/RequestWrapper.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/ResponseWrapper.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/Action.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingException.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/EndpointReference.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/FaultAction.java
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultExceptionHelper.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/utils/ThreadLocalAssociation.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/deployment/MetaDataBuilder.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPMarshallerImpl.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/JBossContextServlet.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInterceptor.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/ToolsUtils.java
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
Log:
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebMethod.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebMethod.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebMethod.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.jws;
// $Id$
@@ -38,9 +38,13 @@
* @since 26-Apr-2005
*/
@Retention(value = RetentionPolicy.RUNTIME)
-(a)Target({ElementType.METHOD})
+@Target( { ElementType.METHOD })
public @interface WebMethod
{
+ /**
+ * Indicate that a method should not be exposed on the Web Service
+ */
+ boolean exclude() default false;
/**
* Name of the wsdl:operation matching this method. By default the WSDL operation
name will be the same
@@ -52,6 +56,4 @@
* The action for this operation. For SOAP bindings, this determines the value of
the SOAPAction header.
*/
String action() default "";
-}
-
-;
+};
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebParam.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebParam.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebParam.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -65,11 +65,11 @@
* This is only used if the operation is rpc style, or if the operation is document
style and the parameter style is BARE.
*/
String partName() default "";
-
+
/**
* The XML namespace for the parameter.
*
- * Only used if the operation is document style or the paramater maps to a header. If
the target namespace is set to '', this represents the empty namespace.
+ * Only used if the operation is document style or the paramater maps to a header. If
the target namespace is set to “”, this represents the empty namespace.
*
* Specification Default:
* If the operation is document style, the parameter style is WRAPPED, and the
parameter does not map to a header, the empty namespace.
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebResult.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebResult.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebResult.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -42,14 +42,14 @@
* If true, the result is pulled from a message header rather then the message body.
*/
boolean header() default false;
-
+
/**
* If the operation is rpc style and @WebResult.partName has not been specified, this
is the name of the wsdl:part representing the return value.
* If the operation is document style or the return value maps to a header, this is
the local name of the XML element representing the return value.
*
* Specification Default:
- * If the operation is document style and the parameter style is BARE,
@WebParam.operationName+'Response'.
- * Otherwise, 'return.'
+ * If the operation is document style and the parameter style is BARE,
@WebParam.operationName+”Response”.
+ * Otherwise, “return.”
*/
String name() default "";
@@ -62,7 +62,7 @@
/**
* The XML namespace for the return value.
*
- * Only used if the operation is document style or the return value maps to a header.
If the target namespace is set to '', this represents the empty namespace.
+ * Only used if the operation is document style or the return value maps to a header.
If the target namespace is set to “”, this represents the empty namespace.
*
* Specification Default:
* If the operation is document style, the parameter style is WRAPPED, and the
return value does not map to a header, the empty namespace.
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebService.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebService.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/WebService.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -52,7 +52,7 @@
* Used as the name of the wsdl:port when mapped to WSDL 1.1.
* This member-value is not allowed on endpoint interfaces.
* Specification Default:
- * @WebService.name + 'Port'.
+ * @WebService.name + ”Port”.
*/
String portName() default "";
@@ -78,7 +78,7 @@
* This member-value is not allowed on endpoint interfaces.
*
* Specification Default:
- * The simple name of the Java class + 'Service".
+ * The simple name of the Java class + “Service".
*/
String serviceName() default "";
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/InitParam.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/InitParam.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/InitParam.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.jws.soap;
// $Id$
@@ -40,7 +40,4 @@
* Value of the initialization parameter
*/
String value();
-}
-
-;
-
+};
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPBinding.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPBinding.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPBinding.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -36,7 +36,8 @@
*/
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE })
-public @interface SOAPBinding {
+public @interface SOAPBinding
+{
/**
* The SOAP binding style
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandler.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandler.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandler.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.jws.soap;
// $Id$
@@ -59,8 +59,4 @@
* documentation for javax.xml.namespace.QName.valueOf(String qNameAsString)
*/
String[] headers() default {};
-}
-
-;
-
-
+};
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandlers.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandlers.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/jws/soap/SOAPMessageHandlers.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.jws.soap;
// $Id$
@@ -39,11 +39,9 @@
* @deprecated
*/
@Retention(value = RetentionPolicy.RUNTIME)
- @Target(value = {ElementType.TYPE})
- public @interface SOAPMessageHandlers
+@Target(value = { ElementType.TYPE })
+public @interface SOAPMessageHandlers
{
SOAPMessageHandler[] value();
-}
-
-;
+};
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Call.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Call.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Call.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,12 +21,13 @@
*/
package javax.xml.rpc;
-import javax.xml.namespace.QName;
import java.rmi.RemoteException;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import javax.xml.namespace.QName;
+
/** The javax.xml.rpc.Call interface provides support for the dynamic invocation of a
service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call
instances.
*
@@ -199,35 +200,35 @@
public Iterator getPropertyNames();
/** Invokes a specific operation using a synchronous request-response interaction
mode.
- *
- * @param inputParams Object[]--Parameters for this invocation. This includes only the
input params
- * @return Returns the return value or null
- * @throws RemoteException if there is any error in the remote method invocation
- * @throws javax.xml.rpc.soap.SOAPFaultException Indicates a SOAP fault
- * @throws JAXRPCException
- * <ul>
- * <li>If there is an error in the configuration of the Call object
- * <li> If inputParams do not match the required parameter set (as specified
through the addParameter invocations or in the corresponding WSDL)
- * <li> If parameters and return type are incorrectly specified
- * </ul>
- */
- public Object invoke(Object[] inputParams) throws RemoteException;
+ *
+ * @param inputParams Object[]--Parameters for this invocation. This includes only the
input params
+ * @return Returns the return value or null
+ * @throws RemoteException if there is any error in the remote method invocation
+ * @throws javax.xml.rpc.soap.SOAPFaultException Indicates a SOAP fault
+ * @throws JAXRPCException
+ * <ul>
+ * <li>If there is an error in the configuration of the Call object
+ * <li> If inputParams do not match the required parameter set (as specified
through the addParameter invocations or in the corresponding WSDL)
+ * <li> If parameters and return type are incorrectly specified
+ * </ul>
+ */
+ public Object invoke(Object[] inputParams) throws RemoteException;
- /** Invokes a specific operation using a synchronous request-response interaction
mode.
- *
- * @param operationName QName of the operation
- * @param inputParams Object[]--Parameters for this invocation. This includes only the
input params.
- * @return Return value or null
- * @throws RemoteException if there is any error in the remote method invocation.
- * @throws javax.xml.rpc.soap.SOAPFaultException - Indicates a SOAP fault
- * @throws JAXRPCException
- * <ul>
- * <li> If there is an error in the configuration of the Call object
- * <li> If inputParams do not match the required parameter set (as specified
through the addParameter invocations or in the corresponding WSDL)
- * <li> If parameters and return type are incorrectly specified
- * </ul>
- */
- public Object invoke(QName operationName, Object[] inputParams) throws
RemoteException;
+ /** Invokes a specific operation using a synchronous request-response interaction
mode.
+ *
+ * @param operationName QName of the operation
+ * @param inputParams Object[]--Parameters for this invocation. This includes only the
input params.
+ * @return Return value or null
+ * @throws RemoteException if there is any error in the remote method invocation.
+ * @throws javax.xml.rpc.soap.SOAPFaultException - Indicates a SOAP fault
+ * @throws JAXRPCException
+ * <ul>
+ * <li> If there is an error in the configuration of the Call object
+ * <li> If inputParams do not match the required parameter set (as specified
through the addParameter invocations or in the corresponding WSDL)
+ * <li> If parameters and return type are incorrectly specified
+ * </ul>
+ */
+ public Object invoke(QName operationName, Object[] inputParams) throws
RemoteException;
/** Invokes a remote method using the one-way interaction mode.
* The client thread does not normally block waiting for the completion of the server
processing for this
@@ -251,9 +252,9 @@
public Map getOutputParams();
/** Returns a List values for the output parameters of the last invoked operation.
- *
- * @return java.util.List Values for the output parameters. An empty List is returned
if there are no output values.
- * @throws JAXRPCException If this method is invoked for a one-way operation or is
invoked before any invoke method has been called.
- */
- public List getOutputValues();
+ *
+ * @return java.util.List Values for the output parameters. An empty List is returned
if there are no output values.
+ * @throws JAXRPCException If this method is invoked for a one-way operation or is
invoked before any invoke method has been called.
+ */
+ public List getOutputValues();
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/JAXRPCException.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/JAXRPCException.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/JAXRPCException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc;
import org.jboss.util.id.SerialVersion;
@@ -35,8 +35,7 @@
{
if (SerialVersion.version == SerialVersion.LEGACY)
serialVersionUID = 2012915834079496799L;
- else
- serialVersionUID = 5213579554532711730L;
+ else serialVersionUID = 5213579554532711730L;
}
public JAXRPCException()
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Service.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Service.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/Service.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,13 +21,14 @@
*/
package javax.xml.rpc;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.TypeMappingRegistry;
-import javax.xml.rpc.handler.HandlerRegistry;
import java.net.URL;
import java.rmi.Remote;
import java.util.Iterator;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.TypeMappingRegistry;
+import javax.xml.rpc.handler.HandlerRegistry;
+
/** Service class acts as a factory for:
* <ul>
* <li>Dynamic proxy for the target service endpoint.
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceException.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceException.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc;
import org.jboss.util.id.SerialVersion;
@@ -35,8 +35,7 @@
{
if (SerialVersion.version == SerialVersion.LEGACY)
serialVersionUID = -4042547292194127311L;
- else
- serialVersionUID = -6582148924441189775L;
+ else serialVersionUID = -6582148924441189775L;
}
public ServiceException()
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/ServiceFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -54,8 +54,8 @@
/** A constant representing the property used to lookup the name of a ServiceFactory
implementation class. */
public static final String SERVICEFACTORY_PROPERTY =
"javax.xml.rpc.ServiceFactory";
- private static final String DEFAULT_SERVICE_FACTORY =
"org.jboss.ws.jaxrpc.ServiceFactoryImpl";
- private static final String[] alternativeFactories = new String[] {
"org.jboss.webservice.client.ServiceFactoryImpl",
"org.jboss.axis.client.ServiceFactory" };
+ private static final String DEFAULT_SERVICE_FACTORY =
"org.jboss.ws.core.jaxrpc.ServiceFactoryImpl";
+ private static final String[] alternativeFactories = new String[] {};
protected ServiceFactory()
{
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Deserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Deserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Deserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.encoding;
import java.io.Serializable;
@@ -30,8 +30,7 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface Deserializer
- extends Serializable
+public interface Deserializer extends Serializable
{
public String getMechanismType();
}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Serializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Serializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/encoding/Serializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.encoding;
import java.io.Serializable;
@@ -31,8 +31,7 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface Serializer
- extends Serializable
+public interface Serializer extends Serializable
{
public String getMechanismType();
}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/GenericHandler.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/GenericHandler.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/GenericHandler.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.handler;
import javax.xml.namespace.QName;
@@ -37,8 +37,7 @@
* @author Rahul Sharma (javadoc)
* @version $Revision$
*/
-public abstract class GenericHandler
- implements Handler
+public abstract class GenericHandler implements Handler
{
/** Default constructor. */
protected GenericHandler()
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerChain.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerChain.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerChain.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,30 +1,31 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.handler;
-import javax.xml.rpc.JAXRPCException;
import java.util.List;
import java.util.Map;
+import javax.xml.rpc.JAXRPCException;
+
/** This interface represents a list of handlers. All elements in the
* HandlerChain are of the type javax.xml.rpc.handler.Handler.
*
@@ -35,8 +36,7 @@
* @author Rahul Sharma (javadoc)
* @version $Revision$
*/
-public interface HandlerChain
- extends List
+public interface HandlerChain extends List
{
/**
* Initializes the configuration for a HandlerChain.
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerInfo.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerInfo.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerInfo.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,32 +1,32 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.handler;
import java.io.Serializable;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+
import javax.xml.namespace.QName;
/** This represents information about a handler in the HandlerChain. A
@@ -36,8 +36,7 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public class HandlerInfo
- implements Serializable
+public class HandlerInfo implements Serializable
{
private static final long serialVersionUID = -6735139577513563610L;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerRegistry.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerRegistry.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/HandlerRegistry.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,28 +1,29 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.handler;
import java.io.Serializable;
import java.util.List;
+
import javax.xml.namespace.QName;
/** This interface provides support for the programmatic configuration of
@@ -39,9 +40,9 @@
* @author Rahul Sharma (javadoc)
* @version $Revision$
*/
-public interface HandlerRegistry
- extends Serializable
+public interface HandlerRegistry extends Serializable
{
public List getHandlerChain(QName portName);
+
public void setHandlerChain(QName portName, List chain);
}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/soap/SOAPMessageContext.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/soap/SOAPMessageContext.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/handler/soap/SOAPMessageContext.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,28 +1,28 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.handler.soap;
+import javax.xml.rpc.handler.MessageContext;
import javax.xml.soap.SOAPMessage;
-import javax.xml.rpc.handler.MessageContext;
/** This interface provides access to the SOAP message for either RPC request
* or response. The javax.xml.soap.SOAPMessage specifies the standard Java API
@@ -32,10 +32,10 @@
* @author Rahul Sharma (javadoc)
* @version $Revision$
*/
-public interface SOAPMessageContext
- extends MessageContext
+public interface SOAPMessageContext extends MessageContext
{
public SOAPMessage getMessage();
+
public void setMessage(SOAPMessage message);
public String[] getRoles();
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigDecimalHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigDecimalHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigDecimalHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
import java.math.BigDecimal;
@@ -28,15 +28,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class BigDecimalHolder
- implements Holder
+public final class BigDecimalHolder implements Holder
{
public BigDecimal value;
public BigDecimalHolder()
{
-
- }
+
+ }
+
public BigDecimalHolder(BigDecimal value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigIntegerHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigIntegerHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BigIntegerHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
import java.math.BigInteger;
@@ -28,15 +28,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class BigIntegerHolder
- implements Holder
+public final class BigIntegerHolder implements Holder
{
public BigInteger value;
public BigIntegerHolder()
{
-
- }
+
+ }
+
public BigIntegerHolder(BigInteger value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for booleans.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class BooleanHolder
- implements Holder
+public final class BooleanHolder implements Holder
{
public boolean value;
public BooleanHolder()
{
-
- }
+
+ }
+
public BooleanHolder(boolean value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanWrapperHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanWrapperHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/BooleanWrapperHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Booleans.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class BooleanWrapperHolder
- implements Holder
+public final class BooleanWrapperHolder implements Holder
{
public Boolean value;
public BooleanWrapperHolder()
{
-
- }
+
+ }
+
public BooleanWrapperHolder(Boolean value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteArrayHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteArrayHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteArrayHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for byte[]s.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class ByteArrayHolder
- implements Holder
+public final class ByteArrayHolder implements Holder
{
public byte[] value;
public ByteArrayHolder()
{
-
- }
+
+ }
+
public ByteArrayHolder(byte[] value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for bytes.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class ByteHolder
- implements Holder
+public final class ByteHolder implements Holder
{
public byte value;
public ByteHolder()
{
-
- }
+
+ }
+
public ByteHolder(byte value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteWrapperHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteWrapperHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ByteWrapperHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Bytes.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class ByteWrapperHolder
- implements Holder
+public final class ByteWrapperHolder implements Holder
{
public Byte value;
public ByteWrapperHolder()
{
-
- }
+
+ }
+
public ByteWrapperHolder(Byte value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/CalendarHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/CalendarHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/CalendarHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
import java.util.Calendar;
@@ -28,15 +28,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class CalendarHolder
- implements Holder
+public final class CalendarHolder implements Holder
{
public Calendar value;
public CalendarHolder()
{
-
- }
+
+ }
+
public CalendarHolder(Calendar value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for doubles.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class DoubleHolder
- implements Holder
+public final class DoubleHolder implements Holder
{
public double value;
public DoubleHolder()
{
-
- }
+
+ }
+
public DoubleHolder(double value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleWrapperHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleWrapperHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/DoubleWrapperHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Doubles.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class DoubleWrapperHolder
- implements Holder
+public final class DoubleWrapperHolder implements Holder
{
public Double value;
public DoubleWrapperHolder()
{
-
- }
+
+ }
+
public DoubleWrapperHolder(Double value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for floats.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class FloatHolder
- implements Holder
+public final class FloatHolder implements Holder
{
public float value;
public FloatHolder()
{
-
- }
+
+ }
+
public FloatHolder(float value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatWrapperHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatWrapperHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/FloatWrapperHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Floats.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class FloatWrapperHolder
- implements Holder
+public final class FloatWrapperHolder implements Holder
{
public Float value;
public FloatWrapperHolder()
{
-
- }
+
+ }
+
public FloatWrapperHolder(Float value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for ints.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class IntHolder
- implements Holder
+public final class IntHolder implements Holder
{
public int value;
public IntHolder()
{
-
- }
+
+ }
+
public IntHolder(int value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntegerWrapperHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntegerWrapperHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/IntegerWrapperHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Integers.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class IntegerWrapperHolder
- implements Holder
+public final class IntegerWrapperHolder implements Holder
{
public Integer value;
public IntegerWrapperHolder()
{
-
- }
+
+ }
+
public IntegerWrapperHolder(Integer value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for longs.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class LongHolder
- implements Holder
+public final class LongHolder implements Holder
{
public long value;
public LongHolder()
{
-
- }
+
+ }
+
public LongHolder(long value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongWrapperHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongWrapperHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/LongWrapperHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Longs.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class LongWrapperHolder
- implements Holder
+public final class LongWrapperHolder implements Holder
{
public Long value;
public LongWrapperHolder()
{
-
- }
+
+ }
+
public LongWrapperHolder(Long value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ObjectHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ObjectHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ObjectHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Objects.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class ObjectHolder
- implements Holder
+public final class ObjectHolder implements Holder
{
public Object value;
public ObjectHolder()
{
-
- }
+
+ }
+
public ObjectHolder(Object value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/QNameHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/QNameHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/QNameHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
import javax.xml.namespace.QName;
@@ -28,15 +28,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class QNameHolder
- implements Holder
+public final class QNameHolder implements Holder
{
public QName value;
public QNameHolder()
{
-
- }
+
+ }
+
public QNameHolder(QName value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for shorts.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class ShortHolder
- implements Holder
+public final class ShortHolder implements Holder
{
public short value;
public ShortHolder()
{
-
- }
+
+ }
+
public ShortHolder(short value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortWrapperHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortWrapperHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/ShortWrapperHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Shorts.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class ShortWrapperHolder
- implements Holder
+public final class ShortWrapperHolder implements Holder
{
public Short value;
public ShortWrapperHolder()
{
-
- }
+
+ }
+
public ShortWrapperHolder(Short value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/StringHolder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/StringHolder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/holders/StringHolder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.holders;
/** A holder for Strings.
@@ -26,15 +26,15 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public final class StringHolder
- implements Holder
+public final class StringHolder implements Holder
{
public String value;
public StringHolder()
{
-
- }
+
+ }
+
public StringHolder(String value)
{
this.value = value;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/server/ServletEndpointContext.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/server/ServletEndpointContext.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/server/ServletEndpointContext.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,30 +1,31 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.rpc.server;
+import java.security.Principal;
+
import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;
import javax.xml.rpc.handler.MessageContext;
-import java.security.Principal;
/**
* This interface provides an endpoint context maintained by the underlying
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,13 +21,14 @@
*/
package javax.xml.rpc.soap;
-import java.io.ObjectStreamField;
+import java.io.IOException;
import java.io.ObjectInputStream;
-import java.io.IOException;
import java.io.ObjectOutputStream;
+import java.io.ObjectStreamField;
+
+import javax.xml.namespace.QName;
import javax.xml.soap.Detail;
import javax.xml.soap.Name;
-import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
import org.jboss.util.id.SerialVersion;
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/AttachmentPart.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/AttachmentPart.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/AttachmentPart.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,29 +1,30 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
-import javax.activation.DataHandler;
import java.util.Iterator;
+import javax.activation.DataHandler;
+
/**
* A single attachment to a SOAPMessage object. A SOAPMessage object may contain zero,
one, or many AttachmentPart objects.
* Each AttachmentPart object consists of two parts, application-specific content and
associated MIME headers.
@@ -195,7 +196,7 @@
/**
* Sets the given DataHandler object as the data handler for this AttachmentPart
object.
* Typically, on an incoming message, the data handler is automatically set.
- * When a message is being created and populated with content, the setXopContent
method can be used to get data
+ * When a message is being created and populated with content, the setDataHandler
method can be used to get data
* from various data sources into the message.
* @param dataHandler the DataHandler object to be set
* @throws IllegalArgumentException if there was a problem with the specified
DataHandler object
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Detail.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Detail.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Detail.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
import java.util.Iterator;
@@ -38,18 +38,18 @@
* of all the DetailEntry objects in d. The code also creates a Name object to
* pass to the method addDetailEntry. The variable se, used to create the Name
* object, is a SOAPEnvelope object.
- Detail d = sf.getDetail();
- Name name = se.createName("GetLastTradePrice", "WOMBAT",
- "http://www.wombat.org/trader");
- d.addDetailEntry(name);
- Iterator it = d.getDetailEntries();
+ Detail d = sf.getDetail();
+ Name name = se.createName("GetLastTradePrice", "WOMBAT",
+ "http://www.wombat.org/trader");
+ d.addDetailEntry(name);
+ Iterator it = d.getDetailEntries();
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface Detail
- extends SOAPFaultElement
+public interface Detail extends SOAPFaultElement
{
public DetailEntry addDetailEntry(Name name) throws SOAPException;
+
public Iterator getDetailEntries();
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/DetailEntry.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/DetailEntry.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/DetailEntry.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
/** The content for a Detail object, giving details for a SOAPFault object. A
@@ -28,7 +28,6 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface DetailEntry
- extends SOAPElement
+public interface DetailEntry extends SOAPElement
{
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MessageFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MessageFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MessageFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,33 +1,33 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
-import org.jboss.logging.Logger;
-
import java.io.IOException;
import java.io.InputStream;
import java.security.AccessController;
import java.security.PrivilegedAction;
+import org.jboss.logging.Logger;
+
/**
* A factory for creating SOAPMessage objects.
*
@@ -62,10 +62,8 @@
// provide logging
private static Logger log = Logger.getLogger(MessageFactory.class);
- private static final String DEFAULT_MESSAGE_FACTORY =
"org.jboss.ws.soap.MessageFactoryImpl";
- private static final String[] alternativeFactories = new String[]{
- "org.jboss.axis.soap.MessageFactoryImpl"
- };
+ private static final String DEFAULT_MESSAGE_FACTORY =
"org.jboss.ws.core.soap.MessageFactoryImpl";
+ private static final String[] alternativeFactories = new String[] {
"org.jboss.axis.soap.MessageFactoryImpl" };
/** Creates a new MessageFactory object that is an instance of the default
implementation.
*/
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeader.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeader.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeader.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,27 +1,26 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
-
/** An object that stores a MIME header name and its value. One or more
* MimeHeader objects may be contained in a MimeHeaders object.
*
@@ -33,7 +32,7 @@
private String name;
private String value;
- public MimeHeader(String name, String value)
+ public MimeHeader(String name, String value)
{
this.name = name;
this.value = value;
@@ -53,14 +52,15 @@
{
return toString().hashCode();
}
-
+
public boolean equals(Object obj)
{
- if (!(obj instanceof MimeHeader)) return false;
+ if (!(obj instanceof MimeHeader))
+ return false;
MimeHeader other = (MimeHeader)obj;
return toString().equals(other.toString());
}
-
+
public String toString()
{
return "[" + name + "=" + value + "]";
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeaders.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeaders.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/MimeHeaders.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
import java.util.ArrayList;
@@ -42,7 +42,7 @@
private LinkedList headers = new LinkedList();
public MimeHeaders()
- {
+ {
}
/**
@@ -50,11 +50,10 @@
* @param name
* @param value
* @throws IllegalArgumentException - if name is null or empty.
- */
- public void addHeader(String name, String value)
- throws IllegalArgumentException
+ */
+ public void addHeader(String name, String value) throws IllegalArgumentException
{
- if( name == null || name.length() == 0 )
+ if (name == null || name.length() == 0)
throw new IllegalArgumentException("Invalid null or empty header
name");
MimeHeader header = new MimeHeader(name, value);
headers.add(header);
@@ -69,18 +68,18 @@
*
* @param name
* @return All matching header values if found, null otherwise
- */
+ */
public String[] getHeader(String name)
{
ArrayList tmp = new ArrayList();
- for(int n = 0; n < headers.size(); n ++)
+ for (int n = 0; n < headers.size(); n++)
{
- MimeHeader mh = (MimeHeader) headers.get(n);
- if( mh.getName().equalsIgnoreCase(name) )
+ MimeHeader mh = (MimeHeader)headers.get(n);
+ if (mh.getName().equalsIgnoreCase(name))
tmp.add(mh.getValue());
}
String[] values = null;
- if( tmp.size() > 0 )
+ if (tmp.size() > 0)
{
values = new String[tmp.size()];
tmp.toArray(values);
@@ -91,13 +90,13 @@
public Iterator getMatchingHeaders(String[] names)
{
MatchingIter iter = new MatchingIter(headers, names, true);
- return iter;
+ return iter;
}
public Iterator getNonMatchingHeaders(String[] names)
{
MatchingIter iter = new MatchingIter(headers, names, false);
- return iter;
+ return iter;
}
public void removeAllHeaders()
@@ -108,10 +107,10 @@
public void removeHeader(String name)
{
Iterator iter = headers.iterator();
- while( iter.hasNext() )
+ while (iter.hasNext())
{
- MimeHeader mh = (MimeHeader) iter.next();
- if( mh.getName().equalsIgnoreCase(name) )
+ MimeHeader mh = (MimeHeader)iter.next();
+ if (mh.getName().equalsIgnoreCase(name))
iter.remove();
}
}
@@ -121,19 +120,19 @@
* header name matches. This method also removes all matching headers after
* the first one.
*
- */
+ */
public void setHeader(String name, String value)
{
boolean didSet = false;
- for(int n = 0; n < headers.size(); n ++)
+ for (int n = 0; n < headers.size(); n++)
{
- MimeHeader mh = (MimeHeader) headers.get(n);
- if( mh.getName().equalsIgnoreCase(name) )
+ MimeHeader mh = (MimeHeader)headers.get(n);
+ if (mh.getName().equalsIgnoreCase(name))
{
- if( didSet == true )
+ if (didSet == true)
{
headers.remove(n);
- n --;
+ n--;
}
else
{
@@ -144,7 +143,7 @@
}
}
- if( didSet == false )
+ if (didSet == false)
{
this.addHeader(name, value);
}
@@ -163,7 +162,7 @@
this.headers = headers;
this.index = 0;
this.names = new HashSet();
- for(int n = 0; n < names.length; n ++)
+ for (int n = 0; n < names.length; n++)
this.names.add(names[n].toLowerCase());
this.match = match;
}
@@ -171,12 +170,12 @@
public boolean hasNext()
{
boolean hasNext = index < headers.size();
- while( hasNext == true )
+ while (hasNext == true)
{
- mh = (MimeHeader) headers.get(index);
- index ++;
+ mh = (MimeHeader)headers.get(index);
+ index++;
String name = mh.getName().toLowerCase();
- if( names.contains(name) == match )
+ if (names.contains(name) == match)
break;
hasNext = index < headers.size();
}
@@ -190,7 +189,7 @@
public void remove()
{
- headers.remove(index-1);
+ headers.remove(index - 1);
}
}
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Name.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Name.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/Name.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
/** A representation of an XML name. This interface provides methods for
@@ -65,7 +65,6 @@
*/
public String getLocalName();
-
/** Returns the prefix that was specified when this Name object was initialized.
* This prefix is associated with the namespace for the XML name that this Name object
represents.
*
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBody.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBody.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBody.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,30 +1,30 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
-import org.w3c.dom.Document;
-
import java.util.Locale;
+import org.w3c.dom.Document;
+
/** An object that represents the contents of the SOAP body element in a SOAP
* message. A SOAP body element consists of XML data that affects the way the
* application-specific content is processed.
@@ -36,8 +36,7 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface SOAPBody
- extends SOAPElement
+public interface SOAPBody extends SOAPElement
{
/** Creates a new SOAPBodyElement object with the specified name and adds it to this
SOAPBody object.
*
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBodyElement.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBodyElement.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPBodyElement.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
/** A SOAPBodyElement object represents the contents in a SOAPBody object.
@@ -28,12 +28,11 @@
* with the SOAPBody method addBodyElement. In the following line of code, sb
* is a SOAPBody object, and myName is a Name object.
- SOAPBodyElement sbe = sb.addBodyElement(myName);
+ SOAPBodyElement sbe = sb.addBodyElement(myName);
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface SOAPBodyElement
- extends SOAPElement
+public interface SOAPBodyElement extends SOAPElement
{
}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,31 +1,31 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
-import org.jboss.logging.Logger;
-
import java.security.AccessController;
import java.security.PrivilegedAction;
+import org.jboss.logging.Logger;
+
/** A factory for creating SOAPConnection objects. Implementation of this class
* is optional. If SOAPConnectionFactory.newInstance() throws an
* UnsupportedOperationException then the implementation does not support the
@@ -42,11 +42,9 @@
// provide logging
private static Logger log = Logger.getLogger(SOAPConnectionFactory.class);
- private static final String DEFAULT_SOAP_CONNECTION_FACTORY =
"org.jboss.ws.soap.SOAPConnectionFactoryImpl";
- private static final String[] alternativeFactories = new String[]{
- "org.jboss.webservice.soap.SOAPConnectionFactoryImpl",
- "org.jboss.axis.soap.SOAPConnectionFactoryImpl"
- };
+ private static final String DEFAULT_SOAP_CONNECTION_FACTORY =
"org.jboss.ws.core.soap.SOAPConnectionFactoryImpl";
+ private static final String[] alternativeFactories = new String[] {
"org.jboss.webservice.soap.SOAPConnectionFactoryImpl",
+ "org.jboss.axis.soap.SOAPConnectionFactoryImpl" };
/** Creates an instance of the default SOAPConnectionFactory object.
*
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConstants.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConstants.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPConstants.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,27 +1,26 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
-
/** The definition of constants pertaining to the SOAP 1.1 protocol.
* @author Scott.Stark(a)jboss.org
* @version $Revision$
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPElementFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPElementFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPElementFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
/** SOAPElementFactory is a factory for XML fragments that will eventually end
@@ -40,21 +40,23 @@
*
* @return
* @throws SOAPException
- */
+ */
public static SOAPElementFactory newInstance() throws SOAPException
{
SOAPFactory factory = SOAPFactory.newInstance();
return new SOAPElementFactory(factory);
}
+
/**
* @deprecated Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
* @return
* @throws SOAPException
- */
- public SOAPElement create(String localName) throws SOAPException
+ */
+ public SOAPElement create(String localName) throws SOAPException
{
return soapFactory.createElement(localName);
}
+
/**
* @deprecated Use javax.xml.soap.SOAPFactory.createElement(String localName, String
prefix, String uri) instead
* @param localName
@@ -62,19 +64,19 @@
* @param uri
* @return
* @throws SOAPException
- */
- public SOAPElement create(String localName, String prefix, String uri)
- throws SOAPException
+ */
+ public SOAPElement create(String localName, String prefix, String uri) throws
SOAPException
{
- return soapFactory.createElement(localName, prefix, uri);
+ return soapFactory.createElement(localName, prefix, uri);
}
+
/**
* @deprecated Use javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
* @param name
* @return
* @throws SOAPException
- */
- public SOAPElement create(Name name) throws SOAPException
+ */
+ public SOAPElement create(Name name) throws SOAPException
{
return soapFactory.createElement(name);
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPEnvelope.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPEnvelope.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPEnvelope.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,61 +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.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
/** The container for the SOAPHeader and SOAPBody portions of a SOAPPart object. By
default, a SOAPMessage object is created with a SOAPPart object that has a SOAPEnvelope
object. The SOAPEnvelope object by default has an empty SOAPBody object and an empty
SOAPHeader object. The SOAPBody object is required, and the SOAPHeader object, though
optional, is used in the majority of cases. If the SOAPHeader object is not needed, it can
be deleted, which is shown later.
-A client can access the SOAPHeader and SOAPBody objects by calling the methods
SOAPEnvelope.getHeader and SOAPEnvelope.getBody. The following lines of code use these two
methods after starting with the SOAPMessage object message to get the SOAPPart object sp,
which is then used to get the SOAPEnvelope object se.
- SOAPPart sp = message.getSOAPPart();
- SOAPEnvelope se = sp.getEnvelope();
- SOAPHeader sh = se.getHeader();
- SOAPBody sb = se.getBody();
+ A client can access the SOAPHeader and SOAPBody objects by calling the methods
SOAPEnvelope.getHeader and SOAPEnvelope.getBody. The following lines of code use these two
methods after starting with the SOAPMessage object message to get the SOAPPart object sp,
which is then used to get the SOAPEnvelope object se.
+ SOAPPart sp = message.getSOAPPart();
+ SOAPEnvelope se = sp.getEnvelope();
+ SOAPHeader sh = se.getHeader();
+ SOAPBody sb = se.getBody();
-It is possible to change the body or header of a SOAPEnvelope object by retrieving the
current one, deleting it, and then adding a new body or header. The javax.xml.soap.Node
method deleteNode deletes the XML element (node) on which it is called. For example, the
following line of code deletes the SOAPBody object that is retrieved by the method
getBody.
- se.getBody().detachNode();
+ It is possible to change the body or header of a SOAPEnvelope object by retrieving the
current one, deleting it, and then adding a new body or header. The javax.xml.soap.Node
method deleteNode deletes the XML element (node) on which it is called. For example, the
following line of code deletes the SOAPBody object that is retrieved by the method
getBody.
+ se.getBody().detachNode();
-To create a SOAPHeader object to replace the one that was removed, a client uses the
method SOAPEnvelope.addHeader, which creates a new header and adds it to the SOAPEnvelope
object. Similarly, the method addBody creates a new SOAPBody object and adds it to the
SOAPEnvelope object. The following code fragment retrieves the current header, removes it,
and adds a new one. Then it retrieves the current body, removes it, and adds a new one.
- SOAPPart sp = message.getSOAPPart();
- SOAPEnvelope se = sp.getEnvelope();
- se.getHeader().detachNode();
- SOAPHeader sh = se.addHeader();
- se.getBody().detachNode();
- SOAPBody sb = se.addBody();
+ To create a SOAPHeader object to replace the one that was removed, a client uses the
method SOAPEnvelope.addHeader, which creates a new header and adds it to the SOAPEnvelope
object. Similarly, the method addBody creates a new SOAPBody object and adds it to the
SOAPEnvelope object. The following code fragment retrieves the current header, removes it,
and adds a new one. Then it retrieves the current body, removes it, and adds a new one.
+ SOAPPart sp = message.getSOAPPart();
+ SOAPEnvelope se = sp.getEnvelope();
+ se.getHeader().detachNode();
+ SOAPHeader sh = se.addHeader();
+ se.getBody().detachNode();
+ SOAPBody sb = se.addBody();
-It is an error to add a SOAPBody or SOAPHeader object if one already exists.
-The SOAPEnvelope interface provides three methods for creating Name objects. One method
creates Name objects with a local name, a namespace prefix, and a namesapce URI. The
second method creates Name objects with a local name and a namespace prefix, and the third
creates Name objects with just a local name. The following line of code, in which se is a
SOAPEnvelope object, creates a new Name object with all three.
- Name name = se.createName("GetLastTradePrice", "WOMBAT",
- "http://www.wombat.org/trader");
+ It is an error to add a SOAPBody or SOAPHeader object if one already exists.
+ The SOAPEnvelope interface provides three methods for creating Name objects. One method
creates Name objects with a local name, a namespace prefix, and a namesapce URI. The
second method creates Name objects with a local name and a namespace prefix, and the third
creates Name objects with just a local name. The following line of code, in which se is a
SOAPEnvelope object, creates a new Name object with all three.
+ Name name = se.createName("GetLastTradePrice", "WOMBAT",
+ "http://www.wombat.org/trader");
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface SOAPEnvelope
- extends SOAPElement
+public interface SOAPEnvelope extends SOAPElement
{
public abstract SOAPBody addBody() throws SOAPException;
+
public abstract SOAPHeader addHeader() throws SOAPException;
+
public abstract Name createName(String localName) throws SOAPException;
- public abstract Name createName(String localName, String prefix, String uri)
- throws SOAPException;
+
+ public abstract Name createName(String localName, String prefix, String uri) throws
SOAPException;
+
public abstract SOAPBody getBody() throws SOAPException;
+
public abstract SOAPHeader getHeader() throws SOAPException;
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPException.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPException.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
import org.jboss.util.id.SerialVersion;
@@ -27,8 +27,7 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public class SOAPException
- extends Exception
+public class SOAPException extends Exception
{
/** @since 4.0.2 */
static final long serialVersionUID;
@@ -36,8 +35,7 @@
{
if (SerialVersion.version == SerialVersion.LEGACY)
serialVersionUID = -4385552115225336830L;
- else
- serialVersionUID = 5083961510786058130L;
+ else serialVersionUID = 5083961510786058130L;
}
public SOAPException()
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFactory.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
// $Id$
@@ -44,10 +44,8 @@
// provide logging
private static Logger log = Logger.getLogger(SOAPFactory.class);
- private static final String DEFAULT_SOAP_FACTORY =
"org.jboss.ws.soap.SOAPFactoryImpl";
- private static final String[] alternativeFactories = new String[]{
- "org.jboss.axis.soap.SOAPFactoryImpl"
- };
+ private static final String DEFAULT_SOAP_FACTORY =
"org.jboss.ws.core.soap.SOAPFactoryImpl";
+ private static final String[] alternativeFactories = new String[] {
"org.jboss.axis.soap.SOAPFactoryImpl" };
/** Creates a new instance of SOAPFactory.
*
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFault.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFault.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFault.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
import java.util.Locale;
@@ -151,7 +151,6 @@
*/
public void setFaultString(String faultString) throws SOAPException;
-
/**
* Sets the fault string for this SOAPFault object to the given string and localized
to the given locale.
*
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFaultElement.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFaultElement.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPFaultElement.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
/** A representation of the contents in a SOAPFault object. The Detail
@@ -30,7 +30,6 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface SOAPFaultElement
- extends SOAPElement
+public interface SOAPFaultElement extends SOAPElement
{
}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPHeaderElement.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPHeaderElement.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPHeaderElement.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
/** An object representing the contents in the SOAP header part of the SOAP
@@ -30,27 +30,26 @@
* @author Scott.Stark(a)jboss.org
* @version $Revision$
*/
-public interface SOAPHeaderElement
- extends SOAPElement
+public interface SOAPHeaderElement extends SOAPElement
{
/** Returns the uri of the actor associated with this SOAPHeaderElement object.
*
* @return a String giving the URI of the actor
*/
- public String getActor();
+ public String getActor();
/** Returns whether the mustUnderstand attribute for this SOAPHeaderElement object is
turned on.
*
* @return true if the mustUnderstand attribute of this SOAPHeaderElement object is
turned on; false otherwise
*/
- public boolean getMustUnderstand();
+ public boolean getMustUnderstand();
/** Sets the actor associated with this SOAPHeaderElement object to the specified
actor.
* The default value of an actor is: SOAPConstants.URI_SOAP_ACTOR_NEXT
*
* @param actorURI a String giving the URI of the actor to set
*/
- public void setActor(String actorURI);
+ public void setActor(String actorURI);
/** Sets the mustUnderstand attribute for this SOAPHeaderElement object to be on or
off.
*
@@ -60,5 +59,5 @@
*
* @param mustUnderstand true to set the mustUnderstand attribute on; false to turn
if off
*/
- public void setMustUnderstand(boolean mustUnderstand);
+ public void setMustUnderstand(boolean mustUnderstand);
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPMessage.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPMessage.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/soap/SOAPMessage.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,32 +1,33 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.soap;
-import javax.activation.DataHandler;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Iterator;
+import javax.activation.DataHandler;
+
/** The root class for all SOAP messages. As transmitted on the "wire", a SOAP
message is an XML document or a
* MIME message whose first body part is an XML/SOAP document.
*
@@ -130,8 +131,7 @@
* @return the value associated with the named property or null if no such property
exists.
* @throws SOAPException if the property name is not recognized.
*/
- public Object getProperty(String property)
- throws SOAPException
+ public Object getProperty(String property) throws SOAPException
{
return properties.get(property);
}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/BindingType.java
===================================================================
--- branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/BindingType.java 2006-12-07
10:43:36 UTC (rev 1600)
+++ branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/BindingType.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,6 +21,7 @@
*/
package javax.xml.ws;
+import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -36,16 +37,22 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-@Target( { ElementType.TYPE })
-@Retention(value = RetentionPolicy.RUNTIME)
+(a)Target(ElementType.TYPE)
+(a)Retention(RetentionPolicy.RUNTIME)
+@Documented
public @interface BindingType
{
-
- /** A binding identifier (a URI).
+ /**
+ * A binding identifier (a URI).
* If not specified, the default is the SOAP 1.1 / HTTP binding.
- *
- * See the SOAPBinding and HTTPBinding for the definition of the standard
- * binding identifiers.
+ * <p>
+ * See the <code>SOAPBinding</code> and
<code>HTTPBinding</code>
+ * for the definition of the standard binding identifiers.
+ *
+ * @see javax.xml.ws.Binding
+ * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
+ * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
+ * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
*/
String value() default "";
-}
\ No newline at end of file
+}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/RequestWrapper.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/RequestWrapper.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/RequestWrapper.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,6 +21,7 @@
*/
package javax.xml.ws;
+import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -38,14 +39,24 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-@Target( { ElementType.METHOD })
-@Retention(value = RetentionPolicy.RUNTIME)
+(a)Target(ElementType.METHOD)
+(a)Retention(RetentionPolicy.RUNTIME)
+@Documented
public @interface RequestWrapper
{
+ /**
+ * Elements local name.
+ **/
+ public String localName() default "";
- String localName() default "";
+ /**
+ * Elements namespace name.
+ **/
+ public String targetNamespace() default "";
- String targetNamespace() default "";
+ /**
+ * Request wrapper bean name.
+ **/
+ public String className() default "";
- String className() default "";
-}
\ No newline at end of file
+}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/ResponseWrapper.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/ResponseWrapper.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/ResponseWrapper.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,6 +21,7 @@
*/
package javax.xml.ws;
+import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -38,13 +39,24 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-@Target( { ElementType.METHOD })
-@Retention(value = RetentionPolicy.RUNTIME)
+(a)Target(ElementType.METHOD)
+(a)Retention(RetentionPolicy.RUNTIME)
+@Documented
public @interface ResponseWrapper
{
- String localName() default "";
- String targetNamespace() default "";
+ /**
+ * Elements local name.
+ **/
+ public String localName() default "";
- String className() default "";
-}
\ No newline at end of file
+ /**
+ * Elements namespace name.
+ **/
+ public String targetNamespace() default "";
+
+ /**
+ * Response wrapper bean name.
+ **/
+ public String className() default "";
+}
Modified: branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/Action.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/Action.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/Action.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package javax.xml.ws.addressing;
//$Id$
@@ -29,15 +29,15 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
-public @interface Action {
+public @interface Action
+{
- String input() default "##default";
+ String input() default "##default";
- String output() default "##default";
+ String output() default "##default";
- String[] fault() default "##default";
+ String[] fault() default "##default";
}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingBuilder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -70,7 +70,6 @@
log.warn("Could not create and instance of " + name + " trying
" + DEFAULT_ADDRESSING_BUILDER);
}
-
// default builder
return newInstance(DEFAULT_ADDRESSING_BUILDER, classLoader);
}
@@ -99,7 +98,7 @@
throw new AddressingException("Provider " + className + " could
not be instantiated: " + x, x);
}
}
-
+
public abstract AttributedURI newURI(URI uri);
public abstract AttributedURI newURI(String uri) throws URISyntaxException;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingException.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingException.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/AddressingException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -24,10 +24,9 @@
//$Id$
import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceException;
-import org.jboss.ws.WSException;
-
-public class AddressingException extends WSException
+public class AddressingException extends WebServiceException
{
protected QName code;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/EndpointReference.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/EndpointReference.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/EndpointReference.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,7 +21,6 @@
*/
package javax.xml.ws.addressing;
-
//$Id$
public interface EndpointReference extends AddressingType, AttributeExtensible,
ElementExtensible
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/FaultAction.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/FaultAction.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/FaultAction.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -29,11 +29,11 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
-public @interface FaultAction {
+public @interface FaultAction
+{
Class className();
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/javax/xml/ws/addressing/JAXWSAConstants.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -36,7 +36,7 @@
public static final String ADDRESSING_BUILDER_PROPERTY =
"javax.xml.ws.addressing.AddressingBuilder";
- public static final String DEFAULT_ADDRESSING_BUILDER =
"org.jboss.ws.addressing.soap.SOAPAddressingBuilderImpl";
+ public static final String DEFAULT_ADDRESSING_BUILDER =
"org.jboss.ws.extensions.addressing.soap.SOAPAddressingBuilderImpl";
public static final String SOAP11_NAMESPACE_NAME =
"http://schemas.xmlsoap.org/soap/envelope/";
Copied: branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonClient.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonClient.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonClient.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,398 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core;
+
+// $Id:CommonClient.java 660 2006-08-01 16:29:43Z thomas.diesler(a)jboss.com $
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.binding.CommonBinding;
+import org.jboss.ws.core.jaxrpc.binding.CommonBindingProvider;
+import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
+import org.jboss.ws.core.soap.EndpointInfo;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.SOAPConnectionImpl;
+import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
+import org.jboss.ws.metadata.ClientEndpointMetaData;
+import org.jboss.ws.metadata.EndpointMetaData;
+import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.ws.metadata.ParameterMetaData;
+import org.jboss.ws.metadata.ServiceMetaData;
+import org.jboss.ws.metadata.UnifiedMetaData;
+import org.jboss.ws.metadata.EndpointMetaData.Type;
+import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
+
+/**
+ * Provides support for the dynamic invocation of a service endpoint.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public abstract class CommonClient
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(CommonClient.class);
+
+ // The endpoint together with the operationName uniquely identify the call operation
+ protected EndpointMetaData epMetaData;
+ // The current operation name
+ protected QName operationName;
+ // Output parameters
+ protected EndpointInvocation epInv;
+ // The binding provider
+ protected CommonBindingProvider bindingProvider;
+
+ /** Create a call that needs to be configured manually
+ */
+ protected CommonClient(ServiceMetaData serviceMetaData)
+ {
+ // If the WSDLService has only one endpoint, use it
+ if (serviceMetaData != null && serviceMetaData.getEndpoints().size() == 1)
+ {
+ this.epMetaData = serviceMetaData.getEndpoints().get(0);
+ }
+ }
+
+ /** Create a call for a known WSDL endpoint.
+ */
+ protected CommonClient(EndpointMetaData epMetaData)
+ {
+ this.epMetaData = epMetaData;
+ }
+
+ /** Create a call for a known WSDL endpoint.
+ */
+ protected CommonClient(ServiceMetaData serviceMetaData, QName portName, QName opName)
+ {
+ if (serviceMetaData != null)
+ {
+ EndpointMetaData epMetaData = null;
+ if (serviceMetaData.getEndpoints().size() > 0)
+ {
+ epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null)
+ throw new WSException("Cannot find endpoint for name: " +
portName);
+ }
+
+ if (epMetaData != null)
+ {
+ this.epMetaData = epMetaData;
+ }
+ }
+
+ if (opName != null)
+ {
+ setOperationName(opName);
+ }
+ }
+
+ /** Gets the address of a target service endpoint.
+ */
+ public abstract String getTargetEndpointAddress();
+
+ /** Sets the address of the target service endpoint.
+ */
+ public abstract void setTargetEndpointAddress(String address);
+
+ /** Gets the name of the operation to be invoked using this Call instance.
+ */
+ public QName getOperationName()
+ {
+ return this.operationName;
+ }
+
+ /** Sets the name of the operation to be invoked using this Call instance.
+ */
+ public void setOperationName(QName operationName)
+ {
+ this.operationName = operationName;
+ }
+
+ /** Get the OperationMetaData for the given operation name
+ * If it does not exist, it will be created
+ */
+ public OperationMetaData getOperationMetaData()
+ {
+ if (operationName == null)
+ throw new WSException("Operation name not set");
+
+ return getOperationMetaData(operationName);
+ }
+
+ /** Get the OperationMetaData for the given operation name
+ * If it does not exist, it will be created
+ */
+ public OperationMetaData getOperationMetaData(QName opName)
+ {
+ if (opName == null)
+ throw new IllegalArgumentException("Cannot get OperationMetaData for
null");
+
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ OperationMetaData opMetaData = epMetaData.getOperation(opName);
+ if (opMetaData == null &&
epMetaData.getServiceMetaData().getWsdlDefinitions() == null)
+ {
+ opMetaData = new OperationMetaData(epMetaData, opName, opName.getLocalPart());
+ epMetaData.addOperation(opMetaData);
+ }
+
+ if (opMetaData == null)
+ throw new WSException("Cannot obtain operation meta data for: " +
opName);
+
+ return opMetaData;
+ }
+
+ // Get the EndpointMetaData for all OperationMetaData
+ public EndpointMetaData getEndpointMetaData()
+ {
+ if (epMetaData == null)
+ {
+ UnifiedMetaData wsMetaData = new UnifiedMetaData();
+ wsMetaData.setClassLoader(Thread.currentThread().getContextClassLoader());
+
+ ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new
QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
+ wsMetaData.addService(serviceMetaData);
+
+ epMetaData = new ClientEndpointMetaData(serviceMetaData, new
QName(Constants.NS_JBOSSWS_URI, "AnonymousPort"), Type.JAXRPC);
+ epMetaData.setStyle(Style.RPC);
+
+ serviceMetaData.addEndpoint(epMetaData);
+ }
+ return epMetaData;
+ }
+
+ protected abstract boolean callRequestHandlerChain(QName portName, HandlerType type);
+
+ protected abstract boolean callResponseHandlerChain(QName portName, HandlerType
type);
+
+ protected abstract void setInboundContextProperties();
+
+ protected abstract void setOutboundContextProperties();
+
+ /** Call invokation goes as follows:
+ *
+ * 1) synchronize the operation name with the operation meta data
+ * 2) synchronize the input parameters with the operation meta data
+ * 3) generate the payload using a BindingProvider
+ * 4) get the Invoker from Remoting, based on the target endpoint address
+ * 5) do the invocation through the Remoting framework
+ * 6) unwrap the result using the BindingProvider
+ * 7) return the result
+ */
+ protected Object invoke(QName opName, Object[] inputParams, Map<QName,
UnboundHeader> unboundHeaders, boolean oneway) throws RemoteException
+ {
+ if (opName.equals(operationName) == false)
+ setOperationName(opName);
+
+ OperationMetaData opMetaData = getOperationMetaData();
+
+ // Associate a message context with the current thread
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ msgContext.setOperationMetaData(opMetaData);
+
+ // copy properties to the message context
+ for (String key : getRequestContext().keySet())
+ {
+ Object value = getRequestContext().get(key);
+ msgContext.setProperty(key, value);
+ }
+
+ try
+ {
+ // Get the binding from the provider
+ CommonBinding binding =
(CommonBinding)getCommonBindingProvider().getCommonBinding();
+
+ // Create the invocation and sync the input parameters
+ epInv = new EndpointInvocation(opMetaData);
+ epInv.initInputParams(inputParams);
+
+ // Bind the request message
+ SOAPMessage reqMessage = (SOAPMessage)binding.bindRequestMessage(opMetaData,
epInv, unboundHeaders);
+
+ setOutboundContextProperties();
+
+ // Call the request handlers
+ QName portName = epMetaData.getQName();
+ boolean handlerPass = callRequestHandlerChain(portName, HandlerType.PRE);
+ handlerPass = handlerPass && callRequestHandlerChain(portName,
HandlerType.ENDPOINT);
+ handlerPass = handlerPass && callRequestHandlerChain(portName,
HandlerType.POST);
+
+ if (handlerPass)
+ {
+ String targetAddress = getTargetEndpointAddress();
+
+ // Fall back to wsa:To
+ AddressingProperties addrProps =
(AddressingProperties)msgContext.getProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
+ if (targetAddress == null && addrProps != null &&
addrProps.getTo() != null)
+ {
+ AddressingConstantsImpl ADDR = new AddressingConstantsImpl();
+ String wsaTo = addrProps.getTo().getURI().toString();
+ if (wsaTo.equals(ADDR.getAnonymousURI()) == false)
+ {
+ try
+ {
+ URL wsaToURL = new URL(wsaTo);
+ log.debug("Sending request to addressing destination: " +
wsaToURL);
+ targetAddress = wsaToURL.toExternalForm();
+ }
+ catch (MalformedURLException ex)
+ {
+ log.debug("Not a valid URL: " + wsaTo);
+ }
+ }
+ }
+
+ // The endpoint address must be known beyond this point
+ if (targetAddress == null)
+ throw new WSException("Target endpoint address not set");
+
+ EndpointInfo epInfo = new EndpointInfo(epMetaData, targetAddress,
getRequestContext());
+
+ SOAPMessage resMessage;
+ if (oneway)
+ {
+ resMessage = new SOAPConnectionImpl().callOneWay(reqMessage, epInfo);
+ }
+ else
+ {
+ resMessage = new SOAPConnectionImpl().call(reqMessage, epInfo);
+ }
+
+ // Associate current message with message context
+ msgContext.setSOAPMessage(resMessage);
+ }
+
+ setInboundContextProperties();
+
+ // Get the return object
+ Object retObj = null;
+ if (oneway == false)
+ {
+ // Call the response handlers
+ handlerPass = callResponseHandlerChain(portName, HandlerType.POST);
+ handlerPass = handlerPass && callResponseHandlerChain(portName,
HandlerType.ENDPOINT);
+ handlerPass = handlerPass && callResponseHandlerChain(portName,
HandlerType.PRE);
+
+ if (handlerPass)
+ {
+ // BP-1.0 R1027
+ HandlerChainBaseImpl.checkMustUnderstand(msgContext, new String[]{});
+
+ // unbind the return values
+ SOAPMessage resMessage = msgContext.getSOAPMessage();
+ binding.unbindResponseMessage(opMetaData, resMessage, epInv,
unboundHeaders);
+
+ retObj = syncOutputParams(inputParams, epInv);
+ }
+ }
+
+ return retObj;
+ }
+ catch (SOAPFaultException ex)
+ {
+ log.error("Call invocation failed", ex);
+ String faultCode = ex.getFaultCode().getLocalPart();
+ throw new RemoteException("Call invocation failed with code [" +
faultCode + "] because of: " + ex.getFaultString(), ex);
+ }
+ catch (Exception ex)
+ {
+ throw new RemoteException("Call invocation failed", ex);
+ }
+ finally
+ {
+ getResponseContext().putAll(msgContext.getProperties());
+ }
+ }
+
+ protected CommonBindingProvider getCommonBindingProvider()
+ {
+ if (bindingProvider == null)
+ {
+ bindingProvider = new CommonBindingProvider(getEndpointMetaData());
+ }
+ return bindingProvider;
+ }
+
+ protected abstract Map<String, Object> getRequestContext();
+
+ protected abstract Map<String, Object> getResponseContext();
+
+ /** Synchronize the operation paramters with the call output parameters.
+ */
+ private Object syncOutputParams(Object[] inParams, EndpointInvocation epInv) throws
SOAPException
+ {
+ Object retValue = null;
+
+ // Assign the return value, if we have a return param
+ OperationMetaData opMetaData = getOperationMetaData();
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+ if (retMetaData != null)
+ {
+ retValue = epInv.getReturnValue();
+ if (opMetaData.isDocumentWrapped() && retMetaData.isMessageType() ==
false)
+ retValue = ParameterWrapping.unwrapResponseParameter(opMetaData, retValue);
+
+ if (JavaUtils.isPrimitive(retMetaData.getJavaType()))
+ retValue = JavaUtils.getPrimitiveValue(retValue);
+ }
+
+ // Set the holder values for INOUT parameters
+ int index = 0;
+ for (ParameterMetaData paramMetaData : opMetaData.getParameters())
+ {
+ ParameterMode paramMode = paramMetaData.getMode();
+
+ if (paramMode == ParameterMode.INOUT || paramMode == ParameterMode.OUT)
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ Object value = epInv.getResponseParamValue(xmlName);
+ log.debug("holder [" + index + "] " + xmlName);
+ HolderUtils.setHolderValue(inParams[index], value);
+ }
+
+ if (index == 0 && opMetaData.isDocumentWrapped())
+ index = paramMetaData.getWrappedVariables().size() - 1;
+
+ index++;
+ }
+
+ return retValue;
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonContextServlet.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonContextServlet.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonContextServlet.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.server.ServiceEndpointManager;
+
+/**
+ * The servlet that that is associated with context /jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 21-Mar-2005
+ */
+public abstract class CommonContextServlet extends HttpServlet
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(CommonContextServlet.class);
+
+ protected ServiceEndpointManager epManager;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ initServiceEndpointManager();
+ }
+
+ protected abstract void initServiceEndpointManager();
+
+ /** Process GET requests.
+ */
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ PrintWriter writer = res.getWriter();
+ res.setContentType("text/html");
+
+ writer.print("<html>");
+ setupHTMLResponseHeader(writer);
+
+ writer.print("<body>");
+ writer.print(epManager.showServiceEndpointTable());
+ writer.print("</body>");
+ writer.print("</html>");
+ writer.close();
+ }
+
+ private void setupHTMLResponseHeader(PrintWriter writer)
+ {
+ Package wsPackage = Package.getPackage("org.jboss.ws");
+ writer.println("<head>");
+ writer.println("<meta http-equiv='Content-Type content='text/html;
charset=iso-8859-1'>");
+ writer.println("<title>JBossWS /
"+wsPackage.getImplementationVersion()+"</title>");
+ writer.println("<link rel='stylesheet'
href='./styles.css'>");
+ writer.println("</head>");
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonMessageContext.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonMessageContext.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonMessageContext.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,157 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.server.MessageContextPropertyHelper;
+import org.jboss.ws.metadata.EndpointMetaData;
+import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.xb.binding.NamespaceRegistry;
+
+/**
+ * The common JAXRPC/JAXWS MessageContext
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 1-Sep-2006
+ */
+public abstract class CommonMessageContext
+{
+ // expandToDOM in the SOAPContentElement should not happen during normal operation
+ // This property should be set the message context when it is ok to do so.
+ public static String ALLOW_EXPAND_TO_DOM = "org.jboss.ws.allow.expand.dom";
+
+ // The operation for this message ctx
+ private EndpointMetaData epMetaData;
+ // The operation for this message ctx
+ private OperationMetaData opMetaData;
+ // The SOAPMessage in this message context
+ private SOAPMessage soapMessage;
+ // The map of the properties
+ protected Map<String, Object> props = new HashMap<String, Object>();
+
+ public EndpointMetaData getEndpointMetaData()
+ {
+ if (epMetaData == null && opMetaData != null)
+ epMetaData = opMetaData.getEndpointMetaData();
+
+ return epMetaData;
+ }
+
+ public void setEndpointMetaData(EndpointMetaData epMetaData)
+ {
+ this.epMetaData = epMetaData;
+ }
+
+ public OperationMetaData getOperationMetaData()
+ {
+ return opMetaData;
+ }
+
+ public void setOperationMetaData(OperationMetaData opMetaData)
+ {
+ this.opMetaData = opMetaData;
+ }
+
+ public SOAPMessage getSOAPMessage()
+ {
+ return soapMessage;
+ }
+
+ public void setSOAPMessage(SOAPMessage soapMessage)
+ {
+ this.soapMessage = soapMessage;
+ }
+
+ public abstract SerializationContext getSerializationContext();
+
+ /** Gets the namespace registry for this message context */
+ public NamespaceRegistry getNamespaceRegistry()
+ {
+ return getSerializationContext().getNamespaceRegistry();
+ }
+
+ public Map<String, Object> getProperties()
+ {
+ return props;
+ }
+
+ public void setProperties(Map<String, Object> props)
+ {
+ this.props = props;
+ }
+
+ /**
+ * Returns true if the MessageContext contains a property with the specified name.
+ */
+ public boolean containsProperty(String name)
+ {
+ return props.containsKey(name);
+ }
+
+ /**
+ * Gets the value of a specific property from the MessageContext
+ */
+ public Object getProperty(String name)
+ {
+ Object value = props.get(name);
+
+ if (value instanceof MessageContextPropertyHelper)
+ {
+ return ((MessageContextPropertyHelper)value).get();
+ }
+
+ return value;
+ }
+
+ /**
+ * Returns an Iterator view of the names of the properties in this MessageContext
+ */
+ public Iterator getPropertyNames()
+ {
+ return props.keySet().iterator();
+ }
+
+ /**
+ * Removes a property (name-value pair) from the MessageContext
+ */
+ public void removeProperty(String name)
+ {
+ props.remove(name);
+ }
+
+ /**
+ * Sets the name and value of a property associated with the MessageContext.
+ * If the MessageContext contains a value of the same property, the old value is
replaced.
+ */
+ public void setProperty(String name, Object value)
+ {
+ props.put(name, value);
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/EndpointInvocation.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/EndpointInvocation.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/EndpointInvocation.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,402 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.rpc.holders.Holder;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.SOAPException;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.core.utils.HolderUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.core.utils.MimeUtils;
+import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.ws.metadata.ParameterMetaData;
+
+/** A web service invocation.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 16-Oct-2004
+ */
+public class EndpointInvocation
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(EndpointInvocation.class);
+
+ // The operation meta data for this invocation
+ private OperationMetaData opMetaData;
+ // Map the named endpoint parameters
+ private Map<QName, Object> reqPayload = new LinkedHashMap<QName,
Object>();
+ // Map the named endpoint parameters
+ private Map<QName, Object> resPayload = new LinkedHashMap<QName,
Object>();
+ // The return value
+ private Object returnValue;
+
+ public EndpointInvocation(OperationMetaData opMetaData)
+ {
+ this.opMetaData = opMetaData;
+ }
+
+ public OperationMetaData getOperationMetaData()
+ {
+ return opMetaData;
+ }
+
+ public Method getJavaMethod()
+ {
+ return opMetaData.getJavaMethod();
+ }
+
+ public List<QName> getRequestParamNames()
+ {
+ List<QName> xmlNames = new ArrayList<QName>();
+ xmlNames.addAll(reqPayload.keySet());
+ return xmlNames;
+ }
+
+ public void setRequestParamValue(QName xmlName, Object value)
+ {
+ log.debug("setRequestParamValue: [name=" + xmlName + ",value="
+ getTypeName(value) + "]");
+ reqPayload.put(xmlName, value);
+ }
+
+ public Object getRequestParamValue(QName xmlName) throws SOAPException
+ {
+ log.debug("getRequestParamValue: " + xmlName);
+ Object paramValue = reqPayload.get(xmlName);
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ return paramValue;
+ }
+
+ /** Returns the payload that can be passed on to the endpoint implementation
+ */
+ public Object[] getRequestPayload() throws SOAPException
+ {
+ log.debug("getRequestPayload");
+ List<QName> xmlNames = getRequestParamNames();
+ ArrayList<Object> objPayload = new ArrayList<Object>();
+ for (int i = 0; i < xmlNames.size(); i++)
+ {
+ QName xmlName = xmlNames.get(i);
+ Object paramValue = getRequestParamValue(xmlName);
+
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ paramValue = syncEndpointInputParam(paramMetaData, paramValue);
+ if(opMetaData.isDocumentWrapped() && paramMetaData.isMessageType() ==
false && paramMetaData.isInHeader() == false)
+ {
+ List<Object> objList = Arrays.asList((Object[])paramValue);
+ objPayload.addAll(objList);
+ }
+ else
+ {
+ objPayload.add(paramValue);
+ }
+ }
+ return objPayload.toArray();
+ }
+
+ public List<QName> getResponseParamNames()
+ {
+ List<QName> xmlNames = new ArrayList<QName>();
+ xmlNames.addAll(resPayload.keySet());
+ return xmlNames;
+ }
+
+ public void setResponseParamValue(QName xmlName, Object value)
+ {
+ log.debug("setResponseParamValue: [name=" + xmlName + ",value="
+ getTypeName(value) + "]");
+ resPayload.put(xmlName, value);
+ }
+
+ public Object getResponseParamValue(QName xmlName) throws SOAPException
+ {
+ log.debug("getResponseParamValue: " + xmlName);
+ Object paramValue = resPayload.get(xmlName);
+ ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ if (paramValue != null)
+ {
+ Class valueType = paramValue.getClass();
+ if (HolderUtils.isHolderType(valueType))
+ {
+ valueType = HolderUtils.getValueType(valueType);
+ paramValue = HolderUtils.getHolderValue(paramValue);
+ }
+ }
+ return paramValue;
+ }
+
+ public void setReturnValue(Object value)
+ {
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+ if (value != null && retMetaData == null)
+ throw new WSException("Operation does not have a return value: " +
opMetaData.getQName());
+
+ log.debug("setReturnValue: " + getTypeName(value));
+ this.returnValue = value;
+ }
+
+ public Object getReturnValue() throws SOAPException
+ {
+ log.debug("getReturnValue");
+ Object paramValue = returnValue;
+ ParameterMetaData paramMetaData = opMetaData.getReturnParameter();
+ if (paramMetaData != null)
+ {
+ paramValue = transformPayloadValue(paramMetaData, paramValue);
+ }
+ return paramValue;
+ }
+
+ private Object transformPayloadValue(ParameterMetaData paramMetaData, final Object
paramValue) throws SOAPException
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ QName xmlType = paramMetaData.getXmlType();
+ Class javaType = paramMetaData.getJavaType();
+
+ Object retValue = paramValue;
+
+ // Handle attachment part
+ if (paramValue instanceof AttachmentPart)
+ {
+ AttachmentPart part = (AttachmentPart)paramValue;
+
+ Set mimeTypes = paramMetaData.getMimeTypes();
+ if (DataHandler.class.isAssignableFrom(javaType) &&
!javaType.equals(Object.class))
+ {
+ DataHandler handler = part.getDataHandler();
+ String mimeType = MimeUtils.getBaseMimeType(handler.getContentType());
+
+ if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
+ throw new SOAPException("Mime type " + mimeType + " not
allowed for parameter " + xmlName + " allowed types are " + mimeTypes);
+
+ retValue = part.getDataHandler();
+ }
+ else
+ {
+ retValue = part.getContent();
+ String mimeType = MimeUtils.getBaseMimeType(part.getContentType());
+
+ if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
+ throw new SOAPException("Mime type " + mimeType + " not
allowed for parameter " + xmlName + " allowed types are " + mimeTypes);
+
+ if (retValue != null)
+ {
+ Class valueType = retValue.getClass();
+ if (JavaUtils.isAssignableFrom(javaType, valueType) == false)
+ throw new SOAPException("javaType [" + javaType.getName() +
"] is not assignable from attachment content: " + valueType.getName());
+ }
+ }
+ }
+ else if (paramValue instanceof SOAPContentElement)
+ {
+ // For type other than xsd:anyType we return the object value
+ if (xmlType.getLocalPart().equals("anyType") == false)
+ {
+ SOAPContentElement soapElement = (SOAPContentElement)paramValue;
+ retValue = soapElement.getObjectValue();
+ }
+ }
+
+ log.debug("transformPayloadValue: " + getTypeName(paramValue) + "
-> " + getTypeName(retValue));
+ return retValue;
+ }
+
+ /** Synchronize the operation IN, INOUT paramters with the call input parameters.
+ * Essetially it unwrapps holders and converts primitives to wrapper types.
+ */
+ public void initInputParams(Object[] inputParams)
+ {
+ List<ParameterMetaData> paramMetaDataList = opMetaData.getParameters();
+ if (opMetaData.isDocumentWrapped() && paramMetaDataList.size() != 0)
+ {
+ Object value = ParameterWrapping.wrapRequestParameters(opMetaData,
inputParams);
+ ParameterMetaData paramMetaData = paramMetaDataList.get(0);
+ QName xmlName = paramMetaData.getXmlName();
+ setRequestParamValue(xmlName, value);
+
+ if (inputParams != null)
+ {
+ int wrappedParamsCount = paramMetaData.getWrappedVariables().size();
+ int lastParam = Math.min(paramMetaDataList.size() - 1, inputParams.length -
wrappedParamsCount);
+
+ // document/literal wrapped with bound headers
+ for (int i = 0; i < lastParam - 1; i++)
+ {
+ paramMetaData = paramMetaDataList.get(i + 1);
+ if (paramMetaData.isInHeader())
+ {
+ xmlName = paramMetaData.getXmlName();
+ Class javaType = paramMetaData.getJavaType();
+
+ value = inputParams[i + wrappedParamsCount];
+ if (value != null)
+ {
+ Class inputType = value.getClass();
+
+ if (HolderUtils.isHolderType(inputType))
+ {
+ inputType = HolderUtils.getValueType(inputType);
+ value = HolderUtils.getHolderValue(value);
+ }
+
+ // Verify that the java type matches a registered xmlType
+ // Attachments are skipped because they don't use type mapping
+ if (!paramMetaData.isSwA() && !paramMetaData.isXOP())
+ {
+ if (JavaUtils.isAssignableFrom(javaType, inputType) == false)
+ throw new WSException("Parameter '" + javaType +
"' not assignable from: " + inputType);
+ }
+ }
+ setRequestParamValue(xmlName, value);
+ }
+ }
+ }
+ }
+ else
+ {
+ for (int i = 0; i < paramMetaDataList.size(); i++)
+ {
+ ParameterMetaData paramMetaData = paramMetaDataList.get(i);
+ QName xmlName = paramMetaData.getXmlName();
+ Class javaType = paramMetaData.getJavaType();
+
+ Object value = inputParams[i];
+ if (value != null)
+ {
+ Class inputType = value.getClass();
+
+ if (HolderUtils.isHolderType(inputType))
+ {
+ inputType = HolderUtils.getValueType(inputType);
+ value = HolderUtils.getHolderValue(value);
+ }
+
+ // Verify that the java type matches a registered xmlType
+ // Attachments are skipped because they don't use type mapping
+ if (!paramMetaData.isSwA() && !paramMetaData.isXOP())
+ {
+ if (JavaUtils.isAssignableFrom(javaType, inputType) == false)
+ throw new WSException("Parameter '" + javaType +
"' not assignable from: " + inputType);
+ }
+ }
+ setRequestParamValue(xmlName, value);
+ }
+ }
+ }
+
+ /** Synchronize the operation paramters with the endpoint method parameters
+ */
+ private Object syncEndpointInputParam(ParameterMetaData paramMetaData, final Object
paramValue)
+ {
+ Object retValue = paramValue;
+ Method method = opMetaData.getJavaMethod();
+ Class[] targetParameterTypes = method.getParameterTypes();
+
+ if (opMetaData.isDocumentWrapped() && paramMetaData.isMessageType() ==
false)
+ {
+ // Unwrap the request parameters
+ if (paramMetaData.isInHeader() == false)
+ {
+ retValue = ParameterWrapping.unwrapRequestParameters(opMetaData,
paramValue);
+ }
+ else
+ {
+ if (paramMetaData.getMode() == ParameterMode.INOUT || paramMetaData.getMode()
== ParameterMode.OUT)
+ {
+ Class javaType = paramMetaData.getJavaType();
+ for (int i=0; i < targetParameterTypes.length; i++)
+ {
+ Class targetType = targetParameterTypes[i];
+ if (HolderUtils.isHolderType(targetType))
+ {
+ Class valueType = HolderUtils.getValueType(targetType);
+ if (JavaUtils.isAssignableFrom(valueType, javaType))
+ {
+ Holder holder = HolderUtils.getHolderInstance(targetType);
+ HolderUtils.setHolderValue(holder, paramValue);
+ retValue = holder;
+
+ QName xmlName = paramMetaData.getXmlName();
+ setResponseParamValue(xmlName, holder);
+ }
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ // Replace INOUT and OUT parameters by their respective holder values
+ int paramTypeIndex = opMetaData.getParameters().indexOf(paramMetaData);
+ Class targetParameterType = targetParameterTypes[paramTypeIndex];
+
+ if (paramMetaData.getMode() == ParameterMode.INOUT || paramMetaData.getMode() ==
ParameterMode.OUT)
+ {
+ Holder holder = HolderUtils.getHolderInstance(targetParameterType);
+ HolderUtils.setHolderValue(holder, paramValue);
+ retValue = holder;
+
+ QName xmlName = paramMetaData.getXmlName();
+ setResponseParamValue(xmlName, holder);
+ }
+
+ if (JavaUtils.isPrimitive(targetParameterType))
+ {
+ retValue = JavaUtils.getPrimitiveValue(paramValue);
+ }
+
+ if (retValue != null)
+ {
+ Class valueType = retValue.getClass();
+ if (JavaUtils.isAssignableFrom(targetParameterType, valueType) == false)
+ throw new WSException("Parameter " +
targetParameterType.getName() + " is not assignable from: " +
getTypeName(retValue));
+ }
+ }
+
+ log.debug("syncEndpointInputParam: " + getTypeName(paramValue) + "
-> " + getTypeName(retValue));
+ return retValue;
+ }
+
+ private String getTypeName(Object value)
+ {
+ String valueType = (value != null ? value.getClass().getName() : null);
+ return valueType;
+ }
+}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/CallImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -45,15 +45,15 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.binding.UnboundHeader;
-import org.jboss.ws.common.CommonClient;
+import org.jboss.ws.core.CommonClient;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.jbossxb.JBossXBSerializerFactory;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -34,22 +34,22 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
-import org.jboss.ws.core.jaxrpc.encoding.Base64DeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.Base64SerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.ElementDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.ElementSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SOAPElementDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SOAPElementSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.Base64DeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.Base64SerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.CalendarDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.CalendarSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.DateDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.DateSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.ElementDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.ElementSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.HexDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.HexSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.QNameDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.QNameSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SOAPElementDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SOAPElementSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SimpleDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SimpleSerializerFactory;
import org.w3c.dom.Element;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -30,9 +30,9 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
-import org.jboss.ws.core.jaxrpc.encoding.*;
-import org.jboss.ws.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.jbossxb.JBossXBSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.*;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBSerializerFactory;
import org.w3c.dom.Element;
import java.awt.*;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -40,9 +40,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBSerializerFactory;
import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.jbossxb.JBossXBSerializerFactory;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultExceptionHelper.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultExceptionHelper.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultExceptionHelper.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -45,13 +45,13 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerSupport;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.jaxrpc.binding.SerializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.SerializerSupport;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -29,7 +29,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.binding.SerializationContext;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.utils.JavaUtils;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -40,18 +40,18 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.core.jaxrpc.encoding.Base64DeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.Base64SerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.CalendarSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.DateSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.HexSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.QNameSerializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.Base64DeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.Base64SerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.CalendarDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.CalendarSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.DateDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.DateSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.HexDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.HexSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.QNameDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.QNameSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SimpleDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SimpleSerializerFactory;
import org.jboss.ws.core.utils.JavaUtils;
/**
Copied: branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding (from
rev 1599, branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding)
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Deserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,83 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.extensions.xop.XOPUnmarshallerImpl;
-import org.jboss.ws.WSException;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.w3c.dom.Element;
-
-import java.io.IOException;
-
-/**
- * Deserializer for Base64
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Deserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Deserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,80 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.extensions.xop.XOPUnmarshallerImpl;
+import org.jboss.ws.WSException;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.jboss.xb.binding.sunday.xop.XOPUnmarshaller;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.w3c.dom.Element;
+
+import java.io.IOException;
+
+/**
+ * Deserializer for Base64
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64DeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * DeserializerFactory for base64.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class Base64DeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new Base64Deserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64DeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64DeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * DeserializerFactory for base64.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64DeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new Base64Deserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Serializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,77 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.ws.extensions.xop.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(a)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.getPrimitiveValue(value);
- String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
- xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
- }
-
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Serializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64Serializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.extensions.xop.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(a)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.getPrimitiveValue(value);
+ String valueStr = SimpleTypeBindings.marshalBase64((byte[])value);
+ xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes, true);
+ }
+
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64SerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for base64Binary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class Base64SerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new Base64Serializer();
- }
-}
\ No newline at end of file
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64SerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/Base64SerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * SerializerFactory for base64Binary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class Base64SerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new Base64Serializer();
+ }
+}
\ No newline at end of file
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/BindingException.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/BindingException.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+/** An exception that may occur during message binding
+ *
+ * @author Thomas.Diesler(a)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);
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Calendar;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-/**
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import java.util.Calendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,42 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A CalendarDeserializer Factory
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class CalendarDeserializerFactory extends DeserializerFactoryBase
-{
-
- public DeserializerSupport getDeserializer()
- {
- return new CalendarDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * A CalendarDeserializer Factory
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class CalendarDeserializerFactory extends DeserializerFactoryBase
+{
+
+ public DeserializerSupport getDeserializer()
+ {
+ return new CalendarDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,58 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Calendar;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import java.util.Calendar;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,39 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class CalendarSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new CalendarSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/CalendarSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 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.binding;
+
+
+// $Id$
+
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class CalendarSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new CalendarSerializer();
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonBinding.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonBinding.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonBinding.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonBinding.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxrpc.binding;
+
+// $Id$
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.metadata.OperationMetaData;
+
+/**
+ * The base interface for protocol bindings.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 04-Jul-2006
+ */
+public interface CommonBinding
+{
+ /** On the client side, generate the Object from IN parameters. */
+ Object bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv,
Map<QName, UnboundHeader> unboundHeaders) throws BindingException;
+
+ /** On the server side, extract the IN parameters from the Object and populate an
Invocation object */
+ EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, Object
reqMessage) throws BindingException;
+
+ /** On the server side, generate the Object from OUT parameters in the Invocation
object. */
+ Object bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv)
throws BindingException;
+
+ /** On the client side, extract the OUT parameters from the Object and return them to
the client. */
+ void unbindResponseMessage(OperationMetaData opMetaData, Object resMessage,
EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws
BindingException;
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonBindingProvider.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonBindingProvider.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonBindingProvider.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonBindingProvider.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.EndpointMetaData;
+
+/**
+ * Provides access to the protocol binding.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 04-Jul-2006
+ */
+public class CommonBindingProvider
+{
+ protected EndpointMetaData epMetaData;
+ protected CommonBinding binding;
+
+ public CommonBindingProvider(EndpointMetaData epMetaData)
+ {
+ this.epMetaData = epMetaData;
+ initBinding(epMetaData.getBindingId());
+ }
+
+ public CommonBindingProvider(String bindingId)
+ {
+ initBinding(bindingId);
+ }
+
+ protected void initBinding(String bindingId)
+ {
+ if (CommonSOAPBinding.SOAP11HTTP_BINDING.equals(bindingId))
+ {
+ binding = new CommonSOAP11Binding();
+ }
+ else if (CommonSOAPBinding.SOAP12HTTP_BINDING.equals(bindingId))
+ {
+ binding = new CommonSOAP12Binding();
+ }
+ else
+ {
+ throw new WSException("Unsupported binding: " + bindingId);
+ }
+ }
+
+ public CommonBinding getCommonBinding()
+ {
+ return binding;
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAP11Binding.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonSOAP11Binding.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonSOAP11Binding.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAP11Binding.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.metadata.OperationMetaData;
+
+/**
+ * The SOAP11Binding
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 04-Jul-2006
+ */
+public class CommonSOAP11Binding extends CommonSOAPBinding
+{
+ /** Create the SOAP-1.1 message */
+ protected SOAPMessage createMessage(OperationMetaData opMetaData) throws
SOAPException
+ {
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+ factory.setEnvelopeURI(Constants.NS_SOAP11_ENV);
+ SOAPMessage soapMessage = factory.createMessage();
+
+ Use encStyle = opMetaData.getEndpointMetaData().getEncodingStyle();
+ if (Use.ENCODED.equals(encStyle))
+ {
+ SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+ soapEnvelope.addNamespaceDeclaration(Constants.PREFIX_SOAP11_ENC,
Constants.URI_SOAP11_ENC);
+ }
+
+ return soapMessage;
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAP12Binding.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonSOAP12Binding.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonSOAP12Binding.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAP12Binding.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.metadata.OperationMetaData;
+
+/**
+ * The SOAP11Binding
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 04-Jul-2006
+ */
+public class CommonSOAP12Binding extends CommonSOAPBinding
+{
+ /** Create the SOAP-1.1 message */
+ protected SOAPMessage createMessage(OperationMetaData opMetaData) throws
SOAPException
+ {
+ MessageFactoryImpl factory = new MessageFactoryImpl();
+ factory.setEnvelopeURI(Constants.NS_SOAP12_ENV);
+ return factory.createMessage();
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAPBinding.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonSOAPBinding.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/CommonSOAPBinding.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/CommonSOAPBinding.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,924 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.JAXRPCException;
+import javax.xml.rpc.ParameterMode;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.AttachmentPart;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPBodyElement;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.xerces.xs.XSElementDeclaration;
+import org.apache.xerces.xs.XSTypeDefinition;
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.ParameterWrapping;
+import org.jboss.ws.core.jaxrpc.SOAPFaultExceptionHelper;
+import org.jboss.ws.core.jaxrpc.StubExt;
+import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.NameImpl;
+import org.jboss.ws.core.soap.SOAPBodyElementDoc;
+import org.jboss.ws.core.soap.SOAPBodyElementRpc;
+import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.core.soap.SOAPElementImpl;
+import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
+import org.jboss.ws.core.soap.SOAPHeaderElementImpl;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.core.soap.UnboundHeader;
+import org.jboss.ws.core.soap.attachment.AttachmentPartImpl;
+import org.jboss.ws.core.soap.attachment.CIDGenerator;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.core.utils.MimeUtils;
+import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.ws.metadata.ParameterMetaData;
+import org.jboss.ws.metadata.TypesMetaData;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.Element;
+
+/**
+ * The SOAPBinding interface is an abstraction for the SOAP binding.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 04-Jul-2006
+ */
+public abstract class CommonSOAPBinding implements CommonBinding
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(CommonSOAPBinding.class);
+
+ private boolean mtomEnabled;
+
+ /** A constant representing the identity of the SOAP 1.2 over HTTP binding. */
+ public static final String SOAP12HTTP_BINDING =
"http://www.w3.org/2003/05/soap/bindings/HTTP/";
+
+ /** A constant representing the identity of the SOAP 1.1 over HTTP binding. */
+ public static final String SOAP11HTTP_BINDING =
"http://schemas.xmlsoap.org/wsdl/soap/http";
+
+ public MessageFactory getMessageFactory()
+ {
+ return new MessageFactoryImpl();
+ }
+
+ public SOAPFactory getSOAPFactory()
+ {
+ return new SOAPFactoryImpl();
+ }
+
+ public boolean isMTOMEnabled()
+ {
+ return mtomEnabled;
+ }
+
+ public void setMTOMEnabled(boolean flag)
+ {
+ this.mtomEnabled = flag;
+ }
+
+ /** Create the SOAP-1.1 message */
+ protected abstract SOAPMessage createMessage(OperationMetaData opMetaData) throws
SOAPException;
+
+ /** On the client side, generate the payload from IN parameters. */
+ public Object bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation
epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException
+ {
+ log.debug("bindRequestMessage: " + opMetaData.getQName());
+
+ try
+ {
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ if (msgContext == null)
+ throw new WSException("MessageContext not available");
+
+ // Disable MTOM for rpc/encoded
+ if (opMetaData.isRPCEncoded())
+ msgContext.setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ // Associate current message with message context
+ SOAPMessageImpl reqMessage = (SOAPMessageImpl)createMessage(opMetaData);
+ msgContext.setSOAPMessage(reqMessage);
+
+ SOAPEnvelope soapEnvelope = reqMessage.getSOAPPart().getEnvelope();
+ SOAPBody soapBody = soapEnvelope.getBody();
+ SOAPHeader soapHeader = soapEnvelope.getHeader();
+
+ // Get the namespace registry
+ NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
+
+ Style style = opMetaData.getStyle();
+ if (style == Style.RPC)
+ {
+ QName opQName = opMetaData.getQName();
+ Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
+
+ log.debug("Create RPC body element: " + opName);
+ SOAPBodyElement soapBodyElement = new SOAPBodyElementRpc(opName);
+
+ soapBodyElement =
(SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ for (ParameterMetaData paramMetaData : opMetaData.getInputParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ Object value = epInv.getRequestParamValue(xmlName);
+
+ if (paramMetaData.isSwA())
+ {
+ CIDGenerator cidGenerator = reqMessage.getCidGenerator();
+ AttachmentPart part = createAttachmentPart(paramMetaData, value,
cidGenerator);
+ reqMessage.addAttachmentPart(part);
+ }
+ else
+ {
+ SOAPElement soapElement = paramMetaData.isInHeader() ?
(SOAPElement)soapHeader : soapBodyElement;
+ addParameterToMessage(paramMetaData, value, soapElement);
+ }
+ }
+ }
+ else if (style == Style.DOCUMENT)
+ {
+ for (ParameterMetaData paramMetaData : opMetaData.getInputParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ Object value = epInv.getRequestParamValue(xmlName);
+
+ if (paramMetaData.isSwA())
+ {
+ CIDGenerator cidGenerator = reqMessage.getCidGenerator();
+ AttachmentPart part = createAttachmentPart(paramMetaData, value,
cidGenerator);
+ reqMessage.addAttachmentPart(part);
+ }
+ else
+ {
+ SOAPElement soapElement = paramMetaData.isInHeader() ?
(SOAPElement)soapHeader : soapBody;
+ addParameterToMessage(paramMetaData, value, soapElement);
+ }
+ }
+ }
+ else
+ {
+ throw new WSException("Unsupported message style: " + style);
+ }
+
+ // Add unbound headers
+ if (unboundHeaders != null)
+ {
+ Iterator it = unboundHeaders.values().iterator();
+ while (it.hasNext())
+ {
+ UnboundHeader unboundHeader = (UnboundHeader)it.next();
+ if (unboundHeader.getMode() != ParameterMode.OUT)
+ {
+ QName xmlName = unboundHeader.getXmlName();
+ Object value = unboundHeader.getHeaderValue();
+
+ xmlName = namespaceRegistry.registerQName(xmlName);
+ Name soapName = new NameImpl(xmlName.getLocalPart(),
xmlName.getPrefix(), xmlName.getNamespaceURI());
+
+ log.debug("Add unboundHeader element: " + soapName);
+ SOAPContentElement contentElement = new
SOAPHeaderElementImpl(soapName);
+
contentElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
+ soapHeader.addChildElement(contentElement);
+ contentElement.setObjectValue(value);
+ }
+ }
+ }
+
+ // Set the SOAPAction
+ MimeHeaders mimeHeaders = reqMessage.getMimeHeaders();
+ String soapAction = opMetaData.getSOAPAction();
+
+ // R2744 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
+ // with a quoted value equal to the value of the soapAction attribute of
+ // soapbind:operation, if present in the corresponding WSDL description.
+
+ // R2745 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
+ // with a quoted empty string value, if in the corresponding WSDL description,
+ // the soapAction attribute of soapbind:operation is either not present, or
+ // present with an empty string as its value.
+
+ if (msgContext.getProperty(Call.SOAPACTION_USE_PROPERTY) != null)
+ log.info("Ignore Call.SOAPACTION_USE_PROPERTY because of BP-1.0 R2745,
R2745");
+
+ String soapActionProperty =
(String)msgContext.getProperty(Call.SOAPACTION_URI_PROPERTY);
+ if (soapActionProperty != null)
+ soapAction = soapActionProperty;
+
+ mimeHeaders.addHeader("SOAPAction", soapAction != null ? soapAction :
"");
+
+ return reqMessage;
+ }
+ catch (Exception e)
+ {
+ handleException(e);
+ return null;
+ }
+ }
+
+ /** On the server side, extract the IN parameters from the payload and populate an
Invocation object */
+ public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, Object
payload) throws BindingException
+ {
+ log.debug("unbindRequestMessage: " + opMetaData.getQName());
+
+ try
+ {
+ // Read the SOAPEnvelope from the reqMessage
+ SOAPMessage reqMessage = (SOAPMessage)payload;
+ SOAPEnvelope soapEnvelope = reqMessage.getSOAPPart().getEnvelope();
+ SOAPHeader soapHeader = soapEnvelope.getHeader();
+ SOAPBody soapBody = soapEnvelope.getBody();
+
+ // Verify the SOAP version
+ verifySOAPVersion(opMetaData, soapEnvelope);
+
+ // Construct the endpoint invocation object
+ EndpointInvocation epInv = new EndpointInvocation(opMetaData);
+
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ if (msgContext == null)
+ throw new WSException("MessageContext not available");
+
+ // Disable MTOM for rpc/encoded
+ if (opMetaData.isRPCEncoded())
+ msgContext.setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ // Get the namespace registry
+ NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
+
+ if (opMetaData.isMessageEndpoint() == false)
+ {
+ Style style = opMetaData.getStyle();
+ if (style == Style.RPC)
+ {
+ SOAPBodyElement soapBodyElement =
(SOAPBodyElement)soapBody.getChildElements().next();
+ Name elName = soapBodyElement.getElementName();
+
+ QName elQName = new QName(elName.getURI(), elName.getLocalName(),
elName.getPrefix());
+ elQName = namespaceRegistry.registerQName(elQName);
+
+ for (ParameterMetaData paramMetaData : opMetaData.getParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ if (paramMetaData.getMode() == ParameterMode.OUT)
+ {
+ epInv.setRequestParamValue(xmlName, null);
+ }
+ else
+ {
+ if (paramMetaData.isSwA())
+ {
+ Object value = getAttachmentFromMessage(paramMetaData,
reqMessage);
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ else
+ {
+ if (paramMetaData.isInHeader() == false)
+ {
+ Object value = getParameterFromMessage(paramMetaData,
soapBodyElement, false);
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ else
+ {
+ Object value = getParameterFromMessage(paramMetaData,
soapHeader, false);
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ }
+ }
+ }
+ }
+
+ // Document style
+ else
+ {
+ for (ParameterMetaData paramMetaData : opMetaData.getParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ if (paramMetaData.isSwA())
+ {
+ Object value = getAttachmentFromMessage(paramMetaData, reqMessage);
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ else
+ {
+ if (paramMetaData.isInHeader())
+ {
+ if (paramMetaData.getMode() == ParameterMode.IN)
+ {
+ Object value = getParameterFromMessage(paramMetaData,
soapHeader, false);
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ else
+ {
+ Object value = getParameterFromMessage(paramMetaData,
soapHeader, true);
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ }
+ else
+ {
+ Object value = getParameterFromMessage(paramMetaData, soapBody,
false);
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ }
+ }
+ }
+ }
+
+ // Generic message endpoint
+ else
+ {
+ for (ParameterMetaData paramMetaData : opMetaData.getParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ Object value = soapBody.getChildElements().next();
+ epInv.setRequestParamValue(xmlName, value);
+ }
+ }
+
+ return epInv;
+ }
+ catch (Exception e)
+ {
+ handleException(e);
+ return null;
+ }
+ }
+
+ /** On the server side, generate the payload from OUT parameters. */
+ public Object bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation
epInv) throws BindingException
+ {
+ log.debug("bindResponseMessage: " + opMetaData.getQName());
+
+ try
+ {
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ if (msgContext == null)
+ throw new WSException("MessageContext not available");
+
+ // Disable MTOM for rpc/encoded
+ if (opMetaData.isRPCEncoded())
+ msgContext.setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ // Associate current message with message context
+ SOAPMessageImpl resMessage = (SOAPMessageImpl)createMessage(opMetaData);
+ msgContext.setSOAPMessage(resMessage);
+
+ // R2714 For one-way operations, an INSTANCE MUST NOT return a HTTP response
that contains a SOAP envelope.
+ // Specifically, the HTTP response entity-body must be empty.
+ if (opMetaData.isOneWayOperation())
+ {
+ resMessage.getSOAPPart().setContent(null);
+ return resMessage;
+ }
+
+ SOAPEnvelope soapEnvelope = resMessage.getSOAPPart().getEnvelope();
+ SOAPHeader soapHeader = soapEnvelope.getHeader();
+ SOAPBody soapBody = soapEnvelope.getBody();
+
+ // Get the namespace registry
+ NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
+
+ Style style = opMetaData.getStyle();
+ if (style == Style.RPC)
+ {
+ QName opQName = opMetaData.getResponseName();
+
+ Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
+ SOAPBodyElement soapBodyElement = new SOAPBodyElementRpc(opName);
+
+ soapBodyElement =
(SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ // Add the return to the message
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+ if (retMetaData != null)
+ {
+ Object value = epInv.getReturnValue();
+ if (retMetaData.isSwA())
+ {
+ CIDGenerator cidGenerator = resMessage.getCidGenerator();
+ AttachmentPart part = createAttachmentPart(retMetaData, value,
cidGenerator);
+ resMessage.addAttachmentPart(part);
+ epInv.setReturnValue(part);
+ }
+ else
+ {
+ SOAPContentElement soapElement = addParameterToMessage(retMetaData,
value, soapBodyElement);
+ epInv.setReturnValue(soapElement);
+ soapElement.setObjectValue(value);
+ }
+ }
+
+ // Add the out parameters to the message
+ for (ParameterMetaData paramMetaData : opMetaData.getOutputParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ Object value = epInv.getResponseParamValue(xmlName);
+ if (paramMetaData.isSwA())
+ {
+ CIDGenerator cidGenerator = resMessage.getCidGenerator();
+ AttachmentPart part = createAttachmentPart(retMetaData, value,
cidGenerator);
+ resMessage.addAttachmentPart(part);
+ }
+ else
+ {
+ if (paramMetaData.isInHeader())
+ {
+ addParameterToMessage(paramMetaData, value, soapHeader);
+ }
+ else
+ {
+ addParameterToMessage(paramMetaData, value, soapBodyElement);
+ }
+ }
+ }
+ }
+ else if (style == Style.DOCUMENT)
+ {
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+ if (retMetaData != null)
+ {
+ Object value = epInv.getReturnValue();
+ if (opMetaData.isDocumentWrapped())
+ value = ParameterWrapping.wrapResponseParameter(opMetaData, value);
+
+ if (retMetaData.isSwA())
+ {
+ CIDGenerator cidGenerator = resMessage.getCidGenerator();
+ AttachmentPart part = createAttachmentPart(retMetaData, value,
cidGenerator);
+ resMessage.addAttachmentPart(part);
+ epInv.setReturnValue(part);
+ }
+ else
+ {
+ SOAPContentElement soapElement = addParameterToMessage(retMetaData,
value, soapBody);
+ epInv.setReturnValue(soapElement);
+ }
+ }
+
+ // Add the out header parameters to the message
+ for (ParameterMetaData paramMetaData : opMetaData.getOutputParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ if (paramMetaData.isInHeader())
+ {
+ Object value = epInv.getResponseParamValue(xmlName);
+ addParameterToMessage(paramMetaData, value, soapHeader);
+ }
+ }
+ }
+ else
+ {
+ throw new WSException("Unsupported message style: " + style);
+ }
+
+ return resMessage;
+ }
+ catch (Exception e)
+ {
+ handleException(e);
+ return null;
+ }
+ }
+
+ /** On the client side, extract the OUT parameters from the payload and return them to
the client. */
+ public void unbindResponseMessage(OperationMetaData opMetaData, Object payload,
EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
+ throws BindingException
+ {
+ log.debug("unbindResponseMessage: " + opMetaData.getQName());
+
+ try
+ {
+ // R2714 For one-way operations, an INSTANCE MUST NOT return a HTTP response
that contains a SOAP envelope.
+ // Specifically, the HTTP response entity-body must be empty.
+ if (opMetaData.isOneWayOperation() == true)
+ {
+ return;
+ }
+
+ // WS-Addressing might redirect the response, which results in an empty
envelope
+ SOAPMessage resMessage = (SOAPMessage)payload;
+ SOAPEnvelope soapEnvelope = resMessage.getSOAPPart().getEnvelope();
+ if (soapEnvelope == null)
+ {
+ return;
+ }
+
+ // Verify the SOAP version
+ verifySOAPVersion(opMetaData, soapEnvelope);
+
+ // Get the SOAP message context that is associated with the current thread
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ if (msgContext == null)
+ throw new WSException("MessageContext not available");
+
+ // Disable MTOM for rpc/encoded
+ if (opMetaData.isRPCEncoded())
+ msgContext.setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
+
+ SOAPHeader soapHeader = soapEnvelope.getHeader();
+ SOAPBody soapBody = soapEnvelope.getBody();
+ Iterator bodyChildren = soapBody.getChildElements();
+
+ SOAPBodyElement soapBodyElement = null;
+ if (bodyChildren.hasNext() != false)
+ soapBodyElement = (SOAPBodyElement)bodyChildren.next();
+
+ // Translate the SOAPFault to an exception and throw it
+ if (soapBodyElement instanceof SOAPFaultImpl)
+ {
+ SOAPFaultImpl soapFault = (SOAPFaultImpl)soapBodyElement;
+ SOAPFaultException faultEx =
SOAPFaultExceptionHelper.getSOAPFaultException(soapFault);
+ throw faultEx;
+ }
+
+ // Extract unbound OUT headers
+ if (unboundHeaders != null)
+ {
+ Map<QName, UnboundHeader> outHeaders = new HashMap<QName,
UnboundHeader>();
+ Iterator itHeaderElements = soapHeader.getChildElements();
+ while (itHeaderElements.hasNext())
+ {
+ SOAPContentElement soapHeaderElement =
(SOAPHeaderElementImpl)itHeaderElements.next();
+ Name elName = soapHeaderElement.getElementName();
+ QName xmlName = new QName(elName.getURI(), elName.getLocalName());
+
+ UnboundHeader unboundHeader = (UnboundHeader)unboundHeaders.get(xmlName);
+ if (unboundHeader != null)
+ {
+
soapHeaderElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
+
+ // Do the unmarshalling
+ Object value = soapHeaderElement.getObjectValue();
+ unboundHeader.setHeaderValue(value);
+ outHeaders.put(xmlName, unboundHeader);
+ }
+ }
+ unboundHeaders.clear();
+ unboundHeaders.putAll(outHeaders);
+ }
+
+ Style style = opMetaData.getStyle();
+ if (style == Style.RPC)
+ {
+ if (soapBodyElement == null)
+ throw new WSException("Cannot unbind response message with empty soap
body");
+
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+ if (retMetaData != null)
+ {
+ if (retMetaData.isSwA())
+ {
+ Object value = getAttachmentFromMessage(retMetaData, resMessage);
+ epInv.setReturnValue(value);
+ }
+ else
+ {
+ Object value = getParameterFromMessage(retMetaData, soapBodyElement,
false);
+ epInv.setReturnValue(value);
+ }
+ }
+
+ for (ParameterMetaData paramMetaData : opMetaData.getOutputParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ if (paramMetaData.isSwA())
+ {
+ Object value = getAttachmentFromMessage(paramMetaData, resMessage);
+ epInv.setResponseParamValue(xmlName, value);
+ }
+ else
+ {
+ SOAPElement soapElement = paramMetaData.isInHeader() ? soapHeader :
(SOAPElement)soapBodyElement;
+ Object value = getParameterFromMessage(paramMetaData, soapElement,
false);
+ epInv.setResponseParamValue(xmlName, value);
+ }
+ }
+ }
+ else if (style == Style.DOCUMENT)
+ {
+ ParameterMetaData retMetaData = opMetaData.getReturnParameter();
+
+ // WS-Eventing has no message part for UnsubscribeResponseMsg
+ if (retMetaData != null)
+ {
+ if (retMetaData.isSwA())
+ {
+ Object value = getAttachmentFromMessage(retMetaData, resMessage);
+ epInv.setReturnValue(value);
+ }
+ else
+ {
+ Object value = getParameterFromMessage(retMetaData, soapBody, false);
+ epInv.setReturnValue(value);
+ }
+
+ for (ParameterMetaData paramMetaData : opMetaData.getOutputParameters())
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ if (paramMetaData.isInHeader())
+ {
+ Object value = getParameterFromMessage(paramMetaData, soapHeader,
false);
+ epInv.setResponseParamValue(xmlName, value);
+ }
+ }
+ }
+ }
+ else
+ {
+ throw new WSException("Unsupported message style: " + style);
+ }
+ }
+ catch (Exception e)
+ {
+ handleException(e);
+ }
+ }
+
+ private void verifySOAPVersion(OperationMetaData opMetaData, SOAPEnvelope
soapEnvelope)
+ {
+ String envNS = soapEnvelope.getNamespaceURI();
+ String bindingId = opMetaData.getEndpointMetaData().getBindingId();
+ if (CommonSOAPBinding.SOAP11HTTP_BINDING.equals(bindingId) &&
Constants.NS_SOAP11_ENV.equals(envNS) == false)
+ log.warn("Expected SOAP-1.1 envelope, but got: " + envNS);
+
+ if (CommonSOAPBinding.SOAP12HTTP_BINDING.equals(bindingId) &&
Constants.NS_SOAP12_ENV.equals(envNS) == false)
+ log.warn("Expected SOAP-1.2 envelope, but got: " + envNS);
+ }
+
+ private AttachmentPart createAttachmentPart(ParameterMetaData paramMetaData, Object
value, CIDGenerator cidGenerator) throws SOAPException, BindingException
+ {
+ String partName = paramMetaData.getXmlName().getLocalPart();
+ Set mimeTypes = paramMetaData.getMimeTypes();
+
+ AttachmentPart part = new AttachmentPartImpl();
+ if (value instanceof DataHandler)
+ {
+ DataHandler handler = (DataHandler)value;
+ String mimeType = MimeUtils.getBaseMimeType(handler.getContentType());
+
+ if (mimeTypes != null && !MimeUtils.isMemberOf(mimeType, mimeTypes))
+ throw new BindingException("Mime type " + mimeType + " not
allowed for parameter " + partName + " allowed types are " + mimeTypes);
+
+ part.setDataHandler((DataHandler)value);
+ }
+ else
+ {
+ String mimeType = null;
+ if (mimeTypes != null && mimeTypes.size() > 0)
+ {
+ mimeType = (String)mimeTypes.iterator().next();
+ }
+ else
+ {
+ mimeType = MimeUtils.resolveMimeType(value);
+ }
+
+ if (mimeType == null)
+ throw new BindingException("Could not determine mime type for attachment
parameter: " + partName);
+
+ part.setContent(value, mimeType);
+ }
+
+ if (paramMetaData.isSwA())
+ {
+ String swaCID = '<' + partName + "=" +
cidGenerator.generateFromCount() + '>';
+ part.setContentId(swaCID);
+ }
+ if (paramMetaData.isXOP())
+ {
+ String xopCID = '<' + cidGenerator.generateFromName(partName) +
'>';
+ part.setContentId(xopCID);
+ }
+
+ return part;
+ }
+
+ private Object getAttachmentFromMessage(ParameterMetaData paramMetaData, SOAPMessage
message) throws SOAPException, BindingException
+ {
+ QName xmlName = paramMetaData.getXmlName();
+
+ AttachmentPart part =
((SOAPMessageImpl)message).getAttachmentByPartName(xmlName.getLocalPart());
+ if (part == null)
+ throw new BindingException("Could not locate attachment for parameter:
" + paramMetaData.getXmlName());
+
+ return part;
+ }
+
+ /** Marshall the given parameter and add it to the SOAPMessage */
+ private SOAPContentElement addParameterToMessage(ParameterMetaData paramMetaData,
Object value, SOAPElement soapElement) throws SOAPException, BindingException
+ {
+ QName xmlName = paramMetaData.getXmlName();
+ Class javaType = paramMetaData.getJavaType();
+
+ if (value != null && paramMetaData.isXOP() == false)
+ {
+ Class valueType = value.getClass();
+ if (JavaUtils.isAssignableFrom(javaType, valueType) == false)
+ throw new BindingException("javaType " + javaType.getName() +
" is not assignable from: " + valueType.getName());
+ }
+
+ // Make sure we have a prefix on qualified names
+ if (xmlName.getNamespaceURI().length() > 0)
+ {
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
+ xmlName = namespaceRegistry.registerQName(xmlName);
+ }
+
+ Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(),
xmlName.getNamespaceURI());
+ if (paramMetaData.isSOAPArrayParam())
+ soapName = new NameImpl("Array", Constants.PREFIX_SOAP11_ENC,
Constants.URI_SOAP11_ENC);
+
+ SOAPContentElement contentElement;
+ if (soapElement instanceof SOAPHeader)
+ {
+ contentElement = new SOAPHeaderElementImpl(soapName);
+ soapElement.addChildElement(contentElement);
+ }
+ else
+ {
+ Style style = paramMetaData.getOperationMetaData().getStyle();
+ if (style == Style.DOCUMENT)
+ {
+ contentElement = new SOAPBodyElementDoc(soapName);
+ soapElement.addChildElement(contentElement);
+ }
+ else
+ {
+ contentElement = new SOAPContentElement(soapName);
+ soapElement.addChildElement(contentElement);
+ }
+ }
+
+ contentElement.setParamMetaData(paramMetaData);
+
+ if (paramMetaData.isSOAPArrayParam())
+ {
+ log.trace("Add parameter as SOAP encoded Array");
+ contentElement.addNamespaceDeclaration(Constants.PREFIX_SOAP11_ENC,
Constants.URI_SOAP11_ENC);
+ }
+
+ // When a potential xop parameter is detected and MTOM is enabled
+ // we flag the SOAP message as a XOP package
+ if (paramMetaData.isXOP() && XOPContext.isMTOMEnabled())
+ {
+ log.trace("Add parameter as XOP");
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
+ soapMessage.setXOPMessage(true);
+ }
+
+ contentElement.setObjectValue(value);
+
+ return contentElement;
+ }
+
+ /** Unmarshall a message element and add it to the parameter list */
+ private Object getParameterFromMessage(ParameterMetaData paramMetaData, SOAPElement
soapElement, boolean optional) throws BindingException
+ {
+ Name xmlName = new NameImpl(paramMetaData.getXmlName());
+ Name soapArrayName = new NameImpl("Array", Constants.PREFIX_SOAP11_ENC,
Constants.URI_SOAP11_ENC);
+
+ SOAPContentElement soapContentElement = null;
+ Iterator childElements = soapElement.getChildElements();
+ while (childElements.hasNext())
+ {
+ SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();
+
+ // If this message was manipulated by a handler the child may not be a content
element
+ if (!(childElement instanceof SOAPContentElement))
+ childElement = (SOAPContentElement)soapElement.replaceChild(new
SOAPContentElement(childElement), childElement);
+
+ // The parameters are expected to be lazy
+ SOAPContentElement aux = (SOAPContentElement)childElement;
+ Name elName = aux.getElementName();
+
+ if (xmlName.equals(elName))
+ {
+ soapContentElement = aux;
+ soapContentElement.setParamMetaData(paramMetaData);
+ break;
+ }
+
+ if (soapArrayName.equals(elName))
+ {
+ CommonMessageContext msgContext =
MessageContextAssociation.peekMessageContext();
+ msgContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM,
Boolean.TRUE);
+ try
+ {
+ QName compXMLName = paramMetaData.getXmlName();
+ Element compElement = DOMUtils.getFirstChildElement(aux);
+ if (compElement.getNodeName().equals(compXMLName.getLocalPart()))
+ {
+ soapContentElement = aux;
+ soapContentElement.setParamMetaData(paramMetaData);
+ break;
+ }
+ }
+ finally
+ {
+ msgContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
+ }
+ }
+ }
+
+ // If matching by name fails, try to match by xmlType
+ // This maybe necessary when wsa:Action dispatches to the operation
+ if (soapContentElement == null)
+ {
+ childElements = soapElement.getChildElements();
+ OperationMetaData opMetaData = paramMetaData.getOperationMetaData();
+ TypesMetaData typesMetaData =
opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
+ if (childElements.hasNext() && opMetaData.getStyle() == Style.DOCUMENT)
+ {
+ SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();
+
+ // The parameters are expected to be lazy
+ SOAPContentElement aux = (SOAPContentElement)childElement;
+ Name elName = aux.getElementName();
+ QName elType = null;
+
+ XSElementDeclaration xsdElement =
typesMetaData.getSchemaModel().getElementDeclaration(elName.getLocalName(),
elName.getURI());
+ if (xsdElement != null && xsdElement.getTypeDefinition() != null)
+ {
+ XSTypeDefinition xsdType = xsdElement.getTypeDefinition();
+ elType = new QName(xsdType.getNamespace(), xsdType.getName());
+ }
+
+ if (paramMetaData.getXmlType().equals(elType))
+ {
+ soapContentElement = aux;
+ soapContentElement.setParamMetaData(paramMetaData);
+ }
+ }
+ }
+
+ if (soapContentElement == null && optional == false)
+ throw new JAXRPCException("Cannot find child element: " + xmlName);
+
+ // When a potential XOP parameter is detected and
+ // the incomming request is actuall XOP encoded we flag
+ // the SOAP message a XOP packaged.
+ if (paramMetaData.isXOP() && XOPContext.isXOPEncodedRequest())
+ {
+ SOAPMessageImpl soapMessage =
(SOAPMessageImpl)MessageContextAssociation.peekMessageContext().getSOAPMessage();
+ soapMessage.setXOPMessage(true);
+ }
+ return soapContentElement;
+ }
+
+ private void handleException(Exception ex) throws BindingException
+ {
+ if (ex instanceof RuntimeException)
+ throw (RuntimeException)ex;
+
+ if (ex instanceof BindingException)
+ throw (BindingException)ex;
+
+ throw new BindingException(ex);
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/ComplexTypeDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/ComplexTypeDeserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+/**
+ * A Deserializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class ComplexTypeDeserializer extends DeserializerSupport
+{
+
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeSerializer.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/ComplexTypeSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/ComplexTypeSerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+/**
+ * A Serializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class ComplexTypeSerializer extends SerializerSupport
+{
+
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,61 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-/**
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A DateDeserializer Factory
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class DateDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new DateDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * A DateDeserializer Factory
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new DateDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,68 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $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.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.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(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.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.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for Dates.
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for Date primitives
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class DateSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new DateSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DateSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * SerializerFactory for Date primitives
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class DateSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new DateSerializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DeserializerFactoryBase.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.core.jaxrpc.encoding;
-
-// $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.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-
-/**
- * @author Thomas.Diesler(a)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();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DeserializerFactoryBase.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/DeserializerFactoryBase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.xml.rpc.encoding.Deserializer;
+import javax.xml.rpc.encoding.DeserializerFactory;
+
+import org.jboss.util.NotImplementedException;
+
+/**
+ * @author Thomas.Diesler(a)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();
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/DeserializerSupport.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/DeserializerSupport.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Deserializer;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.utils.XMLPredefinedEntityReferenceResolver;
+
+/** The base class for all Deserializers.
+ *
+ * @author Thomas.Diesler(a)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();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,65 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.w3c.dom.Element;
-
-/**
- * A deserializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * A deserializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)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();
+ }
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class ElementDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new ElementDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class ElementDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new ElementDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,65 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * A serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-/**
- * A factory for a Serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jun-2005
- */
-public class ElementSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new ElementSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/ElementSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+/**
+ * A factory for a Serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jun-2005
+ */
+public class ElementSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new ElementSerializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-/**
- * Deserializer for hexBinary.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+/**
+ * Deserializer for hexBinary.
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * DeserializerFactory for hexBinary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class HexDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new HexDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * DeserializerFactory for hexBinary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class HexDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new HexDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,60 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Serializer for hexBinary.
- *
- * @author Thomas.Diesler(a)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.getPrimitiveValue(value);
- String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
-
- NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
- String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
- return xmlFragment;
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for hexBinary.
+ *
+ * @author Thomas.Diesler(a)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.getPrimitiveValue(value);
+ String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
+
+ NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
+ String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, attributes,
true);
+ return xmlFragment;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for hexBinary.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class HexSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new HexSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/HexSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * SerializerFactory for hexBinary.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class HexSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new HexSerializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/NullValueSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Serializer for null values.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/NullValueSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/NullValueSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for null values.
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,98 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import java.io.IOException;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.xb.binding.NamespaceRegistry;
-import org.jboss.xb.binding.SimpleTypeBindings;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxrpc.binding;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.DOMUtils;
+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(a)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);
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,39 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class QNameDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new QNameDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 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.binding;
+
+
+// $Id$
+
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new QNameDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,78 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.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(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.NamespaceRegistry;
+import org.jboss.xb.binding.SimpleTypeBindings;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * Serializer for QNames.
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * SerializerFactory for QName primitive
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class QNameSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new QNameSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/QNameSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * SerializerFactory for QName primitive
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class QNameSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new QNameSerializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,189 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $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.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.metadata.ParameterMetaData;
-import org.w3c.dom.Element;
-
-/**
- * A Deserializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)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.getWrapperValue(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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,186 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.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.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.metadata.ParameterMetaData;
+import org.w3c.dom.Element;
+
+/**
+ * A Deserializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)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.getWrapperValue(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);
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-/**
- * A factory for a Deserializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2005
- */
-public class SOAPArrayDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer() throws BindingException
- {
- return new SOAPArrayDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArrayDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+/**
+ * A factory for a Deserializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArrayDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer() throws BindingException
+ {
+ return new SOAPArrayDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,208 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.metadata.ParameterMetaData;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * A Serializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)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.getWrapperValue(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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,205 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.metadata.ParameterMetaData;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A Serializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)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.getWrapperValue(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;
+ }
+
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,42 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Serializer that can handle SOAP encoded arrays.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2005
- */
-public class SOAPArraySerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer() throws BindingException
- {
- return new SOAPArraySerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPArraySerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle SOAP encoded arrays.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class SOAPArraySerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer() throws BindingException
+ {
+ return new SOAPArraySerializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,67 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.core.soap.SOAPElementImpl;
-import org.jboss.ws.core.soap.SOAPFactoryImpl;
-import org.jboss.ws.core.utils.DOMUtils;
-import org.w3c.dom.Element;
-
-/**
- * A deserializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)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);
- SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
- SOAPElementImpl soapElement = soapFactory.createElement(domElement, true);
- return soapElement;
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new BindingException();
- }
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.soap.SOAPElementImpl;
+import org.jboss.ws.core.soap.SOAPFactoryImpl;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * A deserializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)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);
+ SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
+ SOAPElementImpl soapElement = soapFactory.createElement(domElement, true);
+ return soapElement;
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new BindingException();
+ }
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SOAPElementDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new SOAPElementDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SOAPElementDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new SOAPElementDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,64 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.core.utils.DOMWriter;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * A serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.utils.DOMWriter;
+import org.w3c.dom.NamedNodeMap;
+
+/**
+ * A serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,40 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-/**
- * A factory for a Serializer that can handle xsd:anyType
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 23-Jun-2005
- */
-public class SOAPElementSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new SOAPElementSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SOAPElementSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+/**
+ * A factory for a Serializer that can handle xsd:anyType
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jun-2005
+ */
+public class SOAPElementSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new SOAPElementSerializer();
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/SerializationContext.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/SerializationContext.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.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(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SerializerFactoryBase.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.core.jaxrpc.encoding;
-
-// $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.binding.BindingException;
-import org.jboss.ws.binding.SerializerSupport;
-
-/**
- * @author Thomas.Diesler(a)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();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SerializerFactoryBase.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SerializerFactoryBase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.xml.rpc.encoding.Serializer;
+import javax.xml.rpc.encoding.SerializerFactory;
+
+import org.jboss.util.NotImplementedException;
+
+/**
+ * @author Thomas.Diesler(a)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();
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/SerializerSupport.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/SerializerSupport.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Serializer;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.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(a)jboss.org
+ * @author <a href="mailto:jason.greene@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("<");
+ break;
+ case '>':
+ builder.append(">");
+ break;
+ case '&':
+ builder.append("&");
+ break;
+ case '"':
+ builder.append(""");
+ break;
+ default:
+ builder.append(c);
+ }
+ }
+
+ return builder.toString();
+ }
+}
\ No newline at end of file
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.xb.binding.SimpleTypeBindings;
-
-import javax.xml.namespace.QName;
-
-/**
- * A deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.xb.binding.SimpleTypeBindings;
+
+import javax.xml.namespace.QName;
+
+/**
+ * A deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.DeserializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Deserializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SimpleDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer()
- {
- return new SimpleDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * A factory for a Deserializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer()
+ {
+ return new SimpleDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializer.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.encoding;
-
-// $Id$
-
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.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(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+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(a)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;
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializerFactory.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,41 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc.encoding;
-
-import org.jboss.ws.binding.SerializerSupport;
-
-// $Id$
-
-
-/**
- * A factory for a Serializer that can handle XMLSchema simple types.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 18-Oct-2004
- */
-public class SimpleSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer()
- {
- return new SimpleSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/encoding/SimpleSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding;
+
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle XMLSchema simple types.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-Oct-2004
+ */
+public class SimpleSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer()
+ {
+ return new SimpleSerializer();
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb (from
rev 1586, branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb)
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBConstants.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBConstants.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBConstants.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jbossxb;
-
-// $Id$
-
-/** JBossXB Constants
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBConstants.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBConstants.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBConstants.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBConstants.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+// $Id$
+
+/** JBossXB Constants
+ *
+ * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBDeserializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.jbossxb;
-
-// $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.binding.BindingException;
-import org.jboss.ws.binding.ComplexTypeDeserializer;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.jaxrpc.SerializationContextJAXRPC;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-
-/**
- * A Deserializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBDeserializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBDeserializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxrpc.binding.jbossxb;
+
+// $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.core.jaxrpc.SerializationContextJAXRPC;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.ComplexTypeDeserializer;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+
+/**
+ * A Deserializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)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;
+
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBDeserializerFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jbossxb;
-
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.jaxrpc.encoding.DeserializerFactoryBase;
-
-// $Id$
-
-/**
- * A factory for a Deserializer that can handle complex types
- * by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class JBossXBDeserializerFactory extends DeserializerFactoryBase
-{
- public DeserializerSupport getDeserializer() throws BindingException
- {
- return new JBossXBDeserializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBDeserializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBDeserializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBDeserializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerSupport;
+
+// $Id$
+
+/**
+ * A factory for a Deserializer that can handle complex types
+ * by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBDeserializerFactory extends DeserializerFactoryBase
+{
+ public DeserializerSupport getDeserializer() throws BindingException
+ {
+ return new JBossXBDeserializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshaller.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBMarshaller.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshaller.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jbossxb;
-
-import org.xml.sax.ContentHandler;
-import org.w3c.dom.Node;
-
-import java.io.Writer;
-import java.io.OutputStream;
-
-/**
- * @author Heiko Braun <heiko.braun(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshaller.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBMarshaller.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBMarshaller.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshaller.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+import org.xml.sax.ContentHandler;
+import org.w3c.dom.Node;
+
+import java.io.Writer;
+import java.io.OutputStream;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBMarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jbossxb;
-
-// $Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.WSException;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.utils.JavaUtils;
-import org.jboss.ws.xop.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;
-
-import javax.xml.namespace.QName;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.HashMap;
-
-/**
- * An implementation of a JAXB Marshaller that uses the JBossXB schema binding
marshaller.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBMarshallerImpl.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBMarshallerImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBMarshallerImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+// $Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.extensions.xop.XOPMarshallerImpl;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.metadata.jaxrpcmapping.VariableMapping;
+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;
+
+import javax.xml.namespace.QName;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.HashMap;
+
+/**
+ * An implementation of a JAXB Marshaller that uses the JBossXB schema binding
marshaller.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Heiko.Braun(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializer.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSerializer.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,121 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.jbossxb;
-
-// $Id$
-
-import org.apache.xerces.xs.XSModel;
-import org.jboss.logging.Logger;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.ComplexTypeSerializer;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.jaxrpc.SerializationContextJAXRPC;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.w3c.dom.NamedNodeMap;
-
-import javax.xml.namespace.QName;
-import java.io.StringWriter;
-
-/**
- * A Serializer that can handle complex types by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializer.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSerializer.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSerializer.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializer.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+// $Id$
+
+import org.apache.xerces.xs.XSModel;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.ComplexTypeSerializer;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.w3c.dom.NamedNodeMap;
+
+import javax.xml.namespace.QName;
+import java.io.StringWriter;
+
+/**
+ * A Serializer that can handle complex types by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)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);
+ }
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializerFactory.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSerializerFactory.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,44 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.jbossxb;
-
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.jaxrpc.encoding.SerializerFactoryBase;
-
-// $Id$
-
-
-/**
- * A factory for a Serializer that can handle complex types
- * by delegating to JAXB.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public class JBossXBSerializerFactory extends SerializerFactoryBase
-{
- public SerializerSupport getSerializer() throws BindingException
- {
- return new JBossXBSerializer();
- }
-}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializerFactory.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSerializerFactory.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSerializerFactory.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSerializerFactory.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.jaxrpc.binding.jbossxb;
+
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.SerializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.SerializerSupport;
+
+// $Id$
+
+
+/**
+ * A factory for a Serializer that can handle complex types
+ * by delegating to JAXB.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public class JBossXBSerializerFactory extends SerializerFactoryBase
+{
+ public SerializerSupport getSerializer() throws BindingException
+ {
+ return new JBossXBSerializer();
+ }
+}
Deleted:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSupport.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,106 +0,0 @@
-package org.jboss.ws.jbossxb;
-
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.metadata.EndpointMetaData;
-import org.jboss.ws.metadata.OperationMetaData;
-import org.jboss.ws.metadata.ServiceMetaData;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
-import org.jboss.ws.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(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSupport.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBSupport.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBSupport.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,106 @@
+package org.jboss.ws.core.jaxrpc.binding.jbossxb;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.EndpointMetaData;
+import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.ws.metadata.ServiceMetaData;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
+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(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshaller.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jbossxb;
-
-import java.io.InputStream;
-
-/**
- * @author Heiko Braun <heiko.braun(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshaller.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshaller.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshaller.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+import java.io.InputStream;
+
+/**
+ * @author Heiko Braun <heiko.braun(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,107 +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.jbossxb;
-
-// $Id$
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.xop.XOPUnmarshallerImpl;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-
-import java.io.InputStream;
-import java.util.HashMap;
-
-/**
- * An implementation of a JAXB Unmarshaller.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Alexey.Loubyansky(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshallerImpl.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/JBossXBUnmarshallerImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding.jbossxb;
+
+// $Id$
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.extensions.xop.XOPUnmarshallerImpl;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+
+import java.io.InputStream;
+import java.util.HashMap;
+
+/**
+ * An implementation of a JAXB Unmarshaller.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Alexey.Loubyansky(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/MarshalException.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/MarshalException.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/MarshalException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jbossxb;
-
-/**
- * A marshal exception.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/MarshalException.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/MarshalException.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/MarshalException.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/MarshalException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+/**
+ * A marshal exception.
+ *
+ * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,613 +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.jbossxb;
-
-// $Id$
-
-import org.apache.xerces.xs.XSModel;
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.metadata.jaxrpcmapping.*;
-import org.jboss.ws.utils.JBossWSEntityResolver;
-import org.jboss.ws.xop.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.*;
-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;
-
-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 java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * Create SchemaBinding from XSModel and jaxrpc-mapping.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Alexey.Loubyansky(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/SchemaBindingBuilder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/SchemaBindingBuilder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,613 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding.jbossxb;
+
+// $Id$
+
+import org.apache.xerces.xs.XSModel;
+import org.jboss.logging.Logger;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.ws.Constants;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.JBossWSEntityResolver;
+import org.jboss.ws.extensions.xop.JBossXBContentAdapter;
+import org.jboss.ws.metadata.jaxrpcmapping.*;
+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.*;
+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;
+
+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 java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * Create SchemaBinding from XSModel and jaxrpc-mapping.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Alexey.Loubyansky(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/UnmarshalException.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/UnmarshalException.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/UnmarshalException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jbossxb;
-
-/**
- * A marshal exception.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/UnmarshalException.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/UnmarshalException.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/UnmarshalException.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/UnmarshalException.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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.jaxrpc.binding.jbossxb;
+
+/**
+ * A marshal exception.
+ *
+ * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/XercesXSMarshallerImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/XercesXSMarshallerImpl.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/XercesXSMarshallerImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -1,250 +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.jbossxb;
-
-// $Id$
-
-import org.apache.xerces.xs.XSModel;
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.WSException;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
-import org.jboss.ws.metadata.jaxrpcmapping.VariableMapping;
-import org.jboss.ws.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;
-
-import javax.xml.namespace.QName;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.HashMap;
-
-/**
- * An implementation of a JAXB Marshaller that user XercesXSMarshaller impl.
- *
- * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/XercesXSMarshallerImpl.java
(from rev 1600,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/XercesXSMarshallerImpl.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/jbossxb/XercesXSMarshallerImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/binding/jbossxb/XercesXSMarshallerImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,250 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 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.binding.jbossxb;
+
+// $Id$
+
+import org.apache.xerces.xs.XSModel;
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
+import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
+import org.jboss.ws.metadata.jaxrpcmapping.VariableMapping;
+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;
+
+import javax.xml.namespace.QName;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.HashMap;
+
+/**
+ * An implementation of a JAXB Marshaller that user XercesXSMarshaller impl.
+ *
+ * @author Thomas.Diesler(a)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/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -48,7 +48,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.SOAPElementImpl;
import org.jboss.ws.core.soap.SOAPElementWriter;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -26,9 +26,9 @@
import javax.xml.rpc.handler.MessageContext;
import javax.xml.soap.SOAPMessage;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.ServiceMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -38,11 +38,11 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.binding.EndpointInvocation;
-import org.jboss.ws.common.CommonBinding;
-import org.jboss.ws.common.CommonBindingProvider;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.SOAPFaultExceptionHelper;
+import org.jboss.ws.core.jaxrpc.binding.CommonBinding;
+import org.jboss.ws.core.jaxrpc.binding.CommonBindingProvider;
import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPMessageImpl;
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/MessageContextPropertyHelper.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/MessageContextPropertyHelper.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/common/MessageContextPropertyHelper.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/MessageContextPropertyHelper.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -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;
+
+/**
+ * Interface to be implemented by property helpers to assist the retrieval
+ * of objects added to the property context.
+ *
+ * If an instance of MessageContextPropertyHelper is added to the
+ * CommonMessageContext a call to get for the same property will return
+ * the result of callig get on the helper instead of returning the helper
+ * itself.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Oct 22, 2006
+ */
+public interface MessageContextPropertyHelper
+{
+
+ public Object get();
+
+}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -38,9 +38,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.SOAPFaultExceptionHelper;
+import org.jboss.ws.core.jaxrpc.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/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -32,7 +32,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.binding.EndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.ServletEndpointContextImpl;
import org.jboss.ws.metadata.ServerEndpointMetaData;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -55,8 +55,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.common.MessageContextPropertyHelper;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -26,7 +26,7 @@
import java.util.Stack;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.utils.ThreadLocalAssociation;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -41,7 +41,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
-import org.jboss.ws.common.CommonMessageContext;
+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/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -27,8 +27,6 @@
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.remoting.util.socket.RemotingSSLSocketFactory;
-import org.jboss.ws.binding.soap.SOAPMessageMarshaller;
-import org.jboss.ws.binding.soap.SOAPMessageUnMarshaller;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.extensions.xop.XOPContext;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPContentElement.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -26,15 +26,15 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.binding.BindingException;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.encoding.NullValueSerializer;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerSupport;
+import org.jboss.ws.core.jaxrpc.binding.NullValueSerializer;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.jaxrpc.binding.SerializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.SerializerSupport;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.core.utils.DOMWriter;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -35,7 +35,7 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.OperationMetaData;
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/soap/SOAPMessageMarshaller.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/soap/SOAPMessageMarshaller.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageMarshaller.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,91 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.core.soap;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.invocation.OnewayInvocation;
+import org.jboss.remoting.marshal.Marshaller;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.core.utils.DOMWriter;
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Nov-2004
+ */
+public class SOAPMessageMarshaller implements Marshaller
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(SOAPMessageMarshaller.class);
+
+ /**
+ * Marshaller will need to take the dataObject and convert
+ * into primitive java data types and write to the
+ * given output.
+ *
+ * @param dataObject Object to be writen to output
+ * @param output The data output to write the object
+ * data to.
+ */
+ public void write(Object dataObject, OutputStream output) throws IOException
+ {
+ if (dataObject instanceof InvocationRequest)
+ dataObject = ((InvocationRequest)dataObject).getParameter();
+
+ if (dataObject instanceof OnewayInvocation)
+ dataObject = ((OnewayInvocation)dataObject).getParameters()[0];
+
+ if ((dataObject instanceof SOAPMessage) == false)
+ throw new IllegalArgumentException("Not a SOAPMessage: " +
dataObject);
+
+ try
+ {
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)dataObject;
+
+ // debug the outgoing message
+ if (log.isTraceEnabled())
+ {
+ SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
+ String envStr = SOAPElementWriter.writeElement((SOAPElementImpl)soapEnv,
true);
+ log.trace("Outgoing SOAPMessage\n" + envStr);
+ }
+
+ soapMessage.writeTo(output);
+ }
+ catch (SOAPException e)
+ {
+ log.error("Cannot marshall SOAPMessage", e);
+ throw new IOException(e.toString());
+ }
+ }
+
+ public Marshaller cloneMarshaller() throws CloneNotSupportedException
+ {
+ return new SOAPMessageMarshaller();
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
(from rev 1599,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/soap/SOAPMessageUnMarshaller.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/soap/SOAPMessageUnMarshaller.java 2006-12-07
10:45:48 UTC (rev 1599)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.soap;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.remoting.marshal.UnMarshaller;
+import org.jboss.remoting.transport.http.HTTPMetadataConstants;
+import org.jboss.ws.WSException;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Nov-2004
+ */
+public class SOAPMessageUnMarshaller implements UnMarshaller
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(SOAPMessageUnMarshaller.class);
+
+ private static List validResponseCodes = new ArrayList();
+ static
+ {
+ validResponseCodes.add(HttpServletResponse.SC_OK);
+ validResponseCodes.add(HttpServletResponse.SC_ACCEPTED);
+ validResponseCodes.add(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ }
+
+ public Object read(InputStream inputStream, Map metadata) throws IOException,
ClassNotFoundException
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace("Read input stream with metadata=" + metadata);
+ }
+
+ try
+ {
+ Integer resCode = (Integer)metadata.get(HTTPMetadataConstants.RESPONSE_CODE);
+ String resMessage =
(String)metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);
+ if (resCode != null && validResponseCodes.contains(resCode) == false)
+ throw new WSException("Invalid HTTP server response [" + resCode +
"] - " + resMessage);
+
+ MimeHeaders mimeHeaders = getMimeHeaders(metadata);
+ SOAPMessage soapMsg = new
MessageFactoryImpl().createMessageInternal(mimeHeaders, inputStream, true);
+ return soapMsg;
+ }
+ catch (SOAPException e)
+ {
+ log.error("Cannot unmarshall SOAPMessage", e);
+ throw new IOException(e.toString());
+ }
+ }
+
+ /**
+ * Set the class loader to use for unmarhsalling. This may
+ * be needed when need to have access to class definitions that
+ * are not part of this unmarshaller's parent classloader (especially
+ * when doing remote classloading).
+ *
+ * @param classloader
+ */
+ public void setClassLoader(ClassLoader classloader)
+ {
+ //NO OP
+ }
+
+ public UnMarshaller cloneUnMarshaller() throws CloneNotSupportedException
+ {
+ return new SOAPMessageUnMarshaller();
+ }
+
+ private MimeHeaders getMimeHeaders(Map metadata)
+ {
+ log.debug("getMimeHeaders from: " + metadata);
+
+ MimeHeaders headers = new MimeHeaders();
+ Iterator i = metadata.keySet().iterator();
+ while (i.hasNext())
+ {
+ String key = (String)i.next();
+ Object value = metadata.get(key);
+ if (key != null && value instanceof List)
+ {
+ for (Object listValue : (List)value)
+ {
+ headers.addHeader(key, listValue.toString());
+ }
+ }
+ }
+ return headers;
+ }
+}
Copied:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/UnboundHeader.java
(from rev 1586,
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/UnboundHeader.java)
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/binding/UnboundHeader.java 2006-12-07
00:31:03 UTC (rev 1586)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/soap/UnboundHeader.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core.soap;
+
+// $Id$
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ParameterMode;
+
+import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.ws.metadata.ParameterMetaData;
+
+/**
+ * Represents an unbound SOAPHeaderElement
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Jan-2005
+ */
+public class UnboundHeader
+{
+ private QName xmlName;
+ private QName xmlType;
+ private Class javaType;
+ private ParameterMode mode;
+ private Object headerValue;
+
+ public UnboundHeader(QName xmlName, QName xmlType, Class javaType, ParameterMode
mode)
+ {
+ this.xmlName = xmlName;
+ this.xmlType = xmlType;
+ this.javaType = javaType;
+ this.mode = mode;
+ }
+
+ public QName getXmlName()
+ {
+ return xmlName;
+ }
+
+ public QName getXmlType()
+ {
+ return xmlType;
+ }
+
+ public Class getJavaType()
+ {
+ return javaType;
+ }
+
+ public ParameterMode getMode()
+ {
+ return mode;
+ }
+
+ public Object getHeaderValue()
+ {
+ return headerValue;
+ }
+
+ public void setHeaderValue(Object headerValue)
+ {
+ this.headerValue = headerValue;
+ }
+
+ public ParameterMetaData toParameterMetaData(OperationMetaData opMetaData)
+ {
+ ParameterMetaData paramMetaData = new ParameterMetaData(opMetaData, xmlName,
xmlType, javaType.getName());
+ paramMetaData.setInHeader(true);
+ return paramMetaData;
+ }
+
+ public String toString()
+ {
+ StringBuilder buffer = new StringBuilder("\nUnboundHeader:");
+ buffer.append("\n xmlName=" + getXmlName());
+ buffer.append("\n xmlType=" + getXmlType());
+ buffer.append("\n javaType=" + getJavaType().getName());
+ buffer.append("\n mode=" + getMode());
+ return buffer.toString();
+ }
+}
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/utils/ThreadLocalAssociation.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/utils/ThreadLocalAssociation.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/core/utils/ThreadLocalAssociation.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -25,7 +25,7 @@
import java.util.Stack;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.extensions.security.SecurityStore;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/deployment/MetaDataBuilder.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/deployment/MetaDataBuilder.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/deployment/MetaDataBuilder.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -47,9 +47,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonSOAPBinding;
import org.jboss.ws.core.jaxrpc.UnqualifiedFaultException;
import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.jaxrpc.binding.CommonSOAPBinding;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
import org.jboss.ws.core.utils.ObjectNameFactory;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/EventingEndpointBase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -33,7 +33,7 @@
import javax.xml.ws.addressing.JAXWSAConstants;
import org.jboss.ws.Constants;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerFactory;
import org.jboss.ws.extensions.eventing.mgmt.SubscriptionManagerMBean;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/eventing/SubscriptionManagerEndpointImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -35,7 +35,7 @@
import javax.xml.ws.addressing.ReferenceParameters;
import org.jboss.ws.Constants;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.extensions.eventing.element.RenewRequest;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -34,7 +34,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.utils.DOMWriter;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -24,7 +24,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.NameImpl;
@@ -179,7 +179,7 @@
* would already have been written.
*
* @see
org.jboss.ws.core.soap.SOAPConnectionImpl#callInternal(javax.xml.soap.SOAPMessage, Object,
boolean)
- * @see org.jboss.ws.binding.soap.SOAPMessageMarshaller#write(Object,
java.io.OutputStream)
+ * @see org.jboss.ws.core.soap.SOAPMessageMarshaller#write(Object,
java.io.OutputStream)
*/
public static void eagerlyCreateAttachments()
{
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPMarshallerImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPMarshallerImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/extensions/xop/XOPMarshallerImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -23,7 +23,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.soap.attachment.ContentHandlerRegistry;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/JBossContextServlet.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/JBossContextServlet.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/JBossContextServlet.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -24,7 +24,7 @@
// $Id$
import org.jboss.logging.Logger;
-import org.jboss.ws.common.CommonContextServlet;
+import org.jboss.ws.core.CommonContextServlet;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInterceptor.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInterceptor.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInterceptor.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -29,11 +29,11 @@
import org.jboss.invocation.Invocation;
import org.jboss.invocation.InvocationKey;
import org.jboss.logging.Logger;
-import org.jboss.ws.binding.EndpointInvocation;
-import org.jboss.ws.common.CommonBinding;
-import org.jboss.ws.common.CommonBindingProvider;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.SOAPFaultExceptionHelper;
+import org.jboss.ws.core.jaxrpc.binding.CommonBinding;
+import org.jboss.ws.core.jaxrpc.binding.CommonBindingProvider;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -41,8 +41,8 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.security.SecurityAssociation;
import org.jboss.ws.WSException;
-import org.jboss.ws.binding.EndpointInvocation;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -34,7 +34,7 @@
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.ws.WSException;
-import org.jboss.ws.binding.EndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -28,7 +28,7 @@
import javax.xml.rpc.soap.SOAPFaultException;
import org.jboss.logging.Logger;
-import org.jboss.ws.binding.EndpointInvocation;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -35,7 +35,7 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.server.ServiceEndpoint;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatContextServlet.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -37,7 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonContextServlet;
+import org.jboss.ws.core.CommonContextServlet;
import org.jboss.ws.core.server.ServiceEndpointManager;
import org.jboss.ws.core.server.ServiceEndpointManagerFactory;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -38,9 +38,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonSOAPBinding;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.jaxrpc.binding.CommonSOAPBinding;
import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
import org.jboss.ws.metadata.config.WSCommonConfig;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -40,12 +40,12 @@
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.jaxrpc.encoding.SOAPArrayDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SOAPArraySerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SOAPArrayDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SOAPArraySerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.SchemaBindingBuilder;
import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.jbossxb.JBossXBDeserializerFactory;
-import org.jboss.ws.jbossxb.JBossXBSerializerFactory;
-import org.jboss.ws.jbossxb.SchemaBindingBuilder;
import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
Modified: branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/ToolsUtils.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/ToolsUtils.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -46,8 +46,8 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleDeserializerFactory;
-import org.jboss.ws.core.jaxrpc.encoding.SimpleSerializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SimpleDeserializerFactory;
+import org.jboss.ws.core.jaxrpc.binding.SimpleSerializerFactory;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.metadata.wsdl.xsd.SchemaUtils;
Modified:
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -40,9 +40,9 @@
import org.apache.xerces.xs.XSTypeDefinition;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.common.CommonSOAPBinding;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.binding.CommonSOAPBinding;
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.FaultMetaData;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/binding/SOAPBindingTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -36,16 +36,16 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.Constants;
-import org.jboss.ws.binding.EndpointInvocation;
-import org.jboss.ws.binding.UnboundHeader;
-import org.jboss.ws.common.CommonBinding;
-import org.jboss.ws.common.CommonBindingProvider;
-import org.jboss.ws.common.CommonMessageContext;
-import org.jboss.ws.common.CommonSOAPBinding;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.CallImpl;
+import org.jboss.ws.core.jaxrpc.binding.CommonBinding;
+import org.jboss.ws.core.jaxrpc.binding.CommonBindingProvider;
+import org.jboss.ws.core.jaxrpc.binding.CommonSOAPBinding;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -32,14 +32,14 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.Constants;
-import org.jboss.ws.binding.DeserializerSupport;
-import org.jboss.ws.binding.SerializationContext;
-import org.jboss.ws.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
-import org.jboss.ws.core.jaxrpc.encoding.DeserializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.encoding.SerializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.DeserializerSupport;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.jaxrpc.binding.SerializerFactoryBase;
+import org.jboss.ws.core.jaxrpc.binding.SerializerSupport;
import org.jboss.xb.binding.NamespaceRegistry;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayMarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -28,9 +28,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/BigDecimalArrayUnmarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -28,9 +28,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayMarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -30,9 +30,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/CalendarArrayUnmarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -30,9 +30,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayMarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -27,9 +27,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/array/QNameArrayUnmarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -27,9 +27,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
/**
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeMarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -30,9 +30,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/complex/ComplexTypeUnmarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -30,8 +30,8 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
import org.jboss.ws.tools.JavaToXSD;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleMarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -30,9 +30,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/docstyle/DocumentStyleUnmarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -29,8 +29,8 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBUnmarshallerImpl;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMappingFactory;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -27,9 +27,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.PackageMapping;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeUnmarshallerTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -27,9 +27,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.test.ws.tools.WSToolsTest;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
+import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.core.utils.DOMUtils;
-import org.jboss.ws.jbossxb.JBossXBConstants;
-import org.jboss.ws.jbossxb.JBossXBUnmarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.PackageMapping;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/common/soap/attachment/GenericAttachmentTestCase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -41,11 +41,11 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.ws.Constants;
-import org.jboss.ws.binding.EndpointInvocation;
-import org.jboss.ws.common.CommonBinding;
-import org.jboss.ws.common.CommonBindingProvider;
-import org.jboss.ws.common.CommonSOAPBinding;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.CallImpl;
+import org.jboss.ws.core.jaxrpc.binding.CommonBinding;
+import org.jboss.ws.core.jaxrpc.binding.CommonBindingProvider;
+import org.jboss.ws.core.jaxrpc.binding.CommonSOAPBinding;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1179/TestEndpointImpl.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -25,7 +25,7 @@
import javax.servlet.http.HttpSession;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
Modified:
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java
===================================================================
---
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2006-12-07
10:43:36 UTC (rev 1600)
+++
branches/tdiesler/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/shared/MTOMServiceBase.java 2006-12-07
11:35:39 UTC (rev 1601)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxrpc.xop.shared;
-import org.jboss.ws.common.CommonMessageContext;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.StubExt;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.xop.XOPContext;