Author: thomas.diesler(a)jboss.com
Date: 2007-01-08 05:08:16 -0500 (Mon, 08 Jan 2007)
New Revision: 1858
Added:
trunk/jbossws-core/src/main/java/javax/annotation/
trunk/jbossws-core/src/main/java/javax/annotation/Resource.java
trunk/jbossws-core/src/main/java/javax/annotation/Resources.java
trunk/jbossws-core/src/main/java/org/jboss/annotation/
trunk/jbossws-core/src/main/java/org/jboss/annotation/security/
trunk/jbossws-core/src/main/java/org/jboss/annotation/security/SecurityDomain.java
trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt
Modified:
trunk/build/version.properties
trunk/integration-jboss42/build.xml
trunk/jbossws-core/build.xml
trunk/jbossws-core/src/main/java/org/jboss/ws/Constants.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
trunk/jbossws-tests/build.xml
Log:
Fix jbossas testssuite regression
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-01-08 09:57:05 UTC (rev 1857)
+++ trunk/build/version.properties 2007-01-08 10:08:16 UTC (rev 1858)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (
http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=1.2.0.CR2
-repository.id=1.2.0.CR2
+version.id=1.2.0.CR3
+repository.id=1.2.0.CR3
implementation.title=JBoss Web Services (JBossWS)
implementation.url=http://www.jboss.org/products/jbossws
Modified: trunk/integration-jboss42/build.xml
===================================================================
--- trunk/integration-jboss42/build.xml 2007-01-08 09:57:05 UTC (rev 1857)
+++ trunk/integration-jboss42/build.xml 2007-01-08 10:08:16 UTC (rev 1858)
@@ -153,6 +153,8 @@
<delete
dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<mkdir
dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar
dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"
src="${jboss42.output.lib.dir}/jbossws42.sar"/>
+ <!-- The JBossAS testsuite references jbossws-client.jar from thirdparty -->
+ <copy todir="${jboss42.home}/../../../thirdparty/jboss/jbossws/lib"
file="${core.output.lib.dir}/jbossws-client.jar"
overwrite="true"/>
</target>
<!-- ================================================================== -->
Modified: trunk/jbossws-core/build.xml
===================================================================
--- trunk/jbossws-core/build.xml 2007-01-08 09:57:05 UTC (rev 1857)
+++ trunk/jbossws-core/build.xml 2007-01-08 10:08:16 UTC (rev 1858)
@@ -58,8 +58,10 @@
<mkdir dir="${core.output.classes.dir}"/>
<javac srcdir="${core.java.dir}" sourcepath=""
destdir="${core.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
+ <include name="javax/annotation/**"/>
<include name="javax/xml/ws/**"/>
<include name="javax/jws/**"/>
+ <include name="org/jboss/annotation/**"/>
<include name="org/jboss/ws/**"/>
<exclude name="org/jboss/ws/integration/**"/>
<classpath path="${core.output.classes14.dir}"/>
@@ -119,6 +121,7 @@
<mkdir dir="${core.output.lib.dir}"/>
<jar jarfile="${core.output.lib.dir}/jboss-jaxws.jar"
manifest="${etc.dir}/default.mf">
<fileset dir="${core.output.classes.dir}">
+ <include name="javax/annotation/**"/>
<include name="javax/jws/**"/>
<include name="javax/xml/ws/**"/>
<include name="org/jboss/ws/jaxws/injection/**"/>
@@ -129,6 +132,7 @@
<mkdir dir="${core.output.lib.dir}"/>
<jar jarfile="${core.output.lib.dir}/jbossws-core.jar"
manifest="${etc.dir}/default.mf">
<fileset dir="${core.output.classes.dir}">
+ <include name="org/jboss/annotation/**"/>
<include name="org/jboss/ws/**"/>
<exclude name="org/jboss/ws/integration/**"/>
</fileset>
Added: trunk/jbossws-core/src/main/java/javax/annotation/Resource.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/annotation/Resource.java 2007-01-08 09:57:05
UTC (rev 1857)
+++ trunk/jbossws-core/src/main/java/javax/annotation/Resource.java 2007-01-08 10:08:16
UTC (rev 1858)
@@ -0,0 +1,67 @@
+/*
+ * 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 javax.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The Resource annotation is used to express a dependency on an external
+ * resource in the bean’s environment. The name property refers to the name by
+ * which the resource is to be known in the environment; the type is the
+ * resource manager connection factory type. The authenticationType member
+ * specifies whether the container or bean is to perform authentication. The
+ * shareable member refers to the sharability of resource manager connections.
+ *
+ * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+(a)Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
+ public @interface Resource
+{
+ /**
+ * Enums for whether the container or bean is to perform authentication.
+ *
+ * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+ public enum AuthenticationType
+ {
+ CONTAINER,
+ APPLICATION
+ }
+
+ String name() default "";
+
+ Class type() default Object.class;
+
+ AuthenticationType authenticationType() default AuthenticationType.CONTAINER;
+
+ boolean shareable() default true;
+
+ String description() default "";
+
+ String mappedName() default "";
+
+}
Property changes on: trunk/jbossws-core/src/main/java/javax/annotation/Resource.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/main/java/javax/annotation/Resources.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/annotation/Resources.java 2007-01-08 09:57:05
UTC (rev 1857)
+++ trunk/jbossws-core/src/main/java/javax/annotation/Resources.java 2007-01-08 10:08:16
UTC (rev 1858)
@@ -0,0 +1,40 @@
+/*
+ * 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 javax.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import javax.annotation.Resource;
+
+/**
+ * Specify a collection of Resources on a bean class.
+ *
+ * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+(a)Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME)
+public @interface Resources
+{
+ Resource[] value();
+}
Property changes on: trunk/jbossws-core/src/main/java/javax/annotation/Resources.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/main/java/org/jboss/annotation/security/SecurityDomain.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/annotation/security/SecurityDomain.java 2007-01-08
09:57:05 UTC (rev 1857)
+++
trunk/jbossws-core/src/main/java/org/jboss/annotation/security/SecurityDomain.java 2007-01-08
10:08:16 UTC (rev 1858)
@@ -0,0 +1,45 @@
+/*
+ * 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.annotation.security;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for specifying the JBoss security domain for an EJB
+ * DO NOT USE THE JNDI NAME:
+ * - "java:/jaas/MyDomain" ILLEGAL
+ * - "MyDomain" GOOD
+ *
+ * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
+ * @version $Revision$
+ *
+ **/
+(a)Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)
+public @interface SecurityDomain
+{
+ String value();
+
+ String unauthenticatedPrincipal() default "";
+}
Property changes on:
trunk/jbossws-core/src/main/java/org/jboss/annotation/security/SecurityDomain.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/Constants.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/Constants.java 2007-01-08 09:57:05 UTC
(rev 1857)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/Constants.java 2007-01-08 10:08:16 UTC
(rev 1858)
@@ -58,6 +58,8 @@
static final String NS_SOAP11_ENV = SOAPConstants.URI_NS_SOAP_ENVELOPE;
/** SOAP-1.2 namespace
http://schemas.xmlsoap.org/wsdl/soap12/ */
static final String NS_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/";
+ /** HTTP binding namespace
http://schemas.xmlsoap.org/wsdl/http/ */
+ static final String NS_HTTP = "http://schemas.xmlsoap.org/wsdl/http/";
/** SOAP-1.2 envelope namespace
http://www.w3.org/2003/05/soap-envelope */
static final String NS_SOAP12_ENV =
"http://www.w3.org/2003/05/soap-envelope";
/** The namespace for the SwA mime type */
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-01-08
09:57:05 UTC (rev 1857)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCMetaDataBuilder.java 2007-01-08
10:08:16 UTC (rev 1858)
@@ -660,30 +660,35 @@
MethodParamPartsMapping[] partsMappings =
seiMethodMapping.getMethodParamPartsMappings();
if (partsMappings.length > 0)
{
+ List<String> anyTypes = new ArrayList<String>();
+ anyTypes.add("javax.xml.soap.SOAPElement");
+ anyTypes.add("org.w3c.dom.Element");
+
boolean matchingPartFound = false;
for (MethodParamPartsMapping partsMapping : partsMappings)
{
- String paramTypeName = partsMapping.getParamType();
- if (paramTypeName.equals(javaTypeName))
+ String methodMappingTypeName = partsMapping.getParamType();
+ if (methodMappingTypeName.equals(javaTypeName))
{
matchingPartFound = true;
break;
}
+ // Check xsd:anyType
+ else if (anyTypes.contains(javaTypeName) &&
anyTypes.contains(methodMappingTypeName))
+ {
+ matchingPartFound = true;
+ break;
+ }
+ // Check assignability,
else
{
- // Check assignability,
- // JavaUtils.isAssignableFrom("org.w3c.dom.Element",
- // "javax.xml.soap.SOAPElement")
try
{
- Class paramType = JavaUtils.loadJavaType(paramTypeName);
+ Class paramType = JavaUtils.loadJavaType(methodMappingTypeName);
Class javaType = JavaUtils.loadJavaType(javaTypeName);
- // If it is assignable the explict mapping takes presedence
- // and we don't wrap
if (JavaUtils.isAssignableFrom(javaType, paramType))
{
- // javaTypeName = paramTypeName;
matchingPartFound = true;
break;
}
@@ -691,8 +696,7 @@
catch (ClassNotFoundException e)
{
// Ignore. For simple types this should work, others should
- // be lexically equal
- // if it is not wrapped.
+ // be lexically equal if it is not wrapped.
}
}
}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-01-08
09:57:05 UTC (rev 1857)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-01-08
10:08:16 UTC (rev 1858)
@@ -131,8 +131,22 @@
Type valueType = (holder ? HolderUtils.getValueType(actualType) : actualType);
Class valueClass = JavaUtils.erasure(valueType);
- boolean matched = (exact ? valueClass.getName().equals(expectedType.getName()) :
JavaUtils.isAssignableFrom(valueClass, expectedType));
-
+
+ List<Class> anyTypes = new ArrayList<Class>();
+ anyTypes.add(javax.xml.soap.SOAPElement.class);
+ anyTypes.add(org.w3c.dom.Element.class);
+
+ boolean matched;
+ if (exact)
+ {
+ matched = valueClass.getName().equals(expectedType.getName());
+ if (matched == false && anyTypes.contains(valueClass))
+ matched = anyTypes.contains(expectedType);
+ }
+ else
+ {
+ matched = JavaUtils.isAssignableFrom(valueClass, expectedType);
+ }
return matched;
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-01-08
09:57:05 UTC (rev 1857)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-01-08
10:08:16 UTC (rev 1858)
@@ -116,9 +116,14 @@
// provide logging
private static final Logger log = Logger.getLogger(WSDL11Reader.class);
+ private static QName HTTP_BINDING = new QName(Constants.NS_HTTP,
"binding");
+
private static QName SOAP12_BINDING = new QName(Constants.NS_SOAP12,
"binding");
+
private static QName SOAP12_BODY = new QName(Constants.NS_SOAP12, "body");
+
private static QName SOAP12_OPERATION = new QName(Constants.NS_SOAP12,
"operation");
+
private static QName SOAP12_ADDRESS = new QName(Constants.NS_SOAP12,
"address");
private WSDLDefinitions destWsdl;
@@ -130,6 +135,7 @@
private Map<String, URL> schemaLocationsMap = new HashMap<String, URL>();
private LinkedHashMap<QName, Binding> allBindings;
+
private LinkedHashMap<QName, Binding> portTypeBindings;
// Temporary files used by this reader.
@@ -165,10 +171,10 @@
private void cleanupTemporaryFiles()
{
- for (File current : tempFiles)
- {
- current.delete();
- }
+ for (File current : tempFiles)
+ {
+ current.delete();
+ }
}
// process all bindings not within service separetly
@@ -519,7 +525,7 @@
if (wsaAction != null)
destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_IN,
wsaAction.getLocalPart()));
- List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
+ List<String> paramOrder =
(List<String>)srcOperation.getParameterOrdering();
if (paramOrder != null)
{
for (String name : paramOrder)
@@ -530,12 +536,12 @@
}
WSDLInterfaceOperationInput rpcInput = new
WSDLInterfaceOperationInput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(paramOrder))
+ for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(paramOrder))
{
if (Constants.URI_STYLE_IRI == destOperation.getStyle())
{
WSDLInterfaceOperationInput destInput = new
WSDLInterfaceOperationInput(destOperation);
- QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
+ QName elementName = messagePartToElementName(srcMessage, srcPart);
destInput.setElement(elementName);
//Lets remember the Message name
@@ -554,8 +560,7 @@
QName xmlType = srcPart.getTypeName();
if (xmlType != null)
rpcInput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
- else
- messagePartToElementName(srcWsdl, srcPortType, srcOperation,
srcMessage, srcPart);
+ else messagePartToElementName(srcMessage, srcPart);
}
}
if (Constants.URI_STYLE_RPC == destOperation.getStyle())
@@ -582,11 +587,11 @@
log.trace("processOperationOutput: " + srcMessage.getQName());
destOperation.setPattern(Constants.WSDL20_PATTERN_IN_OUT);
- QName wsaAction = (QName)
srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
+ QName wsaAction =
(QName)srcOutput.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSA_ACTION);
if (wsaAction != null)
destOperation.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_ACTION_OUT,
wsaAction.getLocalPart()));
- List<String> paramOrder = (List<String>)
srcOperation.getParameterOrdering();
+ List<String> paramOrder =
(List<String>)srcOperation.getParameterOrdering();
if (paramOrder != null)
{
for (String name : paramOrder)
@@ -596,26 +601,24 @@
WSDLRPCSignatureItem item = destOperation.getRpcSignatureitem(name);
if (item != null)
item.setDirection(Direction.INOUT);
- else
- destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name,
Direction.OUT));
+ else destOperation.addRpcSignatureItem(new WSDLRPCSignatureItem(name,
Direction.OUT));
}
}
}
WSDLInterfaceOperationOutput rpcOutput = new
WSDLInterfaceOperationOutput(destOperation);
- for (Part srcPart : (List<Part>) srcMessage.getOrderedParts(null))
+ for (Part srcPart : (List<Part>)srcMessage.getOrderedParts(null))
{
if (Constants.URI_STYLE_IRI == destOperation.getStyle())
{
WSDLInterfaceOperationOutput destOutput = new
WSDLInterfaceOperationOutput(destOperation);
- QName elementName = messagePartToElementName(srcWsdl, srcPortType,
srcOperation, srcMessage, srcPart);
+ QName elementName = messagePartToElementName(srcMessage, srcPart);
destOutput.setElement(elementName);
// Lets remember the Message name
destOutput.setMessageName(srcMessage.getQName());
- destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT, srcMessage.getQName()
- .getLocalPart()));
+ destOperation.addProperty(new
WSDLProperty(Constants.WSDL_PROPERTY_MESSAGE_NAME_OUT,
srcMessage.getQName().getLocalPart()));
// Remember the original part name
destOutput.setPartName(srcPart.getName());
@@ -630,8 +633,7 @@
QName xmlType = srcPart.getTypeName();
if (xmlType != null)
rpcOutput.addChildPart(new WSDLRPCPart(srcPart.getName(),
destWsdl.registerQName(xmlType)));
- else
- messagePartToElementName(srcWsdl, srcPortType, srcOperation, srcMessage,
srcPart);
+ else messagePartToElementName(srcMessage, srcPart);
}
}
@@ -702,7 +704,7 @@
/** Translate the message part name into an XML element name.
*/
- private QName messagePartToElementName(Definition srcWsdl, PortType srcPortType,
Operation srcOperation, Message srcMessage, Part srcPart)
+ private QName messagePartToElementName(Message srcMessage, Part srcPart)
{
// <part name="param" element="tns:SomeType" />
QName xmlName = srcPart.getElementName();
@@ -756,26 +758,26 @@
if (operationStyle == null)
{
- for (ExtensibilityElement extElement : (List<ExtensibilityElement>)
srcBinding.getExtensibilityElements())
+ for (ExtensibilityElement extElement :
(List<ExtensibilityElement>)srcBinding.getExtensibilityElements())
{
QName elementType = extElement.getElementType();
if (extElement instanceof SOAPBinding)
{
- SOAPBinding soapBinding = (SOAPBinding) extElement;
+ SOAPBinding soapBinding = (SOAPBinding)extElement;
operationStyle = soapBinding.getStyle();
}
else if (SOAP12_BINDING.equals(elementType))
{
- Element domElement = ((UnknownExtensibilityElement)
extElement).getElement();
+ Element domElement =
((UnknownExtensibilityElement)extElement).getElement();
operationStyle = getOptionalAttribute(domElement, "style");
}
}
}
- return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC :
Constants.URI_STYLE_IRI;
+ return ("rpc".equals(operationStyle)) ? Constants.URI_STYLE_RPC :
Constants.URI_STYLE_IRI;
}
- private void processBinding(Definition srcWsdl, Binding srcBinding)
+ private boolean processBinding(Definition srcWsdl, Binding srcBinding)
{
QName srcBindingQName = srcBinding.getQName();
log.trace("processBinding: " + srcBindingQName);
@@ -787,34 +789,63 @@
if (srcPortType == null)
throw new WSException("Cannot find port type for binding: " +
ncName);
- processPortType(srcWsdl, srcPortType);
+ // Get binding type
+ String bindingType = null;
+ List<ExtensibilityElement> extList =
srcBinding.getExtensibilityElements();
+ for (ExtensibilityElement extElement : extList)
+ {
+ QName elementType = extElement.getElementType();
+ if (extElement instanceof SOAPBinding)
+ {
+ bindingType = Constants.NS_SOAP11;
+ }
+ else if (SOAP12_BINDING.equals(elementType))
+ {
+ bindingType = Constants.NS_SOAP12;
+ }
+ else if ("binding".equals(elementType.getLocalPart()))
+ {
+ log.warn("Unsupported binding: " + elementType);
+ bindingType = elementType.getNamespaceURI();
+ }
+ }
+ if (bindingType == null)
+ throw new WSException("Cannot obtain binding type for: " +
srcBindingQName);
+
+ // Ignore unknown bindings
+ if (Constants.NS_SOAP11.equals(bindingType) == false &&
Constants.NS_SOAP12.equals(bindingType) == false)
+ return false;
+
WSDLBinding destBinding = new WSDLBinding(destWsdl);
destBinding.setQName(srcBindingQName);
destBinding.setName(ncName);
destBinding.setInterfaceName(srcPortType.getQName());
+ destBinding.setType(bindingType);
+ destWsdl.addBinding(destBinding);
+ processPortType(srcWsdl, srcPortType);
+
String bindingStyle = Style.getDefaultStyle().toString();
- List<ExtensibilityElement> extList =
srcBinding.getExtensibilityElements();
for (ExtensibilityElement extElement : extList)
{
QName elementType = extElement.getElementType();
if (extElement instanceof SOAPBinding)
{
- destBinding.setType(Constants.NS_SOAP11);
SOAPBinding soapBinding = (SOAPBinding)extElement;
bindingStyle = soapBinding.getStyle();
}
else if (SOAP12_BINDING.equals(elementType))
{
- destBinding.setType(Constants.NS_SOAP12);
Element domElement =
((UnknownExtensibilityElement)extElement).getElement();
bindingStyle = getOptionalAttribute(domElement, "style");
}
}
- destWsdl.addBinding(destBinding);
- processBindingOperations(destBinding, srcBinding, bindingStyle);
+
+ processBindingOperations(srcWsdl, destBinding, srcBinding, bindingStyle);
}
+
+ return true;
}
private Map<QName, Binding> getPortTypeBindings(Definition srcWsdl)
@@ -858,17 +889,17 @@
return allBindings;
}
- private void processBindingOperations(WSDLBinding destBinding, Binding srcBinding,
String bindingStyle)
+ private void processBindingOperations(Definition srcWsdl, WSDLBinding destBinding,
Binding srcBinding, String bindingStyle)
{
Iterator it = srcBinding.getBindingOperations().iterator();
while (it.hasNext())
{
BindingOperation srcBindingOperation = (BindingOperation)it.next();
- processBindingOperation(destBinding, bindingStyle, srcBindingOperation);
+ processBindingOperation(srcWsdl, destBinding, bindingStyle,
srcBindingOperation);
}
}
- private void processBindingOperation(WSDLBinding destBinding, String bindingStyle,
BindingOperation srcBindingOperation)
+ private void processBindingOperation(Definition srcWsdl, WSDLBinding destBinding,
String bindingStyle, BindingOperation srcBindingOperation)
{
String srcBindingName = srcBindingOperation.getName();
log.trace("processBindingOperation: " + srcBindingName);
@@ -904,24 +935,27 @@
BindingInput srcBindingInput = srcBindingOperation.getBindingInput();
if (srcBindingInput != null)
{
- processBindingInput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingInput);
+ processBindingInput(srcWsdl, destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingInput);
}
BindingOutput srcBindingOutput = srcBindingOperation.getBindingOutput();
if (srcBindingOutput != null)
{
- processBindingOutput(destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingOutput);
+ processBindingOutput(srcWsdl, destBindingOperation, destIntfOperation,
srcBindingOperation, srcBindingOutput);
}
}
interface ReferenceCallback
{
void removeReference(QName element);
+
void removeRPCPart(String partName);
+
QName getXmlType(String partName);
}
- private void processBindingInput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingInput srcBindingInput)
+ private void processBindingInput(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
+ final BindingOperation srcBindingOperation, BindingInput srcBindingInput)
{
log.trace("processBindingInput");
@@ -930,8 +964,7 @@
WSDLBindingOperationInput input = new
WSDLBindingOperationInput(destBindingOperation);
destBindingOperation.addInput(input);
- ReferenceCallback cb = new ReferenceCallback()
- {
+ ReferenceCallback cb = new ReferenceCallback() {
public QName getXmlType(String partName)
{
return
srcBindingOperation.getOperation().getInput().getMessage().getPart(partName).getTypeName();
@@ -951,10 +984,11 @@
}
};
- processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, input, cb);
+ processBindingReference(srcWsdl, destBindingOperation, destIntfOperation,
soap11Body, extList, input, srcBindingOperation, cb);
}
- private void processBindingOutput(WSDLBindingOperation destBindingOperation, final
WSDLInterfaceOperation destIntfOperation, final BindingOperation srcBindingOperation,
BindingOutput srcBindingOutput)
+ private void processBindingOutput(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, final WSDLInterfaceOperation destIntfOperation,
+ final BindingOperation srcBindingOperation, BindingOutput srcBindingOutput)
{
log.trace("processBindingInput");
@@ -963,8 +997,7 @@
WSDLBindingOperationOutput output = new
WSDLBindingOperationOutput(destBindingOperation);
destBindingOperation.addOutput(output);
- ReferenceCallback cb = new ReferenceCallback()
- {
+ ReferenceCallback cb = new ReferenceCallback() {
public QName getXmlType(String partName)
{
return
srcBindingOperation.getOperation().getOutput().getMessage().getPart(partName).getTypeName();
@@ -985,12 +1018,11 @@
}
};
- processBindingReference(destBindingOperation, destIntfOperation, soap11Body,
extList, output, cb);
+ processBindingReference(srcWsdl, destBindingOperation, destIntfOperation,
soap11Body, extList, output, srcBindingOperation, cb);
}
-
- private void processBindingReference(WSDLBindingOperation destBindingOperation,
WSDLInterfaceOperation destIntfOperation,
- QName soap11Body, List<ExtensibilityElement> extList,
WSDLBindingMessageReference reference, ReferenceCallback callback)
+ private void processBindingReference(Definition srcWsdl, WSDLBindingOperation
destBindingOperation, WSDLInterfaceOperation destIntfOperation, QName soap11Body,
+ List<ExtensibilityElement> extList, WSDLBindingMessageReference reference,
BindingOperation srcBindingOperation, ReferenceCallback callback)
{
for (ExtensibilityElement extElement : extList)
{
@@ -1002,23 +1034,42 @@
else if (extElement instanceof SOAPHeader)
{
SOAPHeader header = (SOAPHeader)extElement;
- QName messageQName = header.getMessage();
- String partName = header.getPart();
+ QName headerMessageName = header.getMessage();
+ String headerPartName = header.getPart();
- String key = messageQName + "->" + partName;
+ String key = headerMessageName + "->" + headerPartName;
QName elementName = (QName)messagePartToElementMap.get(key);
- if (elementName == null)
- throw new WSException("Could not determine element name from header:
" + partName);
- reference.addSoapHeader(new WSDLSOAPHeader(elementName, partName));
- if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ // The message may not have been reachable from a port type operation
+ boolean isImplicitHeader = false;
+ Message srcMessage = srcWsdl.getMessage(headerMessageName);
+ if (elementName == null && srcMessage != null)
{
- callback.removeReference(elementName);
+ Iterator itParts = srcMessage.getParts().values().iterator();
+ while (itParts.hasNext())
+ {
+ Part srcPart = (Part)itParts.next();
+ String partName = srcPart.getName();
+ if (partName.equals(headerPartName))
+ isImplicitHeader = true;
+ }
}
- else
+
+ if (elementName == null && isImplicitHeader == false)
+ throw new WSException("Could not determine element name from header:
" + key);
+
+ if (elementName != null)
{
- // Just in case
- callback.removeRPCPart(partName);
+ reference.addSoapHeader(new WSDLSOAPHeader(elementName, headerPartName));
+ if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
+ {
+ callback.removeReference(elementName);
+ }
+ else
+ {
+ // Just in case
+ callback.removeRPCPart(headerPartName);
+ }
}
}
else if (extElement instanceof MIMEMultipartRelated)
@@ -1053,7 +1104,7 @@
// Found content types in this part
if (name != null)
{
- QName xmlType = callback.getXmlType(name);
+ QName xmlType = callback.getXmlType(name);
reference.addMimePart(new WSDLMIMEPart(name, xmlType, types));
if (Constants.URI_STYLE_IRI == destIntfOperation.getStyle())
{
@@ -1070,7 +1121,6 @@
}
}
-
private void processEncodingStyle(ExtensibilityElement extElement,
WSDLBindingOperation destBindingOperation)
{
log.trace("processEncodingStyle");
@@ -1171,9 +1221,9 @@
destEndpoint.setBinding(srcBinding.getQName());
destEndpoint.setQName(new QName(srcWsdl.getTargetNamespace(), srcPort.getName()));
destEndpoint.setAddress(getSOAPAddress(srcPort));
- destService.addEndpoint(destEndpoint);
- processBinding(srcWsdl, srcBinding);
+ if (processBinding(srcWsdl, srcBinding))
+ destService.addEndpoint(destEndpoint);
}
/** Get the endpoint address from the ports extensible element
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-08 09:57:05 UTC (rev 1857)
+++ trunk/jbossws-tests/build.xml 2007-01-08 10:08:16 UTC (rev 1858)
@@ -139,7 +139,14 @@
</condition>
<!-- Define excluded tests -->
- <property name="tests.excludesfile"
value="${tests.resources.dir}/tests-${jbossws.integration.target}-excludes.txt"/>
+ <condition property="excludes-short-name"
value="tests-${jbossws.integration.target}-noejb3-excludes.txt">
+ <not>
+ <available file="${jboss.client}/jboss-ejb3-client.jar"/>
+ </not>
+ </condition>
+ <property name="excludes-short-name"
value="tests-${jbossws.integration.target}-excludes.txt"/>
+ <property name="tests.excludefile"
value="${tests.resources.dir}/${excludes-short-name}"/>
+ <echo message="excludefile = ${excludes-short-name}"/>
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
@@ -315,7 +322,7 @@
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/**/*TestCase.class"/>
<param name="exclude.wildcard"
value="org/jboss/test/ws/*/benchmark/**"/>
- <param name="excludesfile"
value="${tests.excludesfile}"/>
+ <param name="excludesfile"
value="${tests.excludefile}"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -324,7 +331,7 @@
<target name="tests-benchmark" depends="init"
description="Run benchmark unit tests">
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/benchmark/**/*TestCase.class"/>
- <param name="excludesfile"
value="${tests.excludesfile}"/>
+ <param name="excludesfile"
value="${tests.excludefile}"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -333,7 +340,7 @@
<target name="tests-samples" depends="init"
description="Run samples unit tests">
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/*/samples/**/*TestCase.class"/>
- <param name="excludesfile"
value="${tests.excludesfile}"/>
+ <param name="excludesfile"
value="${tests.excludefile}"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -342,7 +349,7 @@
<target name="tests-tools" depends="init" description="Run
tools unit tests">
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/tools/**/*TestCase.class"/>
- <param name="excludesfile"
value="${tests.excludesfile}"/>
+ <param name="excludesfile"
value="${tests.excludefile}"/>
</antcall>
<antcall target="tests-report"/>
</target>
@@ -355,7 +362,7 @@
<antcall target="tests-main">
<param name="include.wildcard"
value="org/jboss/test/ws/${test}/**/*TestCase.class"/>
<param name="exclude.wildcard"
value="org/jboss/test/ws/*/benchmark/**"/>
- <param name="excludesfile"
value="${tests.excludesfile}"/>
+ <param name="excludesfile"
value="${tests.excludefile}"/>
</antcall>
</target>
Added: trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt
===================================================================
--- trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt 2007-01-08
09:57:05 UTC (rev 1857)
+++ trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt 2007-01-08
10:08:16 UTC (rev 1858)
@@ -0,0 +1,8 @@
+org/jboss/test/ws/jaxws/eardeployment/**
+org/jboss/test/ws/jaxws/jbws944/**
+org/jboss/test/ws/jaxws/jbws981/**
+org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB3TestCase.class
+org/jboss/test/ws/jaxws/samples/jsr181ejb/JSR181WebServiceEJB3TestCase.class
+org/jboss/test/ws/jaxws/samples/retail/**
+org/jboss/test/ws/jaxws/webserviceref/WebServiceRefEJB3TestCase.class
+org/jboss/test/ws/jaxws/xop/**
Property changes on:
trunk/jbossws-tests/src/main/resources/tests-jboss42-noejb3-excludes.txt
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF