Author: thomas.diesler(a)jboss.com
Date: 2007-03-09 08:53:08 -0500 (Fri, 09 Mar 2007)
New Revision: 2569
Added:
trunk/jbossws-core/src/java/org/jboss/ws/integration/KernelLocator.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java
Modified:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointLifecycleDeployer.java
trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServerConfigFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManagerFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
Log:
Use KernelLocator the comes with jbossws. Fix whitespace handling in service-ref
Modified:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -27,7 +27,7 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.MainDeployerMBean;
import org.jboss.deployment.SubDeployerInterceptorSupport;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.metadata.WebMetaData;
Modified:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -27,7 +27,7 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.MainDeployerMBean;
import org.jboss.deployment.SubDeployerInterceptorSupport;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.metadata.WebMetaData;
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -26,7 +26,7 @@
import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointLifecycleDeployer.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointLifecycleDeployer.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointLifecycleDeployer.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -28,7 +28,7 @@
import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.metadata.WebMetaData;
Modified:
trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/integration-jboss50/src/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2007-03-09
13:53:08 UTC (rev 2569)
@@ -2,7 +2,9 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="KernelLocator"
class="org.jboss.kernel.plugins.util.KernelLocator"/>
+ <bean name="KernelLocator"
class="org.jboss.ws.integration.KernelLocator">
+ <property name="kernel"><inject
bean="jboss.kernel:service=Kernel"/></property>
+ </bean>
<bean name="ServiceEndpointManager"
class="org.jboss.ws.core.server.ServiceEndpointManager">
Modified:
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java
===================================================================
---
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -27,7 +27,7 @@
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.logging.Logger;
/**
Modified:
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
---
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -33,7 +33,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.logging.Logger;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServerConfigFactory.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServerConfigFactory.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServerConfigFactory.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.core.server;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.logging.Logger;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManagerFactory.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManagerFactory.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManagerFactory.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.core.server;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerFactory.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerFactory.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/jbossws-core/src/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManagerFactory.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -1,6 +1,6 @@
package org.jboss.ws.extensions.eventing.mgmt;
-import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
Added: trunk/jbossws-core/src/java/org/jboss/ws/integration/KernelLocator.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/integration/KernelLocator.java
(rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/integration/KernelLocator.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -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.integration;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+
+/**
+ * Locate the single instance of the kernel
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class KernelLocator
+{
+ private static Kernel kernel;
+
+ public static Kernel getKernel()
+ {
+ return KernelLocator.kernel;
+ }
+
+ public void setKernel(Kernel kernel)
+ {
+ KernelLocator.kernel = kernel;
+ }
+}
Property changes on:
trunk/jbossws-core/src/java/org/jboss/ws/integration/KernelLocator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java
(rev 0)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -0,0 +1,200 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.j2ee.serviceref;
+
+// $Id$
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.xb.QNameBuilder;
+import org.w3c.dom.Element;
+
+/**
+ * The metdata data from service-ref element in web.xml, ejb-jar.xml, and
+ * application-client.xml.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class ServiceRefMetaDataParser
+{
+ public void importStandardXml(Element root, UnifiedServiceRefMetaData sref)
+ {
+ sref.setServiceRefName(getElementContent(root, "service-ref-name"));
+ sref.setServiceInterface(getOptionalElementContent(root,
"service-interface"));
+ sref.setWsdlFile(getOptionalElementContent(root, "wsdl-file"));
+ sref.setMappingFile(getOptionalElementContent(root,
"jaxrpc-mapping-file"));
+
+ Element child = DOMUtils.getFirstChildElement(root, "service-qname");
+ if (child != null)
+ sref.setServiceQName(QNameBuilder.buildQName(child, getTextContent(child)));
+
+ // Parse the port-component-ref elements
+ Iterator iterator = DOMUtils.getChildElements(root,
"port-component-ref");
+ while (iterator.hasNext())
+ {
+ Element pcrefElement = (Element)iterator.next();
+ UnifiedPortComponentRefMetaData pcrefMetaData = new
UnifiedPortComponentRefMetaData(sref);
+ pcrefMetaData.importStandardXml(pcrefElement);
+ sref.addPortComponentRef(pcrefMetaData);
+ }
+
+ // Parse the handler elements
+ iterator = DOMUtils.getChildElements(root, "handler");
+ while (iterator.hasNext())
+ {
+ Element handlerElement = (Element)iterator.next();
+ UnifiedHandlerMetaData handlerMetaData = new UnifiedHandlerMetaData();
+ handlerMetaData.importStandardXml(handlerElement);
+ sref.addHandler(handlerMetaData);
+ }
+ }
+
+ public void importJBossXml(Element root, UnifiedServiceRefMetaData sref)
+ {
+ sref.setConfigName(getOptionalElementContent(root, "config-name"));
+ sref.setConfigFile(getOptionalElementContent(root, "config-file"));
+ sref.setWsdlOverride(getOptionalElementContent(root, "wsdl-override"));
+
+ // Parse the port-component-ref elements
+ Iterator iterator = DOMUtils.getChildElements(root,
"port-component-ref");
+ while (iterator.hasNext())
+ {
+ Element pcrefElement = (Element)iterator.next();
+ String seiName = getOptionalElementContent(pcrefElement,
"service-endpoint-interface");
+ if (seiName != null)
+ {
+ UnifiedPortComponentRefMetaData pcref = sref.getPortComponentRef(seiName);
+ if (pcref == null)
+ {
+ // Its ok to only have the <port-component-ref> in jboss.xml and not
in ejb-jar.xml
+ pcref = new UnifiedPortComponentRefMetaData(sref);
+ pcref.importStandardXml(pcrefElement);
+ sref.addPortComponentRef(pcref);
+ }
+ pcref.importJBossXml(pcrefElement);
+ }
+ }
+
+ // Parse the call-property elements
+ iterator = DOMUtils.getChildElements(root, "call-property");
+ while (iterator.hasNext())
+ {
+ Element propElement = (Element)iterator.next();
+ String name = getElementContent(propElement, "prop-name");
+ String value = getElementContent(propElement, "prop-value");
+ sref.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
+
+ public void importStandardXml(Element root, UnifiedPortComponentRefMetaData pcref)
+ {
+ pcref.setServiceEndpointInterface(getOptionalElementContent(root,
"service-endpoint-interface"));
+ pcref.setPortComponentLink(getOptionalElementContent(root,
"port-component-link"));
+ }
+
+ public void importJBossXml(Element root, UnifiedPortComponentRefMetaData pcref)
+ {
+ // Look for call-property elements
+ Iterator iterator = DOMUtils.getChildElements(root, "call-property");
+ while (iterator.hasNext())
+ {
+ Element propElement = (Element)iterator.next();
+ String name = getElementContent(propElement, "prop-name");
+ String value = getElementContent(propElement, "prop-value");
+ pcref.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
+
+ public void importStandardXml(Element root, UnifiedHandlerMetaData href)
+ {
+ href.setHandlerName(getElementContent(root, "handler-name"));
+ href.setHandlerClass(getElementContent(root, "handler-class"));
+
+ // Parse the init-param elements
+ Iterator iterator = DOMUtils.getChildElements(root, "init-param");
+ while (iterator.hasNext())
+ {
+ Element paramElement = (Element)iterator.next();
+ UnifiedInitParamMetaData param = new UnifiedInitParamMetaData();
+ param.setParamName(getElementContent(paramElement, "param-name"));
+ param.setParamValue(getElementContent(paramElement, "param-value"));
+ href.addInitParam(param);
+ }
+
+ // Parse the soap-header elements
+ iterator = DOMUtils.getChildElements(root, "soap-header");
+ while (iterator.hasNext())
+ {
+ Element headerElement = (Element)iterator.next();
+ String content = getTextContent(headerElement);
+ QName qname = QNameBuilder.buildQName(headerElement, content);
+ href.addSoapHeader(qname);
+ }
+
+ // Parse the soap-role elements
+ iterator = DOMUtils.getChildElements(root, "soap-role");
+ while (iterator.hasNext())
+ {
+ Element roleElement = (Element)iterator.next();
+ String content = getTextContent(roleElement);
+ href.addSoapRole(content);
+ }
+
+ // Parse the port-name elements
+ iterator = DOMUtils.getChildElements(root, "port-name");
+ while (iterator.hasNext())
+ {
+ Element portElement = (Element)iterator.next();
+ String content = getTextContent(portElement);
+ href.addPortName(content);
+ }
+ }
+
+ private String getElementContent(Element element, String childName)
+ {
+ String childValue = getOptionalElementContent(element, childName);
+ if (childValue == null || childValue.length() == 0)
+ throw new IllegalStateException("Invalid null element content: " +
childName);
+
+ return childValue;
+ }
+
+ private String getOptionalElementContent(Element element, String childName)
+ {
+ return getTextContent(DOMUtils.getFirstChildElement(element, childName));
+ }
+
+ private String getTextContent(Element element)
+ {
+ String content = null;
+ if (element != null)
+ {
+ content = DOMUtils.getTextContent(element);
+ if (content != null)
+ content = content.trim();
+ }
+ return content;
+ }
+}
Property changes on:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/ServiceRefMetaDataParser.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedHandlerMetaData.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -25,19 +25,16 @@
import java.util.ArrayList;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
import java.util.Set;
import javax.xml.namespace.QName;
-import org.jboss.ws.core.utils.DOMUtils;
import org.jboss.ws.integration.ServiceRefElement;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXWS;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
-import org.jboss.xb.QNameBuilder;
import org.w3c.dom.Element;
/** The unified metdata data for a handler element
@@ -158,54 +155,8 @@
return hmd;
}
- @Deprecated
public void importStandardXml(Element root)
{
- Element child = DOMUtils.getFirstChildElement(root, "handler-name");
- if (child != null)
- handlerName = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "handler-class");
- if (child != null)
- handlerClass = DOMUtils.getTextContent(child);
-
- // Parse the init-param elements
- Iterator iterator = DOMUtils.getChildElements(root, "init-param");
- while (iterator.hasNext())
- {
- Element paramElement = (Element)iterator.next();
- UnifiedInitParamMetaData param = new UnifiedInitParamMetaData();
-
param.setParamName(DOMUtils.getTextContent(DOMUtils.getFirstChildElement(paramElement,
"param-name")));
-
param.setParamValue(DOMUtils.getTextContent(DOMUtils.getFirstChildElement(paramElement,
"param-value")));
- initParams.add(param);
- }
-
- // Parse the soap-header elements
- iterator = DOMUtils.getChildElements(root, "soap-header");
- while (iterator.hasNext())
- {
- Element headerElement = (Element)iterator.next();
- String content = DOMUtils.getTextContent(headerElement);
- QName qname = QNameBuilder.buildQName(headerElement, content);
- soapHeaders.add(qname);
- }
-
- // Parse the soap-role elements
- iterator = DOMUtils.getChildElements(root, "soap-role");
- while (iterator.hasNext())
- {
- Element roleElement = (Element)iterator.next();
- String content = DOMUtils.getTextContent(roleElement);
- soapRoles.add(content);
- }
-
- // Parse the port-name elements
- iterator = DOMUtils.getChildElements(root, "port-name");
- while (iterator.hasNext())
- {
- Element portElement = (Element)iterator.next();
- String content = DOMUtils.getTextContent(portElement);
- portNames.add(content);
- }
+ new ServiceRefMetaDataParser().importStandardXml(root, this);
}
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -179,29 +179,13 @@
this.configName = configName;
}
- @Deprecated
public void importStandardXml(Element root)
{
- Element child = DOMUtils.getFirstChildElement(root,
"service-endpoint-interface");
- if (child != null)
- serviceEndpointInterface = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "port-component-link");
- if (child != null)
- portComponentLink = DOMUtils.getTextContent(child);
+ new ServiceRefMetaDataParser().importStandardXml(root, this);
}
- @Deprecated
public void importJBossXml(Element root)
{
- // Look for call-property elements
- Iterator iterator = DOMUtils.getChildElements(root, "call-property");
- while (iterator.hasNext())
- {
- Element propElement = (Element)iterator.next();
- String name = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(propElement,
"prop-name"));
- String value =
DOMUtils.getTextContent(DOMUtils.getFirstChildElement(propElement,
"prop-value"));
- callProperties.add(new UnifiedCallPropertyMetaData(name, value));
- }
+ new ServiceRefMetaDataParser().importJBossXml(root, this);
}
}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2007-03-09
12:24:06 UTC (rev 2568)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2007-03-09
13:53:08 UTC (rev 2569)
@@ -388,91 +388,12 @@
@Override
public void importStandardXml(Element root)
{
- Element child = DOMUtils.getFirstChildElement(root, "service-ref-name");
- if (child != null)
- serviceRefName = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "service-interface");
- if (child != null)
- serviceInterface = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "wsdl-file");
- if (child != null)
- wsdlFile = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "jaxrpc-mapping-file");
- if (child != null)
- mappingFile = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "service-qname");
- if (child != null)
- serviceQName = QNameBuilder.buildQName(child, DOMUtils.getTextContent(child));
-
- // Parse the port-component-ref elements
- Iterator iterator = DOMUtils.getChildElements(root,
"port-component-ref");
- while (iterator.hasNext())
- {
- Element pcrefElement = (Element)iterator.next();
- UnifiedPortComponentRefMetaData pcrefMetaData = new
UnifiedPortComponentRefMetaData(this);
- pcrefMetaData.importStandardXml(pcrefElement);
- portComponentRefs.put(pcrefMetaData.getServiceEndpointInterface(),
pcrefMetaData);
- }
-
- // Parse the handler elements
- iterator = DOMUtils.getChildElements(root, "handler");
- while (iterator.hasNext())
- {
- Element handlerElement = (Element)iterator.next();
- UnifiedHandlerMetaData handlerMetaData = new UnifiedHandlerMetaData();
- handlerMetaData.importStandardXml(handlerElement);
- handlers.add(handlerMetaData);
- }
+ new ServiceRefMetaDataParser().importStandardXml(root, this);
}
@Override
public void importJBossXml(Element root)
{
- Element child = DOMUtils.getFirstChildElement(root, "config-name");
- if (child != null)
- configName = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "config-file");
- if (child != null)
- configFile = DOMUtils.getTextContent(child);
-
- child = DOMUtils.getFirstChildElement(root, "wsdl-override");
- if (child != null)
- wsdlOverride = DOMUtils.getTextContent(child);
-
- // Parse the port-component-ref elements
- Iterator iterator = DOMUtils.getChildElements(root,
"port-component-ref");
- while (iterator.hasNext())
- {
- Element pcrefElement = (Element)iterator.next();
- Element seiElement = DOMUtils.getFirstChildElement(pcrefElement,
"service-endpoint-interface");
- if (seiElement != null)
- {
- String seiName = DOMUtils.getTextContent(seiElement);
- UnifiedPortComponentRefMetaData pcrefMetaData =
(UnifiedPortComponentRefMetaData)portComponentRefs.get(seiName);
- if (pcrefMetaData == null)
- {
- // Its ok to only have the <port-component-ref> in jboss.xml and not
in ejb-jar.xml
- pcrefMetaData = new UnifiedPortComponentRefMetaData(this);
- pcrefMetaData.importStandardXml(pcrefElement);
- portComponentRefs.put(pcrefMetaData.getServiceEndpointInterface(),
pcrefMetaData);
- }
- pcrefMetaData.importJBossXml(pcrefElement);
- }
- }
-
- // Parse the call-property elements
- iterator = DOMUtils.getChildElements(root, "call-property");
- while (iterator.hasNext())
- {
- Element propElement = (Element)iterator.next();
- String name = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(propElement,
"prop-name"));
- String value =
DOMUtils.getTextContent(DOMUtils.getFirstChildElement(propElement,
"prop-value"));
- callProperties.add(new UnifiedCallPropertyMetaData(name, value));
- }
+ new ServiceRefMetaDataParser().importJBossXml(root, this);
}
}