JBossWS SVN: r11993 - common/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-04-15 01:43:54 -0400 (Thu, 15 Apr 2010)
New Revision: 11993
Added:
common/trunk/.gitignore
Log:
adding ignores file
Added: common/trunk/.gitignore
===================================================================
--- common/trunk/.gitignore (rev 0)
+++ common/trunk/.gitignore 2010-04-15 05:43:54 UTC (rev 11993)
@@ -0,0 +1,9 @@
+
+# /
+/ant.properties
+/version.properties.md5
+/output*
+/profiles.xml
+/thirdparty
+/target
+/.settings
16 years
JBossWS SVN: r11992 - spi/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-04-15 01:43:31 -0400 (Thu, 15 Apr 2010)
New Revision: 11992
Added:
spi/trunk/.gitignore
Log:
adding ignores file
Added: spi/trunk/.gitignore
===================================================================
--- spi/trunk/.gitignore (rev 0)
+++ spi/trunk/.gitignore 2010-04-15 05:43:31 UTC (rev 11992)
@@ -0,0 +1,4 @@
+
+# /
+/target
+/.settings
16 years
JBossWS SVN: r11991 - in spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata: endpoints and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-04-15 00:06:24 -0400 (Thu, 15 Apr 2010)
New Revision: 11991
Added:
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/AddressMetaData.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointMetaData.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsFactory.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsMetaData.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSAddressMetaData.java
spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSDestinationMetaData.java
Log:
[JBWS-2971]:Add EndpointsMetaData
Added: spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/AddressMetaData.java
===================================================================
--- spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/AddressMetaData.java (rev 0)
+++ spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/AddressMetaData.java 2010-04-15 04:06:24 UTC (rev 11991)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software 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.metadata.endpoints;
+
+/**
+ * AddressMetaData.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public abstract class AddressMetaData
+{
+
+}
Added: spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointMetaData.java
===================================================================
--- spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointMetaData.java (rev 0)
+++ spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointMetaData.java 2010-04-15 04:06:24 UTC (rev 11991)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software 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.metadata.endpoints;
+
+/**
+ * Meta data class contains the implementor and address information
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class EndpointMetaData
+{
+ //Endpoint name
+ private String name;
+
+ //Service name
+ private String serviceName = "";
+
+ //port name
+ private String portName = "";
+
+ //implementor class
+ private String implementor = "";
+
+ //wsdl location
+ private String wsdlLocation = "";
+
+ //endpoint address information
+ private AddressMetaData addressMetaData = null;
+
+ //parent component
+ private EndpointsMetaData endpointsMetaData = null;
+
+ public EndpointMetaData(EndpointsMetaData endpoints)
+ {
+ endpointsMetaData = endpoints;
+ }
+
+ public void addAddressMetaData(AddressMetaData address)
+ {
+ this.addressMetaData = address;
+ }
+
+ public AddressMetaData getAddressMetaData()
+ {
+ return addressMetaData;
+ }
+
+ public EndpointsMetaData getEndpointsMetaData()
+ {
+ return endpointsMetaData;
+ }
+
+ public String getImplementor()
+ {
+ return implementor;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getPortName()
+ {
+ return portName;
+ }
+
+ public String getServiceName()
+ {
+ return serviceName;
+ }
+
+ public String getWsdlLocation()
+ {
+ return wsdlLocation;
+ }
+
+ public void setImplementor(String implementor)
+ {
+ this.implementor = implementor;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void setPortName(String portName)
+ {
+ this.portName = portName;
+ }
+
+ public void setServiceName(String serviceName)
+ {
+ this.serviceName = serviceName;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ this.wsdlLocation = wsdlLocation;
+ }
+
+}
Added: spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsFactory.java
===================================================================
--- spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsFactory.java (rev 0)
+++ spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsFactory.java 2010-04-15 04:06:24 UTC (rev 11991)
@@ -0,0 +1,233 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software 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.metadata.endpoints;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.metadata.endpoints.jms.JMSAddressMetaData;
+import org.jboss.wsf.spi.metadata.endpoints.jms.JMSDestinationMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * Endpoints OjbectModelFactory
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class EndpointsFactory implements ObjectModelFactory
+{
+ public static final String DESCRIPTOR_FILE = "jbossws-endpoints.xml";
+
+ private static final Logger log = Logger.getLogger(EndpointsFactory.class);
+
+ // The URL to the jbossws-endpoints.xml descriptor
+ private URL descriptorURL;
+
+ public EndpointsFactory(URL descriptorURL)
+ {
+ this.descriptorURL = descriptorURL;
+ }
+
+ /**
+ * Load jbossws-endpoints.xml under META-INF/
+ * , WEB-INF or /
+ *
+ * @param root virtual file root
+ * @return EndpointMetaData or <code>null</code> if it cannot be found
+ */
+ public static EndpointsMetaData loadFromVFSRoot(UnifiedVirtualFile root)
+ {
+ EndpointsMetaData endpoints = null;
+
+ UnifiedVirtualFile endpointsDD = null;
+ try
+ {
+ endpointsDD = root.findChild("META-INF/" + DESCRIPTOR_FILE);
+ }
+ catch (IOException e)
+ {
+ //
+ }
+
+ if (null == endpointsDD)
+ {
+ try
+ {
+ endpointsDD = root.findChild("WEB-INF/" + DESCRIPTOR_FILE);
+ }
+ catch (IOException e)
+ {
+ //
+ }
+ }
+
+ if (null == endpointsDD)
+ {
+ try
+ {
+ endpointsDD = root.findChild(DESCRIPTOR_FILE);
+ }
+ catch (IOException e)
+ {
+ //
+ }
+ }
+
+ if (endpointsDD != null)
+ {
+
+ URL endpointsUrl = endpointsDD.toURL();
+ try
+ {
+ InputStream is = endpointsUrl.openStream();
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new EndpointsFactory(endpointsUrl);
+ endpoints = (EndpointsMetaData) unmarshaller.unmarshal(is, factory, null);
+ is.close();
+ }
+ catch (Exception e)
+ {
+ log.error("Failed to unmarshall " + DESCRIPTOR_FILE);
+ throw new WebServiceException("Failed to unmarshall " + DESCRIPTOR_FILE + "," + e.getMessage());
+ }
+ }
+
+ return endpoints;
+ }
+
+ /**
+ * This method is called on the factory by the object model builder when the parsing starts.
+ *
+ * @return the root of the object model.
+ */
+ public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName,
+ Attributes attrs)
+ {
+ EndpointsMetaData endpointsMetaData = new EndpointsMetaData(descriptorURL);
+ return endpointsMetaData;
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
+ {
+ return root;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(EndpointsMetaData endpoints, UnmarshallingContext navigator, String namespaceURI,
+ String localName, Attributes attrs)
+ {
+ if ("endpoint".equals(localName))
+ {
+ EndpointMetaData endpoint = new EndpointMetaData(endpoints);
+ endpoint.setName(attrs.getValue("name"));
+ endpoint.setImplementor(attrs.getValue("implementor"));
+ endpoint.setPortName(attrs.getValue("portName"));
+ endpoint.setServiceName(attrs.getValue("serviceName"));
+ endpoint.setWsdlLocation(attrs.getValue("wsdlLocation"));
+ return endpoint;
+
+ }
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(EndpointsMetaData endpoints, EndpointMetaData endpoint, UnmarshallingContext navigator,
+ String namespaceURI, String localName)
+ {
+ endpoints.addEndpointMetaData(endpoint);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(EndpointMetaData endpoint, UnmarshallingContext navigator, String namespaceURI,
+ String localName, Attributes attrs)
+ {
+ if (JMSAddressMetaData.NAMESPACE_URI.equals(namespaceURI)
+ && JMSAddressMetaData.ADDRESS_LOCAL_NAME.equals(localName))
+ {
+ return new JMSAddressMetaData(endpoint);
+ }
+
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(EndpointMetaData endpoint, JMSAddressMetaData jmsAddress, UnmarshallingContext navigator,
+ String namespaceURI, String localName)
+ {
+ endpoint.addAddressMetaData(jmsAddress);
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(JMSAddressMetaData jmsAddress, UnmarshallingContext navigator, String namespaceURI,
+ String localName, Attributes attrs)
+ {
+ if ("requestDestination".equals(localName))
+ {
+ JMSDestinationMetaData requestDest = new JMSDestinationMetaData();
+ requestDest.setName(attrs.getValue("name"));
+ jmsAddress.setRequestDestination(requestDest);
+ return requestDest;
+ }
+ else if ("replyDestination".equals(localName))
+ {
+ JMSDestinationMetaData replyDest = new JMSDestinationMetaData();
+ replyDest.setName(attrs.getValue("name"));
+ jmsAddress.setReplyDestination(replyDest);
+ return replyDest;
+ }
+ else
+ return null;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(JMSDestinationMetaData jmsDestination, UnmarshallingContext navigator, String namespaceURI,
+ String localName, Attributes attrs)
+ {
+ if ("property".equals(localName))
+ jmsDestination.setProperty(attrs.getValue("name"), attrs.getValue("value"));
+ return null;
+ }
+
+}
Added: spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsMetaData.java
===================================================================
--- spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsMetaData.java (rev 0)
+++ spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/EndpointsMetaData.java 2010-04-15 04:06:24 UTC (rev 11991)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software 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.metadata.endpoints;
+
+import java.net.URL;
+import java.util.ArrayList;
+
+/**
+ * <p>Stack independent top level meta data class from jbossws-endpoints.xml. </p>
+ * <p>This class contains the following example xml content : </p>
+ * <pre>
+ * <jaxws:endpoints xmlns:jaxws="http://jbossws.jboss.org/jaxws"
+ * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ * xmlns:jms="http://jbossws.jboss.org/jaxws/transport/jms"
+ * xsi:schemaLocation="http://jbossws.jboss.org/jaxws jaxws.xsd http://jbossws.jboss.org/jaxws/transport/jms jms.xsd">
+ * <jaxws:endpoint implementor="" name="" portName=""
+ * serviceName="" wsdlLocation="">
+ * <jms:Address>
+ * <jms:requestDestination name="test">
+ * <jms:property name="" value="" />
+ * <jms:property name="" value="" />
+ * </jms:requestDestination>
+
+ * <jms:replyDestination name="test">
+ * <jms:property name="" value="" />
+ * <jms:property name="" value="" />
+ * </jms:replyDestination>
+ * </jms:Address>
+ * </jaxws:endpoint>
+ * </jaxws:endpoints>
+ * </pre>
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+
+public class EndpointsMetaData
+{
+ //The endpoints list
+ private ArrayList<EndpointMetaData> endpointsMetaData = new ArrayList<EndpointMetaData>();
+
+ //The jbossws-endpoint.xml location
+ private URL descriptorURL;
+
+ public EndpointsMetaData()
+ {
+ }
+
+ public EndpointsMetaData(URL descriptorURL)
+ {
+ this.descriptorURL = descriptorURL;
+ }
+
+ public URL getDescriptorURL()
+ {
+ return descriptorURL;
+ }
+
+ public void addEndpointMetaData(EndpointMetaData endpointMetaData)
+ {
+ endpointsMetaData.add(endpointMetaData);
+ }
+}
Added: spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSAddressMetaData.java
===================================================================
--- spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSAddressMetaData.java (rev 0)
+++ spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSAddressMetaData.java 2010-04-15 04:06:24 UTC (rev 11991)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software 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.metadata.endpoints.jms;
+
+import org.jboss.wsf.spi.metadata.endpoints.AddressMetaData;
+import org.jboss.wsf.spi.metadata.endpoints.EndpointMetaData;
+
+/**
+ * JMSAddressMetaData.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JMSAddressMetaData extends AddressMetaData
+{
+ public static final String NAMESPACE_URI = "http://jbossws.jboss.org/jaxws/transport/jms";
+
+ public static final String ADDRESS_LOCAL_NAME = "Address";
+
+ private EndpointMetaData endpoint;
+
+ private JMSDestinationMetaData requestDestination;
+
+ private JMSDestinationMetaData replyDestination;
+
+ public JMSAddressMetaData(EndpointMetaData endpoint)
+ {
+ this.endpoint = endpoint;
+ }
+
+ public EndpointMetaData getEndpoint()
+ {
+ return endpoint;
+ }
+
+ public JMSDestinationMetaData getReplyDestination()
+ {
+ return replyDestination;
+ }
+
+ public JMSDestinationMetaData getRequestDestination()
+ {
+ return requestDestination;
+ }
+
+ public void setReplyDestination(JMSDestinationMetaData replyDestination)
+ {
+ this.replyDestination = replyDestination;
+ }
+
+ public void setRequestDestination(JMSDestinationMetaData requestDestination)
+ {
+ this.requestDestination = requestDestination;
+ }
+}
Added: spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSDestinationMetaData.java
===================================================================
--- spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSDestinationMetaData.java (rev 0)
+++ spi/branches/jms-integration/src/main/java/org/jboss/wsf/spi/metadata/endpoints/jms/JMSDestinationMetaData.java 2010-04-15 04:06:24 UTC (rev 11991)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software 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.metadata.endpoints.jms;
+
+import java.util.Properties;
+
+/**
+ * JMSDestinationMetaData.
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class JMSDestinationMetaData
+{
+ private String name;
+
+ private Properties properties = new Properties();;
+
+ public JMSDestinationMetaData()
+ {
+
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public void setProperty(String name, String value)
+ {
+ properties.put(name, value);
+ }
+
+ public String getProperty(String name) {
+ return (String)properties.get(name);
+ }
+
+ public Properties getProperties() {
+ return properties;
+ }
+}
16 years
JBossWS SVN: r11990 - in container/jboss50/branches/jbossws-jboss510-jms-integration/src/main: java/org/jboss/webservices/integration/deployers/deployment and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-04-15 00:03:22 -0400 (Thu, 15 Apr 2010)
New Revision: 11990
Added:
container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSEndpointsDescriptorParserDeployer.java
Modified:
container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-2791]:1.Add the WSEndpointsDescriptorParserDeployer to parse the jbossws-endpoints.xml in parse stage 2.Create deployment if there is only jbossws-endpoints.xml descriptor, otherwise put the EndpointsMetaData in deployment 3.Change ASHelper.isWebserviceDeployment : if the deployment is not null then it is WebseriviceDeployment. This will enable DeploymentAspect to handle the jms deployment.
Modified: container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2010-04-15 02:25:22 UTC (rev 11989)
+++ container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2010-04-15 04:03:22 UTC (rev 11990)
@@ -104,7 +104,8 @@
{
this.log.debug(this.aspect + " start: " + unit.getName());
final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
- this.aspect.start(dep);
+ if (aspect.canHandle(dep))
+ this.aspect.start(dep);
}
}
@@ -121,7 +122,8 @@
{
this.log.debug(this.aspect + " stop: " + unit.getName());
final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
- this.aspect.stop(dep);
+ if (aspect.canHandle(dep))
+ this.aspect.stop(dep);
}
}
Added: container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSEndpointsDescriptorParserDeployer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSEndpointsDescriptorParserDeployer.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/WSEndpointsDescriptorParserDeployer.java 2010-04-15 04:03:22 UTC (rev 11990)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.deployers;
+
+import org.jboss.deployers.vfs.spi.deployer.ObjectModelFactoryDeployer;
+import org.jboss.wsf.spi.metadata.endpoints.EndpointsFactory;
+import org.jboss.wsf.spi.metadata.endpoints.EndpointsMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+
+/**
+ * jbsssws-endpoints.xml Parser
+ *
+ * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ */
+public class WSEndpointsDescriptorParserDeployer extends ObjectModelFactoryDeployer<EndpointsMetaData>
+{
+
+ /**
+ * Constructor.
+ */
+ public WSEndpointsDescriptorParserDeployer()
+ {
+ super(EndpointsMetaData.class);
+ }
+
+ /**
+ * Model factory generator.
+ *
+ * @param root object tree root
+ * @return object model factory
+ */
+ @Override
+ protected ObjectModelFactory getObjectModelFactory(final EndpointsMetaData root)
+ {
+ this.log.debug("Creating endpoints descrptor factory");
+ return new EndpointsFactory(null);
+ }
+
+}
Modified: container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2010-04-15 02:25:22 UTC (rev 11989)
+++ container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2010-04-15 04:03:22 UTC (rev 11990)
@@ -26,7 +26,12 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.endpoints.EndpointsMetaData;
/**
* JBossWS deployment model builder.
@@ -81,6 +86,27 @@
{
WSDeploymentBuilder.builders.get(deploymentType).newDeploymentModel(unit);
}
+ //if the DeploymentUnit contains jbossws-endpoints.xml (jms endpoints)
+ if (ASHelper.hasAttachment(unit, EndpointsMetaData.class))
+ {
+ Deployment dep = ASHelper.getOptionalAttachment(unit, Deployment.class);
+ if (dep == null)
+ {
+ dep = buildDeploymentFromEndpointsMetaData(unit);
+ }
+
+ EndpointsMetaData endpointsMetaData = ASHelper.getRequiredAttachment(unit, EndpointsMetaData.class);
+ dep.addAttachment(EndpointsMetaData.class, endpointsMetaData);
+ }
}
-
+
+ private Deployment buildDeploymentFromEndpointsMetaData(DeploymentUnit unit)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ DeploymentModelFactory deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ Deployment dep = deploymentModelFactory.newDeployment(unit.getSimpleName(), unit.getClassLoader());
+ //There is no SPI Service and Endpoint created and also there is no DeploymentType
+ //TODO:Review it if add deploymentType can make things easy
+ return dep;
+ }
}
Modified: container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2010-04-15 02:25:22 UTC (rev 11989)
+++ container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2010-04-15 04:03:22 UTC (rev 11990)
@@ -36,6 +36,7 @@
import org.jboss.metadata.web.jboss.JBossServletMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
@@ -72,7 +73,7 @@
*/
public static boolean isWebServiceDeployment(final DeploymentUnit unit)
{
- return ASHelper.getOptionalAttachment(unit, DeploymentType.class) != null;
+ return ASHelper.getOptionalAttachment(unit, Deployment.class) != null;
}
/**
Modified: container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-04-15 02:25:22 UTC (rev 11989)
+++ container/jboss50/branches/jbossws-jboss510-jms-integration/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-04-15 04:03:22 UTC (rev 11990)
@@ -55,6 +55,11 @@
<property name="name">webservices.xml</property>
<property name="useSchemaValidation">true</property>
</bean>
+
+ <bean name="WSEndpointsDescriptorParserDeployer" class="org.jboss.webservices.integration.deployers.WSEndpointsDescriptorParserDeployer">
+ <property name="name">jbossws-endpoints.xml</property>
+ <property name="useSchemaValidation">true</property>
+ </bean>
<bean name="WSEJBAdapterDeployer" class="org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer"/>
16 years
JBossWS SVN: r11989 - container/jboss60/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2010-04-14 22:25:22 -0400 (Wed, 14 Apr 2010)
New Revision: 11989
Added:
container/jboss60/branches/jbossws-jboss600M2-jms-integration/
Log:
Create jms integration branch
Copied: container/jboss60/branches/jbossws-jboss600M2-jms-integration (from rev 11988, container/jboss60/branches/jbossws-jboss600M2)
16 years
JBossWS SVN: r11988 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-04-14 14:12:54 -0400 (Wed, 14 Apr 2010)
New Revision: 11988
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-2998] Updating excludes
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-04-14 18:08:15 UTC (rev 11987)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2010-04-14 18:12:54 UTC (rev 11988)
@@ -70,3 +70,5 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
+# [JBWS-2998] service-ref mtom configuration through deployment descriptor
+org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-04-14 18:08:15 UTC (rev 11987)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2010-04-14 18:12:54 UTC (rev 11988)
@@ -70,3 +70,5 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
+# [JBWS-2998] service-ref mtom configuration through deployment descriptor
+org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-04-14 18:08:15 UTC (rev 11987)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-04-14 18:12:54 UTC (rev 11988)
@@ -70,3 +70,5 @@
org/jboss/test/ws/jaxws/jbws2985/**
org/jboss/test/ws/jaxws/jbws2991/**
+# [JBWS-2998] service-ref mtom configuration through deployment descriptor
+org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-04-14 18:08:15 UTC (rev 11987)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-04-14 18:12:54 UTC (rev 11988)
@@ -65,3 +65,5 @@
org/jboss/test/ws/jaxws/jbws2991/**
org/jboss/test/ws/jaxws/endpointReference/EndpointReferenceBuilderTestCase.*
+# [JBWS-2998] service-ref mtom configuration through deployment descriptor
+org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.*
16 years
JBossWS SVN: r11987 - framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-04-14 14:08:15 -0400 (Wed, 14 Apr 2010)
New Revision: 11987
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java
Log:
[JBWS-2997] split testcase
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java 2010-04-14 17:33:54 UTC (rev 11986)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java 2010-04-14 18:08:15 UTC (rev 11987)
@@ -53,10 +53,13 @@
log.info("service = "+service);
Hello hello = service.getHelloPort();
SOAPBinding binding = (SOAPBinding)((BindingProvider)hello).getBinding();
- log.info("mtom enabled = " + binding.isMTOMEnabled());
- if (!binding.isMTOMEnabled())
+ if ("true".equals(req.getParameter("mtom")))
{
- throw new Exception("Expected mtom enabled because of port-component configuration in the DD");
+ log.info("mtom enabled = " + binding.isMTOMEnabled());
+ if (!binding.isMTOMEnabled())
+ {
+ throw new Exception("Expected mtom enabled because of port-component configuration in the DD");
+ }
}
result = hello.getMessageContextTest();
log.info("result = " + result);
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java 2010-04-14 18:08:15 UTC (rev 11987)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws2307;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * JBWS-2307 / JBWS-2997 testcase
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class JBWS2307MTOMTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2307MTOMTestCase.class, "jaxws-jbws2307-client.war, jaxws-jbws2307-service.war");
+ }
+
+ public void testMTOM() throws Exception
+ {
+ HttpURLConnection con = (HttpURLConnection)new URL("http://" + getServerHost() + ":8080/jaxws-jbws2307-client/jbws2307?mtom=true").openConnection();
+ BufferedReader isr = new BufferedReader(new InputStreamReader(con.getInputStream()));
+ assertEquals("true", isr.readLine());
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
16 years
JBossWS SVN: r11986 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-04-14 13:33:54 -0400 (Wed, 14 Apr 2010)
New Revision: 11986
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java
Log:
[JBWS-2997] Ignore exception when service qname is not available
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java 2010-04-14 16:53:10 UTC (rev 11985)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java 2010-04-14 17:33:54 UTC (rev 11986)
@@ -26,6 +26,7 @@
import java.util.List;
import java.util.Map;
+import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.soap.MTOMFeature;
@@ -80,7 +81,7 @@
private synchronized void configureJaxWsProxyFactoryBean(JaxWsProxyFactoryBean proxyFactory)
{
Class<?> clazz = proxyFactory.getServiceClass();
- UnifiedPortComponentRefMetaData upcmd = serviceRefMD.getPortComponentRef(clazz != null ? clazz.getName() : null, proxyFactory.getServiceName());
+ UnifiedPortComponentRefMetaData upcmd = serviceRefMD.getPortComponentRef(clazz != null ? clazz.getName() : null, getServiceName(proxyFactory));
if (upcmd != null)
{
setProperties(proxyFactory, upcmd);
@@ -88,6 +89,18 @@
}
}
+ private static QName getServiceName(JaxWsProxyFactoryBean proxyFactory)
+ {
+ try
+ {
+ return proxyFactory.getServiceName();
+ }
+ catch (Exception e) //ignore
+ {
+ return null;
+ }
+ }
+
private void setMTOM(JaxWsServiceFactoryBean serviceFactoryBean, UnifiedPortComponentRefMetaData upcmd)
{
if (upcmd.getEnableMTOM())
16 years
JBossWS SVN: r11985 - in framework/trunk/testsuite/test: resources/jaxws/jbws2307/WEB-INF-client and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-04-14 12:53:10 -0400 (Wed, 14 Apr 2010)
New Revision: 11985
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java
framework/trunk/testsuite/test/resources/jaxws/jbws2307/WEB-INF-client/web.xml
Log:
[JBWS-2997] Enhancing jbws2307 testcase to also cover this mtom configuration aspect
Modified: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java 2010-04-14 16:51:39 UTC (rev 11984)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java 2010-04-14 16:53:10 UTC (rev 11985)
@@ -27,7 +27,9 @@
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.soap.SOAPBinding;
import org.jboss.logging.Logger;
@@ -50,6 +52,12 @@
{
log.info("service = "+service);
Hello hello = service.getHelloPort();
+ SOAPBinding binding = (SOAPBinding)((BindingProvider)hello).getBinding();
+ log.info("mtom enabled = " + binding.isMTOMEnabled());
+ if (!binding.isMTOMEnabled())
+ {
+ throw new Exception("Expected mtom enabled because of port-component configuration in the DD");
+ }
result = hello.getMessageContextTest();
log.info("result = " + result);
}
Modified: framework/trunk/testsuite/test/resources/jaxws/jbws2307/WEB-INF-client/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2307/WEB-INF-client/web.xml 2010-04-14 16:51:39 UTC (rev 11984)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2307/WEB-INF-client/web.xml 2010-04-14 16:53:10 UTC (rev 11985)
@@ -18,6 +18,7 @@
<wsdl-file>WEB-INF/wsdl/HelloService.wsdl</wsdl-file>
<port-component-ref>
<service-endpoint-interface>org.jboss.test.ws.jaxws.jbws2307.Hello</service-endpoint-interface>
+ <enable-mtom>true</enable-mtom>
</port-component-ref>
</service-ref>
</web-app>
\ No newline at end of file
16 years
JBossWS SVN: r11984 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-04-14 12:51:39 -0400 (Wed, 14 Apr 2010)
New Revision: 11984
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java
Log:
[JBWS-2997] Adding MTOM feature setup in JaxWsProxyFactoryBean according to data coming from service ref metadata + refactoring the stub property setup a bit too
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java 2010-04-14 08:27:02 UTC (rev 11983)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefStubPropertyConfigurer.java 2010-04-14 16:51:39 UTC (rev 11984)
@@ -22,16 +22,22 @@
package org.jboss.wsf.stack.cxf.client;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.MTOMFeature;
+
import org.apache.cxf.configuration.Configurer;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
+import org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
/**
- * A CXF configurer that sets the serviceref stub properties in the JaxWsProxyFactoryBean
+ * A CXF configurer that sets the serviceref data in the JaxWsProxyFactoryBean
*
* @author alessio.soldano(a)jboss.com
* @since 21-Jul-2009
@@ -73,19 +79,41 @@
private synchronized void configureJaxWsProxyFactoryBean(JaxWsProxyFactoryBean proxyFactory)
{
- Map<String, Object> properties = new HashMap<String, Object>();
- for (UnifiedPortComponentRefMetaData pcRef : serviceRefMD.getPortComponentRefs())
+ Class<?> clazz = proxyFactory.getServiceClass();
+ UnifiedPortComponentRefMetaData upcmd = serviceRefMD.getPortComponentRef(clazz != null ? clazz.getName() : null, proxyFactory.getServiceName());
+ if (upcmd != null)
{
- String sei = pcRef.getServiceEndpointInterface();
- if (sei != null && sei.equals(proxyFactory.getServiceClass().getName()))
+ setProperties(proxyFactory, upcmd);
+ setMTOM((JaxWsServiceFactoryBean)proxyFactory.getServiceFactory(), upcmd);
+ }
+ }
+
+ private void setMTOM(JaxWsServiceFactoryBean serviceFactoryBean, UnifiedPortComponentRefMetaData upcmd)
+ {
+ if (upcmd.getEnableMTOM())
+ {
+ List<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
+ List<WebServiceFeature> prevFeatures = serviceFactoryBean.getWsFeatures();
+ if (prevFeatures != null)
{
- for (UnifiedStubPropertyMetaData prop : pcRef.getStubProperties())
- {
- properties.put(prop.getPropName(), prop.getPropValue());
- }
+ features.addAll(prevFeatures);
}
+ features.add(new MTOMFeature(true));
+ serviceFactoryBean.setWsFeatures(features);
}
- proxyFactory.setProperties(properties);
}
-
+
+ private void setProperties(JaxWsProxyFactoryBean proxyFactory, UnifiedPortComponentRefMetaData upcmd)
+ {
+ Map<String, Object> properties = proxyFactory.getProperties();
+ if (properties == null)
+ {
+ properties = new HashMap<String, Object>();
+ proxyFactory.setProperties(properties);
+ }
+ for (UnifiedStubPropertyMetaData prop : upcmd.getStubProperties())
+ {
+ properties.put(prop.getPropName(), prop.getPropValue());
+ }
+ }
}
16 years