[jboss-svn-commits] JBossWS SVN: r718 - in trunk/src: main/java/javax/jws main/java/org/jboss/ws/common main/java/org/jboss/ws/deployment main/java/org/jboss/ws/jaxrpc main/java/org/jboss/ws/jaxws/core main/java/org/jboss/ws/jaxws/handler main/java/org/jboss/ws/jaxws/spi main/java/org/jboss/ws/metadata main/java/org/jboss/ws/tools/metadata test test/ant test/java/org/jboss/test/ws/addressing test/java/org/jboss/test/ws/addressing/action test/java/org/jboss/test/ws/addressing/replyto test/java/org/jboss/test/ws/jsr181/handlerchain test/java/org/jboss/test/ws/jsr181/soapbinding test/java/org/jboss/test/ws/jsr181/webservice test/java/org/jboss/test/ws/samples/wsaddressing test/resources/addressing/action/Doc-META-INF test/resources/addressing/action/Doc-META-INF/wsdl test/resources/addressing/action/Rpc-META-INF test/resources/addressing/action/Rpc-META-INF/wsdl test/resources/jsr181/handlerchain test/resources/samples/jsr181ejb/META-INF test/resources/samples/wsaddressing
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 9 13:24:54 EDT 2006
Author: thomas.diesler at jboss.com
Date: 2006-08-09 13:23:23 -0400 (Wed, 09 Aug 2006)
New Revision: 718
Added:
trunk/src/main/java/org/jboss/ws/deployment/JSR181ClientMetaDataBuilder.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpoint.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocService.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpoint.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcService.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/Bar.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/BarResponse.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/Foo.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/FooResponse.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ObjectFactory.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/package-info.java
trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxws-handlers.xml
Removed:
trunk/src/test/java/org/jboss/test/ws/addressing/AddressingHandler.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java
trunk/src/test/resources/addressing/action/Doc-META-INF/application-client.xml
trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-client-config.xml
trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/addressing/action/Doc-META-INF/jboss-client.xml
trunk/src/test/resources/addressing/action/Doc-META-INF/wstools-config.xml
trunk/src/test/resources/addressing/action/Rpc-META-INF/application-client.xml
trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-client-config.xml
trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-mapping.xml
trunk/src/test/resources/addressing/action/Rpc-META-INF/jboss-client.xml
trunk/src/test/resources/addressing/action/Rpc-META-INF/wstools-config.xml
trunk/src/test/resources/jsr181/handlerchain/config/
trunk/src/test/resources/samples/jsr181ejb/META-INF/application-client.xml
trunk/src/test/resources/samples/jsr181ejb/META-INF/jboss-client.xml
trunk/src/test/resources/samples/wsaddressing/META-INF/
trunk/src/test/resources/samples/wsaddressing/wstools-config.xml
Modified:
trunk/src/main/java/javax/jws/WebParam.java
trunk/src/main/java/javax/jws/WebResult.java
trunk/src/main/java/javax/jws/WebService.java
trunk/src/main/java/org/jboss/ws/common/CommonClient.java
trunk/src/main/java/org/jboss/ws/deployment/AbstractMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JAXWSMetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JAXWSProviderMetaDataBuilderJSE.java
trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java
trunk/src/main/java/org/jboss/ws/jaxrpc/SOAPFaultExceptionHelper.java
trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java
trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java
trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java
trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerWrapper.java
trunk/src/main/java/org/jboss/ws/jaxws/spi/ServiceDelegateImpl.java
trunk/src/main/java/org/jboss/ws/metadata/ClientEndpointMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java
trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java
trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
trunk/src/test/ant/build-jars.xml
trunk/src/test/build.xml
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java
trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientRpcHandler.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java
trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ClientHandler.java
trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/AuthorizationHandler.java
trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/LogHandler.java
trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/RoutingHandler.java
trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocBareServiceImpl.java
trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocWrappedServiceImpl.java
trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/ExampleServiceImpl.java
trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean01.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean02.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean01.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean02.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean03.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EndpointInterface03.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean01.java
trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean02.java
trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingHandler.java
trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java
trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/ClientHandler.java
trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl
trunk/src/test/resources/addressing/action/Rpc-META-INF/wsdl/ActionRpcService.wsdl
Log:
Support jsr181 on jaxws clients
Use jaxws clients with jsr181 endpoints
Modified: trunk/src/main/java/javax/jws/WebParam.java
===================================================================
--- trunk/src/main/java/javax/jws/WebParam.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/javax/jws/WebParam.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package javax.jws;
// $Id$
@@ -35,32 +35,46 @@
* @since 26-Apr-2005
*/
@Retention(value = RetentionPolicy.RUNTIME)
- @Target(value = {ElementType.PARAMETER})
- public @interface WebParam
+ at Target(value = { ElementType.PARAMETER })
+public @interface WebParam
{
-
/**
* The direction in which the parameter flows
*/
public enum Mode
{
- IN,
- OUT,
- INOUT
+ IN, OUT, INOUT
};
/**
- * Name of the parameter as it appears in the WSDL. For RPC bindings, this is name of the wsdl:part representing
- * the parameter. For document bindings, this is the local name of the XML element representing the parameter.
- *
- * Defaults to the name of the parameter as it appears in the argument list.
+ * Name of the parameter.
+ *
+ * If the operation is rpc style and @WebParam.partName has not been specified, this is name of the wsdl:part representing the parameter.
+ * If the operation is document style or the parameter maps to a header, this is the local name of the XML element representing the parameter.
+ *
+ * A name MUST be specified if the operation is document style, the parameter style is BARE, and the mode is OUT or INOUT.
+ *
+ * Specification Default:
+ * If the operation is document style and the parameter style is BARE, @WebMethod.operationName.
+ * Otherwise, argN, where N represents the index of the parameter in the method signature (starting at arg0).
*/
String name() default "";
/**
- * The XML namespace for the parameter. Only used with document bindings, where the parameter maps to an XML
- * element. Defaults to the targetNamespace for the Web Service.
+ * The name of the wsdl:part representing this return value.
+ * This is only used if the operation is rpc style, or if the operation is document style and the parameter style is BARE.
*/
+ String partName() default "";
+
+ /**
+ * The XML namespace for the parameter.
+ *
+ * Only used if the operation is document style or the paramater maps to a header. If the target namespace is set to “”, this represents the empty namespace.
+ *
+ * Specification Default:
+ * If the operation is document style, the parameter style is WRAPPED, and the parameter does not map to a header, the empty namespace.
+ * Otherwise, the targetNamespace for the Web Service.
+ */
String targetNamespace() default "";
/**
@@ -74,6 +88,4 @@
* If true, the parameter is pulled from a message header rather then the message body.
*/
boolean header() default false;
-}
-
-;
+};
Modified: trunk/src/main/java/javax/jws/WebResult.java
===================================================================
--- trunk/src/main/java/javax/jws/WebResult.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/javax/jws/WebResult.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package javax.jws;
// $Id$
@@ -35,22 +35,38 @@
* @since 26-Apr-2005
*/
@Retention(value = RetentionPolicy.RUNTIME)
- @Target(value = {ElementType.METHOD})
- public @interface WebResult
+ at Target(value = { ElementType.METHOD })
+public @interface WebResult
{
+ /**
+ * If true, the result is pulled from a message header rather then the message body.
+ */
+ boolean header() default false;
+
+ /**
+ * If the operation is rpc style and @WebResult.partName has not been specified, this is the name of the wsdl:part representing the return value.
+ * If the operation is document style or the return value maps to a header, this is the local name of the XML element representing the return value.
+ *
+ * Specification Default:
+ * If the operation is document style and the parameter style is BARE, @WebParam.operationName+”Response”.
+ * Otherwise, “return.”
+ */
+ String name() default "";
/**
- * Name of return value as it appears in the WSDL and messages on the wire. For RPC bindings, this is the name of
- * the wsdl:part representing the return value. For document bindings, this is the local name of the XML element
- * representing the return value.
+ * The name of the wsdl:part representing this return value.
+ * This is only used if the operation is rpc style, or if the operation is document style and the parameter style is BARE.
*/
- String name() default "return";
+ String partName() default "";
/**
- * The XML namespace for the return value. Only used with document bindings, where the return value maps to an
- * XML element. Defaults to the targetNamespace of the Web Service.
+ * The XML namespace for the return value.
+ *
+ * Only used if the operation is document style or the return value maps to a header. If the target namespace is set to “”, this represents the empty namespace.
+ *
+ * Specification Default:
+ * If the operation is document style, the parameter style is WRAPPED, and the return value does not map to a header, the empty namespace.
+ * Otherwise, the targetNamespace for the Web Service.
*/
String targetNamespace() default "";
-}
-
-;
+};
Modified: trunk/src/main/java/javax/jws/WebService.java
===================================================================
--- trunk/src/main/java/javax/jws/WebService.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/javax/jws/WebService.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -40,45 +40,73 @@
{
/**
- * The name of the Web Service. Used as the name of the wsdl:portType when mapped to WSDL 1.1.
- * Defaults to the simple name of the Java class or interface
+ * The name of the Web Service.
+ * Used as the name of the wsdl:portType when mapped to WSDL 1.1.
+ * Specification Default:
+ * The simple name of the Java class or interface.
*/
String name() default "";
/**
- * The XML namespace used for the WSDL and XML elements generated from this Web Service.
+ * The port name of the Web Service.
+ * Used as the name of the wsdl:port when mapped to WSDL 1.1.
+ * This member-value is not allowed on endpoint interfaces.
+ * Specification Default:
+ * @WebService.name + ”Port”.
*/
+ String portName() default "";
+
+ /**
+ * If the @WebService.targetNamespace annotation is on a service endpoint interface, the targetNamespace is used for the
+ * namespace for the wsdl:portType (and associated XML elements).
+ *
+ * If the @WebService.targetNamespace annotation is on a service implementation bean that does NOT reference a service
+ * endpoint interface (through the endpointInterface attribute), the targetNamespace is used for both the wsdl:portType
+ * and the wsdl:service (and associated XML elements).
+ *
+ * If the @WebService.targetNamespace annotation is on a service implementation bean that does reference a service
+ * endpoint interface (through the endpointInterface attribute), the targetNamespace is used for only the wsdl:service
+ * (and associated XML elements).
+ */
String targetNamespace() default "";
/**
- * The service name of the Web Service. Used as the name of the wsdl:service when mapped to WSDL 1.1.
- * Not allowed on interfaces. Defaults to the simple name of the Java class + Service".
+ * The service name of the Web Service.
+ *
+ * Used as the name of the wsdl:service when mapped to WSDL 1.1.
+ *
+ * This member-value is not allowed on endpoint interfaces.
+ *
+ * Specification Default:
+ * The simple name of the Java class + “Service".
*/
String serviceName() default "";
/**
- * The location of a pre-defined WSDL describing the service. The wsdlLocation is a URL (relative or absolute)
- * that refers to a pre-existing WSDL file. The presence of a wsdlLocation value indicates that the service
- * implementation bean is implementing a pre-defined WSDL contract. The JSR-181 tool should instead feedback
- * if the service implementation bean is inconsistent with the portType and bindings declared in this WSDL. Note
- * that a single WSDL file might contain multiple portTypes and multiple bindings. The annotations on the service
- * implementation bean determine the specific portType and bindings that correspond to the Web Service.
+ * The location of a pre-defined WSDL describing the service.
+ *
+ * The wsdlLocation is a URL (relative or absolute) that refers to a pre-existing WSDL file.
+ * The presence of a wsdlLocation value indicates that the service implementation bean is implementing a
+ * pre-defined WSDL contract. The JSR-181 tool MUST provide feedback if the service implementation bean is
+ * inconsistent with the portType and bindings declared in this WSDL. Note that a single WSDL file might
+ * contain multiple portTypes and multiple bindings. The annotations on the service implementation bean
+ * determine the specific portType and bindings that correspond to the Web Service.
*/
String wsdlLocation() default "";
/**
- * The complete name of the service endpoint interface defining the service's abstract Web Service contract. This
- * annotation allows the developer to separate the interface contract from the implementation. If this annotation
- * is present, the service endpoint interface is used to determine the abstract WSDL contract (portType and
- * bindings). The service endpoint interface may include JSR-181 annotations to customize the mapping from Java to
- * WSDL. The service implementation bean may implement the service endpoint interface, but is not required to do
- * so.
- *
- * If this annotation is not present, the Web Service contract will be generated from annotations on the service
- * implementation bean itself. If a service endpoint interface is required by the target environment, it will be
- * generated into an implementation-defined package with an implementation defined name.
+ * The complete name of the service endpoint interface defining the service’s abstract Web Service contract.
+ *
+ * This annotation allows the developer to separate the interface contract from the implementation.
+ * If this annotation is present, the service endpoint interface is used to determine the abstract
+ * WSDL contract (portType and bindings). The service endpoint interface MAY include JSR-181 annotations
+ * to customize the mapping from Java to WSDL.
+ *
+ * The service implementation bean MAY implement the service endpoint interface, but is not REQUIRED to do so.
+ * If this member-value is not present, the Web Service contract is generated from annotations on the service
+ * implementation bean. If a service endpoint interface is required by the target environment, it will be generated into an implementation-defined package with an implementation- defined name
+ *
+ * This member-value is not allowed on endpoint interfaces.
*/
String endpointInterface() default "";
-}
-
-;
+};
Modified: trunk/src/main/java/org/jboss/ws/common/CommonClient.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/common/CommonClient.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -191,7 +191,7 @@
ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
wsMetaData.addService(serviceMetaData);
- epMetaData = new ClientEndpointMetaData(serviceMetaData, new QName(Constants.NS_JBOSSWS_URI, "AnonymousEndpoint"), Type.JAXRPC);
+ epMetaData = new ClientEndpointMetaData(serviceMetaData, new QName(Constants.NS_JBOSSWS_URI, "AnonymousPort"), Type.JAXRPC);
epMetaData.setStyle(Style.RPC);
serviceMetaData.addEndpoint(epMetaData);
Modified: trunk/src/main/java/org/jboss/ws/deployment/AbstractMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/AbstractMetaDataBuilder.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/deployment/AbstractMetaDataBuilder.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -117,7 +117,7 @@
for (WSDLBindingOperation wsdlBindingOperation : wsdlBinding.getOperations())
{
String encStyle = wsdlBindingOperation.getEncodingStyle();
- epMetaData.setEncodingStyle(Use.valueOf(encStyle));
+ epMetaData.setEncoding(Use.valueOf(encStyle));
}
}
}
Modified: trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/deployment/JAXWSClientMetaDataBuilder.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -56,6 +56,8 @@
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationInput;
import org.jboss.ws.metadata.wsdl.WSDLInterfaceOperationOutput;
import org.jboss.ws.metadata.wsdl.WSDLService;
+import org.jboss.ws.metadata.wsdl.WSDLUtils;
+import org.jboss.ws.metadata.wsdl.xmlschema.JBossXSModel;
/**
* A client side meta data builder.
@@ -90,6 +92,10 @@
buildMetaDataInternal(serviceMetaData, wsdlDefinitions);
+ // Read the generated WSDL and initialize the schema model
+ JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
+ serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
+
// eagerly initialize
wsMetaData.eagerInitialize();
@@ -175,7 +181,7 @@
opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());
// Get the type mapping for the encoding style
- String encStyle = epMetaData.getEncodingStyle().toURI();
+ String encStyle = epMetaData.getEncoding().toURI();
TypeMappingRegistry tmRegistry = new TypeMappingRegistryImpl();
TypeMappingImpl typeMapping = (TypeMappingImpl)tmRegistry.getTypeMapping(encStyle);
Modified: trunk/src/main/java/org/jboss/ws/deployment/JAXWSMetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JAXWSMetaDataBuilder.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/deployment/JAXWSMetaDataBuilder.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -23,26 +23,8 @@
// $Id$
-import javax.management.ObjectName;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.transform.Source;
-import javax.xml.ws.ServiceMode;
-import javax.xml.ws.WebServiceProvider;
-import javax.xml.ws.Service.Mode;
-
import org.jboss.logging.Logger;
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.jaxrpc.ParameterStyle;
-import org.jboss.ws.jaxrpc.Style;
-import org.jboss.ws.metadata.OperationMetaData;
-import org.jboss.ws.metadata.ParameterMetaData;
import org.jboss.ws.metadata.ServerEndpointMetaData;
-import org.jboss.ws.metadata.ServiceMetaData;
-import org.jboss.ws.metadata.UnifiedMetaData;
-import org.jboss.ws.metadata.EndpointMetaData.Type;
-import org.jboss.ws.metadata.wsdl.WSDLUtils;
/** An abstract annotation meta data builder.
*
@@ -58,98 +40,9 @@
{
}
- protected ServerEndpointMetaData setupEndpointFromAnnotations(UnifiedMetaData wsMetaData, UnifiedDeploymentInfo udi, Class sepClass, String linkName)
- throws ClassNotFoundException, SecurityException, NoSuchMethodException
- {
- WebServiceProvider anWebServiceProvider = (WebServiceProvider)sepClass.getAnnotation(WebServiceProvider.class);
- if (anWebServiceProvider == null)
- throw new WSException("Cannot obtain @WebServiceProvider annotaion from: " + sepClass.getName());
-
- Class seiClass = null;
- Class wsClass = (seiClass != null ? seiClass : sepClass);
-
- WSDLUtils wsdlUtils = WSDLUtils.getInstance();
-
- String serviceName = anWebServiceProvider.serviceName();
- if (serviceName.length() == 0)
- serviceName = wsdlUtils.getJustClassName(wsClass.getName()) + "Service";
-
- String targetNS = anWebServiceProvider.targetNamespace();
- if (targetNS.length() == 0)
- targetNS = wsdlUtils.getTypeNamespace(wsClass);
-
- String portName = anWebServiceProvider.portName();
- if (portName.length() == 0)
- {
- portName = wsdlUtils.getJustClassName(wsClass.getName());
- portName += "Port";
- }
-
- ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new QName(targetNS, serviceName));
- wsMetaData.addService(serviceMetaData);
-
- // Setup the ServerEndpointMetaData
- QName portQName = new QName(targetNS, portName);
- ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, portQName, Type.JAXWS);
- sepMetaData.setLinkName(linkName);
-
- sepMetaData.setStyle(Style.DOCUMENT);
- sepMetaData.setParameterStyle(ParameterStyle.BARE);
-
- sepMetaData.setServiceEndpointImplName(sepClass.getName());
- sepMetaData.setServiceEndpointInterfaceName(wsClass.getName());
-
- ServiceMode anServiceMode = (ServiceMode)sepClass.getAnnotation(ServiceMode.class);
- if (anServiceMode != null)
- sepMetaData.setServiceMode(anServiceMode.value());
- else sepMetaData.setServiceMode(Mode.PAYLOAD);
-
- serviceMetaData.addEndpoint(sepMetaData);
-
- // Process invoke method
- processWebMethod(sepMetaData);
-
- // Process or generate WSDL
- String wsdlLocation = anWebServiceProvider.wsdlLocation();
-
- // FIXME: JBWS-1026
- // processOrGenerateWSDL(wsClass, serviceMetaData, wsdlLocation, sepMetaData);
-
- // Set the endpoint address
- processPortComponent(udi, wsClass, linkName, sepMetaData);
-
- // init service endpoint id
- ObjectName sepID = getServiceEndpointID(udi, sepMetaData);
- sepMetaData.setServiceEndpointID(sepID);
-
- return sepMetaData;
- }
-
protected void replaceAddressLocation(ServerEndpointMetaData epMetaData)
{
// FIXME: JBWS-1026
// Remove this method
}
-
- private void processWebMethod(ServerEndpointMetaData epMetaData) throws SecurityException, NoSuchMethodException
- {
- String javaName = "invoke";
- String targetNS = epMetaData.getQName().getNamespaceURI();
- OperationMetaData opMetaData = new OperationMetaData(epMetaData, new QName(targetNS, javaName), javaName);
- epMetaData.addOperation(opMetaData);
-
- Mode serviceMode = epMetaData.getServiceMode();
- Class paramType = (serviceMode == Mode.MESSAGE ? SOAPMessage.class : Source.class);
-
- // Setup invoke param
- QName xmlName = new QName("invokeParam");
- QName xmlType = Constants.TYPE_LITERAL_ANYTYPE;
- ParameterMetaData pmd = new ParameterMetaData(opMetaData, xmlName, xmlType, paramType.getName());
- opMetaData.addParameter(pmd);
-
- // Setup invoke return
- xmlName = new QName("invokeReturn");
- ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, paramType.getName());
- opMetaData.setReturnParameter(retMetaData);
- }
}
Modified: trunk/src/main/java/org/jboss/ws/deployment/JAXWSProviderMetaDataBuilderJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JAXWSProviderMetaDataBuilderJSE.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/deployment/JAXWSProviderMetaDataBuilderJSE.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -25,12 +25,27 @@
import java.util.Map;
import javax.jws.WebService;
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.transform.Source;
+import javax.xml.ws.ServiceMode;
import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.Service.Mode;
import org.jboss.logging.Logger;
+import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.jaxrpc.ParameterStyle;
+import org.jboss.ws.jaxrpc.Style;
+import org.jboss.ws.metadata.OperationMetaData;
+import org.jboss.ws.metadata.ParameterMetaData;
+import org.jboss.ws.metadata.ServerEndpointMetaData;
+import org.jboss.ws.metadata.ServiceMetaData;
import org.jboss.ws.metadata.UnifiedMetaData;
+import org.jboss.ws.metadata.EndpointMetaData.Type;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.metadata.wsdl.WSDLUtils;
/**
* A server side meta data builder that is based on JSR-181 annotations
@@ -75,7 +90,7 @@
catch (ClassNotFoundException ex)
{
log.warn("Cannot load service endpoint class: " + servletClassName);
- }
+ }
}
log.debug("END buildMetaData: " + wsMetaData);
@@ -90,4 +105,93 @@
throw new WSException("Cannot build meta data: " + ex.getMessage(), ex);
}
}
+
+ private ServerEndpointMetaData setupEndpointFromAnnotations(UnifiedMetaData wsMetaData, UnifiedDeploymentInfo udi, Class sepClass, String linkName)
+ throws ClassNotFoundException, SecurityException, NoSuchMethodException
+ {
+ WebServiceProvider anWebServiceProvider = (WebServiceProvider)sepClass.getAnnotation(WebServiceProvider.class);
+ if (anWebServiceProvider == null)
+ throw new WSException("Cannot obtain @WebServiceProvider annotaion from: " + sepClass.getName());
+
+ Class seiClass = null;
+ Class wsClass = (seiClass != null ? seiClass : sepClass);
+
+ WSDLUtils wsdlUtils = WSDLUtils.getInstance();
+
+ String name = wsdlUtils.getJustClassName(wsClass);
+
+ String serviceName = anWebServiceProvider.serviceName();
+ if (serviceName.length() == 0)
+ serviceName = name + "Service";
+
+ String targetNS = anWebServiceProvider.targetNamespace();
+ if (targetNS.length() == 0)
+ targetNS = wsdlUtils.getTypeNamespace(wsClass);
+
+ String portName = anWebServiceProvider.portName();
+ if (portName.length() == 0)
+ portName = name + "Port";
+
+ ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new QName(targetNS, serviceName));
+ wsMetaData.addService(serviceMetaData);
+
+ // Setup the ServerEndpointMetaData
+ QName portQName = new QName(targetNS, portName);
+ ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, portQName, Type.JAXWS);
+ sepMetaData.setLinkName(linkName);
+
+ sepMetaData.setStyle(Style.DOCUMENT);
+ sepMetaData.setParameterStyle(ParameterStyle.BARE);
+
+ sepMetaData.setServiceEndpointImplName(sepClass.getName());
+ sepMetaData.setServiceEndpointInterfaceName(wsClass.getName());
+
+ ServiceMode anServiceMode = (ServiceMode)sepClass.getAnnotation(ServiceMode.class);
+ if (anServiceMode != null)
+ sepMetaData.setServiceMode(anServiceMode.value());
+ else sepMetaData.setServiceMode(Mode.PAYLOAD);
+
+ serviceMetaData.addEndpoint(sepMetaData);
+
+ // Process invoke method
+ processInvokeMethod(sepMetaData);
+
+ // Process or generate WSDL
+ String wsdlLocation = anWebServiceProvider.wsdlLocation();
+
+ // FIXME: JBWS-1026
+ // processOrGenerateWSDL(wsClass, serviceMetaData, wsdlLocation, sepMetaData);
+
+ // Set the endpoint address
+ processPortComponent(udi, wsClass, linkName, sepMetaData);
+
+ // init service endpoint id
+ ObjectName sepID = getServiceEndpointID(udi, sepMetaData);
+ sepMetaData.setServiceEndpointID(sepID);
+
+ return sepMetaData;
+ }
+
+
+ private void processInvokeMethod(ServerEndpointMetaData epMetaData) throws SecurityException, NoSuchMethodException
+ {
+ String javaName = "invoke";
+ String targetNS = epMetaData.getQName().getNamespaceURI();
+ OperationMetaData opMetaData = new OperationMetaData(epMetaData, new QName(targetNS, javaName), javaName);
+ epMetaData.addOperation(opMetaData);
+
+ Mode serviceMode = epMetaData.getServiceMode();
+ Class paramType = (serviceMode == Mode.MESSAGE ? SOAPMessage.class : Source.class);
+
+ // Setup invoke param
+ QName xmlName = new QName("invokeParam");
+ QName xmlType = Constants.TYPE_LITERAL_ANYTYPE;
+ ParameterMetaData pmd = new ParameterMetaData(opMetaData, xmlName, xmlType, paramType.getName());
+ opMetaData.addParameter(pmd);
+
+ // Setup invoke return
+ xmlName = new QName("invokeReturn");
+ ParameterMetaData retMetaData = new ParameterMetaData(opMetaData, xmlName, xmlType, paramType.getName());
+ opMetaData.setReturnParameter(retMetaData);
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -146,7 +146,7 @@
opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());
// Get the type mapping for the encoding style
- String encStyle = epMetaData.getEncodingStyle().toURI();
+ String encStyle = epMetaData.getEncoding().toURI();
TypeMappingRegistry tmRegistry = new TypeMappingRegistryImpl();
TypeMappingImpl typeMapping = (TypeMappingImpl)tmRegistry.getTypeMapping(encStyle);
Copied: trunk/src/main/java/org/jboss/ws/deployment/JSR181ClientMetaDataBuilder.java (from rev 717, branches/tdiesler/trunk/src/main/java/org/jboss/ws/deployment/JSR181ClientMetaDataBuilder.java)
Modified: trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -61,6 +61,7 @@
import org.jboss.ws.jaxrpc.TypeMappingImpl;
import org.jboss.ws.jaxrpc.TypeMappingRegistryImpl;
import org.jboss.ws.jaxrpc.Use;
+import org.jboss.ws.metadata.EndpointMetaData;
import org.jboss.ws.metadata.FaultMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
@@ -120,20 +121,21 @@
WSDLUtils wsdlUtils = WSDLUtils.getInstance();
+ String name = anWebService.name();
+ if (name.length() == 0)
+ name = wsdlUtils.getJustClassName(wsClass);
+
String serviceName = anWebService.serviceName();
if (serviceName.length() == 0)
- serviceName = wsdlUtils.getJustClassName(wsClass.getName()) + "Service";
+ serviceName = name + "Service";
String targetNS = anWebService.targetNamespace();
if (targetNS.length() == 0)
targetNS = wsdlUtils.getTypeNamespace(wsClass);
- String portName = anWebService.name();
+ String portName = anWebService.portName();
if (portName.length() == 0)
- {
- portName = wsdlUtils.getJustClassName(wsClass.getName());
- portName += "Port";
- }
+ portName = name + "Port";
ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new QName(targetNS, serviceName));
wsMetaData.addService(serviceMetaData);
@@ -151,41 +153,12 @@
// Process an optional @SOAPBinding annotation
if (wsClass.isAnnotationPresent(SOAPBinding.class))
{
- processSOAPBinding(wsClass, sepMetaData);
+ processSOAPBinding(sepMetaData, wsClass);
}
- // Process an @WebMethod annotations
- int webMethodCount = 0;
boolean includeAllMethods = (wsClass == seiClass);
- for (Method method : wsClass.getMethods())
- {
- if (includeAllMethods || method.isAnnotationPresent(WebMethod.class))
- {
- processWebMethod(sepMetaData, method);
- webMethodCount++;
- }
- }
+ processWebMethods(sepMetaData, wsClass, includeAllMethods);
- // @WebService should expose all inherited methods if @WebMethod is never specified
- // http://jira.jboss.org/jira/browse/JBWS-754
- if (seiClass != null && webMethodCount == 0)
- {
- Class superClass = seiClass.getSuperclass();
- while (superClass != null)
- {
- for (Method method : superClass.getMethods())
- {
- processWebMethod(sepMetaData, method);
- webMethodCount++;
- }
-
- superClass = superClass.getSuperclass();
- }
- }
-
- if (webMethodCount == 0)
- throw new WSException("At least one @WebMethod annotation is required");
-
// Process an optional @HandlerChain annotation
if (sepClass.isAnnotationPresent(HandlerChain.class))
processHandlerChain(sepClass, sepMetaData);
@@ -215,23 +188,29 @@
return sepMetaData;
}
- private void processSOAPBinding(Class wsClass, ServerEndpointMetaData epMetaData)
+ protected void processSOAPBinding(EndpointMetaData epMetaData, Class wsClass)
{
+ epMetaData.setStyle(null);
+ epMetaData.setEncoding(null);
+ epMetaData.setParameterStyle(null);
+
SOAPBinding anSoapBinding = (SOAPBinding)wsClass.getAnnotation(SOAPBinding.class);
- SOAPBinding.Style attrStyle = anSoapBinding.style();
- Style style = (attrStyle == SOAPBinding.Style.RPC ? Style.RPC : Style.DOCUMENT);
- epMetaData.setStyle(style);
+ if (anSoapBinding != null)
+ {
+ SOAPBinding.Style attrStyle = anSoapBinding.style();
+ Style style = (attrStyle == SOAPBinding.Style.RPC ? Style.RPC : Style.DOCUMENT);
+ epMetaData.setStyle(style);
- SOAPBinding.Use attrUse = anSoapBinding.use();
- if (attrUse == SOAPBinding.Use.ENCODED)
- throw new WSException("SOAP encoding is not supported for JSR-181 deployments. It is also disallowed by"
- + " the WS-I Basic Profile 1.1. Please switch to literal encoding");
+ SOAPBinding.Use attrUse = anSoapBinding.use();
+ if (attrUse == SOAPBinding.Use.ENCODED)
+ throw new WSException("SOAP encoding is not supported for JSR-181 deployments");
- epMetaData.setEncodingStyle(Use.LITERAL);
+ epMetaData.setEncoding(Use.LITERAL);
- SOAPBinding.ParameterStyle attrParamStyle = anSoapBinding.parameterStyle();
- ParameterStyle paramStyle = (attrParamStyle == SOAPBinding.ParameterStyle.BARE ? ParameterStyle.BARE : ParameterStyle.WRAPPED);
- epMetaData.setParameterStyle(paramStyle);
+ SOAPBinding.ParameterStyle attrParamStyle = anSoapBinding.parameterStyle();
+ ParameterStyle paramStyle = (attrParamStyle == SOAPBinding.ParameterStyle.BARE ? ParameterStyle.BARE : ParameterStyle.WRAPPED);
+ epMetaData.setParameterStyle(paramStyle);
+ }
}
private WebParam getWebParamAnnotation(Method method, int pos)
@@ -243,8 +222,44 @@
return null;
}
- private void processWebMethod(ServerEndpointMetaData epMetaData, Method method)
+ protected void processWebMethods(EndpointMetaData epMetaData, Class wsClass, boolean includeAllMethods)
{
+ epMetaData.clearOperations();
+
+ // Process an @WebMethod annotations
+ int webMethodCount = 0;
+ for (Method method : wsClass.getMethods())
+ {
+ if (includeAllMethods || method.isAnnotationPresent(WebMethod.class))
+ {
+ processWebMethod(epMetaData, method);
+ webMethodCount++;
+ }
+ }
+
+ // @WebService should expose all inherited methods if @WebMethod is never specified
+ // http://jira.jboss.org/jira/browse/JBWS-754
+ if (webMethodCount == 0)
+ {
+ Class superClass = wsClass.getSuperclass();
+ while (superClass != null)
+ {
+ for (Method method : superClass.getMethods())
+ {
+ processWebMethod(epMetaData, method);
+ webMethodCount++;
+ }
+
+ superClass = superClass.getSuperclass();
+ }
+ }
+
+ if (webMethodCount == 0)
+ throw new WSException("At least one @WebMethod annotation is required");
+ }
+
+ private void processWebMethod(EndpointMetaData epMetaData, Method method)
+ {
ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
TypesMetaData typesMetaData = serviceMetaData.getTypesMetaData();
String targetNS = epMetaData.getQName().getNamespaceURI();
@@ -450,7 +465,7 @@
addFault(opMetaData, typesMetaData, exClass);
// process op meta data extension
- processOpMetaExtensions(epMetaData, opMetaData);
+ processMetaExtensions(epMetaData, opMetaData);
}
@@ -605,11 +620,8 @@
/**
* Process operation meta data extensions.
- *
- * @param epMetaData
- * @param opMetaData
*/
- private void processOpMetaExtensions(ServerEndpointMetaData epMetaData, OperationMetaData opMetaData)
+ private void processMetaExtensions(EndpointMetaData epMetaData, OperationMetaData opMetaData)
{
// Until there is a addressing annotion we fallback to implicit action asosciation
// TODO: figure out a way to assign message name instead of IN and OUT
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -23,8 +23,8 @@
// $Id$
+import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
-import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.List;
@@ -90,14 +90,36 @@
for (int i = 0; pass && i < varNames.size(); i++)
{
String varName = varNames.get(i);
- PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
- Method method = pd.getWriteMethod();
+ Method method = null;
+ try
+ {
+ PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
+ method = pd.getWriteMethod();
+ }
+ catch (IntrospectionException ex)
+ {
+ // jaxws-ri wsimport generates setter without the underscore
+ if (varName.indexOf("_") > 0)
+ {
+ varName = varName.replace("_", "");
+ PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
+ method = pd.getWriteMethod();
+ }
+ }
+
+ if (method == null)
+ throw new NoSuchMethodError("No write method for: " + varName);
+
Class methodType = method.getParameterTypes()[0];
Class paramType = paramTypes[i];
pass = JavaUtils.isAssignableFrom(methodType, paramType);
}
return pass;
}
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
catch (Exception ex)
{
log.debug("Invalid request wrapper: " + ex);
@@ -115,13 +137,27 @@
log.debug("matchResponseParameters: " + resStructType.getName());
try
{
- boolean pass = true;
- if (returnType != void.class)
+ boolean pass = (returnType == void.class);
+ if (pass == false)
{
- resStructType.getConstructor(new Class[] { returnType });
+ try
+ {
+ resStructType.getConstructor(new Class[] { returnType });
+ pass = true;
+ }
+ catch (NoSuchMethodException ex)
+ {
+ // jaxws-ri wsimport does not generate a ctor with return param type
+ resStructType.getMethod("setResult", returnType);
+ pass = true;
+ }
}
return pass;
}
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
catch (Exception ex)
{
log.debug("Invalid response wrapper: " + ex);
@@ -144,8 +180,26 @@
for (int i = 0; i < varNames.size(); i++)
{
String varName = varNames.get(i);
- PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
- Method method = pd.getWriteMethod();
+ Method method = null;
+ try
+ {
+ PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
+ method = pd.getWriteMethod();
+ }
+ catch (IntrospectionException ex)
+ {
+ // jaxws-ri wsimport generates setter without the underscore
+ if (varName.indexOf("_") > 0)
+ {
+ varName = varName.replace("_", "");
+ PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
+ method = pd.getWriteMethod();
+ }
+ }
+
+ if (method == null)
+ throw new NoSuchMethodError("No write method for: " + varName);
+
Object value = inParams[i];
log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
method.invoke(reqStruct, new Object[] { value });
@@ -181,8 +235,26 @@
for (int i = 0; i < varNames.size(); i++)
{
String varName = varNames.get(i);
- PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
- Method method = pd.getReadMethod();
+ Method method = null;
+ try
+ {
+ PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
+ method = pd.getReadMethod();
+ }
+ catch (IntrospectionException ex)
+ {
+ // jaxws-ri wsimport generates getter without the underscore
+ if (varName.indexOf("_") > 0)
+ {
+ varName = varName.replace("_", "");
+ PropertyDescriptor pd = new PropertyDescriptor(varName, reqStructType);
+ method = pd.getReadMethod();
+ }
+ }
+
+ if (method == null)
+ throw new NoSuchMethodError("No read method for: " + varName);
+
Object value = method.invoke(reqStruct, new Object[] {});
log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
inParams[i] = value;
@@ -221,8 +293,26 @@
if (varNames.size() > 0)
{
String varName = varNames.get(0);
- PropertyDescriptor pd = new PropertyDescriptor(varName, resStructType);
- Method method = pd.getWriteMethod();
+ Method method = null;
+ try
+ {
+ PropertyDescriptor pd = new PropertyDescriptor(varName, resStructType);
+ method = pd.getWriteMethod();
+ }
+ catch (IntrospectionException ex)
+ {
+ // jaxws-ri wsimport generates setter without the underscore
+ if (varName.indexOf("_") > 0)
+ {
+ varName = varName.replace("_", "");
+ PropertyDescriptor pd = new PropertyDescriptor(varName, resStructType);
+ method = pd.getWriteMethod();
+ }
+ }
+
+ if (method == null)
+ throw new NoSuchMethodError("No write method for: " + varName);
+
Object value = outParam;
log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
method.invoke(resStruct, new Object[] { value });
@@ -256,8 +346,26 @@
if (varNames.size() > 0)
{
String varName = varNames.get(0);
- PropertyDescriptor pd = new PropertyDescriptor(varName, resStructType);
- Method method = pd.getReadMethod();
+ Method method = null;
+ try
+ {
+ PropertyDescriptor pd = new PropertyDescriptor(varName, resStructType);
+ method = pd.getReadMethod();
+ }
+ catch (IntrospectionException ex)
+ {
+ // jaxws-ri wsimport generates getter without the underscore
+ if (varName.indexOf("_") > 0)
+ {
+ varName = varName.replace("_", "");
+ PropertyDescriptor pd = new PropertyDescriptor(varName, resStructType);
+ method = pd.getReadMethod();
+ }
+ }
+
+ if (method == null)
+ throw new NoSuchMethodError("No read method for: " + varName);
+
Object value = method.invoke(resStruct, new Object[] {});
log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
retValue = value;
Modified: trunk/src/main/java/org/jboss/ws/jaxrpc/SOAPFaultExceptionHelper.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxrpc/SOAPFaultExceptionHelper.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/jaxrpc/SOAPFaultExceptionHelper.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -51,9 +51,9 @@
import org.jboss.ws.binding.DeserializerSupport;
import org.jboss.ws.binding.SerializationContext;
import org.jboss.ws.binding.SerializerSupport;
+import org.jboss.ws.common.SOAPMessageContextBase;
import org.jboss.ws.jaxrpc.encoding.DeserializerFactoryBase;
import org.jboss.ws.jaxrpc.encoding.SerializerFactoryBase;
-import org.jboss.ws.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.metadata.FaultMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.soap.MessageContextAssociation;
@@ -99,7 +99,7 @@
SOAPFaultException faultEx = new SOAPFaultException(faultCode, faultString, faultActor, detail);
- SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
+ SOAPMessageContextBase msgContext = MessageContextAssociation.peekMessageContext();
if (detail != null && msgContext != null)
{
SerializationContext serContext = msgContext.getSerializationContext();
@@ -230,7 +230,7 @@
{
Class javaType = faultCause.getClass();
- SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
+ SOAPMessageContextBase msgContext = MessageContextAssociation.peekMessageContext();
SerializationContext serContext = msgContext.getSerializationContext();
TypeMapping typeMapping = serContext.getTypeMapping();
Modified: trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/jaxws/core/SOAPBindingImpl.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.jaxws.core;
-// $Id: $
+// $Id$
import java.net.URI;
import java.util.HashMap;
@@ -770,8 +770,7 @@
return contentElement;
}
- /** Unmarshall a message element and add it to the parameter list
- * @param optional TODO*/
+ /** Unmarshall a message element and add it to the parameter list */
private Object getParameterFromMessage(ParameterMetaData paramMetaData, SOAPElement soapElement, boolean optional) throws BindingException
{
Name xmlName = new NameImpl(paramMetaData.getXmlName());
Modified: trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerChainExecutor.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.jaxws.handler;
-// $Id$
+// $Id:HandlerChainExecutor.java 710 2006-08-08 20:19:52Z thomas.diesler at jboss.com $
import java.util.ArrayList;
import java.util.List;
@@ -81,7 +81,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleOutbound");
+ log.debug("Enter: handleRequest");
int handlerIndex = 0;
Handler currHandler = null;
@@ -98,7 +98,7 @@
}
currHandler = handlers.get(handlerIndex);
- log.debug("Handle outbound: " + currHandler);
+ log.debug("Handle request: " + currHandler);
doNext = currHandler.handleMessage(msgContext);
if (log.isTraceEnabled())
@@ -111,7 +111,7 @@
}
catch (RuntimeException e)
{
- log.error("RuntimeException in outbound handler", e);
+ log.error("RuntimeException in request handler", e);
doNext = false;
throw e;
}
@@ -121,7 +121,7 @@
if (doNext == false)
falseIndex = (handlerIndex - 1);
- log.debug("Exit: handleOutbound with status: " + doNext);
+ log.debug("Exit: handleRequest with status: " + doNext);
}
}
@@ -134,7 +134,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleInbound");
+ log.debug("Enter: handleResponse");
int handlerIndex = handlers.size() - 1;
if (falseIndex != -1)
@@ -154,7 +154,7 @@
}
currHandler = handlers.get(handlerIndex);
- log.debug("Handle inbound: " + currHandler);
+ log.debug("Handle response: " + currHandler);
doNext = currHandler.handleMessage(msgContext);
if (log.isTraceEnabled())
@@ -167,7 +167,7 @@
}
catch (RuntimeException rte)
{
- log.error("RuntimeException in inbound handler", rte);
+ log.error("RuntimeException in response handler", rte);
doNext = false;
throw rte;
}
@@ -177,7 +177,7 @@
if (doNext == false)
falseIndex = (handlerIndex - 1);
- log.debug("Exit: handleInbound with status: " + doNext);
+ log.debug("Exit: handleResponse with status: " + doNext);
}
}
Modified: trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerDelegateJAXWS.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -21,7 +21,7 @@
*/
package org.jboss.ws.jaxws.handler;
-// $Id$
+// $Id:HandlerDelegateJAXWS.java 710 2006-08-08 20:19:52Z thomas.diesler at jboss.com $
import java.util.ArrayList;
import java.util.List;
@@ -135,11 +135,11 @@
Handler handler = (Handler)hClass.newInstance();
if (type == HandlerType.PRE)
- preHandlerChain.add(new HandlerWrapper(handler));
+ preHandlerChain.add(handler);
else if (type == HandlerType.ENDPOINT)
- jaxwsHandlerChain.add(new HandlerWrapper(handler));
+ jaxwsHandlerChain.add(handler);
else if (type == HandlerType.POST)
- postHandlerChain.add(new HandlerWrapper(handler));
+ postHandlerChain.add(handler);
}
catch (Exception ex)
{
Modified: trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerWrapper.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerWrapper.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/jaxws/handler/HandlerWrapper.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -54,6 +54,9 @@
*/
public HandlerWrapper(Handler handler)
{
+ if (handler instanceof HandlerWrapper)
+ throw new IllegalArgumentException("Nested handler wrapper");
+
delegate = handler;
state = METHOD_READY;
}
Modified: trunk/src/main/java/org/jboss/ws/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/jaxws/spi/ServiceDelegateImpl.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/jaxws/spi/ServiceDelegateImpl.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -26,12 +26,13 @@
import java.lang.reflect.Proxy;
import java.net.URL;
import java.net.URLClassLoader;
-import java.rmi.Remote;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.concurrent.Executor;
+import javax.jws.WebService;
import javax.xml.bind.JAXBContext;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -44,6 +45,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
import org.jboss.ws.deployment.JAXWSClientMetaDataBuilder;
+import org.jboss.ws.deployment.JSR181ClientMetaDataBuilder;
import org.jboss.ws.jaxrpc.MetaDataSynchronization;
import org.jboss.ws.jaxws.client.ClientImpl;
import org.jboss.ws.jaxws.client.DispatchImpl;
@@ -72,6 +74,9 @@
// The handler resolver
private HandlerResolver handlerResolver = new HandlerResolverImpl();
+ // A list of annotated ports
+ private List<QName> annotatedPorts = new ArrayList<QName>();
+
public ServiceDelegateImpl(URL wsdlURL, QName serviceName)
{
if (serviceName == null)
@@ -100,27 +105,42 @@
* The serviceEndpointInterface specifies the service endpoint interface that is supported by the created dynamic proxy or stub instance.
*/
@Override
- public <T> T getPort(QName qname, Class<T> seiClass)
+ public <T> T getPort(QName portName, Class<T> seiClass)
{
if (seiClass == null)
throw new IllegalArgumentException("SEI class cannot be null");
- String seiName = seiClass.getName();
- if (Remote.class.isAssignableFrom(seiClass) == false)
- throw new WebServiceException("SEI does not implement java.rmi.Remote: " + seiName);
-
if (serviceMetaData == null)
throw new WebServiceException("Service meta data not available");
- EndpointMetaData epMetaData = serviceMetaData.getEndpointByServiceEndpointInterface(seiName);
- if (epMetaData == null && serviceMetaData.getEndpoints().size() == 1)
+ String seiClassName = seiClass.getName();
+
+ EndpointMetaData epMetaData = null;
+ if (seiClass.isAnnotationPresent(WebService.class))
{
- epMetaData = serviceMetaData.getEndpoints().get(0);
- epMetaData.setServiceEndpointInterfaceName(seiName);
+ epMetaData = serviceMetaData.getEndpoint(portName);
+ if (epMetaData == null)
+ throw new WebServiceException("Cannot find endpoint meta data for: " + portName);
+
+ // Adjust the endpoint meta data according to the annotations
+ if (annotatedPorts.contains(portName) == false)
+ {
+ JSR181ClientMetaDataBuilder metaDataBuilder = new JSR181ClientMetaDataBuilder();
+ metaDataBuilder.rebuildEndpointMetaData(epMetaData, seiClass);
+ }
}
+ else
+ {
+ epMetaData = serviceMetaData.getEndpointByServiceEndpointInterface(seiClassName);
+ if (epMetaData == null && serviceMetaData.getEndpoints().size() == 1)
+ {
+ epMetaData = serviceMetaData.getEndpoints().get(0);
+ epMetaData.setServiceEndpointInterfaceName(seiClassName);
+ }
+ }
if (epMetaData == null)
- throw new WebServiceException("Cannot find endpoint meta data for: " + seiName);
+ throw new WebServiceException("Cannot find endpoint meta data for: " + seiClassName);
return createProxy(seiClass, epMetaData);
}
@@ -174,7 +194,7 @@
EndpointMetaData epMetaData = serviceMetaData.getEndpoint(portName);
if (epMetaData == null)
{
- epMetaData = new ClientEndpointMetaData(serviceMetaData, new QName(Constants.NS_JBOSSWS_URI, "AnonymousEndpoint"), Type.JAXWS);
+ epMetaData = new ClientEndpointMetaData(serviceMetaData, new QName(Constants.NS_JBOSSWS_URI, "AnonymousPort"), Type.JAXWS);
epMetaData.setEndpointAddress(port.getEndpointAddress());
epMetaData.setBindingId(port.getBindingId());
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/ClientEndpointMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ClientEndpointMetaData.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/metadata/ClientEndpointMetaData.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -57,9 +57,9 @@
// The REWQUIRED client config
private Object clientConfig;
- public ClientEndpointMetaData(ServiceMetaData service, QName qname, Type type)
+ public ClientEndpointMetaData(ServiceMetaData service, QName portName, Type type)
{
- super(service, qname, type);
+ super(service, portName, type);
}
public void setConfigName(String configName)
Modified: trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/metadata/EndpointMetaData.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -70,7 +70,7 @@
private ServiceMetaData service;
// The REQUIRED name
- private QName qname;
+ private QName portName;
// The REQUIRED binding id
private String bindingId;
// The REQUIRED config-name
@@ -104,10 +104,10 @@
// True if the handlers are initialized
private boolean handlersInitialized;
- public EndpointMetaData(ServiceMetaData service, QName qname, Type type)
+ public EndpointMetaData(ServiceMetaData service, QName portName, Type type)
{
this.service = service;
- this.qname = qname;
+ this.portName = portName;
this.type = type;
// The default binding
@@ -121,7 +121,7 @@
public QName getQName()
{
- return qname;
+ return portName;
}
public String getConfigFile()
@@ -212,7 +212,7 @@
return seiClass;
}
- public Use getEncodingStyle()
+ public Use getEncoding()
{
if (use == null)
use = Use.getDefaultUse();
@@ -220,12 +220,12 @@
return use;
}
- public void setEncodingStyle(Use encStyle)
+ public void setEncoding(Use value)
{
- if (use != null && use.equals(encStyle) == false)
+ if (value != null && use != null && !use.equals(value))
throw new WSException("Mixed encoding styles not supported");
- this.use = encStyle;
+ this.use = value;
}
public Style getStyle()
@@ -239,12 +239,12 @@
return style;
}
- public void setStyle(Style styleValue)
+ public void setStyle(Style value)
{
- if (style != null && style.equals(styleValue) == false)
+ if (value != null && style != null && !style.equals(value))
throw new WSException("Mixed styles not supported");
- this.style = styleValue;
+ this.style = value;
}
public ParameterStyle getParameterStyle()
@@ -255,12 +255,12 @@
return parameterStyle;
}
- public void setParameterStyle(ParameterStyle styleValue)
+ public void setParameterStyle(ParameterStyle value)
{
- if (parameterStyle != null && parameterStyle.equals(styleValue) == false)
+ if (value != null && parameterStyle != null && !parameterStyle.equals(value))
throw new WSException("Mixed SOAP parameter styles not supported");
- this.parameterStyle = styleValue;
+ this.parameterStyle = value;
}
public Mode getServiceMode()
@@ -382,6 +382,11 @@
operations.add(opMetaData);
}
+ public void clearOperations()
+ {
+ operations.clear();
+ }
+
public void addHandler(UnifiedHandlerMetaData handler)
{
handlers.add(handler);
@@ -436,7 +441,7 @@
if (JavaUtils.isPrimitive(javaTypeName))
javaType = JavaUtils.getWrapperType(javaType);
- if (getEncodingStyle() == Use.ENCODED && javaType.isArray())
+ if (getEncoding() == Use.ENCODED && javaType.isArray())
{
typeMapping.register(javaType, xmlType, new SOAPArraySerializerFactory(), new SOAPArrayDeserializerFactory());
}
Modified: trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/metadata/OperationMetaData.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -131,7 +131,7 @@
public Use getUse()
{
- return epMetaData.getEncodingStyle();
+ return epMetaData.getEncoding();
}
public ParameterStyle getParameterStyle()
Modified: trunk/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/metadata/ServerEndpointMetaData.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -79,9 +79,9 @@
// The bean that registers with the ServiceEndpointManager
private String managedEndpointBean = ServiceEndpoint.class.getName();
- public ServerEndpointMetaData(ServiceMetaData service, QName qname, Type type)
+ public ServerEndpointMetaData(ServiceMetaData service, QName portName, Type type)
{
- super(service, qname, type);
+ super(service, portName, type);
}
public void setConfigName(String configName)
Modified: trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/metadata/ServiceMetaData.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -165,9 +165,9 @@
return new ArrayList<EndpointMetaData>(endpoints.values());
}
- public EndpointMetaData getEndpoint(QName portName)
+ public EndpointMetaData getEndpoint(QName portTypeName)
{
- return endpoints.get(portName);
+ return endpoints.get(portTypeName);
}
public EndpointMetaData getEndpointByServiceEndpointInterface(String seiName)
@@ -316,9 +316,9 @@
{
if (encStyle == null)
{
- encStyle = epMetaData.getEncodingStyle();
+ encStyle = epMetaData.getEncoding();
}
- else if (encStyle.equals(epMetaData.getEncodingStyle()) == false)
+ else if (encStyle.equals(epMetaData.getEncoding()) == false)
{
throw new WSException("Conflicting encoding styles not supported");
}
Modified: trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/main/java/org/jboss/ws/tools/metadata/ToolsEndpointMetaData.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -36,8 +36,8 @@
public class ToolsEndpointMetaData extends EndpointMetaData
{
public String typeNamespace;
- public ToolsEndpointMetaData(ServiceMetaData service, QName name)
+ public ToolsEndpointMetaData(ServiceMetaData service, QName portName)
{
- super(service, name, Type.JAXRPC);
+ super(service, portName, Type.JAXRPC);
}
}
\ No newline at end of file
Modified: trunk/src/test/ant/build-jars.xml
===================================================================
--- trunk/src/test/ant/build-jars.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/ant/build-jars.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -22,51 +22,25 @@
<war warfile="${build.test.dir}/libs/jbossws-addressing-action-doc.war" webxml="${build.test.dir}/resources/addressing/action/Doc-WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.class"/>
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint.class"/>
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint_*_RequestStruct.class"/>
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint_*_ResponseStruct.class"/>
+ <include name="org/jboss/test/ws/addressing/action/Foo.class"/>
+ <include name="org/jboss/test/ws/addressing/action/FooResponse.class"/>
+ <include name="org/jboss/test/ws/addressing/action/Bar.class"/>
+ <include name="org/jboss/test/ws/addressing/action/BarResponse.class"/>
</classes>
<webinf dir="${build.test.dir}/resources/addressing/action/Doc-META-INF">
<include name="wsdl/**"/>
<include name="jaxws-handlers.xml"/>
</webinf>
</war>
- <jar destfile="${build.test.dir}/libs/jbossws-addressing-action-doc-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint.class"/>
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint_*_RequestStruct.class"/>
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint_*_ResponseStruct.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/addressing/action/Doc-META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-client-config.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
<war warfile="${build.test.dir}/libs/jbossws-addressing-action-rpc.war" webxml="${build.test.dir}/resources/addressing/action/Rpc-WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.class"/>
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint.class"/>
</classes>
<webinf dir="${build.test.dir}/resources/addressing/action/Rpc-META-INF">
<include name="wsdl/**"/>
<include name="jaxws-handlers.xml"/>
</webinf>
</war>
- <jar destfile="${build.test.dir}/libs/jbossws-addressing-action-rpc-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/addressing/action/ActionEndpoint.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/addressing/action/Rpc-META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-client-config.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
<!-- jbossws-addressing-replyto -->
<war warfile="${build.test.dir}/libs/jbossws-addressing-initial.war" webxml="${build.test.dir}/resources/addressing/replyto/Initial-WEB-INF/web.xml">
@@ -1360,19 +1334,6 @@
<include name="wsse.*"/>
</metainf>
</jar>
- <jar jarfile="${build.test.dir}/libs/jbossws-samples-jsr181ejb-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/samples/jsr181ejb/EndpointInterface.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/samples/jsr181ejb/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- <include name="jboss-wsse-client.xml"/>
- <include name="wsse.*"/>
- </metainf>
- </jar>
<!-- jbossws-samples-jsr181pojo -->
<war warfile="${build.test.dir}/libs/jbossws-samples-jsr181pojo.war" webxml="${build.test.dir}/resources/samples/jsr181pojo/WEB-INF/web.xml">
@@ -1580,19 +1541,6 @@
<include name="jaxws-handlers.xml"/>
</webinf>
</war>
- <jar destfile="${build.test.dir}/libs/jbossws-samples-wsaddressing-client.jar">
- <fileset dir="${build.test.dir}/classes">
- <include name="org/jboss/test/ws/samples/wsaddressing/StatefulEndpoint.class"/>
- <include name="org/jboss/test/ws/samples/wsaddressing/ClientHandler.class"/>
- </fileset>
- <metainf dir="${build.test.dir}/resources/samples/wsaddressing/META-INF">
- <include name="application-client.xml"/>
- <include name="jboss-client.xml"/>
- <include name="jbossws-client-config.xml"/>
- <include name="jaxrpc-mapping.xml"/>
- <include name="wsdl/**"/>
- </metainf>
- </jar>
<!-- jbossws-samples-wssecurity-sign -->
<war warfile="${build.test.dir}/libs/jbossws-samples-wssecurity-sign.war" webxml="${build.test.dir}/resources/samples/wssecurity/WEB-INF/web.xml">
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/build.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -276,7 +276,6 @@
<wstools dest="${build.test.dir}/wstools/resources/samples/rpcstyle/WEB-INF" config="${test.resources.dir}/samples/rpcstyle/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/samples/secureejb/META-INF" config="${test.resources.dir}/samples/secureejb/wstools-config.xml"/>
<!-- wstools dest="${build.test.dir}/wstools/resources/samples/swa/WEB-INF" config="${test.resources.dir}/samples/swa/wstools-config.xml"/-->
- <wstools dest="${build.test.dir}/wstools/resources/samples/wsaddressing/META-INF" config="${test.resources.dir}/samples/wsaddressing/wstools-config.xml"/>
<wstools dest="${build.test.dir}/wstools/resources/samples/wssecurity/WEB-INF" config="${test.resources.dir}/samples/wssecurity/wstools-config.xml"/>
</target>
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/AddressingHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/AddressingHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/AddressingHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.addressing;
-
-import javax.xml.rpc.handler.GenericHandler;
-
-/**
- * An abstract handler for the ws-addressing
- *
- * @author Thomas.Diesler at jboss.org
- * @since 29-Nov-2005
- */
-public abstract class AddressingHandler extends GenericHandler
-{
- /**
- * Get the JBoss server host from system property "jbosstest.server.host"
- * This defaults to "" + getServerHost() + ""
- */
- public String getServerHost()
- {
- String hostName = System.getProperty("jbosstest.server.host", "localhost");
- return hostName;
- }
-}
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpoint.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpoint.java)
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocEndpointImpl.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -39,16 +39,16 @@
* @since 24-Nov-2005
*/
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
- at WebService(serviceName = "ActionDocService", name="ActionEndpointPort", targetNamespace = "http://org.jboss.ws/addressing/action", wsdlLocation = "WEB-INF/wsdl/ActionDocService.wsdl")
+ at WebService(name = "ActionDocEndpoint", targetNamespace = "http://org.jboss.ws/addressing/action", wsdlLocation = "WEB-INF/wsdl/ActionDocService.wsdl")
@HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
-public class ActionDocEndpointImpl implements ActionEndpoint
+public class ActionDocEndpointImpl
{
// provide logging
private static Logger log = Logger.getLogger(ActionDocEndpointImpl.class);
@WebMethod(action = "urn:wsa-action-foo")
- @RequestWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_foo_RequestStruct")
- @ResponseWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_foo_ResponseStruct")
+ @RequestWrapper(className = "org.jboss.test.ws.addressing.action.Foo")
+ @ResponseWrapper(className = "org.jboss.test.ws.addressing.action.FooResponse")
public String foo(String item)
{
log.info("foo: " + item);
@@ -56,8 +56,8 @@
}
@WebMethod(action = "urn:wsa-action-bar")
- @RequestWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_bar_RequestStruct")
- @ResponseWrapper(className = "org.jboss.test.ws.addressing.action.ActionEndpoint_bar_ResponseStruct")
+ @RequestWrapper(className = "org.jboss.test.ws.addressing.action.Bar")
+ @ResponseWrapper(className = "org.jboss.test.ws.addressing.action.BarResponse")
public String bar(String item)
{
log.info("bar: " + item);
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocService.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionDocService.java)
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.addressing.action;
-
-//$Id$
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * WS-Addressing service endpoint interface
- *
- * @author Thomas.Diesler at jboss.org
- *
- * @since 24-Nov-2005
- */
-public interface ActionEndpoint extends Remote
-{
- String foo(String item) throws RemoteException;
-
- String bar(String item) throws RemoteException;
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_RequestStruct.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,38 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.2_01, build R40)
-// Generated source version: 1.1.2
-
-package org.jboss.test.ws.addressing.action;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "bar", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "String_1" })
-public class ActionEndpoint_bar_RequestStruct
-{
- @XmlElement(required = true)
- protected String String_1;
-
- public ActionEndpoint_bar_RequestStruct()
- {
- }
-
- public ActionEndpoint_bar_RequestStruct(String String_1)
- {
- this.String_1 = String_1;
- }
-
- public String getString_1()
- {
- return String_1;
- }
-
- public void setString_1(String String_1)
- {
- this.String_1 = String_1;
- }
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_bar_ResponseStruct.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,38 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.2_01, build R40)
-// Generated source version: 1.1.2
-
-package org.jboss.test.ws.addressing.action;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "barResponse", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "result" })
-public class ActionEndpoint_bar_ResponseStruct
-{
- @XmlElement(required = true)
- protected String result;
-
- public ActionEndpoint_bar_ResponseStruct()
- {
- }
-
- public ActionEndpoint_bar_ResponseStruct(String result)
- {
- this.result = result;
- }
-
- public String getResult()
- {
- return result;
- }
-
- public void setResult(String result)
- {
- this.result = result;
- }
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_RequestStruct.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,38 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.2_01, build R40)
-// Generated source version: 1.1.2
-
-package org.jboss.test.ws.addressing.action;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "foo", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "String_1" })
-public class ActionEndpoint_foo_RequestStruct
-{
- @XmlElement(required = true)
- protected String String_1;
-
- public ActionEndpoint_foo_RequestStruct()
- {
- }
-
- public ActionEndpoint_foo_RequestStruct(String String_1)
- {
- this.String_1 = String_1;
- }
-
- public String getString_1()
- {
- return String_1;
- }
-
- public void setString_1(String String_1)
- {
- this.String_1 = String_1;
- }
-}
Deleted: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionEndpoint_foo_ResponseStruct.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,38 +0,0 @@
-// This class was generated by the JAXRPC SI, do not edit.
-// Contents subject to change without notice.
-// JAX-RPC Standard Implementation (1.1.2_01, build R40)
-// Generated source version: 1.1.2
-
-package org.jboss.test.ws.addressing.action;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "fooResponse", namespace = "http://org.jboss.ws/addressing/action", propOrder = { "result" })
-public class ActionEndpoint_foo_ResponseStruct
-{
- @XmlElement(required = true)
- protected String result;
-
- public ActionEndpoint_foo_ResponseStruct()
- {
- }
-
- public ActionEndpoint_foo_ResponseStruct(String result)
- {
- this.result = result;
- }
-
- public String getResult()
- {
- return result;
- }
-
- public void setResult(String result)
- {
- this.result = result;
- }
-}
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpoint.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpoint.java)
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcEndpointImpl.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -37,9 +37,9 @@
* @since 24-Nov-2005
*/
@SOAPBinding(style = SOAPBinding.Style.RPC)
- at WebService(serviceName = "ActionRpcService", name="ActionEndpointPort", targetNamespace = "http://org.jboss.ws/addressing/action", wsdlLocation = "WEB-INF/wsdl/ActionRpcService.wsdl")
+ at WebService(name="ActionRpcEndpoint", targetNamespace = "http://org.jboss.ws/addressing/action", wsdlLocation = "WEB-INF/wsdl/ActionRpcService.wsdl")
@HandlerChain(file = "resource://WEB-INF/jaxws-handlers.xml")
-public class ActionRpcEndpointImpl implements ActionEndpoint
+public class ActionRpcEndpointImpl
{
// provide logging
private static Logger log = Logger.getLogger(ActionRpcEndpointImpl.class);
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcService.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ActionRpcService.java)
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/AddressingActionTestCase.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -21,12 +21,18 @@
*/
package org.jboss.test.ws.addressing.action;
-import javax.xml.rpc.Service;
+import java.net.URL;
+import java.util.List;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.ws.addressing.jaxws.WSAddressingClientHandler;
/**
* Test endpoint using ws-addressing.
@@ -38,37 +44,40 @@
*/
public class AddressingActionTestCase extends JBossWSTest
{
- private static ActionEndpoint docEndpoint;
- private static ActionEndpoint rpcEndpoint;
-
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(AddressingActionTestCase.class,
- "jbossws-addressing-action-doc.war, jbossws-addressing-action-doc-client.jar," +
- "jbossws-addressing-action-rpc.war, jbossws-addressing-action-rpc-client.jar");
+ "jbossws-addressing-action-doc.war, jbossws-addressing-action-rpc.war");
}
- protected void setUp() throws Exception
- {
- super.setUp();
-
- if (docEndpoint == null)
- {
- Service docService = (Service)getInitialContext("wsadoc-client").lookup("java:comp/env/service/ActionDocService");
- docEndpoint = (ActionEndpoint)docService.getPort(ActionEndpoint.class);
- Service rpcService = (Service)getInitialContext("wsarpc-client").lookup("java:comp/env/service/ActionRpcService");
- rpcEndpoint = (ActionEndpoint)rpcService.getPort(ActionEndpoint.class);
- }
- }
-
public void testRpcEndpoint() throws Exception
{
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-addressing-action-rpc/ActionRpcService?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/addressing/action", "ActionRpcEndpointService");
+ ActionRpcService service = new ActionRpcService(wsdlURL, serviceName);
+ ActionRpcEndpoint rpcEndpoint = service.getActionEndpointPort();
+
+ BindingProvider bindingProvider = (BindingProvider)rpcEndpoint;
+ List<Handler> handlerChain = bindingProvider.getBinding().getHandlerChain();
+ handlerChain.add(new ClientRpcHandler());
+ handlerChain.add(new WSAddressingClientHandler());
+
assertEquals("bar:HelloBar", rpcEndpoint.bar("HelloBar"));
assertEquals("bar:HelloFoo", rpcEndpoint.foo("HelloFoo"));
}
public void testDocEndpoint() throws Exception
{
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-addressing-action-doc/ActionDocService?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/addressing/action", "ActionDocEndpointService");
+ ActionDocService service = new ActionDocService(wsdlURL, serviceName);
+ ActionDocEndpoint docEndpoint = service.getActionEndpointPort();
+
+ BindingProvider bindingProvider = (BindingProvider)docEndpoint;
+ List<Handler> handlerChain = bindingProvider.getBinding().getHandlerChain();
+ handlerChain.add(new ClientDocHandler());
+ handlerChain.add(new WSAddressingClientHandler());
+
assertEquals("bar:HelloBar", docEndpoint.bar("HelloBar"));
assertEquals("bar:HelloFoo", docEndpoint.foo("HelloFoo"));
}
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/Bar.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/Bar.java)
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/BarResponse.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/BarResponse.java)
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientDocHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -22,15 +22,17 @@
package org.jboss.test.ws.addressing.action;
import java.net.URISyntaxException;
+import java.util.HashSet;
+import java.util.Set;
import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.MessageContext;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
import org.jboss.logging.Logger;
-import org.jboss.test.ws.addressing.AddressingHandler;
/**
* A client side handler for the ws-addressing
@@ -38,26 +40,42 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Nov-2005
*/
-public class ClientDocHandler extends AddressingHandler
+public class ClientDocHandler implements SOAPHandler
{
// Provide logging
private static Logger log = Logger.getLogger(ClientDocHandler.class);
- public QName[] getHeaders()
+ /**
+ * Gets the header blocks that can be processed by this Handler instance.
+ */
+ public Set<QName> getHeaders()
{
- return new QName[] {};
+ return new HashSet<QName>();
}
- public boolean handleRequest(MessageContext msgContext)
+ /**
+ * Read the addressing headers from the incomming message and put a
+ * SOAPAddressingProperties object into the message context
+ */
+ public boolean handleMessage(MessageContext msgContext)
{
+ Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound ? handleOutbound(msgContext) : true;
+ }
+
+ private boolean handleOutbound(MessageContext msgContext)
+ {
log.info("handleRequest" + this);
try
{
AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
AddressingProperties outProps = builder.newAddressingProperties();
- outProps.setTo(builder.newURI("uri:jbossws-addressing-action-doc/ActionService"));
+ outProps.setTo(builder.newURI("uri:jbossws-addressing-action-doc/ActionDocService"));
outProps.setAction(builder.newURI("urn:wsa-action-bar"));
- msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
+ msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
}
catch (URISyntaxException ex)
{
@@ -65,4 +83,15 @@
}
return true;
}
+
+ public boolean handleFault(MessageContext messagecontext)
+ {
+ // do nothing
+ return true;
+ }
+
+ public void close(MessageContext messagecontext)
+ {
+ // do nothing
+ }
}
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientRpcHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientRpcHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/action/ClientRpcHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -22,13 +22,15 @@
package org.jboss.test.ws.addressing.action;
import java.net.URISyntaxException;
+import java.util.HashSet;
+import java.util.Set;
import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.MessageContext;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
import org.jboss.logging.Logger;
@@ -38,26 +40,42 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Nov-2005
*/
-public class ClientRpcHandler extends GenericHandler
+public class ClientRpcHandler implements SOAPHandler
{
// Provide logging
private static Logger log = Logger.getLogger(ClientRpcHandler.class);
- public QName[] getHeaders()
+ /**
+ * Gets the header blocks that can be processed by this Handler instance.
+ */
+ public Set<QName> getHeaders()
{
- return new QName[] {};
+ return new HashSet<QName>();
}
- public boolean handleRequest(MessageContext msgContext)
+ /**
+ * Read the addressing headers from the incomming message and put a
+ * SOAPAddressingProperties object into the message context
+ */
+ public boolean handleMessage(MessageContext msgContext)
{
+ Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound ? handleOutbound(msgContext) : true;
+ }
+
+ private boolean handleOutbound(MessageContext msgContext)
+ {
log.info("handleRequest" + this);
try
{
AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
AddressingProperties outProps = builder.newAddressingProperties();
- outProps.setTo(builder.newURI("http://localhost:8080/jbossws-addressing-action-rpc/ActionService"));
+ outProps.setTo(builder.newURI("http://localhost:8080/jbossws-addressing-action-rpc/ActionRpcService"));
outProps.setAction(builder.newURI("urn:wsa-action-bar"));
- msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
+ msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
}
catch (URISyntaxException ex)
{
@@ -65,4 +83,15 @@
}
return true;
}
+
+ public boolean handleFault(MessageContext messagecontext)
+ {
+ // do nothing
+ return true;
+ }
+
+ public void close(MessageContext messagecontext)
+ {
+ // do nothing
+ }
}
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/Foo.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/Foo.java)
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/FooResponse.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/FooResponse.java)
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/ObjectFactory.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/ObjectFactory.java)
Copied: trunk/src/test/java/org/jboss/test/ws/addressing/action/package-info.java (from rev 717, branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/addressing/action/package-info.java)
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/AddressingReplyToTestCase.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -24,24 +24,22 @@
import java.io.ByteArrayInputStream;
import java.io.File;
import java.net.URL;
-import java.util.HashMap;
import java.util.List;
import javax.xml.namespace.QName;
-import javax.xml.rpc.ServiceFactory;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.HandlerRegistry;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler;
-import org.jboss.ws.jaxrpc.ServiceImpl;
+import org.jboss.ws.addressing.jaxws.WSAddressingClientHandler;
/**
* Test endpoint using ws-addressing
@@ -69,40 +67,32 @@
if (initial == null)
{
- ServiceFactory factory = ServiceFactory.newInstance();
-
URL initURL = new File("resources/addressing/replyto/Initial-META-INF/wsdl/InitialService.wsdl").toURL();
- ServiceImpl initialService = (ServiceImpl)factory.createService(initURL, new QName(nsURI, "InitialEndpointImplService"));
+ Service initialService = Service.create(initURL, new QName(nsURI, "InitialEndpointImplService"));
initial = (InitialEndpoint)initialService.getPort(InitialEndpoint.class);
-
- HandlerRegistry registry = initialService.getDynamicHandlerRegistry();
- QName portName = new QName(nsURI, "InitialEndpointPort");
- List infos = registry.getHandlerChain(portName);
- infos.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
- infos.add(new HandlerInfo(WSAddressingClientHandler.class, new HashMap(), new QName[]{}));
- registry.setHandlerChain(portName, infos);
+ BindingProvider bindingProvider = (BindingProvider)initial;
+ List<Handler> handlerChain = bindingProvider.getBinding().getHandlerChain();
+ handlerChain.add(new ClientHandler());
+ handlerChain.add(new WSAddressingClientHandler());
+
URL replyToURL = new File("resources/addressing/replyto/ReplyTo-META-INF/wsdl/ReplyToService.wsdl").toURL();
- ServiceImpl replyToService = (ServiceImpl)factory.createService(replyToURL, new QName(nsURI, "ReplyToEndpointImplService"));
+ Service replyToService = Service.create(replyToURL, new QName(nsURI, "ReplyToEndpointImplService"));
replyto = (ReplyToEndpoint)replyToService.getPort(ReplyToEndpoint.class);
- registry = replyToService.getDynamicHandlerRegistry();
- portName = new QName(nsURI, "ReplyToEndpointPort");
- infos = registry.getHandlerChain(portName);
- infos.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
- infos.add(new HandlerInfo(WSAddressingClientHandler.class, new HashMap(), new QName[]{}));
- registry.setHandlerChain(portName, infos);
+ bindingProvider = (BindingProvider)replyto;
+ handlerChain = bindingProvider.getBinding().getHandlerChain();
+ handlerChain.add(new ClientHandler());
+ handlerChain.add(new WSAddressingClientHandler());
URL faultToURL = new File("resources/addressing/replyto/FaultTo-META-INF/wsdl/FaultToService.wsdl").toURL();
- ServiceImpl faultToService = (ServiceImpl)factory.createService(faultToURL, new QName(nsURI, "FaultToEndpointImplService"));
+ Service faultToService = Service.create(faultToURL, new QName(nsURI, "FaultToEndpointImplService"));
faultto = (FaultToEndpoint)faultToService.getPort(FaultToEndpoint.class);
- registry = faultToService.getDynamicHandlerRegistry();
- portName = new QName(nsURI, "FaultToEndpointPort");
- infos = registry.getHandlerChain(portName);
- infos.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
- infos.add(new HandlerInfo(WSAddressingClientHandler.class, new HashMap(), new QName[]{}));
- registry.setHandlerChain(portName, infos);
+ bindingProvider = (BindingProvider)faultto;
+ handlerChain = bindingProvider.getBinding().getHandlerChain();
+ handlerChain.add(new ClientHandler());
+ handlerChain.add(new WSAddressingClientHandler());
}
}
Modified: trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ClientHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ClientHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/addressing/replyto/ClientHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -24,15 +24,14 @@
import java.net.URI;
import java.net.URISyntaxException;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.MessageContext;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingProperties;
import javax.xml.ws.addressing.EndpointReference;
import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
-import org.jboss.test.ws.addressing.AddressingHandler;
+import org.jboss.test.ws.samples.wsaddressing.AddressingHandler;
import org.jboss.ws.utils.UUIDGenerator;
/**
@@ -46,13 +45,9 @@
// Provide logging
private static Logger log = Logger.getLogger(ClientHandler.class);
- public QName[] getHeaders()
+ @Override
+ public boolean handleOutbound(MessageContext msgContext)
{
- return new QName[] {};
- }
-
- public boolean handleRequest(MessageContext msgContext)
- {
log.info("handleRequest" + this);
try
@@ -68,7 +63,7 @@
EndpointReference eprFaultTo = builder.newEndpointReference(new URI("http://" + getServerHost() + ":8080/jbossws-addressing-faultto/FaultToService"));
outProps.setFaultTo(eprFaultTo);
- msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
+ msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
}
catch (URISyntaxException ex)
{
@@ -77,4 +72,10 @@
return true;
}
+
+ @Override
+ public boolean handleInbound(MessageContext msgContext)
+ {
+ return true;
+ }
}
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/AuthorizationHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/AuthorizationHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/AuthorizationHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -42,7 +42,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
/**
- * A server side handler for the @HandlerChain
+ * A server side handler
*
* @author Thomas.Diesler at jboss.org
* @since 08-Oct-2005
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/LogHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/LogHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/LogHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -42,7 +42,7 @@
import org.jboss.logging.Logger;
/**
- * A server side handler for the @HandlerChain
+ * A server side handler
*
* @author Thomas.Diesler at jboss.org
* @since 08-Oct-2005
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/RoutingHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/RoutingHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/handlerchain/RoutingHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -42,7 +42,7 @@
import javax.xml.ws.handler.soap.SOAPMessageContext;
/**
- * A server side handler for the @HandlerChain
+ * A server side handler
*
* @author Thomas.Diesler at jboss.org
* @since 08-Oct-2005
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocBareServiceImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocBareServiceImpl.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocBareServiceImpl.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -36,7 +36,7 @@
* @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
* @since 16-Oct-2005
*/
- at WebService(serviceName = "DocBareService", name = "DocBareServicePort")
+ at WebService(name = "DocBare")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class DocBareServiceImpl
{
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocWrappedServiceImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocWrappedServiceImpl.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/DocWrappedServiceImpl.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -36,7 +36,7 @@
* @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
* @since 16-Oct-2005
*/
- at WebService(serviceName = "DocWrappedService", name = "DocWrappedServicePort")
+ at WebService(name = "DocWrapped")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public class DocWrappedServiceImpl
{
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/ExampleServiceImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/ExampleServiceImpl.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/ExampleServiceImpl.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -33,7 +33,7 @@
* @author Thomas.Diesler at jboss.org
* @since 16-Oct-2005
*/
- at WebService(serviceName = "ExampleService", name = "ExampleServicePort")
+ at WebService(name = "Example")
@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)
public class ExampleServiceImpl
{
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -72,7 +72,7 @@
public void testDocBareService() throws Exception
{
QName serviceName = new QName(targetNS, "DocBareService");
- QName portName = new QName(targetNS, "DocBareServicePort");
+ QName portName = new QName(targetNS, "DocBarePort");
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-jsr181-soapbinding/DocBareService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
@@ -87,7 +87,7 @@
public void testDocBareServiceMessageAccess() throws Exception
{
QName serviceName = new QName(targetNS, "DocBareService");
- QName portName = new QName(targetNS, "DocBareServicePort");
+ QName portName = new QName(targetNS, "DocBarePort");
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-jsr181-soapbinding/DocBareService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
@@ -115,7 +115,7 @@
public void testNamespacedDocBareServiceMessageAccess() throws Exception
{
QName serviceName = new QName(targetNS, "DocBareService");
- QName portName = new QName(targetNS, "DocBareServicePort");
+ QName portName = new QName(targetNS, "DocBarePort");
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-jsr181-soapbinding/DocBareService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
@@ -146,7 +146,7 @@
public void testDocWrappedService() throws Exception
{
QName serviceName = new QName(targetNS, "DocWrappedService");
- QName portName = new QName(targetNS, "DocWrappedServicePort");
+ QName portName = new QName(targetNS, "DocWrappedPort");
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbossws-jsr181-soapbinding/DocWrappedService?wsdl");
System.out.println("FIXME: JBWS-1033");
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean01.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean01.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean01.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -37,7 +37,7 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Apr-2005
*/
- at WebService(name = "EndpointInterfacePort", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
+ at WebService(name = "EndpointInterface", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@PortComponent(contextRoot="/jsr181", urlPattern="/*")
public class EJB21Bean01 implements SessionBean
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean02.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean02.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB21Bean02.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -39,7 +39,7 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Apr-2005
*/
- at WebService(name = "EndpointInterfacePort", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService", wsdlLocation = "META-INF/wsdl/TestService.wsdl")
+ at WebService(name = "EndpointInterface", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService", wsdlLocation = "META-INF/wsdl/TestService.wsdl")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@PortComponent(contextRoot="/jsr181", urlPattern="/*")
public class EJB21Bean02 implements SessionBean
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean01.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean01.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean01.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -36,7 +36,7 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Apr-2005
*/
- at WebService(name = "EndpointInterfacePort", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
+ at WebService(name = "EndpointInterface", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
@PortComponent(contextRoot="/jsr181", urlPattern="/*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Remote(EJB3RemoteInterface.class)
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean02.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean02.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean02.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -40,7 +40,7 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Apr-2005
*/
- at WebService(name = "EndpointInterfacePort", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService", wsdlLocation = "META-INF/wsdl/TestService.wsdl")
+ at WebService(name = "EndpointInterface", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService", wsdlLocation = "META-INF/wsdl/TestService.wsdl")
@PortComponent(contextRoot="/jsr181", urlPattern="/*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Remote(EJB3RemoteInterface.class)
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean03.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean03.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EJB3Bean03.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -21,14 +21,12 @@
*/
package org.jboss.test.ws.jsr181.webservice;
-import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.ws.annotation.PortComponent;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
import javax.ejb.Remote;
import javax.ejb.Stateless;
+import javax.jws.WebService;
+import org.jboss.annotation.ejb.RemoteBinding;
+
/**
* Test the JSR-181 annotation: javax.jws.WebService
*
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EndpointInterface03.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EndpointInterface03.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/EndpointInterface03.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -35,7 +35,7 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Apr-2005
*/
- at WebService(name = "EndpointInterfacePort", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
+ at WebService(name = "EndpointInterface", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
@PortComponent(contextRoot="/jsr181", urlPattern="/*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface EndpointInterface03 extends Remote
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean01.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean01.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean01.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -31,7 +31,7 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Apr-2005
*/
- at WebService(name = "EndpointInterfacePort", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
+ at WebService(name = "EndpointInterface", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class JSEBean01
{
Modified: trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean02.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean02.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/jsr181/webservice/JSEBean02.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -33,7 +33,7 @@
* @author Thomas.Diesler at jboss.org
* @since 29-Apr-2005
*/
- at WebService(name = "EndpointInterfacePort", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService", wsdlLocation = "WEB-INF/wsdl/TestService.wsdl")
+ at WebService(name = "EndpointInterface", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld", serviceName = "TestService", wsdlLocation = "WEB-INF/wsdl/TestService.wsdl")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class JSEBean02
{
Modified: trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -21,17 +21,57 @@
*/
package org.jboss.test.ws.samples.wsaddressing;
-import javax.xml.rpc.handler.GenericHandler;
+import java.util.HashSet;
+import java.util.Set;
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+
+
/**
* An abstract handler for the ws-addressing
*
* @author Thomas.Diesler at jboss.org
* @since 29-Nov-2005
*/
-public abstract class AddressingHandler extends GenericHandler
+public abstract class AddressingHandler implements SOAPHandler
{
/**
+ * Gets the header blocks that can be processed by this Handler instance.
+ */
+ public Set<QName> getHeaders()
+ {
+ return new HashSet<QName>();
+ }
+
+ /**
+ * Read the addressing headers from the incomming message and put a
+ * SOAPAddressingProperties object into the message context
+ */
+ public boolean handleMessage(MessageContext msgContext)
+ {
+ Boolean outbound = (Boolean)msgContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound == null)
+ throw new IllegalStateException("Cannot obtain required property: " + MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+
+ return outbound ? handleOutbound(msgContext) : handleInbound(msgContext);
+ }
+
+ public abstract boolean handleOutbound(MessageContext msgContext);
+
+ public abstract boolean handleInbound(MessageContext msgContext);
+
+ public boolean handleFault(MessageContext messagecontext)
+ {
+ return false;
+ }
+
+ public void close(MessageContext messagecontext)
+ {
+ }
+
+ /**
* Get the JBoss server host from system property "jbosstest.server.host"
* This defaults to "" + getServerHost() + ""
*/
Modified: trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/AddressingStatefulTestCase.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -23,22 +23,18 @@
import java.io.File;
import java.net.URL;
-import java.util.HashMap;
import java.util.List;
-import javax.naming.InitialContext;
import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
-import javax.xml.rpc.handler.HandlerInfo;
-import javax.xml.rpc.handler.HandlerRegistry;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler;
-import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
-import org.jboss.ws.jaxrpc.ServiceImpl;
+import org.jboss.ws.addressing.jaxws.WSAddressingClientHandler;
/**
* Test stateful endpoint using ws-addressing
@@ -53,7 +49,7 @@
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(AddressingStatefulTestCase.class, "jbossws-samples-wsaddressing.war, jbossws-samples-wsaddressing-client.jar");
+ return JBossWSTestSetup.newTestSetup(AddressingStatefulTestCase.class, "jbossws-samples-wsaddressing.war");
}
protected void setUp() throws Exception
@@ -62,41 +58,23 @@
if (port1 == null || port2 == null)
{
- if (isTargetServerJBoss())
- {
- InitialContext iniCtx = getInitialContext();
- Service service1 = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- Service service2 = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- port1 = (StatefulEndpoint)service1.getPort(StatefulEndpoint.class);
- port2 = (StatefulEndpoint)service2.getPort(StatefulEndpoint.class);
- }
- else
- {
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- URL wsdlURL = new File("resources/samples/wsaddressing/META-INF/wsdl/TestService.wsdl").toURL();
- URL mappingURL = new File("resources/samples/wsaddressing/META-INF/jaxrpc-mapping.xml").toURL();
-
- QName serviceName = new QName("http://org.jboss.ws/samples/wsaddressing", "TestService");
- QName portName = new QName("http://org.jboss.ws/samples/wsaddressing", "StatefulEndpointPort");
-
- ServiceImpl service1 = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL);
- HandlerRegistry registry1 = service1.getDynamicHandlerRegistry();
- List infos1 = registry1.getHandlerChain(portName);
- infos1.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
- infos1.add(new HandlerInfo(WSAddressingClientHandler.class, new HashMap(), new QName[]{}));
- registry1.setHandlerChain(portName, infos1);
+ URL wsdlURL = new File("resources/samples/wsaddressing/META-INF/wsdl/TestService.wsdl").toURL();
+ QName serviceName = new QName("http://org.jboss.ws/samples/wsaddressing", "TestService");
+ QName portName = new QName("http://org.jboss.ws/samples/wsaddressing", "StatefulEndpointPort");
-
- ServiceImpl service2 = (ServiceImpl)factory.createService(wsdlURL, serviceName, mappingURL);
- HandlerRegistry registry2 = service2.getDynamicHandlerRegistry();
- List infos2 = registry2.getHandlerChain(portName);
- infos2.add(new HandlerInfo(ClientHandler.class, new HashMap(), new QName[]{}));
- infos2.add(new HandlerInfo(WSAddressingClientHandler.class, new HashMap(), new QName[]{}));
- registry2.setHandlerChain(portName, infos2);
-
- port2 = (StatefulEndpoint)service2.getPort(StatefulEndpoint.class);
- port1 = (StatefulEndpoint)service1.getPort(StatefulEndpoint.class);
- }
+ Service service1 = Service.create(wsdlURL, serviceName);
+ port1 = (StatefulEndpoint)service1.getPort(StatefulEndpoint.class);
+ BindingProvider bindingProvider = (BindingProvider)port1;
+ List<Handler> handlerChain = bindingProvider.getBinding().getHandlerChain();
+ handlerChain.add(new ClientHandler());
+ handlerChain.add(new WSAddressingClientHandler());
+
+ Service service2 = Service.create(wsdlURL, serviceName);
+ port2 = (StatefulEndpoint)service2.getPort(StatefulEndpoint.class);
+ bindingProvider = (BindingProvider)port2;
+ handlerChain = bindingProvider.getBinding().getHandlerChain();
+ handlerChain.add(new ClientHandler());
+ handlerChain.add(new WSAddressingClientHandler());
}
}
Modified: trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/ClientHandler.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/ClientHandler.java 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/java/org/jboss/test/ws/samples/wsaddressing/ClientHandler.java 2006-08-09 17:23:23 UTC (rev 718)
@@ -25,8 +25,6 @@
import java.net.URISyntaxException;
import javax.xml.namespace.QName;
-import javax.xml.rpc.handler.GenericHandler;
-import javax.xml.rpc.handler.MessageContext;
import javax.xml.soap.SOAPHeaderElement;
import javax.xml.ws.addressing.AddressingBuilder;
import javax.xml.ws.addressing.AddressingConstants;
@@ -34,10 +32,10 @@
import javax.xml.ws.addressing.EndpointReference;
import javax.xml.ws.addressing.JAXWSAConstants;
import javax.xml.ws.addressing.ReferenceParameters;
+import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
import org.jboss.util.xml.DOMUtils;
-import org.jboss.ws.addressing.AddressingClientUtil;
import org.jboss.ws.utils.UUIDGenerator;
/**
@@ -46,7 +44,7 @@
* @author Thomas.Diesler at jboss.org
* @since 24-Nov-2005
*/
-public class ClientHandler extends GenericHandler
+public class ClientHandler extends AddressingHandler
{
// Provide logging
private static Logger log = Logger.getLogger(ClientHandler.class);
@@ -56,17 +54,10 @@
private static int maxClientId;
private String clientid;
- private QName[] headers = new QName[] {};
-
- public QName[] getHeaders()
+ public boolean handleOutbound(MessageContext msgContext)
{
- return headers;
- }
+ log.info("handleOutbound" + this);
- public boolean handleRequest(MessageContext msgContext)
- {
- log.info("handleRequest" + this);
-
try
{
AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
@@ -90,7 +81,7 @@
ReferenceParameters refParams = replyTo.getReferenceParameters();
refParams.addElement(getClientIdElement(clientid));
- msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
+ msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
}
catch (URISyntaxException ex)
{
@@ -100,11 +91,11 @@
return true;
}
- public boolean handleResponse(MessageContext msgContext)
+ public boolean handleInbound(MessageContext msgContext)
{
- log.info("handleResponse");
+ log.info("handleInbound");
- AddressingProperties addrProps = (AddressingProperties)msgContext.getProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
+ AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
if (addrProps == null)
throw new IllegalStateException("Cannot obtain AddressingProperties");
Deleted: trunk/src/test/resources/addressing/action/Doc-META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/application-client.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/application-client.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>JAXRPC simple tests</display-name>
-
- <service-ref>
- <service-ref-name>service/ActionDocService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/ActionDocService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.addressing.action.ActionEndpoint</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>ClientHandler</handler-name>
- <handler-class>org.jboss.test.ws.addressing.action.ClientDocHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Deleted: trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-client-config.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-client-config.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-client-config.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id$ -->
-
-<jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
-
- <client-config>
- <config-name>Addressing Client</config-name>
- <post-handler-chain>
- <handler-chain-name>PostHandlerChain</handler-chain-name>
- <handler>
- <j2ee:handler-name>SOAPClientHandler</j2ee:handler-name>
- <j2ee:handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</j2ee:handler-class>
- </handler>
- </post-handler-chain>
- </client-config>
-
-</jaxrpc-config>
\ No newline at end of file
Deleted: trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/jaxrpc-mapping.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
- <package-mapping>
- <package-type>org.jboss.test.ws.addressing.action</package-type>
- <namespaceURI>http://org.jboss.ws/addressing/action</namespaceURI>
- </package-mapping>
- <package-mapping>
- <package-type>org.jboss.test.ws.addressing.action</package-type>
- <namespaceURI>http://org.jboss.ws/addressing/action</namespaceURI>
- </package-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_foo_ResponseStruct</java-type>
- <root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:fooResponse</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>result</java-variable-name>
- <xml-element-name>result</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_bar_ResponseStruct</java-type>
- <root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:barResponse</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>result</java-variable-name>
- <xml-element-name>result</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_foo_RequestStruct</java-type>
- <root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:foo</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>String_1</java-variable-name>
- <xml-element-name>String_1</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <java-xml-type-mapping>
- <java-type>org.jboss.test.ws.addressing.action.ActionEndpoint_bar_RequestStruct</java-type>
- <root-type-qname xmlns:typeNS="http://org.jboss.ws/addressing/action">typeNS:bar</root-type-qname>
- <qname-scope>complexType</qname-scope>
- <variable-mapping>
- <java-variable-name>String_1</java-variable-name>
- <xml-element-name>String_1</xml-element-name>
- </variable-mapping>
- </java-xml-type-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.addressing.action.ActionDocService</service-interface>
- <wsdl-service-name xmlns:serviceNS="http://org.jboss.ws/addressing/action">serviceNS:ActionDocService</wsdl-service-name>
- <port-mapping>
- <port-name>ActionEndpointPort</port-name>
- <java-port-name>ActionEndpointPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.addressing.action.ActionEndpoint</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS="http://org.jboss.ws/addressing/action">portTypeNS:ActionEndpoint</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS="http://org.jboss.ws/addressing/action">bindingNS:ActionEndpointBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>bar</java-method-name>
- <wsdl-operation>bar</wsdl-operation>
- <wrapped-element/>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_bar</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_barResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- <service-endpoint-method-mapping>
- <java-method-name>foo</java-method-name>
- <wsdl-operation>foo</wsdl-operation>
- <wrapped-element/>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_foo</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_fooResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Deleted: trunk/src/test/resources/addressing/action/Doc-META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/jboss-client.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/jboss-client.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,16 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>wsadoc-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/ActionDocService</service-ref-name>
- <config-name>Addressing Client</config-name>
- <config-file>META-INF/jaxrpc-client-config.xml</config-file>
- </service-ref>
-
-</jboss-client>
Modified: trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/wsdl/ActionDocService.wsdl 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,11 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ wsimport -keep -verbose -d ../../../../java -wsdllocation http://localhost:8080/jbossws-addressing-action-doc?wsdl ./wsdl/ActionDocService.wsdl
+-->
+
<definitions name="ActionDocService" targetNamespace="http://org.jboss.ws/addressing/action" xmlns:tns="http://org.jboss.ws/addressing/action"
- xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
+
+ <jaxws:bindings>
+ <jaxws:package name="org.jboss.test.ws.addressing.action"/>
+ </jaxws:bindings>
+
<types>
- <schema targetNamespace="http://org.jboss.ws/addressing/action" xmlns:tns="http://org.jboss.ws/addressing/action"
- xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns="http://www.w3.org/2001/XMLSchema">
+ <schema targetNamespace="http://org.jboss.ws/addressing/action" xmlns:tns="http://org.jboss.ws/addressing/action" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema" jaxb:version="2.0">
+
+ <xsd:annotation><xsd:appinfo>
+ <jaxb:schemaBindings>
+ <jaxb:package name="org.jboss.test.ws.addressing.action"/>
+ </jaxb:schemaBindings>
+ </xsd:appinfo></xsd:annotation>
+
<complexType name="bar">
<sequence>
<element name="String_1" type="string" nillable="true"/>
@@ -44,7 +60,7 @@
<message name="ActionEndpoint_fooResponse">
<part name="result" element="tns:fooResponse"/>
</message>
- <portType name="ActionEndpoint">
+ <portType name="ActionDocEndpoint">
<operation name="bar">
<input message="tns:ActionEndpoint_bar"/>
<output message="tns:ActionEndpoint_barResponse"/>
@@ -54,7 +70,7 @@
<output message="tns:ActionEndpoint_fooResponse"/>
</operation>
</portType>
- <binding name="ActionEndpointBinding" type="tns:ActionEndpoint">
+ <binding name="ActionDocEndpointBinding" type="tns:ActionDocEndpoint">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="bar">
<soap:operation soapAction=""/>
@@ -75,8 +91,8 @@
</output>
</operation>
</binding>
- <service name="ActionDocService">
- <port name="ActionEndpointPort" binding="tns:ActionEndpointBinding">
+ <service name="ActionDocEndpointService">
+ <port name="ActionDocEndpointPort" binding="tns:ActionDocEndpointBinding">
<soap:address location="http://@jbosstest.host.name@:8080/jbossws-addressing-action-doc/ActionDocService"/>
</port>
</service>
Deleted: trunk/src/test/resources/addressing/action/Doc-META-INF/wstools-config.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Doc-META-INF/wstools-config.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Doc-META-INF/wstools-config.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wscompile -cp ../../../../output/classes -gen:server -f:documentliteral -mapping jaxrpc-mapping.xml -keep config.xml
--->
-
-<configuration
- xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
-
- <service name="ActionDocService"
- targetNamespace="http://org.jboss.ws/addressing/action"
- typeNamespace="http://org.jboss.ws/addressing/action"
- packageName="org.jboss.test.ws.addressing.action">
- <interface name="org.jboss.test.ws.addressing.action.ActionEndpoint"/>
- </service>
-
-</configuration>
-
Deleted: trunk/src/test/resources/addressing/action/Rpc-META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Rpc-META-INF/application-client.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Rpc-META-INF/application-client.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>JAXRPC simple tests</display-name>
-
- <service-ref>
- <service-ref-name>service/ActionRpcService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/ActionRpcService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.addressing.action.ActionEndpoint</service-endpoint-interface>
- </port-component-ref>
- <handler>
- <handler-name>ClientHandler</handler-name>
- <handler-class>org.jboss.test.ws.addressing.action.ClientRpcHandler</handler-class>
- </handler>
- </service-ref>
-
-</application-client>
-
Deleted: trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-client-config.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-client-config.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-client-config.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id$ -->
-
-<jaxrpc-config xmlns="urn:jboss:jaxrpc-config:2.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xsi:schemaLocation="urn:jboss:jaxrpc-config:2.0 jaxrpc-config_2_0.xsd">
-
- <client-config>
- <config-name>Addressing Client</config-name>
- <post-handler-chain>
- <handler-chain-name>PostHandlerChain</handler-chain-name>
- <handler>
- <j2ee:handler-name>SOAPClientHandler</j2ee:handler-name>
- <j2ee:handler-class>org.jboss.ws.addressing.jaxrpc.WSAddressingClientHandler</j2ee:handler-class>
- </handler>
- </post-handler-chain>
- </client-config>
-
-</jaxrpc-config>
\ No newline at end of file
Deleted: trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-mapping.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-mapping.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxrpc-mapping.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
- <package-mapping>
- <package-type>org.jboss.test.ws.addressing.action</package-type>
- <namespaceURI>http://org.jboss.ws/addressing/action</namespaceURI>
- </package-mapping>
- <package-mapping>
- <package-type>org.jboss.test.ws.addressing.action</package-type>
- <namespaceURI>http://org.jboss.ws/addressing/action</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.addressing.action.ActionRpcService</service-interface>
- <wsdl-service-name xmlns:serviceNS="http://org.jboss.ws/addressing/action">serviceNS:ActionRpcService</wsdl-service-name>
- <port-mapping>
- <port-name>ActionEndpointPort</port-name>
- <java-port-name>ActionEndpointPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.addressing.action.ActionEndpoint</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS="http://org.jboss.ws/addressing/action">portTypeNS:ActionEndpoint</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS="http://org.jboss.ws/addressing/action">bindingNS:ActionEndpointBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>bar</java-method-name>
- <wsdl-operation>bar</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_bar</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_barResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- <service-endpoint-method-mapping>
- <java-method-name>foo</java-method-name>
- <wsdl-operation>foo</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_foo</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS="http://org.jboss.ws/addressing/action">wsdlMsgNS:ActionEndpoint_fooResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxws-handlers.xml (from rev 717, branches/tdiesler/trunk/src/test/resources/addressing/action/Rpc-META-INF/jaxws-handlers.xml)
Deleted: trunk/src/test/resources/addressing/action/Rpc-META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Rpc-META-INF/jboss-client.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Rpc-META-INF/jboss-client.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,14 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>wsarpc-client</jndi-name>
- <service-ref>
- <service-ref-name>service/ActionRpcService</service-ref-name>
- <!-- test unnamed config-name -->
- <config-file>META-INF/jaxrpc-client-config.xml</config-file>
- </service-ref>
-</jboss-client>
Modified: trunk/src/test/resources/addressing/action/Rpc-META-INF/wsdl/ActionRpcService.wsdl
===================================================================
--- trunk/src/test/resources/addressing/action/Rpc-META-INF/wsdl/ActionRpcService.wsdl 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Rpc-META-INF/wsdl/ActionRpcService.wsdl 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,7 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ wsimport -keep -verbose -d ../../../../java -wsdllocation http://localhost:8080/jbossws-addressing-action-rpc?wsdl ./wsdl/ActionRpcService.wsdl
+-->
+
<definitions name="ActionRpcService" targetNamespace="http://org.jboss.ws/addressing/action" xmlns:tns="http://org.jboss.ws/addressing/action"
- xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
+
+ <jaxws:bindings>
+ <jaxws:package name="org.jboss.test.ws.addressing.action"/>
+ </jaxws:bindings>
+
<types/>
<message name="ActionEndpoint_bar">
<part name="String_1" type="xsd:string"/>
@@ -15,7 +25,7 @@
<message name="ActionEndpoint_fooResponse">
<part name="result" type="xsd:string"/>
</message>
- <portType name="ActionEndpoint">
+ <portType name="ActionRpcEndpoint">
<operation name="bar" parameterOrder="String_1">
<input message="tns:ActionEndpoint_bar"/>
<output message="tns:ActionEndpoint_barResponse"/>
@@ -25,7 +35,7 @@
<output message="tns:ActionEndpoint_fooResponse"/>
</operation>
</portType>
- <binding name="ActionEndpointBinding" type="tns:ActionEndpoint">
+ <binding name="ActionRpcEndpointBinding" type="tns:ActionRpcEndpoint">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
<operation name="bar">
<soap:operation soapAction=""/>
@@ -46,8 +56,8 @@
</output>
</operation>
</binding>
- <service name="ActionRpcService">
- <port name="ActionEndpointPort" binding="tns:ActionEndpointBinding">
+ <service name="ActionRpcEndpointService">
+ <port name="ActionRpcEndpointPort" binding="tns:ActionRpcEndpointBinding">
<soap:address location="http://@jbosstest.host.name@:8080/jbossws-addressing-action-rpc/ActionRpcService"/>
</port>
</service>
Deleted: trunk/src/test/resources/addressing/action/Rpc-META-INF/wstools-config.xml
===================================================================
--- trunk/src/test/resources/addressing/action/Rpc-META-INF/wstools-config.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/addressing/action/Rpc-META-INF/wstools-config.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wscompile -cp ../../../../output/classes -gen:server -f:rpcliteral -mapping jaxrpc-mapping.xml config.xml
--->
-
-<configuration
- xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
-
- <service name="ActionRpcService"
- targetNamespace="http://org.jboss.ws/addressing/action"
- typeNamespace="http://org.jboss.ws/addressing/action"
- packageName="org.jboss.test.ws.addressing.action">
- <interface name="org.jboss.test.ws.addressing.action.ActionEndpoint"/>
- </service>
-
-</configuration>
-
Deleted: trunk/src/test/resources/samples/jsr181ejb/META-INF/application-client.xml
===================================================================
--- trunk/src/test/resources/samples/jsr181ejb/META-INF/application-client.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/samples/jsr181ejb/META-INF/application-client.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>JSR-181 Annotation test</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.samples.jsr181ejb.EndpointInterface</service-endpoint-interface>
- </port-component-ref>
- </service-ref>
-
-</application-client>
-
Deleted: trunk/src/test/resources/samples/jsr181ejb/META-INF/jboss-client.xml
===================================================================
--- trunk/src/test/resources/samples/jsr181ejb/META-INF/jboss-client.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/samples/jsr181ejb/META-INF/jboss-client.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,13 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <config-name>Standard Secure Client</config-name>
- </service-ref>
-</jboss-client>
Deleted: trunk/src/test/resources/samples/wsaddressing/wstools-config.xml
===================================================================
--- trunk/src/test/resources/samples/wsaddressing/wstools-config.xml 2006-08-09 16:50:34 UTC (rev 717)
+++ trunk/src/test/resources/samples/wsaddressing/wstools-config.xml 2006-08-09 17:23:23 UTC (rev 718)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools -config wstools-config.xml
--->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
-
- <wsdl-java file="resources/samples/wsaddressing/META-INF/wsdl/TestService.wsdl">
- <mapping file="jaxrpc-mapping.xml"/>
- </wsdl-java>
-
-</configuration>
More information about the jboss-svn-commits
mailing list