JBossWS SVN: r3741 - branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-27 03:27:56 -0400 (Wed, 27 Jun 2007)
New Revision: 3741
Modified:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericHandler.java
Log:
Fix package
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericHandler.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericHandler.java 2007-06-26 22:24:16 UTC (rev 3740)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericHandler.java 2007-06-27 07:27:56 UTC (rev 3741)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.wsf.spi.handler;
+package org.jboss.wsf.spi.jaxws.handler;
// $Id: $
17 years, 6 months
JBossWS SVN: r3740 - branches/ropalka/testsuite/ant-import.
by jbossws-commits@lists.jboss.org
Author: richard_opalka
Date: 2007-06-26 18:24:16 -0400 (Tue, 26 Jun 2007)
New Revision: 3740
Modified:
branches/ropalka/testsuite/ant-import/build-jars-jaxws.xml
Log:
adding new packaging statement
Modified: branches/ropalka/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- branches/ropalka/testsuite/ant-import/build-jars-jaxws.xml 2007-06-26 22:22:21 UTC (rev 3739)
+++ branches/ropalka/testsuite/ant-import/build-jars-jaxws.xml 2007-06-26 22:24:16 UTC (rev 3740)
@@ -296,6 +296,13 @@
</fileset>
</jar>
+ <!-- jaxws-samples-wsrx-inorder-exactlyonce -->
+ <war warfile="${tests.output.dir}/libs/jaxws-samples-wsrx-inorder-exactlyonce.war" webxml="${tests.output.dir}/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXServiceImpl.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-samples-xop-doclit -->
<war jarfile="${tests.output.dir}/libs/jaxws-samples-xop-doclit.war" webxml="${tests.output.dir}/resources/jaxws/samples/xop/doclit/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
17 years, 6 months
JBossWS SVN: r3739 - in branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples: wsrx and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard_opalka
Date: 2007-06-26 18:22:21 -0400 (Tue, 26 Jun 2007)
New Revision: 3739
Added:
branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/
branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/
branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/InOrderExactlyOnceRMTestCase.java
branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXService.java
branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXServiceImpl.java
Log:
adding initial version of RX test case
Added: branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/InOrderExactlyOnceRMTestCase.java
===================================================================
--- branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/InOrderExactlyOnceRMTestCase.java (rev 0)
+++ branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/InOrderExactlyOnceRMTestCase.java 2007-06-26 22:22:21 UTC (rev 3739)
@@ -0,0 +1,59 @@
+package org.jboss.test.ws.jaxws.samples.wsrx.ioeo;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
+/**
+ * Test the WS RX in order and exactly once sequence types
+ *
+ * @author opalka_richard(a)gmail.com
+ * @since 26-Jun-2007
+ */
+public class InOrderExactlyOnceRMTestCase extends JBossWSTest
+{
+ private String targetNS = "http://www.jboss.org/wsrx/inorder_exactlyonce/";
+
+ private static RXService port;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(InOrderExactlyOnceRMTestCase.class, "jaxws-samples-wsrx-inorder-exactlyonce.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ QName serviceName = new QName(targetNS, "RXService");
+ URL wsdlURL = new File("resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl").toURL();
+
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(RXService.class);
+
+ ((BindingProvider)port).getRequestContext().put(
+ BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+ "http://"+getServerHost()+":8080/" // TODO: it seems that this URL is incorrect - debug it!
+ );
+ }
+ }
+
+ public void testOneWay() throws Exception {
+ System.out.println("FIXME: write RX one way usecase test");
+ // port.oneWay("Hello world!");
+ }
+
+ public void testReqResp() throws Exception {
+ System.out.println("FIXME: write RX req resp usecase test");
+ //System.out.println(port.reqResp("Hello world!"));
+ }
+
+}
Property changes on: branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/InOrderExactlyOnceRMTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXService.java
===================================================================
--- branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXService.java (rev 0)
+++ branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXService.java 2007-06-26 22:22:21 UTC (rev 3739)
@@ -0,0 +1,43 @@
+
+package org.jboss.test.ws.jaxws.samples.wsrx.ioeo;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.1
+ *
+ */
+@WebService(name = "RXService", targetNamespace = "http://www.jboss.org/wsrx/inorder_exactlyonce/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface RXService {
+
+
+ /**
+ *
+ * @param p0
+ */
+ @WebMethod
+ public void oneWay(
+ @WebParam(name = "p0", partName = "p0")
+ String p0);
+
+ /**
+ *
+ * @param p0
+ * @return
+ * returns java.lang.String
+ */
+ @WebMethod
+ @WebResult(name = "response", partName = "response")
+ public String reqResp(
+ @WebParam(name = "p0", partName = "p0")
+ String p0);
+
+}
Property changes on: branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXServiceImpl.java
===================================================================
--- branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXServiceImpl.java (rev 0)
+++ branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXServiceImpl.java 2007-06-26 22:22:21 UTC (rev 3739)
@@ -0,0 +1,39 @@
+package org.jboss.test.ws.jaxws.samples.wsrx.ioeo;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Test the WS RX in order and exactly once sequence types
+ *
+ * @author opalka_richard(a)gmail.com
+ * @since 26-Jun-2007
+ */
+@WebService(name = "RXService", targetNamespace = "http://www.jboss.org/wsrx/inorder_exactlyonce/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class RXServiceImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(RXServiceImpl.class);
+
+ @WebMethod(operationName = "reqResp")
+ @WebResult(targetNamespace = "http://www.jboss.org/wsrx/inorder_exactlyonce/", partName = "response")
+ public String reqResp(@WebParam(name = "p0") String p)
+ {
+ log.info("echo: " + p);
+ return p;
+ }
+
+ @Oneway
+ @WebMethod(operationName = "oneWay")
+ public void oneWay(@WebParam(name = "p0") String p)
+ {
+ log.info("ping: " + p);
+ }
+}
Property changes on: branches/ropalka/testsuite/src/java/org/jboss/test/ws/jaxws/samples/wsrx/ioeo/RXServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 6 months
JBossWS SVN: r3738 - in branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce: META-INF/wsdl and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard_opalka
Date: 2007-06-26 18:20:07 -0400 (Tue, 26 Jun 2007)
New Revision: 3738
Added:
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/WEB-INF/
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/WEB-INF/web.xml
Modified:
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl
Log:
adding new web descriptor
Modified: branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl
===================================================================
--- branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl 2007-06-26 22:15:44 UTC (rev 3737)
+++ branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl 2007-06-26 22:20:07 UTC (rev 3738)
@@ -8,7 +8,8 @@
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
xmlns='http://schemas.xmlsoap.org/wsdl/'>
- <wsp:UsingPolicy required="true"/>
+ <!-- this policy version is commented out for now, because current JBossWS stack is unable to handle them -->
+ <!--wsp:UsingPolicy required="true"/>
<wsp:Policy wsu:Id="RMPolicy">
<wsrmp:RMAssertion>
@@ -21,7 +22,7 @@
</wsrmp:DeliveryAssurance>
</wsp:Policy>
</wsrmp:RMAssertion>
- </wsp:Policy>
+ </wsp:Policy-->
<message name='RXService_oneWay_Request_Soap'>
<part name='p0' type='xsd:string'/>
@@ -44,7 +45,7 @@
</operation>
</portType>
<binding name='RXService' type='tns:RXService'>
- <wsp:PolicyReference URI="#RMPolicy"/>
+ <!--wsp:PolicyReference URI="#RMPolicy"/-->
<soap:binding transport='http://schemas.xmlsoap.org/soap/http' style='rpc'/>
<operation name='oneWay'>
<soap:operation soapAction='' style='rpc'/>
Added: branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/WEB-INF/web.xml
===================================================================
--- branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/WEB-INF/web.xml (rev 0)
+++ branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/WEB-INF/web.xml 2007-06-26 22:20:07 UTC (rev 3738)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>TestService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.samples.wsrx.ioeo.RXServiceImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestService</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 6 months
JBossWS SVN: r3737 - in branches/jbossws-2.0: integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50 and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-26 18:15:44 -0400 (Tue, 26 Jun 2007)
New Revision: 3737
Modified:
branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java
branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java
branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java
branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeployer.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
Log:
Associate ServerEndpointMetaData with Endpoint
Modified: branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java
===================================================================
--- branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookEJB21.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -90,7 +90,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(ejbLink);
ep.setService(service);
- ep.setTargetBean(ejbClass);
+ ep.setTargetBeanName(ejbClass);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java
===================================================================
--- branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookJSE.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -107,7 +107,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(servletLink);
ep.setService(service);
- ep.setTargetBean(servletClass);
+ ep.setTargetBeanName(servletClass);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
===================================================================
--- branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -76,7 +76,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(ejbName);
ep.setService(service);
- ep.setTargetBean(epBean);
+ ep.setTargetBeanName(epBean);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java
===================================================================
--- branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookJSE.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -82,7 +82,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(servletName);
ep.setService(service);
- ep.setTargetBean(servletClass);
+ ep.setTargetBeanName(servletClass);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java
===================================================================
--- branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -57,14 +57,14 @@
// <servlet-class> originally contained a javax.servlet.Servlet
for (Endpoint ep : dep.getService().getEndpoints())
{
- if (ep.getTargetBean() == null)
+ if (ep.getTargetBeanName() == null)
{
String servletName = ep.getShortName();
String beanClassName = results.sepTargetMap.get(servletName);
if (beanClassName == null)
throw new IllegalStateException("Cannot obtain target bean for: " + servletName);
- ep.setTargetBean(beanClassName);
+ ep.setTargetBeanName(beanClassName);
}
}
}
Modified: branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java
===================================================================
--- branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookEJB21.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -89,7 +89,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(ejbLink);
ep.setService(service);
- ep.setTargetBean(ejbClass);
+ ep.setTargetBeanName(ejbClass);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java
===================================================================
--- branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXRPCDeployerHookJSE.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -89,7 +89,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(servletLink);
ep.setService(service);
- ep.setTargetBean(servletClass);
+ ep.setTargetBeanName(servletClass);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java
===================================================================
--- branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookEJB3.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -82,7 +82,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(ejbName);
ep.setService(service);
- ep.setTargetBean(epBean);
+ ep.setTargetBeanName(epBean);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java
===================================================================
--- branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JAXWSDeployerHookJSE.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -79,7 +79,7 @@
Endpoint ep = createEndpoint();
ep.setShortName(servletName);
ep.setService(service);
- ep.setTargetBean(servletClass);
+ ep.setTargetBeanName(servletClass);
service.addEndpoint(ep);
}
Modified: branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeployer.java
===================================================================
--- branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeployer.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataAssociationDeployer.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -52,9 +52,11 @@
if (sepMetaData == null)
{
sepMetaData = getEndpointMetaData(umd, ep);
+ sepMetaData.setEndpoint(ep);
+
ep.addAttachment(ServerEndpointMetaData.class, sepMetaData);
- String targetBean = ep.getTargetBean();
+ String targetBean = ep.getTargetBeanName();
if (targetBean != null)
sepMetaData.setServiceEndpointImplName(targetBean);
}
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicEndpoint.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -67,12 +67,12 @@
this.service = service;
}
- public String getTargetBean()
+ public String getTargetBeanName()
{
return targetBean;
}
- public void setTargetBean(String targetBean)
+ public void setTargetBeanName(String targetBean)
{
this.targetBean = targetBean;
}
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -75,10 +75,10 @@
void setState(EndpointState state);
/** Get the endpoint implementation bean */
- String getTargetBean();
+ String getTargetBeanName();
/** Set the endpoint implementation bean */
- void setTargetBean(String epImpl);
+ void setTargetBeanName(String epImpl);
/** Use the deployment classloader to load the bean */
Class getTargetBeanClass();
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppGeneratorDeployer.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -136,7 +136,7 @@
{
Element servlet = webApp.addElement("servlet");
servlet.addElement("servlet-name").addText(ep.getShortName());
- servlet.addElement("servlet-class").addText(ep.getTargetBean());
+ servlet.addElement("servlet-class").addText(ep.getTargetBeanName());
}
/*
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.wsf.spi.binding.jaxb.CachingJAXBContextFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -39,12 +40,12 @@
public ClientEndpointMetaData(ServiceMetaData service, QName qname, QName portTypeName, Type type)
{
super(service, qname, portTypeName, type);
- super.configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
+ configName = ConfigurationProvider.DEFAULT_CLIENT_CONFIG_NAME;
if (type == Type.JAXRPC)
- super.configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
+ configFile = ConfigurationProvider.DEFAULT_JAXRPC_CLIENT_CONFIG_FILE;
else
- super.configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
+ configFile = ConfigurationProvider.DEFAULT_JAXWS_CLIENT_CONFIG_FILE;
}
public String toString()
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -55,12 +55,12 @@
import org.jboss.ws.core.jaxws.client.DispatchBinding;
import org.jboss.ws.core.soap.Style;
import org.jboss.ws.core.soap.Use;
+import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.config.CommonConfig;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.config.EndpointFeature;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
-import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.wsf.spi.binding.jaxb.CachingJAXBContextFactory;
import org.jboss.wsf.spi.binding.jaxb.JAXBContextFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
@@ -142,7 +142,7 @@
private ConfigObservable configObservable = new ConfigObservable();
- private JAXBContextFactory jaxbContextFactory = new CachingJAXBContextFactory();
+ protected JAXBContextFactory jaxbContextFactory = new CachingJAXBContextFactory();
private List<UnifiedPortComponentRefMetaData> serviceRefContrib = new ArrayList<UnifiedPortComponentRefMetaData>();
@@ -326,6 +326,11 @@
return type;
}
+ public JAXBContextFactory getJAXBContextFactory()
+ {
+ return jaxbContextFactory;
+ }
+
public String getAuthMethod()
{
return authMethod;
@@ -602,11 +607,6 @@
}
}
- public JAXBContextFactory getJAXBContextFactory()
- {
- return jaxbContextFactory;
- }
-
// ---------------------------------------------------------------
// Configuration provider impl
@@ -638,7 +638,7 @@
{
DispatchBinding dpb = (DispatchBinding)configurable;
dpb.setValidateDispatch(config.hasFeature(EndpointFeature.VALIDATE_DISPATCH));
- }
+ }
}
public UnifiedVirtualFile getRootFile()
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-06-26 22:04:36 UTC (rev 3736)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServerEndpointMetaData.java 2007-06-26 22:15:44 UTC (rev 3737)
@@ -28,6 +28,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.wsf.spi.binding.jaxb.JAXBContextFactory;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
@@ -44,7 +46,10 @@
public static final String SEPID_DOMAIN = "jboss.ws";
public static final String SEPID_PROPERTY_CONTEXT = "context";
public static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
-
+
+ // The associated SPI endpoint
+ private Endpoint endpoint;
+
// The REQUIRED link name
private String linkName;
// Legacy JSR-109 port component name
@@ -75,6 +80,16 @@
configFile = ConfigurationProvider.DEFAULT_JAXWS_ENDPOINT_CONFIG_FILE;
}
+ public Endpoint getEndpoint()
+ {
+ return endpoint;
+ }
+
+ public void setEndpoint(Endpoint endpoint)
+ {
+ this.endpoint = endpoint;
+ }
+
public String getLinkName()
{
return linkName;
17 years, 6 months
JBossWS SVN: r3736 - trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-26 18:04:36 -0400 (Tue, 26 Jun 2007)
New Revision: 3736
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java
Log:
Typo
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java 2007-06-26 22:03:45 UTC (rev 3735)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/ServiceLoader.java 2007-06-26 22:04:36 UTC (rev 3736)
@@ -42,7 +42,7 @@
public abstract class ServiceLoader
{
/**
- * This method uses the algirithm below using the JAXWS Provider as an example.
+ * This method uses the algorithm below using the JAXWS Provider as an example.
*
* 1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then
* its first line, if present, is used as the UTF-8 encoded name of the implementation class.
17 years, 6 months
JBossWS SVN: r3735 - trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-06-26 18:03:45 -0400 (Tue, 26 Jun 2007)
New Revision: 3735
Added:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
Log:
Breakup JAXBContextCache and JAXBContextFactory
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java 2007-06-26 22:03:45 UTC (rev 3735)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.jaxws;
+
+import org.jboss.ws.WSException;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+
+/**
+ * Doesn't do anything fancy. It just delegates to <code>JAXBContext.newInstance(clazzes)</code>
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jun 26, 2007
+ */
+public class DefaultJAXBContextFactory extends JAXBContextFactory
+{
+ public JAXBContext createContext(Class[] clazzes) throws WSException
+ {
+ try
+ {
+ return JAXBContext.newInstance(clazzes);
+ }
+ catch (JAXBException e) {
+ throw new WSException("Failed to create JAXBContext", e);
+ }
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DefaultJAXBContextFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java 2007-06-26 21:46:51 UTC (rev 3734)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java 2007-06-26 22:03:45 UTC (rev 3735)
@@ -42,76 +42,67 @@
*/
public class JAXBContextCache
{
- private Map<Integer, JAXBContext> cache = new ConcurrentHashMap<Integer, JAXBContext>();
+ private Map<Integer, JAXBContext> cache = new ConcurrentHashMap<Integer, JAXBContext>();
- private JAXBContext get(Integer id)
- {
- return cache.get(id);
- }
+ public JAXBContext get(Class[] clazzes)
+ {
+ Integer id = buildId(clazzes);
+ return get(id);
+ }
- private void add(Integer id, JAXBContext context)
- {
- cache.put(id, context);
- }
+ public void add(Class[] clazzes, JAXBContext context)
+ {
+ Integer id = buildId(clazzes);
+ add(id, context);
+ }
- /**
- * Retrieve a cached JAXBContext instance.
- * If no instance is cached a new one will be created and registered.
- */
- public JAXBContext getInstance(Class[] classes) throws JAXBException
- {
- Integer id = buildId(classes);
- JAXBContext ctx = get(id);
- if (null == ctx)
- {
- ctx = JAXBContext.newInstance(classes);
- add(id, ctx);
- }
+ private JAXBContext get(Integer id)
+ {
+ return cache.get(id);
+ }
- return ctx;
- }
+ private void add(Integer id, JAXBContext context)
+ {
+ cache.put(id, context);
+ }
- /**
- * Retrieve a cached JAXBContext instance.
- * If no instance is cached a new one will be created and registered.
- */
- public JAXBContext getInstance(Class clazz) throws JAXBException
- {
- Integer id = buildId(clazz);
- JAXBContext ctx = get(id);
- if (null == ctx)
- {
- ctx = JAXBContext.newInstance(clazz);
- add(id, ctx);
- }
+ /**
+ * Retrieve a cached JAXBContext instance.
+ * If no instance is cached a new one will be created and registered.
+ */
+ public JAXBContext getInstance(Class[] classes) throws JAXBException
+ {
+ Integer id = buildId(classes);
+ JAXBContext ctx = get(id);
+ if (null == ctx)
+ {
+ ctx = JAXBContext.newInstance(classes);
+ add(id, ctx);
+ }
- return ctx;
- }
+ return ctx;
+ }
- /**
- * Access the JAXBContext cache through the message context.
- * The actual instance is assiciated with the EndpointMetaData.
- * @return JAXBContextCache
- */
- public static JAXBContextCache getContextCache()
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- return epMetaData.getJaxbCache();
- }
+ private static Integer buildId(Class[] classes)
+ {
+ int sum = HashCodeUtil.SEED;
+ for (Class cls : classes)
+ {
+ sum = HashCodeUtil.hash(sum, cls.getName());
+ }
+ return sum;
+ }
- private static Integer buildId(Class[] classes)
- {
- int sum = HashCodeUtil.SEED;
- for (Class cls : classes)
- {
- sum = HashCodeUtil.hash(sum, cls.getName());
- }
- return new Integer(sum);
- }
-
- private static Integer buildId(Class clazz)
- {
- return buildId(new Class[] { clazz });
- }
+ /**
+ * Access the JAXBContext cache through the message context.
+ * The actual instance is assiciated with the EndpointMetaData.
+ * @return JAXBContextCache
+ */
+ public static JAXBContextCache getContextCache()
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
+ return epMetaData.getJaxbCache();
+ }
}
+
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java 2007-06-26 22:03:45 UTC (rev 3735)
@@ -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.jaxws;
+
+import org.jboss.ws.WSException;
+import org.jboss.wsf.spi.utils.ServiceLoader;
+
+import javax.xml.bind.JAXBContext;
+
+/**
+ * Creates JAXBContext's.<p>
+ * The factory uses the WSF {@link ServiceLoader} to find
+ * the actual factory that's going to be used.
+ *
+ * @author Heiko.Braun(a)jboss.com
+ * Created: Jun 26, 2007
+ */
+public abstract class JAXBContextFactory {
+
+ public final static String DEFAULT_JAXB_CONTEXT_FACTORY = "org.jboss.ws.core.jaxws.DefaultJAXBContextFactory";
+
+ public abstract JAXBContext createContext(Class[] clazzes) throws WSException;
+
+ public static JAXBContextFactory newInstance()
+ {
+ return (JAXBContextFactory)ServiceLoader.loadService(
+ JAXBContextFactory.class.getName(),
+ DEFAULT_JAXB_CONTEXT_FACTORY
+ );
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-06-26 21:46:51 UTC (rev 3734)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-06-26 22:03:45 UTC (rev 3735)
@@ -23,21 +23,20 @@
// $Id$
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+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.extensions.xop.jaxws.AttachmentUnmarshallerImpl;
+
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
import javax.xml.ws.WebServiceException;
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-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.extensions.xop.jaxws.AttachmentUnmarshallerImpl;
-
/**
* A Deserializer that can handle complex types by delegating to JAXB.
*
@@ -65,12 +64,11 @@
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
- JAXBContextCache contextCache = JAXBContextCache.getContextCache();
- JAXBContext jaxbContext = contextCache.getInstance(javaTypes);
-
+ JAXBContext jaxbContext = getJAXBContext(javaTypes);
+
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setAttachmentUnmarshaller( new AttachmentUnmarshallerImpl());
-
+
JAXBElement jbe = unmarshaller.unmarshal(xmlFragment, javaType);
value = jbe.getValue();
@@ -84,9 +82,20 @@
}
- private JAXBContext getJAXBContext(Class[] types) throws JAXBException {
- JAXBContext jaxbContext = JAXBContext.newInstance(types);
- return jaxbContext;
+ /**
+ * Retrieve JAXBContext from cache or create new one and cache it.
+ * @param types
+ * @return JAXBContext
+ */
+ private JAXBContext getJAXBContext(Class[] types){
+ JAXBContextCache cache = JAXBContextCache.getContextCache();
+ JAXBContext context = cache.get(types);
+ if(null==context)
+ {
+ context = JAXBContextFactory.newInstance().createContext(types);
+ cache.add(types, context);
+ }
+ return context;
}
// 4.21 Conformance (Marshalling failure): If an error occurs when using the supplied JAXBContext to marshall
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-06-26 21:46:51 UTC (rev 3734)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-06-26 22:03:45 UTC (rev 3735)
@@ -23,6 +23,14 @@
// $Id$
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
+import org.jboss.ws.core.jaxrpc.binding.ComplexTypeSerializer;
+import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.extensions.xop.jaxws.AttachmentMarshallerImpl;
+import org.w3c.dom.NamedNodeMap;
+
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Marshaller;
@@ -31,15 +39,6 @@
import javax.xml.transform.Result;
import javax.xml.ws.WebServiceException;
-import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
-import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
-import org.jboss.ws.core.jaxrpc.binding.ComplexTypeSerializer;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
-import org.jboss.ws.extensions.xop.jaxws.AttachmentMarshallerImpl;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.w3c.dom.NamedNodeMap;
-
/**
* A Serializer that can handle complex types by delegating to JAXB.
*
@@ -67,11 +66,10 @@
// This should be more efficient and accurate than searching the type mapping
Class expectedType = serContext.getJavaType();
Class actualType = value.getClass();
-
- JAXBContextCache contextCache = JAXBContextCache.getContextCache();
Class[] types = shouldFilter(actualType) ? new Class[]{expectedType} : new Class[]{expectedType, actualType};
- JAXBContext jaxbContext = contextCache.getInstance(types);
+ JAXBContext jaxbContext = getJAXBContext(types);
+
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
@@ -92,6 +90,22 @@
return result;
}
+ /**
+ * Retrieve JAXBContext from cache or create new one and cache it.
+ * @param types
+ * @return JAXBContext
+ */
+ private JAXBContext getJAXBContext(Class[] types){
+ JAXBContextCache cache = JAXBContextCache.getContextCache();
+ JAXBContext context = cache.get(types);
+ if(null==context)
+ {
+ context = JAXBContextFactory.newInstance().createContext(types);
+ cache.add(types, context);
+ }
+ return context;
+ }
+
// Remove this when we add a XMLGregorianCalendar Serializer
private boolean shouldFilter(Class<?> actualType)
{
17 years, 6 months
JBossWS SVN: r3734 - in branches/jbossws-2.0: integration/spi/ant-import and 25 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-26 17:46:51 -0400 (Tue, 26 Jun 2007)
New Revision: 3734
Added:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/CachingJAXBContextFactory.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/JAXBContextFactory.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java
Removed:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/handler/
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java
Modified:
branches/jbossws-2.0/integration/spi/.classpath
branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericLogicalHandler.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericSOAPHandler.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java
branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java
Log:
Add notion of JAXBContextFactory
Modified: branches/jbossws-2.0/integration/spi/.classpath
===================================================================
--- branches/jbossws-2.0/integration/spi/.classpath 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/integration/spi/.classpath 2007-06-26 21:46:51 UTC (rev 3734)
@@ -22,5 +22,6 @@
<classpathentry kind="lib" path="thirdparty/ant.jar"/>
<classpathentry kind="lib" path="thirdparty/getopt.jar"/>
<classpathentry kind="lib" path="thirdparty/saaj-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jaxb-api.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml
===================================================================
--- branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/integration/spi/ant-import/build-thirdparty.xml 2007-06-26 21:46:51 UTC (rev 3734)
@@ -88,6 +88,7 @@
<pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
<pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
<pathelement location="${thirdparty.dir}/jaxws-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
<pathelement location="${thirdparty.dir}/jaxrpc-api.jar"/>
<pathelement location="${thirdparty.dir}/jsr181-api.jar"/>
<pathelement location="${thirdparty.dir}/junit.jar"/>
Added: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/CachingJAXBContextFactory.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/CachingJAXBContextFactory.java (rev 0)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/CachingJAXBContextFactory.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -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.wsf.spi.binding.jaxb;
+
+// $Id: $
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+
+import org.jboss.wsf.spi.utils.HashCodeUtil;
+
+/**
+ * Cache JAXBContext's.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 26-Jun-2007
+ */
+public class CachingJAXBContextFactory implements JAXBContextFactory
+{
+ private Map<Integer, JAXBContext> cache = new ConcurrentHashMap<Integer, JAXBContext>();
+
+ private JAXBContext get(Integer id)
+ {
+ return cache.get(id);
+ }
+
+ private void add(Integer id, JAXBContext context)
+ {
+ cache.put(id, context);
+ }
+
+ /**
+ * Retrieve a cached JAXBContext instance.
+ * If no instance is cached a new one will be created and registered.
+ */
+ public JAXBContext getInstance(Class[] classes) throws JAXBException
+ {
+ Integer id = buildId(classes);
+ JAXBContext ctx = get(id);
+ if (null == ctx)
+ {
+ ctx = JAXBContext.newInstance(classes);
+ add(id, ctx);
+ }
+
+ return ctx;
+ }
+
+ private Integer buildId(Class[] classes)
+ {
+ int sum = HashCodeUtil.SEED;
+ for (Class cls : classes)
+ {
+ sum = HashCodeUtil.hash(sum, cls.getName());
+ }
+ return new Integer(sum);
+ }
+
+ private Integer buildId(Class clazz)
+ {
+ return buildId(new Class[] { clazz });
+ }
+}
Added: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/JAXBContextFactory.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/JAXBContextFactory.java (rev 0)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/binding/jaxb/JAXBContextFactory.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.binding.jaxb;
+
+// $Id: $
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+
+/**
+ * A factory for JAXBContext
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 26-Jun-2007
+ */
+public interface JAXBContextFactory
+{
+ /**
+ * Retrieve a cached JAXBContext instance.
+ * If no instance is cached a new one will be created and registered.
+ */
+ JAXBContext getInstance(Class[] classes) throws JAXBException;
+}
Copied: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler (from rev 3729, branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/handler)
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericLogicalHandler.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/handler/GenericLogicalHandler.java 2007-06-26 19:38:00 UTC (rev 3729)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericLogicalHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.wsf.spi.handler;
+package org.jboss.wsf.spi.jaxws.handler;
// $Id$
Modified: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericSOAPHandler.java
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/handler/GenericSOAPHandler.java 2007-06-26 19:38:00 UTC (rev 3729)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/jaxws/handler/GenericSOAPHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.wsf.spi.handler;
+package org.jboss.wsf.spi.jaxws.handler;
// $Id: $
Copied: branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java (from rev 3729, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java)
===================================================================
--- branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java (rev 0)
+++ branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/utils/HashCodeUtil.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.utils;
+
+import java.lang.reflect.Array;
+
+/**
+ * Collected methods which allow easy implementation of <code>hashCode</code>.
+ *
+ * Example use case:
+ * <pre>
+ * public int hashCode(){
+ * int result = HashCodeUtil.SEED;
+ * //collect the contributions of various fields
+ * result = HashCodeUtil.hash(result, fPrimitive);
+ * result = HashCodeUtil.hash(result, fObject);
+ * result = HashCodeUtil.hash(result, fArray);
+ * return result;
+ * }
+ * </pre>
+ */
+public final class HashCodeUtil
+{
+
+ /**
+ * An initial value for a <code>hashCode</code>, to which is added contributions
+ * from fields. Using a non-zero value decreases collisons of <code>hashCode</code>
+ * values.
+ */
+ public static final int SEED = 23;
+
+ /**
+ * booleans.
+ */
+ public static int hash(int aSeed, boolean aBoolean)
+ {
+ return firstTerm(aSeed) + (aBoolean ? 1 : 0);
+ }
+
+ /**
+ * chars.
+ */
+ public static int hash(int aSeed, char aChar)
+ {
+ return firstTerm(aSeed) + (int)aChar;
+ }
+
+ /**
+ * ints.
+ */
+ public static int hash(int aSeed, int aInt)
+ {
+ /*
+ * Implementation Note
+ * Note that byte and short are handled by this method, through
+ * implicit conversion.
+ */
+ return firstTerm(aSeed) + aInt;
+ }
+
+ /**
+ * longs.
+ */
+ public static int hash(int aSeed, long aLong)
+ {
+ return firstTerm(aSeed) + (int)(aLong ^ (aLong >>> 32));
+ }
+
+ /**
+ * floats.
+ */
+ public static int hash(int aSeed, float aFloat)
+ {
+ return hash(aSeed, Float.floatToIntBits(aFloat));
+ }
+
+ /**
+ * doubles.
+ */
+ public static int hash(int aSeed, double aDouble)
+ {
+ return hash(aSeed, Double.doubleToLongBits(aDouble));
+ }
+
+ /**
+ * <code>aObject</code> is a possibly-null object field, and possibly an array.
+ *
+ * If <code>aObject</code> is an array, then each element may be a primitive
+ * or a possibly-null object.
+ */
+ public static int hash(int aSeed, Object aObject)
+ {
+ int result = aSeed;
+ if (aObject == null)
+ {
+ result = hash(result, 0);
+ }
+ else if (!isArray(aObject))
+ {
+ result = hash(result, aObject.hashCode());
+ }
+ else
+ {
+ int length = Array.getLength(aObject);
+ for (int idx = 0; idx < length; ++idx)
+ {
+ Object item = Array.get(aObject, idx);
+ //recursive call!
+ result = hash(result, item);
+ }
+ }
+ return result;
+ }
+
+ /// PRIVATE ///
+ private static final int fODD_PRIME_NUMBER = 37;
+
+ private static int firstTerm(int aSeed)
+ {
+ return fODD_PRIME_NUMBER * aSeed;
+ }
+
+ private static boolean isArray(Object aObject)
+ {
+ return aObject.getClass().isArray();
+ }
+}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -53,7 +53,7 @@
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.HashCodeUtil;
+import org.jboss.wsf.spi.utils.HashCodeUtil;
import org.jboss.wsf.spi.utils.JavaUtils;
/**
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBContextCache.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxws;
-
-// $Id: $
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-
-import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.soap.MessageContextAssociation;
-import org.jboss.ws.core.utils.HashCodeUtil;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-
-/**
- * Cache JAXBContext's.
- *
- * @author Heiko.Braun(a)jboss.org
- * @since 26.01.2007
- */
-public class JAXBContextCache
-{
- private Map<Integer, JAXBContext> cache = new ConcurrentHashMap<Integer, JAXBContext>();
-
- private JAXBContext get(Integer id)
- {
- return cache.get(id);
- }
-
- private void add(Integer id, JAXBContext context)
- {
- cache.put(id, context);
- }
-
- /**
- * Retrieve a cached JAXBContext instance.
- * If no instance is cached a new one will be created and registered.
- */
- public JAXBContext getInstance(Class[] classes) throws JAXBException
- {
- Integer id = buildId(classes);
- JAXBContext ctx = get(id);
- if (null == ctx)
- {
- ctx = JAXBContext.newInstance(classes);
- add(id, ctx);
- }
-
- return ctx;
- }
-
- /**
- * Retrieve a cached JAXBContext instance.
- * If no instance is cached a new one will be created and registered.
- */
- public JAXBContext getInstance(Class clazz) throws JAXBException
- {
- Integer id = buildId(clazz);
- JAXBContext ctx = get(id);
- if (null == ctx)
- {
- ctx = JAXBContext.newInstance(clazz);
- add(id, ctx);
- }
-
- return ctx;
- }
-
- /**
- * Access the JAXBContext cache through the message context.
- * The actual instance is assiciated with the EndpointMetaData.
- * @return JAXBContextCache
- */
- public static JAXBContextCache getContextCache()
- {
- CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- return epMetaData.getJaxbCache();
- }
-
- private static Integer buildId(Class[] classes)
- {
- int sum = HashCodeUtil.SEED;
- for (Class cls : classes)
- {
- sum = HashCodeUtil.hash(sum, cls.getName());
- }
- return new Integer(sum);
- }
-
- private static Integer buildId(Class clazz)
- {
- return buildId(new Class[] { clazz });
- }
-}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -37,6 +37,7 @@
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.extensions.xop.jaxws.AttachmentUnmarshallerImpl;
+import org.jboss.wsf.spi.binding.jaxb.JAXBContextFactory;
/**
* A Deserializer that can handle complex types by delegating to JAXB.
@@ -65,8 +66,8 @@
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
- JAXBContextCache contextCache = JAXBContextCache.getContextCache();
- JAXBContext jaxbContext = contextCache.getInstance(javaTypes);
+ JAXBContextFactory jaxbFactory = ((SerializationContextJAXWS)serContext).getJAXBContextFactory();
+ JAXBContext jaxbContext = jaxbFactory.getInstance(javaTypes);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setAttachmentUnmarshaller( new AttachmentUnmarshallerImpl());
@@ -84,11 +85,6 @@
}
- private JAXBContext getJAXBContext(Class[] types) throws JAXBException {
- JAXBContext jaxbContext = JAXBContext.newInstance(types);
- return jaxbContext;
- }
-
// 4.21 Conformance (Marshalling failure): If an error occurs when using the supplied JAXBContext to marshall
// a request or unmarshall a response, an implementation MUST throw a WebServiceException whose
// cause is set to the original JAXBException.
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -37,7 +37,7 @@
import org.jboss.ws.core.binding.ComplexTypeSerializer;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.extensions.xop.jaxws.AttachmentMarshallerImpl;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
+import org.jboss.wsf.spi.binding.jaxb.JAXBContextFactory;
import org.w3c.dom.NamedNodeMap;
/**
@@ -68,9 +68,9 @@
Class expectedType = serContext.getJavaType();
Class actualType = value.getClass();
- JAXBContextCache contextCache = JAXBContextCache.getContextCache();
- Class[] types = shouldFilter(actualType) ? new Class[]{expectedType} : new Class[]{expectedType, actualType};
- JAXBContext jaxbContext = contextCache.getInstance(types);
+ Class[] javaTypes = shouldFilter(actualType) ? new Class[]{expectedType} : new Class[]{expectedType, actualType};
+ JAXBContextFactory jaxbFactory = ((SerializationContextJAXWS)serContext).getJAXBContextFactory();
+ JAXBContext jaxbContext = jaxbFactory.getInstance(javaTypes);
Marshaller marshaller = jaxbContext.createMarshaller();
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -24,7 +24,11 @@
// $Id$
import org.jboss.logging.Logger;
+import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.wsf.spi.binding.jaxb.JAXBContextFactory;
/**
* The serialization context for JAXWS endpoints/clients
@@ -38,4 +42,15 @@
private static final Logger log = Logger.getLogger(SerializationContextJAXWS.class);
public static final String JAXB_CONTEXT_TYPES = "org.jboss.ws.jaxb.context.types";
+
+ /**
+ * Access the JAXBContextFactory through the message context.
+ * The actual instance is assiciated with the EndpointMetaData.
+ */
+ public static JAXBContextFactory getJAXBContextFactory()
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
+ return epMetaData.getJAXBContextFactory();
+ }
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -49,8 +49,8 @@
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.wsf.spi.handler.GenericHandler;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/HashCodeUtil.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -1,134 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.utils;
-
-import java.lang.reflect.Array;
-
-/**
-* Collected methods which allow easy implementation of <code>hashCode</code>.
-*
-* Example use case:
-* <pre>
-* public int hashCode(){
-* int result = HashCodeUtil.SEED;
-* //collect the contributions of various fields
-* result = HashCodeUtil.hash(result, fPrimitive);
-* result = HashCodeUtil.hash(result, fObject);
-* result = HashCodeUtil.hash(result, fArray);
-* return result;
-* }
-* </pre>
-*/
-public final class HashCodeUtil {
-
- /**
- * An initial value for a <code>hashCode</code>, to which is added contributions
- * from fields. Using a non-zero value decreases collisons of <code>hashCode</code>
- * values.
- */
- public static final int SEED = 23;
-
- /**
- * booleans.
- */
- public static int hash( int aSeed, boolean aBoolean ) {
- return firstTerm( aSeed ) + ( aBoolean ? 1 : 0 );
- }
-
- /**
- * chars.
- */
- public static int hash( int aSeed, char aChar ) {
- return firstTerm( aSeed ) + (int)aChar;
- }
-
- /**
- * ints.
- */
- public static int hash( int aSeed , int aInt ) {
- /*
- * Implementation Note
- * Note that byte and short are handled by this method, through
- * implicit conversion.
- */
- return firstTerm( aSeed ) + aInt;
- }
-
- /**
- * longs.
- */
- public static int hash( int aSeed , long aLong ) {
- return firstTerm(aSeed) + (int)( aLong ^ (aLong >>> 32) );
- }
-
- /**
- * floats.
- */
- public static int hash( int aSeed , float aFloat ) {
- return hash( aSeed, Float.floatToIntBits(aFloat) );
- }
-
- /**
- * doubles.
- */
- public static int hash( int aSeed , double aDouble ) {
- return hash( aSeed, Double.doubleToLongBits(aDouble) );
- }
-
- /**
- * <code>aObject</code> is a possibly-null object field, and possibly an array.
- *
- * If <code>aObject</code> is an array, then each element may be a primitive
- * or a possibly-null object.
- */
- public static int hash( int aSeed , Object aObject ) {
- int result = aSeed;
- if ( aObject == null) {
- result = hash(result, 0);
- }
- else if ( ! isArray(aObject) ) {
- result = hash(result, aObject.hashCode());
- }
- else {
- int length = Array.getLength(aObject);
- for ( int idx = 0; idx < length; ++idx ) {
- Object item = Array.get(aObject, idx);
- //recursive call!
- result = hash(result, item);
- }
- }
- return result;
- }
-
-
- /// PRIVATE ///
- private static final int fODD_PRIME_NUMBER = 37;
-
- private static int firstTerm( int aSeed ){
- return fODD_PRIME_NUMBER * aSeed;
- }
-
- private static boolean isArray(Object aObject){
- return aObject.getClass().isArray();
- }
-}
-
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -24,7 +24,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.soap.SOAPAddressingPropertiesImpl;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPException;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -26,7 +26,7 @@
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
import org.jboss.ws.extensions.addressing.metadata.AddressingOpMetaExt;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPMessage;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/jaxws/WSSecurityHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -42,7 +42,7 @@
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* An abstract JAXWS handler that delegates to the WSSecurityDispatcher
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -50,7 +50,6 @@
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArrayDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArraySerializerFactory;
-import org.jboss.ws.core.jaxws.JAXBContextCache;
import org.jboss.ws.core.jaxws.JAXBDeserializerFactory;
import org.jboss.ws.core.jaxws.JAXBSerializerFactory;
import org.jboss.ws.core.jaxws.client.DispatchBinding;
@@ -62,6 +61,8 @@
import org.jboss.ws.metadata.config.EndpointFeature;
import org.jboss.ws.metadata.config.JBossWSConfigFactory;
import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.wsf.spi.binding.jaxb.CachingJAXBContextFactory;
+import org.jboss.wsf.spi.binding.jaxb.JAXBContextFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.utils.JavaUtils;
@@ -141,7 +142,7 @@
private ConfigObservable configObservable = new ConfigObservable();
- private JAXBContextCache jaxbCache = new JAXBContextCache();
+ private JAXBContextFactory jaxbContextFactory = new CachingJAXBContextFactory();
private List<UnifiedPortComponentRefMetaData> serviceRefContrib = new ArrayList<UnifiedPortComponentRefMetaData>();
@@ -601,9 +602,9 @@
}
}
- public JAXBContextCache getJaxbCache()
+ public JAXBContextFactory getJAXBContextFactory()
{
- return jaxbCache;
+ return jaxbContextFactory;
}
// ---------------------------------------------------------------
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/binding/ClientHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A client side handler
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/handlerscope/ProtocolHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -28,7 +28,7 @@
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
public class ProtocolHandler extends GenericSOAPHandler
{
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/AttachmentHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -21,7 +21,7 @@
*/
package org.jboss.test.ws.jaxws.jbws1283;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import javax.activation.DataHandler;
import javax.xml.soap.AttachmentPart;
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/jbws1283/JBWS1283TestCase.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -23,7 +23,7 @@
import org.jboss.wsf.spi.test.JBossWSTest;
import org.jboss.wsf.spi.test.JBossWSTestSetup;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import org.jboss.test.ws.jaxws.jbws1357.JBWS1357;
import junit.framework.Test;
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ClientHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -37,7 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.utils.UUIDGenerator;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
/**
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/samples/wsaddressing/ServerHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -34,7 +34,7 @@
import javax.xml.ws.handler.MessageContext.Scope;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
/**
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/AddressingHandlerEnableMU.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -31,7 +31,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericHandler;
/**
* A client side handler that disables mustUnderstand processing
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsaddressing/action/CustomAddressingHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -32,7 +32,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericHandler;
/**
* A client side handler for the ws-addressing
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/jaxws/wsdd/CustomHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -23,7 +23,7 @@
import org.jboss.ws.core.soap.TextImpl;
import org.jboss.ws.extensions.xop.XOPContext;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/AuthorizationHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ClientMimeHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A client side handler
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/LogHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/RoutingHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/handlerchain/ServerMimeHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -27,7 +27,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A server side handler
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/httpbinding/LogicalSourceHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericLogicalHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalJAXBHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.LogicalMessageContext;
import javax.xml.ws.handler.MessageContext;
-import org.jboss.wsf.spi.handler.GenericLogicalHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
public class LogicalJAXBHandler extends GenericLogicalHandler
{
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/LogicalSourceHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericLogicalHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/PortHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A jaxws protocol handler
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/logicalhandler/ProtocolHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -29,7 +29,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
/**
* A jaxws protocol handler
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/provider/LogicalSourceHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -35,7 +35,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericLogicalHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericLogicalHandler;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/retail/handler/SOAPMessageTrace.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -24,7 +24,7 @@
import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
public class SOAPMessageTrace extends GenericSOAPHandler
{
Modified: branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java
===================================================================
--- branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java 2007-06-26 21:03:20 UTC (rev 3733)
+++ branches/jbossws-2.0/testsuite/src/java/org/jboss/test/ws/jaxws/samples/xop/doclit/MTOMProtocolHandler.java 2007-06-26 21:46:51 UTC (rev 3734)
@@ -22,7 +22,7 @@
package org.jboss.test.ws.jaxws.samples.xop.doclit;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.handler.GenericSOAPHandler;
+import org.jboss.wsf.spi.jaxws.handler.GenericSOAPHandler;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
17 years, 6 months
JBossWS SVN: r3733 - in branches/jbossws-2.0: jbossws-core/src/main/java/org/jboss/ws/core and 14 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-06-26 17:03:20 -0400 (Tue, 26 Jun 2007)
New Revision: 3733
Added:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BindingException.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BufferedStreamResult.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java
Removed:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
Modified:
branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchHTTPBinding.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLFragment.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
Log:
Refactor stuff to ws.common.binding
Modified: branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -61,7 +61,7 @@
import org.jboss.ws.core.HTTPMessageImpl;
import org.jboss.ws.core.MessageAbstraction;
import org.jboss.ws.core.MessageTrace;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBinding.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,7 +27,7 @@
import javax.xml.namespace.QName;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -33,7 +33,7 @@
import javax.xml.ws.handler.MessageContext.Scope;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -51,8 +51,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
Added: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractDeserializerFactory.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -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.binding;
+
+// $Id: DeserializerFactoryBase.java 2210 2007-01-31 09:51:54Z thomas.diesler(a)jboss.com $
+
+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 AbstractDeserializerFactory implements DeserializerFactory
+{
+ public abstract DeserializerSupport getDeserializer() throws BindingException;
+
+ public Deserializer getDeserializerAs(String mechanismType)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Iterator getSupportedMechanismTypes()
+ {
+ throw new NotImplementedException();
+ }
+}
Added: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractSerializerFactory.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/AbstractSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -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.binding;
+
+// $Id: SerializerFactoryBase.java 2210 2007-01-31 09:51:54Z thomas.diesler(a)jboss.com $
+
+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 AbstractSerializerFactory implements SerializerFactory
+{
+ public abstract SerializerSupport getSerializer() throws BindingException;
+
+ public Serializer getSerializerAs(String mechanismType)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Iterator getSupportedMechanismTypes()
+ {
+ throw new NotImplementedException();
+ }
+}
Copied: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BindingException.java (from rev 3729, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java)
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BindingException.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BindingException.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+/** An exception that may occur during message binding
+ *
+ * @author Thomas.Diesler(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);
+ }
+}
Copied: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BufferedStreamResult.java (from rev 3729, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java)
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BufferedStreamResult.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/BufferedStreamResult.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id: $
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.Writer;
+
+import javax.xml.transform.stream.StreamResult;
+
+import org.jboss.ws.WSException;
+import org.jboss.wsf.spi.utils.IOUtils;
+
+/**
+ * @author Heiko.Braun(a)jboss.org
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 06.02.2007
+ */
+public class BufferedStreamResult extends StreamResult
+{
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+
+ public BufferedStreamResult()
+ {
+ }
+
+ public BufferedStreamResult(String xmlFragment)
+ {
+ try
+ {
+ IOUtils.copyStream(getOutputStream(), new ByteArrayInputStream(xmlFragment.getBytes()));
+ }
+ catch (IOException e)
+ {
+ WSException.rethrow(e);
+ }
+ }
+
+ @Override
+ public Writer getWriter()
+ {
+ return null;
+ }
+
+ @Override
+ public OutputStream getOutputStream()
+ {
+ return baos;
+ }
+
+ @Override
+ public void setWriter(Writer writer)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void setOutputStream(OutputStream outputStream)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String toString()
+ {
+ return baos.toString();
+ }
+}
Copied: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java (from rev 3729, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java)
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+
+
+// $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
+{
+
+}
Added: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/ComplexTypeSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -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.binding;
+
+
+
+
+// $Id: ComplexTypeSerializer.java 1757 2006-12-22 15:40:24Z thomas.diesler(a)jboss.com $
+
+/**
+ * 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
+{
+
+}
Copied: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java (from rev 3729, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java)
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/DeserializerSupport.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Deserializer;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.soap.SOAPContentElement;
+import org.jboss.ws.core.utils.XMLPredefinedEntityReferenceResolver;
+import org.jboss.wsf.spi.utils.DOMWriter;
+import org.w3c.dom.Node;
+
+/** The base class for all Deserializers.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class DeserializerSupport implements Deserializer
+{
+ private static final Logger log = Logger.getLogger(DeserializerSupport.class);
+
+ public Object deserialize(SOAPContentElement soapElement, SerializationContext serContext) throws BindingException
+ {
+ QName xmlName = soapElement.getElementQName();
+ QName xmlType = soapElement.getXmlType();
+
+ Source source = soapElement.getXMLFragment().getSource();
+ return deserialize(xmlName, xmlType, source, serContext);
+ }
+
+ /** 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, Source xmlFragment, SerializationContext serContext) throws BindingException;
+
+ // TODO: remove when JBossXB supports unmarshall(Source)
+ // http://jira.jboss.org/jira/browse/JBXB-100
+ protected static String sourceToString(Source source)
+ {
+ String xmlFragment = null;
+ try
+ {
+ if (source instanceof DOMSource)
+ {
+ Node node = ((DOMSource)source).getNode();
+ xmlFragment = DOMWriter.printNode(node, false);
+ }
+ else
+ {
+ // Note, this code will not handler namespaces correctly that
+ // are defined on a parent of the DOMSource
+ //
+ // <env:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ // <env:Body>
+ // <myMethod>
+ // <param xsi:type='xsd:string'>Hello World!</param>
+ // </myMethod>
+ // </env:Body>
+ // </env:Envelope>
+ //
+ TransformerFactory tf = TransformerFactory.newInstance();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
+ StreamResult streamResult = new StreamResult(baos);
+ tf.newTransformer().transform(source, streamResult);
+ xmlFragment = new String(baos.toByteArray());
+ if (xmlFragment.startsWith("<?xml"))
+ {
+ int index = xmlFragment.indexOf(">");
+ xmlFragment = xmlFragment.substring(index + 1);
+ }
+ }
+ }
+ catch (TransformerException e)
+ {
+ WSException.rethrow(e);
+ }
+
+ return xmlFragment;
+ }
+
+ /** 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();
+ }
+}
Added: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializationContext.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core.binding;
+
+// $Id: SerializationContext.java 2634 2007-03-16 23:44:09Z jason.greene(a)jboss.com $
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.xb.binding.NamespaceRegistry;
+
+/**
+ * An abstract serialization context
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-Dec-2004
+ */
+public abstract class SerializationContext
+{
+ private Class javaType;
+
+ 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;
+ }
+
+ public Class getJavaType()
+ {
+ return javaType;
+ }
+
+ public void setJavaType(Class javaType)
+ {
+ this.javaType = javaType;
+ }
+}
Added: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/SerializerSupport.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -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.binding;
+
+// $Id: SerializerSupport.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com $
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.Serializer;
+import javax.xml.transform.Result;
+
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.Constants;
+import org.jboss.ws.core.soap.SOAPContentElement;
+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
+{
+
+ public Result serialize(SOAPContentElement soapElement, SerializationContext serContext) throws BindingException
+ {
+ QName xmlName = soapElement.getElementQName();
+ QName xmlType = soapElement.getXmlType();
+ NamedNodeMap attributes = soapElement.getAttributes();
+ Object objectValue = soapElement.getObjectValue();
+ return serialize(xmlName, xmlType, objectValue, serContext, attributes);
+ }
+
+ /** 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 The attributes on this element
+ */
+ public abstract Result 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, Set<String> nsExtras, NamedNodeMap attributes, boolean normalize)
+ {
+ String xmlNameURI = xmlName.getNamespaceURI();
+ String localPart = xmlName.getLocalPart();
+
+ Map<String, String> namespaces = new HashMap<String, String>();
+
+ 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 + "'");
+
+ if (attrName.startsWith("xmlns:"))
+ {
+ String prefix = attrName.substring(6);
+ namespaces.put(attrValue, prefix);
+ }
+ }
+ }
+
+ String elName;
+ if (xmlNameURI.length() > 0)
+ {
+ xmlName = nsRegistry.registerQName(xmlName);
+ String prefix = xmlName.getPrefix();
+ elName = prefix + ":" + localPart;
+ if (namespaces.get(xmlNameURI) == null || !prefix.equals(namespaces.get(xmlNameURI)))
+ {
+ nsAttr.append(" xmlns:" + prefix + "='" + xmlNameURI + "'");
+ namespaces.put(xmlNameURI, prefix);
+ }
+ }
+ else
+ {
+ elName = localPart;
+ }
+
+ if (nsExtras != null)
+ {
+ for (String nsURI : nsExtras)
+ {
+ String prefix = nsRegistry.getPrefix(nsURI);
+ if (namespaces.get(nsURI) == null || !prefix.equals(namespaces.get(nsURI)))
+ {
+ nsAttr.append(" xmlns:" + prefix + "='" + nsURI + "'");
+ namespaces.put(nsURI, prefix);
+ }
+ }
+ }
+
+ String xmlFragment;
+ if (valueStr == null)
+ {
+ String xsins = "";
+ if (namespaces.get(Constants.NS_SCHEMA_XSI) == null || !Constants.PREFIX_XSI.equals(namespaces.get(xmlNameURI)))
+ {
+ xsins = " xmlns:" + Constants.PREFIX_XSI + "='" + Constants.NS_SCHEMA_XSI + "'";
+ namespaces.put(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
+ }
+
+ xmlFragment = "<" + elName + nsAttr + " " + Constants.PREFIX_XSI + ":nil='1'" + xsins + "/>";
+ }
+ 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
Copied: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java (from rev 3729, branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java)
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java (rev 0)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/binding/TypeMappingImpl.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -0,0 +1,744 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.core.binding;
+
+// $Id$
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.encoding.DeserializerFactory;
+import javax.xml.rpc.encoding.SerializerFactory;
+import javax.xml.rpc.encoding.TypeMapping;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
+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.HashCodeUtil;
+import org.jboss.wsf.spi.utils.JavaUtils;
+
+/**
+ * This is the representation of a type mapping.
+ * This TypeMapping implementation supports the literal encoding style.
+ *
+ * The TypeMapping instance maintains a tuple of the type
+ * {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Oct-2004
+ */
+public abstract class TypeMappingImpl implements TypeMapping
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(TypeMappingImpl.class);
+
+ // Map<KeyPair,FactoryPair>
+ private Map<KeyPair, FactoryPair> tupleMap = new LinkedHashMap<KeyPair, FactoryPair>();
+
+ private Map<Integer, List<KeyPair>> keyPairCache = new ConcurrentHashMap<Integer, List<KeyPair>>();
+
+ /**
+ * Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @return Registered DeserializerFactory or null if there is no registered factory
+ */
+ public DeserializerFactory getDeserializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
+ return (fPair != null ? fPair.getDeserializerFactory() : null);
+ }
+
+ /**
+ * Gets the SerializerFactory registered for the specified pair of Java type and XML data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @return Registered SerializerFactory or null if there is no registered factory
+ */
+ public SerializerFactory getSerializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
+ return (fPair != null ? fPair.getSerializerFactory() : null);
+ }
+
+ /**
+ * Returns the encodingStyle URIs (as String[]) supported by this TypeMapping instance.
+ * A TypeMapping that contains only encoding style independent serializers and deserializers
+ * returns null from this method.
+ *
+ * @return Array of encodingStyle URIs for the supported encoding styles
+ */
+ public abstract String[] getSupportedEncodings();
+
+ /**
+ * Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping that contains only encoding
+ * independent serializers and deserializers requires null as the parameter for this method.
+ *
+ * @param encodingStyleURIs Array of encodingStyle URIs for the supported encoding styles
+ */
+ public abstract void setSupportedEncodings(String[] encodingStyleURIs);
+
+ /**
+ * Checks whether or not type mapping between specified XML type and Java type is registered.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @return boolean; true if type mapping between the specified XML type and Java type is registered; otherwise false
+ */
+ public boolean isRegistered(Class javaType, QName xmlType)
+ {
+ return getFactoryPair(new IQName(xmlType), javaType) != null;
+ }
+
+ /**
+ * Registers SerializerFactory and DeserializerFactory for a specific type mapping between an XML type and Java type.
+ * This method replaces any existing registered SerializerFactory DeserializerFactory instances.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @param sf SerializerFactory
+ * @param df DeserializerFactory
+ * @throws javax.xml.rpc.JAXRPCException If any error during the registration
+ */
+ public void register(Class javaType, QName xmlType, SerializerFactory sf, DeserializerFactory df)
+ {
+ if (log.isTraceEnabled())
+ log.trace("register: TypeMappingImpl@" + hashCode() + " [xmlType=" + xmlType + ",javaType=" + javaType.getName() + ",sf=" + sf + ",df=" + df + "]");
+
+ registerInternal(javaType, new IQName(xmlType), sf, df);
+ keyPairCache.clear();
+ }
+
+ private void registerInternal(Class javaType, IQName xmlType, SerializerFactory sf, DeserializerFactory df)
+ {
+ if (javaType == null)
+ throw new IllegalArgumentException("javaType cannot be null for: " + xmlType);
+ if (xmlType == null)
+ throw new IllegalArgumentException("xmlType cannot be null for: " + javaType);
+
+ KeyPair kPair = new KeyPair(xmlType, javaType);
+ FactoryPair fPair = new FactoryPair(sf, df);
+ tupleMap.put(kPair, fPair);
+ }
+
+ /**
+ * Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered DeserializerFactory
+ */
+ public void removeDeserializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
+ if (fPair != null)
+ fPair.setDeserializerFactory(null);
+ }
+
+ /**
+ * Removes the SerializerFactory registered for the specified pair of Java type and XML data type.
+ * @param javaType Class of the Java type
+ * @param xmlType QName of the XML type
+ * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered SerializerFactory
+ */
+ public void removeSerializer(Class javaType, QName xmlType)
+ {
+ FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
+ if (fPair != null)
+ fPair.setSerializerFactory(null);
+ }
+
+ /** Get the list of registered XML types */
+ public List<QName> getRegisteredXmlTypes()
+ {
+ List<QName> types = new ArrayList<QName>();
+ for (KeyPair keyPair : getKeyPairs(null, null))
+ {
+ types.add(keyPair.getXmlType().toQName());
+ }
+ return types;
+ }
+
+ /** Get the list of registered Java types */
+ public List<Class> getRegisteredJavaTypes()
+ {
+ List<Class> types = new ArrayList<Class>();
+ for (KeyPair keyPair : getKeyPairs(null, null))
+ {
+ types.add(keyPair.getJavaType());
+ }
+ return types;
+ }
+
+ /** Get the Class that was registered last for this xmlType */
+ public Class getJavaType(QName xmlType)
+ {
+ Class javaType = null;
+
+ List keyPairList = getKeyPairs(new IQName(xmlType), null);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
+ javaType = kPair.getJavaType();
+ }
+
+ return javaType;
+ }
+
+ /**
+ * Get all of the Classes registered for this xmlType.
+ */
+ public List<Class> getJavaTypes(QName xmlType)
+ {
+ List<KeyPair> keyPairList = getKeyPairs( new IQName(xmlType), null);
+ List<Class> classes = new ArrayList<Class>(keyPairList.size());
+
+ for (KeyPair current : keyPairList)
+ {
+ classes.add(current.getJavaType());
+ }
+
+ return classes;
+ }
+
+ /**
+ * Get the Class that was registered last for this xmlType
+ * If there are two Java Types registered for the xmlType
+ * return the primitive type rather than the wrapper,
+ * if available
+ */
+ public Class getJavaType(QName xmlType,boolean getPrimitive)
+ {
+ //Lets get the primitive type if available
+ Class javaType = null;
+
+ List keyPairList = getKeyPairs(new IQName(xmlType), null);
+ int size = keyPairList.size();
+ if (size == 2 && getPrimitive)
+ {
+ KeyPair kPair1 = (KeyPair)keyPairList.get(0);
+ Class javaType1 = kPair1.getJavaType();
+ KeyPair kPair2 = (KeyPair)keyPairList.get(1);
+ Class javaType2 = kPair2.getJavaType();
+ if(javaType2.isPrimitive() && !javaType1.isPrimitive())
+ javaType = javaType2;
+ else
+ if(javaType1.isPrimitive() && !javaType2.isPrimitive())
+ javaType = javaType1;
+ else
+ javaType = javaType2; //Fallback on the most latest
+ }
+ else
+ return getJavaType(xmlType);
+
+ return javaType;
+ }
+
+ /** Get the Class name that was registered last for this xmlType */
+ public String getJavaTypeName(QName xmlType)
+ {
+ Class javaType = getJavaType(xmlType);
+ return (javaType != null ? javaType.getName() : null);
+ }
+
+ /** Get the QName that was registered last for this javaType */
+ public QName getXMLType(Class javaType)
+ {
+ QName xmlType = null;
+
+ List keyPairList = getKeyPairs(null, javaType);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
+ xmlType = kPair.getXmlType().toQName();
+ }
+
+ return xmlType;
+ }
+
+ /** Get the QNames that was registered last for this javaType */
+ public List<QName> getXMLTypes(Class javaType)
+ {
+ List<QName> xmlTypes = new ArrayList<QName>();
+
+ for (KeyPair kPair : getKeyPairs(null, javaType))
+ {
+ xmlTypes.add(kPair.getXmlType().toQName());
+ }
+ return xmlTypes;
+ }
+
+ /**
+ * Get the QName that was registered last for this javaType
+ * @param javaType class for which XML Type is needed
+ * @param tryAssignable If the xmlType is not registered for javaType
+ * should a base class type be checked?
+ *
+ */
+ public QName getXMLType(Class javaType, boolean tryAssignable)
+ {
+ if(tryAssignable) return getXMLType(javaType);
+
+ QName xmlType = null;
+
+ List keyPairList = getKeyPairs(null, javaType, tryAssignable);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
+ xmlType = kPair.getXmlType().toQName();
+ }
+
+ return xmlType;
+ }
+
+ /**
+ * Get the serializer/deserializer factory pair for the given xmlType, javaType
+ * Both xmlType, javaType may be null. In that case, this implementation still
+ * returns a FactoryPair if there is only one possible match.
+ *
+ * @param xmlType can be null
+ * @param javaType can be null
+ */
+ private List<KeyPair> getKeyPairs(IQName xmlType, Class javaType)
+ {
+ Integer cacheId = cacheIdFor(javaType, xmlType);
+
+ List<KeyPair> keyPairList = keyPairCache.get(cacheId);
+ if(null == keyPairList)
+ {
+ keyPairList = getKeyPairsInternal(xmlType, javaType);
+ keyPairCache.put(cacheId, keyPairList);
+ }
+
+ return keyPairList;
+ }
+
+ private Integer cacheIdFor(Class javaType, IQName xmlType) {
+ int result = HashCodeUtil.SEED;
+ int nullHash = HashCodeUtil.hash(result, "null");
+ result = javaType!= null ? HashCodeUtil.hash(result, javaType.getName()) : HashCodeUtil.hash(result, nullHash);
+ result = xmlType!= null ? HashCodeUtil.hash(result, xmlType.hashCode()): HashCodeUtil.hash(result, nullHash);
+ return new Integer(result);
+ }
+
+ private List<KeyPair> getKeyPairsInternal(IQName xmlType, Class javaType)
+ {
+ List<KeyPair> keyPairList = new ArrayList<KeyPair>();
+
+ // Getting the exact matching pair
+ if (xmlType != null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() == javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ // No exact match, try assignable
+ if (keyPairList.size() == 0)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()) && JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+ }
+
+ // Getting the pair for a given xmlType
+ else if (xmlType != null && javaType == null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the pair for a given javaType
+ else if (xmlType == null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (entry.getJavaType() == javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ // No exact match, try assignable
+ if (keyPairList.size() == 0)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+ }
+
+ // Getting the all pairs
+ else if (xmlType == null && javaType == null)
+ {
+ keyPairList.addAll(tupleMap.keySet());
+ }
+
+ return keyPairList;
+ }
+
+ private List<KeyPair> getKeyPairs(IQName xmlType, Class javaType, boolean tryAssignable)
+ {
+ Integer cacheId = cacheIdFor(javaType, xmlType);
+
+ List<KeyPair> keyPairList = keyPairCache.get(cacheId);
+ if(null == keyPairList)
+ {
+ keyPairList = getKeyPairsInternal(xmlType, javaType, tryAssignable);
+ keyPairCache.put(cacheId, keyPairList);
+ }
+
+ return keyPairList;
+ }
+
+ /**
+ * Get the serializer/deserializer factory pair for the given xmlType, javaType
+ * Both xmlType, javaType may be null. In that case, this implementation still
+ * returns a FactoryPair if there is only one possible match.
+ * <br>Note: This method does not try for the base class, if no keypair exists for the
+ * javaType in question.
+ */
+ private List<KeyPair> getKeyPairsInternal(IQName xmlType, Class javaType, boolean tryAssignable)
+ {
+ if(tryAssignable) return getKeyPairs( xmlType, javaType );
+
+ List<KeyPair> keyPairList = new ArrayList<KeyPair>();
+
+ // Getting the exact matching pair
+ if (xmlType != null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() == javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the pair for a given xmlType
+ else if (xmlType != null && javaType == null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (xmlType.equals(entry.getXmlType()))
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the pair for a given javaType
+ else if (xmlType == null && javaType != null)
+ {
+ for (KeyPair entry : tupleMap.keySet())
+ {
+ if (entry.getJavaType() == javaType)
+ {
+ keyPairList.add(entry);
+ }
+ }
+ }
+
+ // Getting the all pairs
+ else if (xmlType == null && javaType == null)
+ {
+ keyPairList.addAll(tupleMap.keySet());
+ }
+
+ return keyPairList;
+ }
+
+ /**
+ * Get the serializer/deserializer factory pair for the given xmlType, javaType
+ * Both xmlType, javaType may be null. In that case, this implementation still
+ * returns a FactoryPair that was last registered
+ */
+ private FactoryPair getFactoryPair(IQName xmlType, Class javaType)
+ {
+ FactoryPair fPair = null;
+
+ List<KeyPair> keyPairList = getKeyPairs(xmlType, javaType);
+ int size = keyPairList.size();
+ if (size > 0)
+ {
+ KeyPair kPair = keyPairList.get(size - 1);
+ fPair = (FactoryPair)tupleMap.get(kPair);
+ }
+
+ return fPair;
+ }
+
+ protected void registerStandardLiteralTypes()
+ {
+ register(BigDecimal.class, Constants.TYPE_LITERAL_DECIMAL, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(BigInteger.class, Constants.TYPE_LITERAL_POSITIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(BigInteger.class, Constants.TYPE_LITERAL_NEGATIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(BigInteger.class, Constants.TYPE_LITERAL_NONPOSITIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(BigInteger.class, Constants.TYPE_LITERAL_NONNEGATIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(BigInteger.class, Constants.TYPE_LITERAL_UNSIGNEDLONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(BigInteger.class, Constants.TYPE_LITERAL_INTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(Date.class, Constants.TYPE_LITERAL_DATETIME, new DateSerializerFactory(), new DateDeserializerFactory());
+
+ register(Calendar.class, Constants.TYPE_LITERAL_DATE, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
+ register(Calendar.class, Constants.TYPE_LITERAL_TIME, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
+ register(Calendar.class, Constants.TYPE_LITERAL_DATETIME, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
+
+ register(QName.class, Constants.TYPE_LITERAL_QNAME, new QNameSerializerFactory(), new QNameDeserializerFactory());
+
+ register(String.class, Constants.TYPE_LITERAL_ANYSIMPLETYPE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_DURATION, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_GDAY, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_GMONTH, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_GMONTHDAY, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_GYEAR, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_GYEARMONTH, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_ID, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_LANGUAGE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_NAME, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_NCNAME, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_NMTOKEN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_NORMALIZEDSTRING, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_TOKEN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(String.class, Constants.TYPE_LITERAL_STRING, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(String[].class, Constants.TYPE_LITERAL_NMTOKENS, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(URI.class, Constants.TYPE_LITERAL_ANYURI, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(byte.class, Constants.TYPE_LITERAL_BYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Byte.class, Constants.TYPE_LITERAL_BYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(Byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new HexSerializerFactory(), new HexDeserializerFactory());
+ register(byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new HexSerializerFactory(), new HexDeserializerFactory());
+
+ register(Byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new Base64SerializerFactory(), new Base64DeserializerFactory());
+ register(byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new Base64SerializerFactory(), new Base64DeserializerFactory());
+
+ register(double.class, Constants.TYPE_LITERAL_DOUBLE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Double.class, Constants.TYPE_LITERAL_DOUBLE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(float.class, Constants.TYPE_LITERAL_FLOAT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Float.class, Constants.TYPE_LITERAL_FLOAT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(int.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Integer.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(int.class, Constants.TYPE_LITERAL_INT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Integer.class, Constants.TYPE_LITERAL_INT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(long.class, Constants.TYPE_LITERAL_LONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Long.class, Constants.TYPE_LITERAL_LONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+
+ register(short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(short.class, Constants.TYPE_LITERAL_SHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ register(Short.class, Constants.TYPE_LITERAL_SHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
+ }
+
+ /** A tuple of the type {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
+ */
+ private static class KeyPair
+ {
+ private IQName xmlType;
+ private Class javaType;
+
+ public KeyPair(IQName xmlType, Class javaType)
+ {
+ this.javaType = javaType;
+ this.xmlType = xmlType;
+ }
+
+ public Class getJavaType()
+ {
+ return javaType;
+ }
+
+ public IQName getXmlType()
+ {
+ return xmlType;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (this == o) return true;
+ if (!(o instanceof KeyPair)) return false;
+
+ final KeyPair keyPair = (KeyPair)o;
+
+ if (!javaType.equals(keyPair.javaType)) return false;
+ if (!xmlType.equals(keyPair.xmlType)) return false;
+
+ return true;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = xmlType.hashCode();
+ result = 29 * result + javaType.hashCode();
+ return result;
+ }
+
+ public String toString()
+ {
+ return "[xmlType=" + xmlType + ",javaType=" + javaType.getName() + "]";
+ }
+ }
+
+ /** A tuple of the type {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
+ */
+ public static class FactoryPair
+ {
+ private SerializerFactory serializerFactory;
+ private DeserializerFactory deserializerFactory;
+
+ FactoryPair(SerializerFactory sf, DeserializerFactory df)
+ {
+ this.deserializerFactory = df;
+ this.serializerFactory = sf;
+ }
+
+ public DeserializerFactory getDeserializerFactory()
+ {
+ return deserializerFactory;
+ }
+
+ public SerializerFactory getSerializerFactory()
+ {
+ return serializerFactory;
+ }
+
+ public void setDeserializerFactory(DeserializerFactory df)
+ {
+ this.deserializerFactory = df;
+ }
+
+ public void setSerializerFactory(SerializerFactory sf)
+ {
+ this.serializerFactory = sf;
+ }
+ }
+
+ /**
+ * A duck typed QName that relies on internalized Strings.<p>
+ * Taken from the {@link javax.xml.namespace.QName} docs:<br>
+ * The value of a QName contains a Namespace URI, local part and prefix.
+ * The prefix is included in QName to retain lexical information when present in an XML input source.
+ * The prefix is NOT used in QName.equals(Object) or to compute the QName.hashCode().
+ * Equality and the hash code are defined using only the Namespace URI and local part.
+ * If not specified, the Namespace URI is set to "" (the empty string).
+ * If not specified, the prefix is set to "" (the empty string).
+ */
+ private final class IQName
+ {
+ public String namespace;
+ public String localPart;
+ public String prefix;
+ public int hash;
+
+ public IQName(QName name)
+ {
+ namespace = name.getNamespaceURI() != null ? name.getNamespaceURI().intern() : "".intern();
+ localPart = name.getLocalPart() != null ? name.getLocalPart().intern() : "".intern();
+ prefix = name.getPrefix() != null ? name.getPrefix().intern() : "".intern();
+ hash = name.hashCode();
+ }
+
+ public boolean equals(Object object) {
+ if(!(object instanceof IQName))
+ throw new IllegalArgumentException("Cannot compare IQName to " + object);
+
+ IQName iqn = (IQName)object;
+ return (iqn.namespace == this.namespace && iqn.localPart == this.localPart);
+ }
+
+ public QName toQName()
+ {
+ QName qname;
+
+ if(null == namespace)
+ qname = new QName(localPart);
+ else if(null == prefix)
+ qname = new QName(namespace, localPart);
+ else
+ qname = new QName(namespace, localPart, prefix);
+
+ return qname;
+ }
+
+ /**
+ * This implementation currently represents a QName as: "{" + Namespace URI + "}" + local part.
+ * If the Namespace URI .equals(""), only the local part is returned.
+ */
+ public String toString() {
+ String ns = "".equals(namespace) ? namespace : "{"+namespace+"}";
+ return ns+localPart;
+ }
+
+ public int hashCode()
+ {
+ return this.hash;
+ }
+ }
+}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/EncodedTypeMapping.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -34,6 +34,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.Base64DeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.Base64SerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.CalendarDeserializerFactory;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/LiteralTypeMapping.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -32,6 +32,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.ElementDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.ElementSerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -41,6 +41,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.soap.Style;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -48,12 +48,12 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPFaultException;
-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.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
@@ -124,7 +124,7 @@
Class javaType = faultMetaData.getJavaType();
// Get the deserializer from the type mapping
- DeserializerFactoryBase desFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(javaType, xmlType);
+ AbstractDeserializerFactory desFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(javaType, xmlType);
if (desFactory == null)
throw new JAXRPCException("Cannot obtain deserializer factory for: " + xmlType);
@@ -266,7 +266,7 @@
xmlName = nsRegistry.registerQName(xmlName);
// Get the serializer from the type mapping
- SerializerFactoryBase serFactory = (SerializerFactoryBase)typeMapping.getSerializer(javaType, xmlType);
+ AbstractSerializerFactory serFactory = (AbstractSerializerFactory)typeMapping.getSerializer(javaType, xmlType);
if (serFactory == null)
throw new JAXRPCException("Cannot obtain serializer factory for: " + xmlType);
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -29,7 +29,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingImpl.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,744 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.core.jaxrpc;
-
-// $Id$
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.DeserializerFactory;
-import javax.xml.rpc.encoding.SerializerFactory;
-import javax.xml.rpc.encoding.TypeMapping;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-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.HashCodeUtil;
-import org.jboss.wsf.spi.utils.JavaUtils;
-
-/**
- * This is the representation of a type mapping.
- * This TypeMapping implementation supports the literal encoding style.
- *
- * The TypeMapping instance maintains a tuple of the type
- * {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Oct-2004
- */
-public abstract class TypeMappingImpl implements TypeMapping
-{
- // provide logging
- private static final Logger log = Logger.getLogger(TypeMappingImpl.class);
-
- // Map<KeyPair,FactoryPair>
- private Map<KeyPair, FactoryPair> tupleMap = new LinkedHashMap<KeyPair, FactoryPair>();
-
- private Map<Integer, List<KeyPair>> keyPairCache = new ConcurrentHashMap<Integer, List<KeyPair>>();
-
- /**
- * Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @return Registered DeserializerFactory or null if there is no registered factory
- */
- public DeserializerFactory getDeserializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
- return (fPair != null ? fPair.getDeserializerFactory() : null);
- }
-
- /**
- * Gets the SerializerFactory registered for the specified pair of Java type and XML data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @return Registered SerializerFactory or null if there is no registered factory
- */
- public SerializerFactory getSerializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
- return (fPair != null ? fPair.getSerializerFactory() : null);
- }
-
- /**
- * Returns the encodingStyle URIs (as String[]) supported by this TypeMapping instance.
- * A TypeMapping that contains only encoding style independent serializers and deserializers
- * returns null from this method.
- *
- * @return Array of encodingStyle URIs for the supported encoding styles
- */
- public abstract String[] getSupportedEncodings();
-
- /**
- * Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping that contains only encoding
- * independent serializers and deserializers requires null as the parameter for this method.
- *
- * @param encodingStyleURIs Array of encodingStyle URIs for the supported encoding styles
- */
- public abstract void setSupportedEncodings(String[] encodingStyleURIs);
-
- /**
- * Checks whether or not type mapping between specified XML type and Java type is registered.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @return boolean; true if type mapping between the specified XML type and Java type is registered; otherwise false
- */
- public boolean isRegistered(Class javaType, QName xmlType)
- {
- return getFactoryPair(new IQName(xmlType), javaType) != null;
- }
-
- /**
- * Registers SerializerFactory and DeserializerFactory for a specific type mapping between an XML type and Java type.
- * This method replaces any existing registered SerializerFactory DeserializerFactory instances.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @param sf SerializerFactory
- * @param df DeserializerFactory
- * @throws javax.xml.rpc.JAXRPCException If any error during the registration
- */
- public void register(Class javaType, QName xmlType, SerializerFactory sf, DeserializerFactory df)
- {
- if (log.isTraceEnabled())
- log.trace("register: TypeMappingImpl@" + hashCode() + " [xmlType=" + xmlType + ",javaType=" + javaType.getName() + ",sf=" + sf + ",df=" + df + "]");
-
- registerInternal(javaType, new IQName(xmlType), sf, df);
- keyPairCache.clear();
- }
-
- private void registerInternal(Class javaType, IQName xmlType, SerializerFactory sf, DeserializerFactory df)
- {
- if (javaType == null)
- throw new IllegalArgumentException("javaType cannot be null for: " + xmlType);
- if (xmlType == null)
- throw new IllegalArgumentException("xmlType cannot be null for: " + javaType);
-
- KeyPair kPair = new KeyPair(xmlType, javaType);
- FactoryPair fPair = new FactoryPair(sf, df);
- tupleMap.put(kPair, fPair);
- }
-
- /**
- * Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered DeserializerFactory
- */
- public void removeDeserializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
- if (fPair != null)
- fPair.setDeserializerFactory(null);
- }
-
- /**
- * Removes the SerializerFactory registered for the specified pair of Java type and XML data type.
- * @param javaType Class of the Java type
- * @param xmlType QName of the XML type
- * @throws javax.xml.rpc.JAXRPCException If there is error in removing the registered SerializerFactory
- */
- public void removeSerializer(Class javaType, QName xmlType)
- {
- FactoryPair fPair = getFactoryPair(new IQName(xmlType), javaType);
- if (fPair != null)
- fPair.setSerializerFactory(null);
- }
-
- /** Get the list of registered XML types */
- public List<QName> getRegisteredXmlTypes()
- {
- List<QName> types = new ArrayList<QName>();
- for (KeyPair keyPair : getKeyPairs(null, null))
- {
- types.add(keyPair.getXmlType().toQName());
- }
- return types;
- }
-
- /** Get the list of registered Java types */
- public List<Class> getRegisteredJavaTypes()
- {
- List<Class> types = new ArrayList<Class>();
- for (KeyPair keyPair : getKeyPairs(null, null))
- {
- types.add(keyPair.getJavaType());
- }
- return types;
- }
-
- /** Get the Class that was registered last for this xmlType */
- public Class getJavaType(QName xmlType)
- {
- Class javaType = null;
-
- List keyPairList = getKeyPairs(new IQName(xmlType), null);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
- javaType = kPair.getJavaType();
- }
-
- return javaType;
- }
-
- /**
- * Get all of the Classes registered for this xmlType.
- */
- public List<Class> getJavaTypes(QName xmlType)
- {
- List<KeyPair> keyPairList = getKeyPairs( new IQName(xmlType), null);
- List<Class> classes = new ArrayList<Class>(keyPairList.size());
-
- for (KeyPair current : keyPairList)
- {
- classes.add(current.getJavaType());
- }
-
- return classes;
- }
-
- /**
- * Get the Class that was registered last for this xmlType
- * If there are two Java Types registered for the xmlType
- * return the primitive type rather than the wrapper,
- * if available
- */
- public Class getJavaType(QName xmlType,boolean getPrimitive)
- {
- //Lets get the primitive type if available
- Class javaType = null;
-
- List keyPairList = getKeyPairs(new IQName(xmlType), null);
- int size = keyPairList.size();
- if (size == 2 && getPrimitive)
- {
- KeyPair kPair1 = (KeyPair)keyPairList.get(0);
- Class javaType1 = kPair1.getJavaType();
- KeyPair kPair2 = (KeyPair)keyPairList.get(1);
- Class javaType2 = kPair2.getJavaType();
- if(javaType2.isPrimitive() && !javaType1.isPrimitive())
- javaType = javaType2;
- else
- if(javaType1.isPrimitive() && !javaType2.isPrimitive())
- javaType = javaType1;
- else
- javaType = javaType2; //Fallback on the most latest
- }
- else
- return getJavaType(xmlType);
-
- return javaType;
- }
-
- /** Get the Class name that was registered last for this xmlType */
- public String getJavaTypeName(QName xmlType)
- {
- Class javaType = getJavaType(xmlType);
- return (javaType != null ? javaType.getName() : null);
- }
-
- /** Get the QName that was registered last for this javaType */
- public QName getXMLType(Class javaType)
- {
- QName xmlType = null;
-
- List keyPairList = getKeyPairs(null, javaType);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
- xmlType = kPair.getXmlType().toQName();
- }
-
- return xmlType;
- }
-
- /** Get the QNames that was registered last for this javaType */
- public List<QName> getXMLTypes(Class javaType)
- {
- List<QName> xmlTypes = new ArrayList<QName>();
-
- for (KeyPair kPair : getKeyPairs(null, javaType))
- {
- xmlTypes.add(kPair.getXmlType().toQName());
- }
- return xmlTypes;
- }
-
- /**
- * Get the QName that was registered last for this javaType
- * @param javaType class for which XML Type is needed
- * @param tryAssignable If the xmlType is not registered for javaType
- * should a base class type be checked?
- *
- */
- public QName getXMLType(Class javaType, boolean tryAssignable)
- {
- if(tryAssignable) return getXMLType(javaType);
-
- QName xmlType = null;
-
- List keyPairList = getKeyPairs(null, javaType, tryAssignable);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = (KeyPair)keyPairList.get(size - 1);
- xmlType = kPair.getXmlType().toQName();
- }
-
- return xmlType;
- }
-
- /**
- * Get the serializer/deserializer factory pair for the given xmlType, javaType
- * Both xmlType, javaType may be null. In that case, this implementation still
- * returns a FactoryPair if there is only one possible match.
- *
- * @param xmlType can be null
- * @param javaType can be null
- */
- private List<KeyPair> getKeyPairs(IQName xmlType, Class javaType)
- {
- Integer cacheId = cacheIdFor(javaType, xmlType);
-
- List<KeyPair> keyPairList = keyPairCache.get(cacheId);
- if(null == keyPairList)
- {
- keyPairList = getKeyPairsInternal(xmlType, javaType);
- keyPairCache.put(cacheId, keyPairList);
- }
-
- return keyPairList;
- }
-
- private Integer cacheIdFor(Class javaType, IQName xmlType) {
- int result = HashCodeUtil.SEED;
- int nullHash = HashCodeUtil.hash(result, "null");
- result = javaType!= null ? HashCodeUtil.hash(result, javaType.getName()) : HashCodeUtil.hash(result, nullHash);
- result = xmlType!= null ? HashCodeUtil.hash(result, xmlType.hashCode()): HashCodeUtil.hash(result, nullHash);
- return new Integer(result);
- }
-
- private List<KeyPair> getKeyPairsInternal(IQName xmlType, Class javaType)
- {
- List<KeyPair> keyPairList = new ArrayList<KeyPair>();
-
- // Getting the exact matching pair
- if (xmlType != null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() == javaType)
- {
- keyPairList.add(entry);
- }
- }
- // No exact match, try assignable
- if (keyPairList.size() == 0)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()) && JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
- {
- keyPairList.add(entry);
- }
- }
- }
- }
-
- // Getting the pair for a given xmlType
- else if (xmlType != null && javaType == null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()))
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the pair for a given javaType
- else if (xmlType == null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (entry.getJavaType() == javaType)
- {
- keyPairList.add(entry);
- }
- }
- // No exact match, try assignable
- if (keyPairList.size() == 0)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (JavaUtils.isAssignableFrom(entry.getJavaType(), javaType))
- {
- keyPairList.add(entry);
- }
- }
- }
- }
-
- // Getting the all pairs
- else if (xmlType == null && javaType == null)
- {
- keyPairList.addAll(tupleMap.keySet());
- }
-
- return keyPairList;
- }
-
- private List<KeyPair> getKeyPairs(IQName xmlType, Class javaType, boolean tryAssignable)
- {
- Integer cacheId = cacheIdFor(javaType, xmlType);
-
- List<KeyPair> keyPairList = keyPairCache.get(cacheId);
- if(null == keyPairList)
- {
- keyPairList = getKeyPairsInternal(xmlType, javaType, tryAssignable);
- keyPairCache.put(cacheId, keyPairList);
- }
-
- return keyPairList;
- }
-
- /**
- * Get the serializer/deserializer factory pair for the given xmlType, javaType
- * Both xmlType, javaType may be null. In that case, this implementation still
- * returns a FactoryPair if there is only one possible match.
- * <br>Note: This method does not try for the base class, if no keypair exists for the
- * javaType in question.
- */
- private List<KeyPair> getKeyPairsInternal(IQName xmlType, Class javaType, boolean tryAssignable)
- {
- if(tryAssignable) return getKeyPairs( xmlType, javaType );
-
- List<KeyPair> keyPairList = new ArrayList<KeyPair>();
-
- // Getting the exact matching pair
- if (xmlType != null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()) && entry.getJavaType() == javaType)
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the pair for a given xmlType
- else if (xmlType != null && javaType == null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (xmlType.equals(entry.getXmlType()))
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the pair for a given javaType
- else if (xmlType == null && javaType != null)
- {
- for (KeyPair entry : tupleMap.keySet())
- {
- if (entry.getJavaType() == javaType)
- {
- keyPairList.add(entry);
- }
- }
- }
-
- // Getting the all pairs
- else if (xmlType == null && javaType == null)
- {
- keyPairList.addAll(tupleMap.keySet());
- }
-
- return keyPairList;
- }
-
- /**
- * Get the serializer/deserializer factory pair for the given xmlType, javaType
- * Both xmlType, javaType may be null. In that case, this implementation still
- * returns a FactoryPair that was last registered
- */
- private FactoryPair getFactoryPair(IQName xmlType, Class javaType)
- {
- FactoryPair fPair = null;
-
- List<KeyPair> keyPairList = getKeyPairs(xmlType, javaType);
- int size = keyPairList.size();
- if (size > 0)
- {
- KeyPair kPair = keyPairList.get(size - 1);
- fPair = (FactoryPair)tupleMap.get(kPair);
- }
-
- return fPair;
- }
-
- protected void registerStandardLiteralTypes()
- {
- register(BigDecimal.class, Constants.TYPE_LITERAL_DECIMAL, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(BigInteger.class, Constants.TYPE_LITERAL_POSITIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(BigInteger.class, Constants.TYPE_LITERAL_NEGATIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(BigInteger.class, Constants.TYPE_LITERAL_NONPOSITIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(BigInteger.class, Constants.TYPE_LITERAL_NONNEGATIVEINTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(BigInteger.class, Constants.TYPE_LITERAL_UNSIGNEDLONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(BigInteger.class, Constants.TYPE_LITERAL_INTEGER, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(Date.class, Constants.TYPE_LITERAL_DATETIME, new DateSerializerFactory(), new DateDeserializerFactory());
-
- register(Calendar.class, Constants.TYPE_LITERAL_DATE, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
- register(Calendar.class, Constants.TYPE_LITERAL_TIME, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
- register(Calendar.class, Constants.TYPE_LITERAL_DATETIME, new CalendarSerializerFactory(), new CalendarDeserializerFactory());
-
- register(QName.class, Constants.TYPE_LITERAL_QNAME, new QNameSerializerFactory(), new QNameDeserializerFactory());
-
- register(String.class, Constants.TYPE_LITERAL_ANYSIMPLETYPE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_DURATION, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_GDAY, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_GMONTH, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_GMONTHDAY, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_GYEAR, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_GYEARMONTH, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_ID, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_LANGUAGE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_NAME, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_NCNAME, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_NMTOKEN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_NORMALIZEDSTRING, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_TOKEN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(String.class, Constants.TYPE_LITERAL_STRING, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(String[].class, Constants.TYPE_LITERAL_NMTOKENS, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(URI.class, Constants.TYPE_LITERAL_ANYURI, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Boolean.class, Constants.TYPE_LITERAL_BOOLEAN, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(byte.class, Constants.TYPE_LITERAL_BYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Byte.class, Constants.TYPE_LITERAL_BYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(Byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new HexSerializerFactory(), new HexDeserializerFactory());
- register(byte[].class, Constants.TYPE_LITERAL_HEXBINARY, new HexSerializerFactory(), new HexDeserializerFactory());
-
- register(Byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new Base64SerializerFactory(), new Base64DeserializerFactory());
- register(byte[].class, Constants.TYPE_LITERAL_BASE64BINARY, new Base64SerializerFactory(), new Base64DeserializerFactory());
-
- register(double.class, Constants.TYPE_LITERAL_DOUBLE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Double.class, Constants.TYPE_LITERAL_DOUBLE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(float.class, Constants.TYPE_LITERAL_FLOAT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Float.class, Constants.TYPE_LITERAL_FLOAT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(int.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Integer.class, Constants.TYPE_LITERAL_UNSIGNEDSHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(int.class, Constants.TYPE_LITERAL_INT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Integer.class, Constants.TYPE_LITERAL_INT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Long.class, Constants.TYPE_LITERAL_UNSIGNEDINT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(long.class, Constants.TYPE_LITERAL_LONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Long.class, Constants.TYPE_LITERAL_LONG, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
-
- register(short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Short.class, Constants.TYPE_LITERAL_UNSIGNEDBYTE, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(short.class, Constants.TYPE_LITERAL_SHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- register(Short.class, Constants.TYPE_LITERAL_SHORT, new SimpleSerializerFactory(), new SimpleDeserializerFactory());
- }
-
- /** A tuple of the type {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
- */
- private static class KeyPair
- {
- private IQName xmlType;
- private Class javaType;
-
- public KeyPair(IQName xmlType, Class javaType)
- {
- this.javaType = javaType;
- this.xmlType = xmlType;
- }
-
- public Class getJavaType()
- {
- return javaType;
- }
-
- public IQName getXmlType()
- {
- return xmlType;
- }
-
- public boolean equals(Object o)
- {
- if (this == o) return true;
- if (!(o instanceof KeyPair)) return false;
-
- final KeyPair keyPair = (KeyPair)o;
-
- if (!javaType.equals(keyPair.javaType)) return false;
- if (!xmlType.equals(keyPair.xmlType)) return false;
-
- return true;
- }
-
- public int hashCode()
- {
- int result;
- result = xmlType.hashCode();
- result = 29 * result + javaType.hashCode();
- return result;
- }
-
- public String toString()
- {
- return "[xmlType=" + xmlType + ",javaType=" + javaType.getName() + "]";
- }
- }
-
- /** A tuple of the type {XML typeQName, Java Class, SerializerFactory, DeserializerFactory}.
- */
- public static class FactoryPair
- {
- private SerializerFactory serializerFactory;
- private DeserializerFactory deserializerFactory;
-
- FactoryPair(SerializerFactory sf, DeserializerFactory df)
- {
- this.deserializerFactory = df;
- this.serializerFactory = sf;
- }
-
- public DeserializerFactory getDeserializerFactory()
- {
- return deserializerFactory;
- }
-
- public SerializerFactory getSerializerFactory()
- {
- return serializerFactory;
- }
-
- public void setDeserializerFactory(DeserializerFactory df)
- {
- this.deserializerFactory = df;
- }
-
- public void setSerializerFactory(SerializerFactory sf)
- {
- this.serializerFactory = sf;
- }
- }
-
- /**
- * A duck typed QName that relies on internalized Strings.<p>
- * Taken from the {@link javax.xml.namespace.QName} docs:<br>
- * The value of a QName contains a Namespace URI, local part and prefix.
- * The prefix is included in QName to retain lexical information when present in an XML input source.
- * The prefix is NOT used in QName.equals(Object) or to compute the QName.hashCode().
- * Equality and the hash code are defined using only the Namespace URI and local part.
- * If not specified, the Namespace URI is set to "" (the empty string).
- * If not specified, the prefix is set to "" (the empty string).
- */
- private final class IQName
- {
- public String namespace;
- public String localPart;
- public String prefix;
- public int hash;
-
- public IQName(QName name)
- {
- namespace = name.getNamespaceURI() != null ? name.getNamespaceURI().intern() : "".intern();
- localPart = name.getLocalPart() != null ? name.getLocalPart().intern() : "".intern();
- prefix = name.getPrefix() != null ? name.getPrefix().intern() : "".intern();
- hash = name.hashCode();
- }
-
- public boolean equals(Object object) {
- if(!(object instanceof IQName))
- throw new IllegalArgumentException("Cannot compare IQName to " + object);
-
- IQName iqn = (IQName)object;
- return (iqn.namespace == this.namespace && iqn.localPart == this.localPart);
- }
-
- public QName toQName()
- {
- QName qname;
-
- if(null == namespace)
- qname = new QName(localPart);
- else if(null == prefix)
- qname = new QName(namespace, localPart);
- else
- qname = new QName(namespace, localPart, prefix);
-
- return qname;
- }
-
- /**
- * This implementation currently represents a QName as: "{" + Namespace URI + "}" + local part.
- * If the Namespace URI .equals(""), only the local part is returned.
- */
- public String toString() {
- String ns = "".equals(namespace) ? namespace : "{"+namespace+"}";
- return ns+localPart;
- }
-
- public int hashCode()
- {
- return this.hash;
- }
- }
-}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/TypeMappingRegistryImpl.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -32,6 +32,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.binding.TypeMappingImpl;
/**
* This defines a registry of TypeMapping instances for encoding styles.
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,6 +30,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.extensions.xop.jaxrpc.XOPUnmarshallerImpl;
import org.jboss.wsf.spi.utils.DOMUtils;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64DeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class Base64DeserializerFactory extends DeserializerFactoryBase
+public class Base64DeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,6 +27,10 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.extensions.xop.jaxrpc.XOPMarshallerImpl;
import org.jboss.wsf.spi.utils.JavaUtils;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64SerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class Base64SerializerFactory extends SerializerFactoryBase
+public class Base64SerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BindingException.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,92 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.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/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/BufferedStreamResult.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.jaxrpc.binding;
-
-// $Id: $
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.Writer;
-
-import javax.xml.transform.stream.StreamResult;
-
-import org.jboss.ws.WSException;
-import org.jboss.wsf.spi.utils.IOUtils;
-
-/**
- * @author Heiko.Braun(a)jboss.org
- * @author Thomas.Diesler(a)jboss.org
- * @since 06.02.2007
- */
-public class BufferedStreamResult extends StreamResult
-{
- ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
-
- public BufferedStreamResult()
- {
- }
-
- public BufferedStreamResult(String xmlFragment)
- {
- try
- {
- IOUtils.copyStream(getOutputStream(), new ByteArrayInputStream(xmlFragment.getBytes()));
- }
- catch (IOException e)
- {
- WSException.rethrow(e);
- }
- }
-
- @Override
- public Writer getWriter()
- {
- return null;
- }
-
- @Override
- public OutputStream getOutputStream()
- {
- return baos;
- }
-
- @Override
- public void setWriter(Writer writer)
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setOutputStream(OutputStream outputStream)
- {
- throw new UnsupportedOperationException();
- }
-
- public String toString()
- {
- return baos.toString();
- }
-}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,6 +30,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.xb.binding.SimpleTypeBindings;
/**
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class CalendarDeserializerFactory extends DeserializerFactoryBase
+public class CalendarDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,6 +30,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -29,7 +32,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class CalendarSerializerFactory extends SerializerFactoryBase
+public class CalendarSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.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
-{
-
-}
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ComplexTypeSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.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
-{
-
-}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,6 +30,9 @@
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.xb.binding.SimpleTypeBindings;
/**
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class DateDeserializerFactory extends DeserializerFactoryBase
+public class DateDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -31,6 +31,10 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class DateSerializerFactory extends SerializerFactoryBase
+public class DateSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerFactoryBase.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,50 +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.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();
- }
-}
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DeserializerSupport.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,160 +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.binding;
-
-// $Id$
-
-import java.io.ByteArrayOutputStream;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.Deserializer;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.soap.SOAPContentElement;
-import org.jboss.ws.core.utils.XMLPredefinedEntityReferenceResolver;
-import org.jboss.wsf.spi.utils.DOMWriter;
-import org.w3c.dom.Node;
-
-/** The base class for all Deserializers.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 04-Dec-2004
- */
-public abstract class DeserializerSupport implements Deserializer
-{
- private static final Logger log = Logger.getLogger(DeserializerSupport.class);
-
- public Object deserialize(SOAPContentElement soapElement, SerializationContext serContext) throws BindingException
- {
- QName xmlName = soapElement.getElementQName();
- QName xmlType = soapElement.getXmlType();
-
- Source source = soapElement.getXMLFragment().getSource();
- return deserialize(xmlName, xmlType, source, serContext);
- }
-
- /** 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, Source xmlFragment, SerializationContext serContext) throws BindingException;
-
- // TODO: remove when JBossXB supports unmarshall(Source)
- // http://jira.jboss.org/jira/browse/JBXB-100
- protected static String sourceToString(Source source)
- {
- String xmlFragment = null;
- try
- {
- if (source instanceof DOMSource)
- {
- Node node = ((DOMSource)source).getNode();
- xmlFragment = DOMWriter.printNode(node, false);
- }
- else
- {
- // Note, this code will not handler namespaces correctly that
- // are defined on a parent of the DOMSource
- //
- // <env:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- // <env:Body>
- // <myMethod>
- // <param xsi:type='xsd:string'>Hello World!</param>
- // </myMethod>
- // </env:Body>
- // </env:Envelope>
- //
- TransformerFactory tf = TransformerFactory.newInstance();
- ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
- StreamResult streamResult = new StreamResult(baos);
- tf.newTransformer().transform(source, streamResult);
- xmlFragment = new String(baos.toByteArray());
- if (xmlFragment.startsWith("<?xml"))
- {
- int index = xmlFragment.indexOf(">");
- xmlFragment = xmlFragment.substring(index + 1);
- }
- }
- }
- catch (TransformerException e)
- {
- WSException.rethrow(e);
- }
-
- return xmlFragment;
- }
-
- /** 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();
- }
-}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,6 +27,9 @@
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 18-Oct-2004
*/
-public class ElementDeserializerFactory extends DeserializerFactoryBase
+public class ElementDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,6 +27,10 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.wsf.spi.utils.DOMWriter;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
/**
@@ -30,7 +33,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 23-Jun-2005
*/
-public class ElementSerializerFactory extends SerializerFactoryBase
+public class ElementSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,6 +27,9 @@
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.xb.binding.SimpleTypeBindings;
/**
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class HexDeserializerFactory extends DeserializerFactoryBase
+public class HexDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,6 +27,10 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.wsf.spi.utils.JavaUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class HexSerializerFactory extends SerializerFactoryBase
+public class HexSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,6 +30,9 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.ComplexTypeDeserializer;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshaller;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
/**
@@ -31,7 +35,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JBossXBDeserializerFactory extends DeserializerFactoryBase
+public class JBossXBDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer() throws BindingException
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -31,6 +31,10 @@
import org.apache.xerces.xs.XSModel;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.ComplexTypeSerializer;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshaller;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -32,7 +36,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JBossXBSerializerFactory extends SerializerFactoryBase
+public class JBossXBSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer() throws BindingException
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -28,6 +28,10 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.xb.binding.NamespaceRegistry;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -29,6 +29,9 @@
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -29,7 +32,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class QNameDeserializerFactory extends DeserializerFactoryBase
+public class QNameDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,6 +30,10 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class QNameSerializerFactory extends SerializerFactoryBase
+public class QNameSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -35,7 +35,11 @@
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.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.jboss.wsf.spi.utils.JavaUtils;
@@ -78,11 +82,11 @@
Object[] retArray = (Object[])Array.newInstance(compJavaType, arrDims);
TypeMappingImpl typeMapping = serContext.getTypeMapping();
- DeserializerFactoryBase compDeserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(compJavaType, compXmlType);
+ AbstractDeserializerFactory compDeserializerFactory = (AbstractDeserializerFactory)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);
+ compDeserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(null, compXmlType);
}
if (compDeserializerFactory == null)
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
/**
@@ -30,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 31-Oct-2005
*/
-public class SOAPArrayDeserializerFactory extends DeserializerFactoryBase
+public class SOAPArrayDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer() throws BindingException
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -29,7 +29,12 @@
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.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.soap.NameImpl;
import org.jboss.ws.core.soap.SOAPContentElement;
import org.jboss.ws.core.soap.XMLFragment;
@@ -101,11 +106,11 @@
// Get the component type serializer factory
log.debug("Get component serializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
- SerializerFactoryBase compSerializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(compJavaType, compXmlType);
+ AbstractSerializerFactory compSerializerFactory = (AbstractSerializerFactory)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);
+ compSerializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(null, compXmlType);
}
if (compSerializerFactory == null)
throw new WSException("Cannot obtain component serializer for: " + compXmlType);
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArraySerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,11 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -31,7 +35,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 31-Oct-2005
*/
-public class SOAPArraySerializerFactory extends SerializerFactoryBase
+public class SOAPArraySerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer() throws BindingException
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -28,6 +28,9 @@
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.w3c.dom.Element;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 18-Oct-2004
*/
-public class SOAPElementDeserializerFactory extends DeserializerFactoryBase
+public class SOAPElementDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -28,6 +28,10 @@
import javax.xml.transform.Result;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.wsf.spi.utils.DOMWriter;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
/**
@@ -30,7 +33,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 23-Jun-2005
*/
-public class SOAPElementSerializerFactory extends SerializerFactoryBase
+public class SOAPElementSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializationContext.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.core.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
-{
- public static final String CONTEXT_TYPES = "org.jboss.ws.jaxrpc.binding.contextTypes";
-
- private Class javaType;
-
- 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;
- }
-
- public Class getJavaType()
- {
- return javaType;
- }
-
- public void setJavaType(Class javaType)
- {
- this.javaType = javaType;
- }
-}
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerFactoryBase.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,50 +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.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();
- }
-}
Deleted: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SerializerSupport.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -1,209 +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.binding;
-
-// $Id$
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.namespace.QName;
-import javax.xml.rpc.encoding.Serializer;
-import javax.xml.transform.Result;
-
-import org.jboss.util.NotImplementedException;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.soap.SOAPContentElement;
-import org.jboss.wsf.spi.utils.IOUtils;
-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
-{
-
- public Result serialize(SOAPContentElement soapElement, SerializationContext serContext) throws BindingException
- {
- QName xmlName = soapElement.getElementQName();
- QName xmlType = soapElement.getXmlType();
- NamedNodeMap attributes = soapElement.getAttributes();
- Object objectValue = soapElement.getObjectValue();
- return serialize(xmlName, xmlType, objectValue, serContext, attributes);
- }
-
- /** 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 The attributes on this element
- */
- public abstract Result 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, Set<String> nsExtras, NamedNodeMap attributes, boolean normalize)
- {
- String xmlNameURI = xmlName.getNamespaceURI();
- String localPart = xmlName.getLocalPart();
-
- Map<String, String> namespaces = new HashMap<String, String>();
-
- 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 + "'");
-
- if (attrName.startsWith("xmlns:"))
- {
- String prefix = attrName.substring(6);
- namespaces.put(attrValue, prefix);
- }
- }
- }
-
- String elName;
- if (xmlNameURI.length() > 0)
- {
- xmlName = nsRegistry.registerQName(xmlName);
- String prefix = xmlName.getPrefix();
- elName = prefix + ":" + localPart;
- if (namespaces.get(xmlNameURI) == null || !prefix.equals(namespaces.get(xmlNameURI)))
- {
- nsAttr.append(" xmlns:" + prefix + "='" + xmlNameURI + "'");
- namespaces.put(xmlNameURI, prefix);
- }
- }
- else
- {
- elName = localPart;
- }
-
- if (nsExtras != null)
- {
- for (String nsURI : nsExtras)
- {
- String prefix = nsRegistry.getPrefix(nsURI);
- if (namespaces.get(nsURI) == null || !prefix.equals(namespaces.get(nsURI)))
- {
- nsAttr.append(" xmlns:" + prefix + "='" + nsURI + "'");
- namespaces.put(nsURI, prefix);
- }
- }
- }
-
- String xmlFragment;
- if (valueStr == null)
- {
- String xsins = "";
- if (namespaces.get(Constants.NS_SCHEMA_XSI) == null || !Constants.PREFIX_XSI.equals(namespaces.get(xmlNameURI)))
- {
- xsins = " xmlns:" + Constants.PREFIX_XSI + "='" + Constants.NS_SCHEMA_XSI + "'";
- namespaces.put(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
- }
-
- xmlFragment = "<" + elName + nsAttr + " " + Constants.PREFIX_XSI + ":nil='1'" + xsins + "/>";
- }
- 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
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,6 +27,9 @@
import javax.xml.transform.Source;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.xb.binding.SimpleTypeBindings;
/**
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 18-Oct-2004
*/
-public class SimpleDeserializerFactory extends DeserializerFactoryBase
+public class SimpleDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -28,6 +28,10 @@
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.xb.binding.NamespaceRegistry;
import org.jboss.xb.binding.SimpleTypeBindings;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,7 +21,10 @@
*/
package org.jboss.ws.core.jaxrpc.binding;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+
// $Id$
@@ -31,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 18-Oct-2004
*/
-public class SimpleSerializerFactory extends SerializerFactoryBase
+public class SimpleSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer()
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -52,8 +52,8 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.WSTimeoutException;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.SchemaGenerator;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.UnqualifiedCallParameter;
import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -32,8 +32,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -32,10 +32,10 @@
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-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.core.binding.BindingException;
+import org.jboss.ws.core.binding.ComplexTypeDeserializer;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.extensions.xop.jaxws.AttachmentUnmarshallerImpl;
/**
@@ -60,7 +60,7 @@
Object value = null;
try
{
- Class[] javaTypes = (Class[])serContext.getProperty(SerializationContext.CONTEXT_TYPES);
+ Class[] javaTypes = (Class[])serContext.getProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES);
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,9 +21,9 @@
*/
package org.jboss.ws.core.jaxws;
-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.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
// $Id$
@@ -34,7 +34,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JAXBDeserializerFactory extends DeserializerFactoryBase
+public class JAXBDeserializerFactory extends AbstractDeserializerFactory
{
public DeserializerSupport getDeserializer() throws BindingException
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializer.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -32,10 +32,10 @@
import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
-import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
-import org.jboss.ws.core.jaxrpc.binding.ComplexTypeSerializer;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.ComplexTypeSerializer;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.extensions.xop.jaxws.AttachmentMarshallerImpl;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBSerializerFactory.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -21,9 +21,9 @@
*/
package org.jboss.ws.core.jaxws;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
-import org.jboss.ws.core.jaxrpc.binding.SerializerFactoryBase;
-import org.jboss.ws.core.jaxrpc.binding.SerializerSupport;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
// $Id$
@@ -35,7 +35,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Dec-2004
*/
-public class JAXBSerializerFactory extends SerializerFactoryBase
+public class JAXBSerializerFactory extends AbstractSerializerFactory
{
public SerializerSupport getSerializer() throws BindingException
{
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -36,13 +36,13 @@
import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPFaultException;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
-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.NameImpl;
import org.jboss.ws.core.soap.SOAPFactoryImpl;
@@ -92,7 +92,7 @@
Class<?> faultBeanClass = faultMetaData.getFaultBean();
// Get the deserializer from the type mapping
- DeserializerFactoryBase desFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(faultBeanClass, xmlType);
+ AbstractDeserializerFactory desFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(faultBeanClass, xmlType);
if (desFactory == null)
throw new WebServiceException("Cannot obtain deserializer factory: xmlType=" + xmlType + ", javaType=" + faultBeanClass);
@@ -119,7 +119,7 @@
try
{
Class[] types = opMetaData.getEndpointMetaData().getRegisteredTypes().toArray(new Class[0]);
- serContext.setProperty(SerializationContext.CONTEXT_TYPES, types);
+ serContext.setProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES, types);
Source source = new DOMSource(deElement);
DeserializerSupport des = (DeserializerSupport)desFactory.getDeserializer();
@@ -304,7 +304,7 @@
QName xmlType = faultMetaData.getXmlType();
Class javaType = faultMetaData.getFaultBean();
serContext.setJavaType(javaType);
- SerializerFactoryBase serFactory = (SerializerFactoryBase)serContext.getTypeMapping().getSerializer(javaType, xmlType);
+ AbstractSerializerFactory serFactory = (AbstractSerializerFactory)serContext.getTypeMapping().getSerializer(javaType, xmlType);
if (serFactory == null)
throw new WebServiceException("Cannot obtain serializer factory: xmlType=" + xmlType + ", javaType=" + javaType);
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SerializationContextJAXWS.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -24,7 +24,7 @@
// $Id$
import org.jboss.logging.Logger;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializationContext;
/**
* The serialization context for JAXWS endpoints/clients
@@ -36,5 +36,6 @@
{
// provide logging
private static final Logger log = Logger.getLogger(SerializationContextJAXWS.class);
-
+
+ public static final String JAXB_CONTEXT_TYPES = "org.jboss.ws.jaxb.context.types";
}
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -40,7 +40,7 @@
import org.jboss.ws.core.HTTPMessageImpl;
import org.jboss.ws.core.HeaderSource;
import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -37,7 +37,7 @@
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.HeaderSource;
import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -42,7 +42,7 @@
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.HeaderSource;
import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchHTTPBinding.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchHTTPBinding.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchHTTPBinding.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -26,7 +26,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.HTTPMessageImpl;
import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.BufferedStreamResult;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -27,7 +27,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
+import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/DelegatingInvocation.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,7 +30,7 @@
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.spi.invocation.BasicEndpointInvocation;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerEJB21.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -29,7 +29,7 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.EndpointInvocation;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/ObjectContent.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -30,12 +30,12 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.binding.BindingException;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.binding.TypeMappingImpl;
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.wsf.spi.utils.JavaUtils;
/**
@@ -148,7 +148,7 @@
SerializerSupport ser;
if (objectValue != null)
{
- SerializerFactoryBase serializerFactory = getSerializerFactory(typeMapping, javaType, xmlType);
+ AbstractSerializerFactory serializerFactory = getSerializerFactory(typeMapping, javaType, xmlType);
ser = (SerializerSupport)serializerFactory.getSerializer();
}
else
@@ -172,9 +172,9 @@
/**
* Get the serializer factory for a given javaType and xmlType
*/
- private SerializerFactoryBase getSerializerFactory(TypeMappingImpl typeMapping, Class javaType, QName xmlType)
+ private AbstractSerializerFactory getSerializerFactory(TypeMappingImpl typeMapping, Class javaType, QName xmlType)
{
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(javaType, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(javaType, xmlType);
// The type mapping might contain a mapping for the array wrapper bean
if (serializerFactory == null && javaType.isArray())
@@ -188,7 +188,7 @@
Class returnType = toArrayMethod.getReturnType();
if (JavaUtils.isAssignableFrom(javaType, returnType))
{
- serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(arrayWrapperType, xmlType);
+ serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(arrayWrapperType, xmlType);
}
}
catch (NoSuchMethodException e)
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLContent.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLContent.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -41,11 +41,12 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
-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.binding.BindingException;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.TypeMappingImpl;
+import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.core.utils.MimeUtils;
import org.jboss.ws.extensions.xop.XOPContext;
@@ -167,13 +168,13 @@
serContext.setProperty(ParameterMetaData.class.getName(), pmd);
serContext.setJavaType(javaType);
List<Class> registeredTypes = opMetaData.getEndpointMetaData().getRegisteredTypes();
- serContext.setProperty(SerializationContext.CONTEXT_TYPES, registeredTypes.toArray(new Class[0]));
+ serContext.setProperty(SerializationContextJAXWS.JAXB_CONTEXT_TYPES, registeredTypes.toArray(new Class[0]));
try
{
// Get the deserializer from the type mapping
TypeMappingImpl typeMapping = serContext.getTypeMapping();
- DeserializerFactoryBase deserializerFactory = getDeserializerFactory(typeMapping, javaType, xmlType);
+ AbstractDeserializerFactory deserializerFactory = getDeserializerFactory(typeMapping, javaType, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
obj = des.deserialize(container, serContext);
@@ -255,9 +256,9 @@
}
// Get the deserializer factory for a given javaType and xmlType
- private static DeserializerFactoryBase getDeserializerFactory(TypeMappingImpl typeMapping, Class javaType, QName xmlType)
+ private static AbstractDeserializerFactory getDeserializerFactory(TypeMappingImpl typeMapping, Class javaType, QName xmlType)
{
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(javaType, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(javaType, xmlType);
// The type mapping might contain a mapping for the array wrapper bean
if (deserializerFactory == null && javaType.isArray())
@@ -271,7 +272,7 @@
Class returnType = toArrayMethod.getReturnType();
if (JavaUtils.isAssignableFrom(javaType, returnType))
{
- deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(arrayWrapperType, xmlType);
+ deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(arrayWrapperType, xmlType);
}
}
catch (NoSuchMethodException e)
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLFragment.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLFragment.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/XMLFragment.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -41,7 +41,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.binding.BufferedStreamResult;
+import org.jboss.ws.core.binding.BufferedStreamResult;
import org.jboss.ws.core.jaxrpc.binding.BufferedStreamSource;
import org.jboss.wsf.spi.utils.DOMUtils;
import org.jboss.wsf.spi.utils.DOMWriter;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -37,9 +37,9 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.EncodedTypeMapping;
import org.jboss.ws.core.jaxrpc.LiteralTypeMapping;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
import org.jboss.ws.core.jaxrpc.UnqualifiedFaultException;
import org.jboss.ws.core.soap.Style;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -45,7 +45,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonSOAPBinding;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.binding.SOAPArrayDeserializerFactory;
Modified: branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -38,7 +38,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
-import org.jboss.ws.core.jaxrpc.TypeMappingImpl;
+import org.jboss.ws.core.binding.TypeMappingImpl;
import org.jboss.ws.core.jaxrpc.TypeMappingRegistryImpl;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.SchemaBindingBuilder;
import org.jboss.ws.core.soap.Use;
Modified: branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2007-06-26 19:46:25 UTC (rev 3732)
+++ branches/jbossws-2.0/jbossws-core/src/test/java/org/jboss/test/ws/common/jbossxb/SerializerDeserializerTestCase.java 2007-06-26 21:03:20 UTC (rev 3733)
@@ -35,14 +35,14 @@
import javax.xml.transform.stream.StreamSource;
import org.jboss.ws.Constants;
+import org.jboss.ws.core.binding.AbstractDeserializerFactory;
+import org.jboss.ws.core.binding.DeserializerSupport;
+import org.jboss.ws.core.binding.SerializationContext;
+import org.jboss.ws.core.binding.AbstractSerializerFactory;
+import org.jboss.ws.core.binding.SerializerSupport;
+import org.jboss.ws.core.binding.TypeMappingImpl;
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.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.XMLFragment;
import org.jboss.wsf.spi.test.JBossWSTest;
import org.jboss.xb.binding.NamespaceRegistry;
@@ -76,12 +76,12 @@
QName xmlType = Constants.TYPE_LITERAL_STRING;
String value = "Hello World!";
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(String.class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(String.class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(String.class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(String.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
String out = (String)des.deserialize(xmlName, xmlType, source, serContext);
@@ -94,12 +94,12 @@
QName xmlType = Constants.TYPE_LITERAL_DATETIME;
Calendar value = new GregorianCalendar(2004, 10, 20, 14, 53, 25);
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(Calendar.class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(Calendar.class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(Calendar.class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(Calendar.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
Calendar out = (Calendar)des.deserialize(xmlName, xmlType, source, serContext);
@@ -113,12 +113,12 @@
QName xmlType = Constants.TYPE_LITERAL_INTEGER;
BigInteger value = new BigInteger("12345678901234567890");
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(BigInteger.class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(BigInteger.class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(BigInteger.class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(BigInteger.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
BigInteger out = (BigInteger)des.deserialize(xmlName, xmlType, source, serContext);
@@ -131,12 +131,12 @@
QName xmlType = Constants.TYPE_LITERAL_DECIMAL;
BigDecimal value = new BigDecimal("12345678901234567890");
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(BigDecimal.class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(BigDecimal.class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(BigDecimal.class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(BigDecimal.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
BigDecimal out = (BigDecimal)des.deserialize(xmlName, xmlType, source, serContext);
@@ -149,7 +149,7 @@
QName xmlType = Constants.TYPE_LITERAL_QNAME;
QName value = new QName("http://some-ns", "localPart", "ns1");
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(QName.class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(QName.class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
@@ -159,7 +159,7 @@
assertEquals("ns1", nsRegistry.getPrefix("http://some-ns"));
nsRegistry.unregisterURI("http://some-ns");
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(QName.class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(QName.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
QName out = (QName)des.deserialize(xmlName, xmlType, source, serContext);
@@ -172,12 +172,12 @@
QName xmlType = Constants.TYPE_LITERAL_ANYURI;
URI value = new URI("http://someURI:that:has:more:parts");
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(URI.class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(URI.class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(URI.class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(URI.class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
URI out = (URI)des.deserialize(xmlName, xmlType, source, serContext);
@@ -190,12 +190,12 @@
QName xmlType = Constants.TYPE_LITERAL_BASE64BINARY;
byte[] value = new String("Some base64 binary string").getBytes();
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(byte[].class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(byte[].class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(byte[].class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(byte[].class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
byte[] out = (byte[])des.deserialize(xmlName, xmlType, source, serContext);
@@ -208,12 +208,12 @@
QName xmlType = Constants.TYPE_LITERAL_HEXBINARY;
byte[] value = new String("Some hex binary string").getBytes();
- SerializerFactoryBase serializerFactory = (SerializerFactoryBase)typeMapping.getSerializer(byte[].class, xmlType);
+ AbstractSerializerFactory serializerFactory = (AbstractSerializerFactory)typeMapping.getSerializer(byte[].class, xmlType);
SerializerSupport ser = (SerializerSupport)serializerFactory.getSerializer();
Result result = ser.serialize(xmlName, xmlType, value, serContext, null);
assertNotNull(result);
- DeserializerFactoryBase deserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(byte[].class, xmlType);
+ AbstractDeserializerFactory deserializerFactory = (AbstractDeserializerFactory)typeMapping.getDeserializer(byte[].class, xmlType);
DeserializerSupport des = (DeserializerSupport)deserializerFactory.getDeserializer();
Source source = new StreamSource(new ByteArrayInputStream( new XMLFragment(result).toXMLString().getBytes()));
byte[] out = (byte[])des.deserialize(xmlName, xmlType, source, serContext);
17 years, 6 months
JBossWS SVN: r3732 - in branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx: inOrder_exactlyOnce and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard_opalka
Date: 2007-06-26 15:46:25 -0400 (Tue, 26 Jun 2007)
New Revision: 3732
Added:
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl
Removed:
branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/META-INF/
Log:
refactoring
Added: branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl
===================================================================
--- branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl (rev 0)
+++ branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl 2007-06-26 19:46:25 UTC (rev 3732)
@@ -0,0 +1,73 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<definitions name='RXService' targetNamespace='http://www.jboss.org/wsrx/inorder_exactlyonce/'
+ xmlns:tns='http://www.jboss.org/wsrx/inorder_exactlyonce/'
+ xmlns:xsd='http://www.w3.org/2001/XMLSchema'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..."
+ xmlns='http://schemas.xmlsoap.org/wsdl/'>
+
+ <wsp:UsingPolicy required="true"/>
+
+ <wsp:Policy wsu:Id="RMPolicy">
+ <wsrmp:RMAssertion>
+ <wsp:Policy>
+ <wsrmp:DeliveryAssurance>
+ <wsp:Policy>
+ <wsrmp:ExactlyOnce/>
+ <wsrmp:InOrder/>
+ </wsp:Policy>
+ </wsrmp:DeliveryAssurance>
+ </wsp:Policy>
+ </wsrmp:RMAssertion>
+ </wsp:Policy>
+
+ <message name='RXService_oneWay_Request_Soap'>
+ <part name='p0' type='xsd:string'/>
+ </message>
+ <message name='RXService_oneWay_Response_Soap'/>
+ <message name='RXService_reqResp_Request_Soap'>
+ <part name='p0' type='xsd:string'/>
+ </message>
+ <message name='RXService_reqResp_Response_Soap'>
+ <part name='response' type='xsd:string'/>
+ </message>
+ <portType name='RXService'>
+ <operation name='oneWay' parameterOrder='p0'>
+ <input message='tns:RXService_oneWay_Request_Soap'/>
+ <output message='tns:RXService_oneWay_Response_Soap'/>
+ </operation>
+ <operation name='reqResp' parameterOrder='p0'>
+ <input message='tns:RXService_reqResp_Request_Soap'/>
+ <output message='tns:RXService_reqResp_Response_Soap'/>
+ </operation>
+ </portType>
+ <binding name='RXService' type='tns:RXService'>
+ <wsp:PolicyReference URI="#RMPolicy"/>
+ <soap:binding transport='http://schemas.xmlsoap.org/soap/http' style='rpc'/>
+ <operation name='oneWay'>
+ <soap:operation soapAction='' style='rpc'/>
+ <input>
+ <soap:body parts='p0' use='literal' namespace='http://www.jboss.org/wsrx/inorder_exactlyonce/RXService#oneWay?KExqYXZhL2...'/>
+ </input>
+ <output>
+ <soap:body use='literal' namespace='http://www.jboss.org/wsrx/inorder_exactlyonce/RXService#oneWay?KExqYXZhL2...'/>
+ </output>
+ </operation>
+ <operation name='reqResp'>
+ <soap:operation soapAction='' style='rpc'/>
+ <input>
+ <soap:body parts='p0' use='literal' namespace='http://www.jboss.org/wsrx/inorder_exactlyonce/RXService#reqResp?KExqYXZhL...'/>
+ </input>
+ <output>
+ <soap:body parts='response' use='literal' namespace='http://www.jboss.org/wsrx/inorder_exactlyonce/RXService#reqResp?KExqYXZhL...'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='RXService'>
+ <port name='RXService' binding='tns:RXService'>
+ <soap:address location='http://@jboss.bind.address@:8080/wsrx/inorder_exactlyonce'/>
+ </port>
+ </service>
+</definitions>
Property changes on: branches/ropalka/testsuite/src/resources/jaxws/samples/wsrx/inOrder_exactlyOnce/META-INF/wsdl/rxservice.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 6 months