Author: heiko.braun(a)jboss.com
Date: 2007-09-26 09:11:47 -0400 (Wed, 26 Sep 2007)
New Revision: 4632
Added:
stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext21.java
stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider21.java
stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate21.java
Modified:
stack/native/trunk/build.xml
stack/native/trunk/src/main/java/javax/xml/ws/EndpointReference.java
stack/native/trunk/src/main/java/javax/xml/ws/Service.java
stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext.java
stack/native/trunk/src/main/java/javax/xml/ws/http/HTTPBinding.java
stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPBinding.java
stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider.java
stack/native/trunk/src/main/java/javax/xml/ws/spi/ProviderLoader.java
stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java
stack/native/trunk/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
Log:
TXK signature tests: Fix remeining pkg's: javax.xml.ws.handler,
javax.xml.ws.handler.soap, javax.xml.ws.spi
Modified: stack/native/trunk/build.xml
===================================================================
--- stack/native/trunk/build.xml 2007-09-26 13:10:41 UTC (rev 4631)
+++ stack/native/trunk/build.xml 2007-09-26 13:11:47 UTC (rev 4632)
@@ -140,7 +140,13 @@
<exclude name="javax/xml/ws/RespectBinding.class"/>
<exclude name="javax/xml/ws/RespectBindingFeature.class"/>
<exclude name="javax/xml/ws/WebServiceFeature.class"/>
+ <exclude
name="javax/xml/ws/spi/WebServiceFeatureAnnotation.class"/>
+ <exclude name="javax/xml/ws/soap/MTOMFeature.class"/>
+ <exclude name="javax/xml/ws/soap/AddressingFeature.class"/>
<exclude name="javax/xml/ws/addressing/**"/>
+ <exclude name="javax/xml/ws/soap/Addressing.class"/>
+ <exclude name="javax/xml/ws/soap/MTOM.class"/>
+ <exclude name="javax/xml/ws/soap/MTOMFeature.class"/>
<exclude name="javax/xml/ws/wsaddressing/**"/>
</fileset>
<metainf dir="${core.resources.dir}/jboss-jaxws.jar/META-INF"/>
@@ -178,7 +184,14 @@
<include name="javax/xml/ws/RespectBinding.class"/>
<include name="javax/xml/ws/RespectBindingFeature.class"/>
<include name="javax/xml/ws/WebServiceFeature.class"/>
+ <include name="javax/xml/ws/soap/MTOMFeature.class"/>
+ <include name="javax/xml/ws/soap/AddressingFeature.class"/>
+ <include
name="javax/xml/ws/spi/WebServiceFeatureAnnotation.class"/>
<include name="javax/xml/ws/addressing/**"/>
+ <include name="javax/xml/ws/soap/Addressing.class"/>
+ <include name="javax/xml/ws/soap/MTOM.class"/>
+ <include name="javax/xml/ws/soap/MTOMFeature.class"/>
+
<include name="javax/xml/ws/wsaddressing/**"/>
</fileset>
@@ -203,7 +216,13 @@
<include name="javax/xml/ws/RespectBinding.class"/>
<include name="javax/xml/ws/RespectBindingFeature.class"/>
<include name="javax/xml/ws/WebServiceFeature.class"/>
+ <include name="javax/xml/ws/soap/MTOMFeature.class"/>
+ <include name="javax/xml/ws/soap/AddressingFeature.class"/>
+ <include
name="javax/xml/ws/spi/WebServiceFeatureAnnotation.class"/>
<include name="javax/xml/ws/addressing/**"/>
+ <include name="javax/xml/ws/soap/Addressing.class"/>
+ <include name="javax/xml/ws/soap/MTOM.class"/>
+ <include name="javax/xml/ws/soap/MTOMFeature.class"/>
<include name="javax/xml/ws/wsaddressing/**"/>
</fileset>
Modified: stack/native/trunk/src/main/java/javax/xml/ws/EndpointReference.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/EndpointReference.java 2007-09-26
13:10:41 UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/EndpointReference.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -29,6 +29,7 @@
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;
import javax.xml.ws.spi.Provider;
+import javax.xml.ws.spi.Provider21;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
/**
@@ -108,7 +109,7 @@
*/
public static EndpointReference readFrom(Source eprInfoset)
{
- return Provider.provider().readEndpointReference(eprInfoset);
+ return ((Provider21)Provider.provider()).readEndpointReference(eprInfoset);
}
/**
@@ -173,7 +174,7 @@
**/
public <T> T getPort(Class<T> serviceEndpointInterface,
WebServiceFeature... features)
{
- return Provider.provider().getPort(this, serviceEndpointInterface, features);
+ return ((Provider21)Provider.provider()).getPort(this, serviceEndpointInterface,
features);
}
/**
Modified: stack/native/trunk/src/main/java/javax/xml/ws/Service.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/Service.java 2007-09-26 13:10:41 UTC
(rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/Service.java 2007-09-26 13:11:47 UTC
(rev 4632)
@@ -28,6 +28,8 @@
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.spi.Provider;
import javax.xml.ws.spi.ServiceDelegate;
+import javax.xml.ws.spi.ServiceDelegate21;
+import javax.xml.ws.spi.Provider21;
import java.net.URL;
import java.util.Iterator;
@@ -63,7 +65,7 @@
**/
public class Service
{
- protected ServiceDelegate delegate;
+ ServiceDelegate21 delegate;
/**
* The orientation of a dynamic client or service. MESSAGE provides
@@ -77,7 +79,7 @@
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName)
{
- delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
serviceName, this.getClass());
+ delegate =
(ServiceDelegate21)Provider.provider().createServiceDelegate(wsdlDocumentLocation,
serviceName, this.getClass());
}
/**
Modified: stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext.java 2007-09-26
13:10:41 UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -144,18 +144,8 @@
* <p>Type: String
*/
public static final String PATH_INFO =
"javax.xml.ws.http.request.pathinfo";
-
+
/**
- * Standard property: WS Addressing Reference Parameters.
- * The list MUST include all SOAP headers marked with the
- * wsa:IsReferenceParameter="true" attribute.
- * <p>Type: List<Element>
- *
- * @since JAX-WS 2.1
- */
- public static final String REFERENCE_PARAMETERS =
"javax.xml.ws.reference.parameters";
-
- /**
* Property scope. Properties scoped as <code>APPLICATION</code> are
* visible to handlers,
* client applications and service endpoints; properties scoped as
Added: stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext21.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext21.java
(rev 0)
+++ stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext21.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -0,0 +1,39 @@
+/*
+ * 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.xml.ws.handler;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public interface MessageContext21 extends MessageContext
+{
+ /**
+ * Standard property: WS Addressing Reference Parameters.
+ * The list MUST include all SOAP headers marked with the
+ * wsa:IsReferenceParameter="true" attribute.
+ * <p>Type: List<Element>
+ *
+ * @since JAX-WS 2.1
+ */
+ public static final String REFERENCE_PARAMETERS =
"javax.xml.ws.reference.parameters";
+}
Property changes on:
stack/native/trunk/src/main/java/javax/xml/ws/handler/MessageContext21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/trunk/src/main/java/javax/xml/ws/http/HTTPBinding.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/http/HTTPBinding.java 2007-09-26
13:10:41 UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/http/HTTPBinding.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -31,7 +31,7 @@
*
* @since JAX-WS 2.0
**/
-public interface HTTPBinding extends Binding21
+public interface HTTPBinding extends Binding
{
/**
Modified: stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPBinding.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPBinding.java 2007-09-26
13:10:41 UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPBinding.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -23,20 +23,18 @@
// $Id$
-import java.util.Set;
-
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPFactory;
import javax.xml.ws.Binding;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.Binding21;
+import java.util.Set;
/** The <code>SOAPBinding</code> interface is an abstraction for
* the SOAP binding.
*
* @since JAX-WS 2.0
**/
-public interface SOAPBinding extends Binding21
+public interface SOAPBinding extends Binding
{
/**
* A constant representing the identity of the SOAP 1.1 over HTTP binding.
Modified: stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2007-09-26
13:10:41 UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/soap/SOAPFaultException.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -64,21 +64,6 @@
this.fault = fault;
}
- public SOAPFaultException(String message)
- {
- super(message);
- }
-
- public SOAPFaultException(String message, Exception ex)
- {
- super(message, ex);
- }
-
- public SOAPFaultException(Exception ex)
- {
- super(ex);
- }
-
/** Gets the embedded <code>SOAPFault</code> instance.
*
* @return <code>javax.xml.soap.SOAPFault</code> SOAP
Modified: stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider.java 2007-09-26 13:10:41
UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider.java 2007-09-26 13:11:47
UTC (rev 4632)
@@ -23,18 +23,10 @@
// $Id$
-import java.util.List;
-
import javax.xml.namespace.QName;
-import javax.xml.transform.Source;
import javax.xml.ws.Endpoint;
-import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import org.w3c.dom.Element;
-
/**
* Service provider for ServiceDelegate and Endpoint objects.
*
@@ -142,159 +134,4 @@
*/
public abstract Endpoint createAndPublishEndpoint(String address, Object
implementor);
- /**
- * read an EndpointReference from the infoset contained in
- * <code>eprInfoset</code>.
- *
- * @returns the <code>EndpointReference</code> unmarshalled from
- * <code>eprInfoset</code>. This method never returns
<code>null</code>.
- *
- * @throws WebServiceException If there is an error creating the
- * <code>EndpointReference</code> from the specified
<code>eprInfoset</code>.
- *
- * @throws NullPointerException If the <code>null</code>
- * <code>eprInfoset</code> value is given.
- *
- * @since JAX-WS 2.1
- **/
- public abstract EndpointReference readEndpointReference(javax.xml.transform.Source
eprInfoset);
-
- /**
- * Create an EndpointReference for <code>serviceName</code>
- * service and <code>portName</code> port from the WSDL
<code>wsdlDocumentLocation</code>. The instance
- * returned will be of type <code>clazz</code> and contain the
<code>referenceParameters</code>
- * reference parameters. This method delegates to the vendor specific
- * implementation of the {@link
javax.xml.ws.spi.Provider#createEndpointReference(Class<T>,
javax.xml.namespace.QName, javax.xml.namespace.QName, javax.xml.transform.Source,
org.w3c.dom.Element...)} method.
- *
- * @param clazz Specifies the type of <code>EndpointReference</code> that
MUST be returned.
- * @param serviceName Qualified name of the service in the WSDL.
- * @param portName Qualified name of the endpoint in the WSDL.
- * @param wsdlDocumentLocation URL for the WSDL document location for the service.
- * @param referenceParameters Reference parameters to be associated with the
- * returned <code>EndpointReference</code> instance.
- *
- * @return the EndpointReference created from <code>serviceName</code>,
<code>portName</code>,
- * <code>wsdlDocumentLocation</code> and
<code>referenceParameters</code>. This method
- * never returns <code>null</code>.
- * @throws WebServiceException
- * <UL>
- * <li>If the <code>serviceName</code> service is not
present in the WSDL.
- * <li>If the <code>portName</code> port is not present
in <code>serviceName</code> service in the WSDL.
- * <li>If the <code>wsdlDocumentLocation</code> does not
represent a valid WSDL.
- * <li>If an error occurs while creating the
<code>EndpointReference</code>.
- * <li>If the Class <code>clazz</code> is not supported
by this implementation.
- * </UL>
- * @throws java.lang.IllegalArgumentException
- * if any of the <code>clazz</code>,
<code>serviceName</code>, <code>portName</code> and
<code>wsdlDocumentLocation</code> is null.
- */
- public abstract <T extends EndpointReference> T
createEndpointReference(Class<T> clazz, QName serviceName, QName portName, Source
wsdlDocumentLocation,
- Element... referenceParameters);
-
- /**
- * The getPort method returns a proxy. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The parameter <code>serviceEndpointInterface</code> specifies
- * the service endpoint interface that is supported by the
- * returned proxy.
- * The parameter <code>endpointReference</code> specifies the
- * endpoint that will be invoked by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly from
- * the WSDL Metadata from the <code>EndpointReference</code>.
- *
- *
- * @param endpointReference the EndpointReference that will
- * be invoked by the returned proxy.
- * @param serviceEndpointInterface Service endpoint interface
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that supports the
- * specified service endpoint interface
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If this
- * <code>endpointReference</code>
- * is illegal
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified
- * <LI>If feature is enabled that is not compatible with
- * this port or is unsupported.
- * </UL>
- *
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(EndpointReference endpointReference,
Class<T> serviceEndpointInterface, WebServiceFeature... features);
-
- /**
- * Factory method to create a <code>W3CEndpointReference</code>.
- *
- * <p>
- * This method can be used to create a <code>W3CEndpointReference</code>
- * for any endpoint by specifying the <code>address</code> property along
- * with any other desired properties. This method
- * can also be used to create a <code>W3CEndpointReference</code> for
- * an endpoint that is published by the same Java EE application.
- * To do so the <code>address</code> property can be provided or this
- * method can automatically determine the <code>address</code> of
- * an endpoint that is published by the same Java EE application and is
- * identified by the <code>serviceName</code> and
- * <code>portName</code> propeties. If the
<code>address</code> is
- * <code>null</code> and the <code>serviceName</code> and
- * <code>portName</code> do not identify an endpoint published by the
- * same Java EE application, a
- * <code>javax.lang.IllegalArgumentException</code> MUST be thrown.
- *
- * @param address Specifies the address of the target endpoint
- * @param serviceName Qualified name of the service in the WSDL.
- * @param portName Qualified name of the endpoint in the WSDL.
- * @param metadata A list of elements that should be added to the
- * <code>W3CEndpointReference</code> instances
<code>wsa:metadata</code>
- * element.
- * @param wsdlDocumentLocation URL for the WSDL document location for
- * the service.
- * @param referenceParameters Reference parameters to be associated
- * with the returned <code>EndpointReference</code> instance.
- *
- * @return the <code>W3CEndpointReference<code> created from
- * <code>serviceName</code>, <code>portName</code>,
- * <code>metadata</code>,
<code>wsdlDocumentLocation</code>
- * and <code>referenceParameters</code>. This method
- * never returns <code>null</code>.
- *
- * @throws javax.lang.IllegalArgumentException
- * <ul>
- * <li>If the <code>address</code>,
<code>serviceName</code> and
- * <code>portName</code> are all
<code>null</code>.
- * <li>If the <code>serviceName</code> service is
<code>null</code> and the
- * <code>portName> is NOT <code>null</code>.
- * <li>If the <code>address</code> property is
<code>null</code> and
- * the <code>serviceName</code> and
<code>portName</code> do not
- * specify a valid endpoint published by the same Java EE
- * application.
- * <li>If the <code>serviceName</code>is NOT
<code>null</code>
- * and is not present in the specified WSDL.
- * <li>If the <code>portName</code> port is not
<code>null<code> and it
- * is not present in <code>serviceName</code> service in the
WSDL.
- * <li>If the <code>wsdlDocumentLocation</code> is NOT
<code>null</code>
- * and does not represent a valid WSDL.
- * </ul>
- * @throws WebServiceException If an error occurs while creating the
- * <code>W3CEndpointReference</code>.
- *
- * @since JAX-WS 2.1
- */
- public abstract W3CEndpointReference createW3CEndpointReference(String address, QName
serviceName, QName portName, List<Element> metadata,
- String wsdlDocumentLocation, List<Element> referenceParameters);
}
Added: stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider21.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider21.java
(rev 0)
+++ stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider21.java 2007-09-26 13:11:47
UTC (rev 4632)
@@ -0,0 +1,194 @@
+/*
+ * 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.xml.ws.spi;
+
+import org.w3c.dom.Element;
+
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public abstract class Provider21 extends Provider
+{
+ /**
+ * The getPort method returns a proxy. If there
+ * are any reference parameters in the
+ * <code>endpointReference</code>, then those reference
+ * parameters MUST appear as SOAP headers, indicating them to be
+ * reference parameters, on all messages sent to the endpoint.
+ * The parameter <code>serviceEndpointInterface</code> specifies
+ * the service endpoint interface that is supported by the
+ * returned proxy.
+ * The parameter <code>endpointReference</code> specifies the
+ * endpoint that will be invoked by the returned proxy.
+ * In the implementation of this method, the JAX-WS
+ * runtime system takes the responsibility of selecting a protocol
+ * binding (and a port) and configuring the proxy accordingly from
+ * the WSDL Metadata from the <code>EndpointReference</code>.
+ *
+ *
+ * @param endpointReference the EndpointReference that will
+ * be invoked by the returned proxy.
+ * @param serviceEndpointInterface Service endpoint interface
+ * @param features A list of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ * @return Object Proxy instance that supports the
+ * specified service endpoint interface
+ * @throws javax.xml.ws.WebServiceException
+ * <UL>
+ * <LI>If there is an error during creation
+ * of the proxy
+ * <LI>If there is any missing WSDL metadata
+ * as required by this method
+ * <LI>If this
+ * <code>endpointReference</code>
+ * is illegal
+ * <LI>If an illegal
+ * <code>serviceEndpointInterface</code>
+ * is specified
+ * <LI>If feature is enabled that is not compatible with
+ * this port or is unsupported.
+ * </UL>
+ *
+ * @see javax.xml.ws.WebServiceFeature
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract <T> T getPort(EndpointReference endpointReference,
Class<T> serviceEndpointInterface, WebServiceFeature... features);
+
+ /**
+ * Factory method to create a <code>W3CEndpointReference</code>.
+ *
+ * <p>
+ * This method can be used to create a <code>W3CEndpointReference</code>
+ * for any endpoint by specifying the <code>address</code> property along
+ * with any other desired properties. This method
+ * can also be used to create a <code>W3CEndpointReference</code> for
+ * an endpoint that is published by the same Java EE application.
+ * To do so the <code>address</code> property can be provided or this
+ * method can automatically determine the <code>address</code> of
+ * an endpoint that is published by the same Java EE application and is
+ * identified by the <code>serviceName</code> and
+ * <code>portName</code> propeties. If the
<code>address</code> is
+ * <code>null</code> and the <code>serviceName</code> and
+ * <code>portName</code> do not identify an endpoint published by the
+ * same Java EE application, a
+ * <code>javax.lang.IllegalArgumentException</code> MUST be thrown.
+ *
+ * @param address Specifies the address of the target endpoint
+ * @param serviceName Qualified name of the service in the WSDL.
+ * @param portName Qualified name of the endpoint in the WSDL.
+ * @param metadata A list of elements that should be added to the
+ * <code>W3CEndpointReference</code> instances
<code>wsa:metadata</code>
+ * element.
+ * @param wsdlDocumentLocation URL for the WSDL document location for
+ * the service.
+ * @param referenceParameters Reference parameters to be associated
+ * with the returned <code>EndpointReference</code> instance.
+ *
+ * @return the <code>W3CEndpointReference<code> created from
+ * <code>serviceName</code>, <code>portName</code>,
+ * <code>metadata</code>,
<code>wsdlDocumentLocation</code>
+ * and <code>referenceParameters</code>. This method
+ * never returns <code>null</code>.
+ *
+ * @throws javax.lang.IllegalArgumentException
+ * <ul>
+ * <li>If the <code>address</code>,
<code>serviceName</code> and
+ * <code>portName</code> are all
<code>null</code>.
+ * <li>If the <code>serviceName</code> service is
<code>null</code> and the
+ * <code>portName> is NOT <code>null</code>.
+ * <li>If the <code>address</code> property is
<code>null</code> and
+ * the <code>serviceName</code> and
<code>portName</code> do not
+ * specify a valid endpoint published by the same Java EE
+ * application.
+ * <li>If the <code>serviceName</code>is NOT
<code>null</code>
+ * and is not present in the specified WSDL.
+ * <li>If the <code>portName</code> port is not
<code>null<code> and it
+ * is not present in <code>serviceName</code> service in the
WSDL.
+ * <li>If the <code>wsdlDocumentLocation</code> is NOT
<code>null</code>
+ * and does not represent a valid WSDL.
+ * </ul>
+ * @throws javax.xml.ws.WebServiceException If an error occurs while creating the
+ * <code>W3CEndpointReference</code>.
+ *
+ * @since JAX-WS 2.1
+ */
+ public abstract W3CEndpointReference createW3CEndpointReference(String address, QName
serviceName, QName portName, List<Element> metadata,
+ String
wsdlDocumentLocation, List<Element> referenceParameters);
+
+ /**
+ * read an EndpointReference from the infoset contained in
+ * <code>eprInfoset</code>.
+ *
+ * @returns the <code>EndpointReference</code> unmarshalled from
+ * <code>eprInfoset</code>. This method never returns
<code>null</code>.
+ *
+ * @throws javax.xml.ws.WebServiceException If there is an error creating the
+ * <code>EndpointReference</code> from the specified
<code>eprInfoset</code>.
+ *
+ * @throws NullPointerException If the <code>null</code>
+ * <code>eprInfoset</code> value is given.
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract EndpointReference readEndpointReference(javax.xml.transform.Source
eprInfoset);
+
+ /**
+ * Create an EndpointReference for <code>serviceName</code>
+ * service and <code>portName</code> port from the WSDL
<code>wsdlDocumentLocation</code>. The instance
+ * returned will be of type <code>clazz</code> and contain the
<code>referenceParameters</code>
+ * reference parameters. This method delegates to the vendor specific
+ * implementation of the {@link
javax.xml.ws.spi.Provider#createEndpointReference(Class<T>,
javax.xml.namespace.QName, javax.xml.namespace.QName, javax.xml.transform.Source,
org.w3c.dom.Element...)} method.
+ *
+ * @param clazz Specifies the type of <code>EndpointReference</code> that
MUST be returned.
+ * @param serviceName Qualified name of the service in the WSDL.
+ * @param portName Qualified name of the endpoint in the WSDL.
+ * @param wsdlDocumentLocation URL for the WSDL document location for the service.
+ * @param referenceParameters Reference parameters to be associated with the
+ * returned <code>EndpointReference</code> instance.
+ *
+ * @return the EndpointReference created from <code>serviceName</code>,
<code>portName</code>,
+ * <code>wsdlDocumentLocation</code> and
<code>referenceParameters</code>. This method
+ * never returns <code>null</code>.
+ * @throws javax.xml.ws.WebServiceException
+ * <UL>
+ * <li>If the <code>serviceName</code> service is not
present in the WSDL.
+ * <li>If the <code>portName</code> port is not present
in <code>serviceName</code> service in the WSDL.
+ * <li>If the <code>wsdlDocumentLocation</code> does not
represent a valid WSDL.
+ * <li>If an error occurs while creating the
<code>EndpointReference</code>.
+ * <li>If the Class <code>clazz</code> is not supported
by this implementation.
+ * </UL>
+ * @throws java.lang.IllegalArgumentException
+ * if any of the <code>clazz</code>,
<code>serviceName</code>, <code>portName</code> and
<code>wsdlDocumentLocation</code> is null.
+ */
+ public abstract <T extends EndpointReference> T
createEndpointReference(Class<T> clazz, QName serviceName, QName portName, Source
wsdlDocumentLocation,
+ Element... referenceParameters);
+}
Property changes on: stack/native/trunk/src/main/java/javax/xml/ws/spi/Provider21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/trunk/src/main/java/javax/xml/ws/spi/ProviderLoader.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/spi/ProviderLoader.java 2007-09-26
13:10:41 UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/spi/ProviderLoader.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -51,7 +51,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-public abstract class ProviderLoader
+abstract class ProviderLoader
{
/**
* This method uses the algirithm described above.
Modified: stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java 2007-09-26
13:10:41 UTC (rev 4631)
+++ stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -29,10 +29,8 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceException;
import javax.xml.ws.Dispatch;
-import javax.xml.ws.EndpointReference;
import javax.xml.ws.Service;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.handler.HandlerResolver;
/**
@@ -49,593 +47,214 @@
* @since JAX-WS 2.0
*/
public abstract class ServiceDelegate {
-
- protected ServiceDelegate() {
- }
-
- /**
- * The getPort method returns a proxy. A service client
- * uses this proxy to invoke operations on the target
- * service endpoint. The <code>serviceEndpointInterface</code>
- * specifies the service endpoint interface that is supported by
- * the created dynamic proxy instance.
- *
- * @param portName Qualified name of the service endpoint in
- * the WSDL service description
- * @param serviceEndpointInterface Service endpoint interface
- * supported by the dynamic proxy
- * @return Object Proxy instance that
- * supports the specified service endpoint
- * interface
- * @throws WebServiceException This exception is thrown in the
- * following cases:
- * <UL>
- * <LI>If there is an error in creation of
- * the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * or <code>portName</code> is specified
- * </UL>
- * @see java.lang.reflect.Proxy
- * @see java.lang.reflect.InvocationHandler
- **/
- public abstract <T> T getPort(QName portName,
- Class<T> serviceEndpointInterface);
-
- /**
- * The getPort method returns a proxy. A service client
- * uses this proxy to invoke operations on the target
- * service endpoint. The <code>serviceEndpointInterface</code>
- * specifies the service endpoint interface that is supported by
- * the created dynamic proxy instance.
- *
- * @param portName Qualified name of the service endpoint in
- * the WSDL service description
- * @param serviceEndpointInterface Service endpoint interface
- * supported by the dynamic proxy or instance
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that
- * supports the specified service endpoint
- * interface
- * @throws WebServiceException This exception is thrown in the
- * following cases:
- * <UL>
- * <LI>If there is an error in creation of
- * the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * or <code>portName</code> is specified
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- * @see java.lang.reflect.Proxy
- * @see java.lang.reflect.InvocationHandler
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(QName portName,
- Class<T> serviceEndpointInterface, WebServiceFeature... features);
-
- /**
- * The getPort method returns a proxy.
- * The parameter <code>endpointReference</code> specifies the
- * endpoint that will be invoked by the returned proxy. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * The parameter <code>serviceEndpointInterface</code> specifies
- * the service endpoint interface that is supported by the
- * returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the WSDL Metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code>
- * also has a WSDL, then the WSDL from this instance will be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> will be used.
- * The returned proxy should not be reconfigured by the client.
- * If this <code>Service</code> instance has a known proxy
- * port that matches the information contained in
- * the WSDL,
- * then that proxy is returned, otherwise a WebServiceException
- * is thrown.
- * <p>
- * Calling this method has the same behavior as the following
- * <pre>
- * port = service.getPort(portName, serviceEndpointInterface);
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * <code>wsaw:EndpontName</code> attribute of the
- * <code>wsaw:ServiceName</code> element in the
- * metadata of the <code>endpointReference</code> or from the
- * <code>serviceEndpointInterface</code> and the WSDL
- * associated with this <code>Service</code> instance.
- * <br>
- * See <a
href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">W... -
WSDL 1.0
- * </a>.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned proxy.
- * @param serviceEndpointInterface Service endpoint interface.
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object Proxy instance that supports the
- * specified service endpoint interface.
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy.
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <LI>If the <code>wsaw:EndpointName</code> is
- * missing from the <code>endpointReference</code>
- * or does not match a wsdl:Port
- * in the WSDL metadata.
- * <LI>If the <code>wsaw:ServiceName</code> in
the
- * <code>endpointReference</code> metadata does not
- * match the <code>serviceName</code> of this
- * <code>Service</code> instance.
- * <LI>If an invalid
- * <code>endpointReference</code>
- * is specified.
- * <LI>If an invalid
- * <code>serviceEndpointInterface</code>
- * is specified.
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(EndpointReference endpointReference,
- Class<T> serviceEndpointInterface, WebServiceFeature... features);
-
- /**
- * The getPort method returns a proxy. The parameter
- * <code>serviceEndpointInterface</code> specifies the service
- * endpoint interface that is supported by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly.
- * The returned proxy should not be reconfigured by the client.
- *
- * @param serviceEndpointInterface Service endpoint interface
- * @return Object instance that supports the
- * specified service endpoint interface
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified
- * </UL>
- **/
- public abstract <T> T getPort(Class<T> serviceEndpointInterface);
+ protected ServiceDelegate() {
+ }
-
- /**
- * The getPort method returns a proxy. The parameter
- * <code>serviceEndpointInterface</code> specifies the service
- * endpoint interface that is supported by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly.
- * The returned proxy should not be reconfigured by the client.
- *
- * @param serviceEndpointInterface Service endpoint interface
- * @param features An array of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- * @return Object instance that supports the
- * specified service endpoint interface
- * @throws WebServiceException
- * <UL>
- * <LI>If there is an error during creation
- * of the proxy
- * <LI>If there is any missing WSDL metadata
- * as required by this method
- * <LI>If an illegal
- * <code>serviceEndpointInterface</code>
- * is specified
- * <LI>If a feature is enabled that is not compatible
- * with this port or is unsupported.
- * </UL>
- *
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> T getPort(Class<T> serviceEndpointInterface,
- WebServiceFeature... features);
+ /**
+ * The getPort method returns a proxy. A service client
+ * uses this proxy to invoke operations on the target
+ * service endpoint. The <code>serviceEndpointInterface</code>
+ * specifies the service endpoint interface that is supported by
+ * the created dynamic proxy instance.
+ *
+ * @param portName Qualified name of the service endpoint in
+ * the WSDL service description
+ * @param serviceEndpointInterface Service endpoint interface
+ * supported by the dynamic proxy
+ * @return Object Proxy instance that
+ * supports the specified service endpoint
+ * interface
+ * @throws WebServiceException This exception is thrown in the
+ * following cases:
+ * <UL>
+ * <LI>If there is an error in creation of
+ * the proxy
+ * <LI>If there is any missing WSDL metadata
+ * as required by this method
+ * <LI>If an illegal
+ * <code>serviceEndpointInterface</code>
+ * or <code>portName</code> is specified
+ * </UL>
+ * @see java.lang.reflect.Proxy
+ * @see java.lang.reflect.InvocationHandler
+ **/
+ public abstract <T> T getPort(QName portName,
+ Class<T> serviceEndpointInterface);
-
-
- /**
- * Creates a new port for the service. Ports created in this way contain
- * no WSDL port type information and can only be used for creating
- * <code>Dispatch</code>instances.
- *
- * @param portName Qualified name for the target service endpoint
- * @param bindingId A URI identifier of a binding.
- * @param endpointAddress Address of the target service endpoint as a URI
- * @throws WebServiceException If any error in the creation of
- * the port
- *
- * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
- * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
- * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
- **/
- public abstract void addPort(QName portName, String bindingId,
- String endpointAddress);
-
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the users choosing.
- *
- * @param portName Qualified name for the target service endpoint
- * @param type The class of object used for messages or message
- * payloads. Implementations are required to support
- * javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
- * when type is SOAPMessage.
- *
- * @return Dispatch instance
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- **/
- public abstract <T> Dispatch<T> createDispatch(QName portName,
Class<T> type,
- Service.Mode mode);
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the users choosing.
- *
- * @param portName Qualified name for the target service endpoint
- * @param type The class of object used for messages or message
- * payloads. Implementations are required to support
- * javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
- * when type is SOAPMessage.
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object or if a
- * feature is enabled that is not compatible with
- * this port or is unsupported.
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> Dispatch<T> createDispatch(QName portName,
Class<T> type,
- Service.Mode mode, WebServiceFeature... features);
-
-
- /**
- * Creates a <code>Dispatch</code> instance for use with objects of
- * the users choosing. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the dispatch accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the WSDL Metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code>
- * also has a WSDL, then the WSDL from this instance will be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> will be used.
- * <p>
- * This method behaves the same as calling
- * <pre>
- * dispatch = service.createDispatch(portName, type, mode, features);
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * <code>wsaw:EndpointName</code> attribute of the
<code>wsaw:ServiceName</code>
- * element in the
- * metadata of the <code>endpointReference</code>.
- * <br>
- * See <a
href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">W... -
WSDL 1.0
- * </a>.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned <code>Dispatch</code> object.
- * @param type The class of object used to messages or message
- * payloads. Implementations are required to support
- * javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
- * when type is SOAPMessage.
- * @param features An array of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException
- * <UL>
- * <LI>If there is any missing WSDL metadata
- * as required by this method.
- * <li>If the <code>wsaw:ServiceName</code>
element
- * or the <code>wsaw:EndpointName</code> attribute
- * is missing in the metdata of the
- * <code>endpointReference</code>.
- * <li>If the <code>wsaw:ServiceName</code> does
not
- * match the <code>serviceName</code> of this
instance.
- * <li>If the <code>wsaw:EndpointName</code>
does not
- * match a valid wsdl:Port in the WSDL metadata.
- * <li>If any error in the creation of
- * the <code>Dispatch</code> object.
- * <li>if a feature is enabled that is not
- * compatible with this port or is unsupported.
- * </UL>
- *
- * @see javax.xml.transform.Source
- * @see javax.xml.soap.SOAPMessage
- * @see WebServiceFeature;
- *
- * @since JAX-WS 2.1
- **/
- public abstract <T> Dispatch<T> createDispatch(EndpointReference
endpointReference,
- Class<T> type, Service.Mode mode,
- WebServiceFeature... features);
+ /**
+ * The getPort method returns a proxy. The parameter
+ * <code>serviceEndpointInterface</code> specifies the service
+ * endpoint interface that is supported by the returned proxy.
+ * In the implementation of this method, the JAX-WS
+ * runtime system takes the responsibility of selecting a protocol
+ * binding (and a port) and configuring the proxy accordingly.
+ * The returned proxy should not be reconfigured by the client.
+ *
+ * @param serviceEndpointInterface Service endpoint interface
+ * @return Object instance that supports the
+ * specified service endpoint interface
+ * @throws WebServiceException
+ * <UL>
+ * <LI>If there is an error during creation
+ * of the proxy
+ * <LI>If there is any missing WSDL metadata
+ * as required by this method
+ * <LI>If an illegal
+ * <code>serviceEndpointInterface</code>
+ * is specified
+ * </UL>
+ **/
+ public abstract <T> T getPort(Class<T> serviceEndpointInterface);
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects.
- *
- * @param portName Qualified name for the target service endpoint
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body.
- *
- * @return Dispatch instance
- * @throws ServiceException If any error in the creation of
- * the <code>Dispatch</code> object
- *
- * @see javax.xml.bind.JAXBContext
- **/
- public abstract Dispatch<Object> createDispatch(QName portName,
- JAXBContext context, Service.Mode mode);
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects.
- *
- * @param portName Qualified name for the target service endpoint
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body.
- * @param features A list of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException If any error in the creation of
- * the <code>Dispatch</code> object or if a
- * feature is enabled that is not compatible with
- * this port or is unsupported.
- *
- * @see javax.xml.bind.JAXBContext
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract Dispatch<Object> createDispatch(QName portName,
- JAXBContext context, Service.Mode mode, WebServiceFeature... features);
-
- /**
- * Creates a <code>Dispatch</code> instance for use with JAXB
- * generated objects. If there
- * are any reference parameters in the
- * <code>endpointReference</code>, then those reference
- * parameters MUST appear as SOAP headers, indicating them to be
- * reference parameters, on all messages sent to the endpoint.
- * The <code>endpointReference's</code> address MUST be used
- * for invocations on the endpoint.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the dispatch accordingly from
- * the WSDL associated with this <code>Service</code> instance or
- * from the WSDL Metadata from the <code>endpointReference</code>.
- * If this <code>Service</code> instance has a WSDL and
- * the <code>endpointReference</code>
- * also has a WSDL, then the WSDL from this instance will be used.
- * If this <code>Service</code> instance does not have a WSDL and
- * the <code>endpointReference</code> does have a WSDL, then the
- * WSDL from the <code>endpointReference</code> will be used.
- * <p>
- * This method behavies the same as calling
- * <pre>
- * dispatch = service.createDispatch(portName, context, mode, features);
- * </pre>
- * where the <code>portName</code> is retrieved from the
- * <code>wsaw:EndpointName</code> attribute of the
<code>wsaw:ServiceName</code>
- * element in the
- * metadata of the <code>endpointReference</code>.
- * <br>
- * See <a
href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">W... -
WSDL 1.0
- * </a>.
- *
- * @param endpointReference The <code>EndpointReference</code>
- * for the target service endpoint that will be invoked by the
- * returned <code>Dispatch</code> object.
- * @param context The JAXB context used to marshall and unmarshall
- * messages or message payloads.
- * @param mode Controls whether the created dispatch instance is message
- * or payload oriented, i.e. whether the user will work with complete
- * protocol messages or message payloads. E.g. when using the SOAP
- * protocol, this parameter controls whether the user will work with
- * SOAP messages or the contents of a SOAP body.
- * @param features An array of WebServiceFeatures to configure on the
- * proxy. Supported features not in the <code>features
- * </code> parameter will have their default values.
- *
- * @return Dispatch instance
- * @throws WebServiceException
- * @throws WebServiceException
- * <UL>
- * <li>If there is any missing WSDL metadata
- * as required by this method.
- * <li>If the <code>wsaw:ServiceName</code>
element
- * or the <code>wsaw:EndpointName</code> attribute
- * is missing in the metdata of the
- * <code>endpointReference</code>.
- * <li>If the <code>wsaw:ServiceName</code> does
not
- * match the <code>serviceName</code> of this
instance.
- * <li>If the <code>wsaw:EndpointName</code>
does not
- * match a valid wsdl:Port in the WSDL metadata.
- * <li>If any error in the creation of
- * the <code>Dispatch</code> object.
- * <li>if a feature is enabled that is not
- * compatible with this port or is unsupported.
- * </UL>
- *
- * @see javax.xml.bind.JAXBContext
- * @see WebServiceFeature
- *
- * @since JAX-WS 2.1
- **/
- public abstract Dispatch<Object> createDispatch(EndpointReference
endpointReference,
- JAXBContext context, Service.Mode mode,
- WebServiceFeature... features);
-
-
- /**
- * Gets the name of this service.
- * @return Qualified name of this service
- **/
- public abstract QName getServiceName();
-
- /**
- * Returns an <code>Iterator</code> for the list of
- * <code>QName</code>s of service endpoints grouped by this
- * service
- *
- * @return Returns <code>java.util.Iterator</code> with elements
- * of type <code>javax.xml.namespace.QName</code>
- * @throws WebServiceException If this Service class does not
- * have access to the required WSDL metadata
- **/
- public abstract Iterator<javax.xml.namespace.QName> getPorts();
-
- /**
- * Gets the location of the WSDL document for this Service.
- *
- * @return URL for the location of the WSDL document for
- * this service
- **/
- public abstract java.net.URL getWSDLDocumentLocation();
-
- /**
- * Returns the configured handler resolver.
- *
- * @return HandlerResolver The <code>HandlerResolver</code> being
- * used by this <code>Service</code> instance, or
<code>null</code>
- * if there isn't one.
- **/
- public abstract HandlerResolver getHandlerResolver();
-
- /**
- * Sets the <code>HandlerResolver</code> for this
<code>Service</code>
- * instance.
- * <p>
- * The handler resolver, if present, will be called once for each
- * proxy or dispatch instance that is created, and the handler chain
- * returned by the resolver will be set on the instance.
- *
- * @param handlerResolver The <code>HandlerResolver</code> to use
- * for all subsequently created proxy/dispatch objects.
- *
- * @see javax.xml.ws.handler.HandlerResolver
- **/
- public abstract void setHandlerResolver(HandlerResolver handlerResolver);
-
- /**
- * Returns the executor for this <code>Service</code>instance.
- *
- * The executor is used for all asynchronous invocations that
- * require callbacks.
- *
- * @return The <code>java.util.concurrent.Executor</code> to be
- * used to invoke a callback.
- *
- * @see java.util.concurrent.Executor
- **/
- public abstract java.util.concurrent.Executor getExecutor();
-
- /**
- * Sets the executor for this <code>Service</code> instance.
- *
- * The executor is used for all asynchronous invocations that
- * require callbacks.
- *
- * @param executor The <code>java.util.concurrent.Executor</code>
- * to be used to invoke a callback.
- *
- * @throws SecurityException If the instance does not support
- * setting an executor for security reasons (e.g. the
- * necessary permissions are missing).
- *
- * @see java.util.concurrent.Executor
- **/
- public abstract void setExecutor(java.util.concurrent.Executor executor);
-
+
+ /**
+ * Creates a new port for the service. Ports created in this way contain
+ * no WSDL port type information and can only be used for creating
+ * <code>Dispatch</code>instances.
+ *
+ * @param portName Qualified name for the target service endpoint
+ * @param bindingId A URI identifier of a binding.
+ * @param endpointAddress Address of the target service endpoint as a URI
+ * @throws WebServiceException If any error in the creation of
+ * the port
+ *
+ * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
+ * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
+ * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
+ **/
+ public abstract void addPort(QName portName, String bindingId,
+ String endpointAddress);
+
+
+
+ /**
+ * Creates a <code>Dispatch</code> instance for use with objects of
+ * the users choosing.
+ *
+ * @param portName Qualified name for the target service endpoint
+ * @param type The class of object used for messages or message
+ * payloads. Implementations are required to support
+ * javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
+ * @param mode Controls whether the created dispatch instance is message
+ * or payload oriented, i.e. whether the user will work with complete
+ * protocol messages or message payloads. E.g. when using the SOAP
+ * protocol, this parameter controls whether the user will work with
+ * SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
+ * when type is SOAPMessage.
+ *
+ * @return Dispatch instance
+ * @throws WebServiceException If any error in the creation of
+ * the <code>Dispatch</code> object
+ * @see javax.xml.transform.Source
+ * @see javax.xml.soap.SOAPMessage
+ **/
+ public abstract <T> Dispatch<T> createDispatch(QName portName,
Class<T> type,
+ Service.Mode mode);
+
+
+ /**
+ * Creates a <code>Dispatch</code> instance for use with JAXB
+ * generated objects.
+ *
+ * @param portName Qualified name for the target service endpoint
+ * @param context The JAXB context used to marshall and unmarshall
+ * messages or message payloads.
+ * @param mode Controls whether the created dispatch instance is message
+ * or payload oriented, i.e. whether the user will work with complete
+ * protocol messages or message payloads. E.g. when using the SOAP
+ * protocol, this parameter controls whether the user will work with
+ * SOAP messages or the contents of a SOAP body.
+ *
+ * @return Dispatch instance
+ * @throws ServiceException If any error in the creation of
+ * the <code>Dispatch</code> object
+ *
+ * @see javax.xml.bind.JAXBContext
+ **/
+ public abstract Dispatch<Object> createDispatch(QName portName,
+ JAXBContext context, Service.Mode
mode);
+
+ /**
+ * Gets the name of this service.
+ * @return Qualified name of this service
+ **/
+ public abstract QName getServiceName();
+
+ /**
+ * Returns an <code>Iterator</code> for the list of
+ * <code>QName</code>s of service endpoints grouped by this
+ * service
+ *
+ * @return Returns <code>java.util.Iterator</code> with elements
+ * of type <code>javax.xml.namespace.QName</code>
+ * @throws WebServiceException If this Service class does not
+ * have access to the required WSDL metadata
+ **/
+ public abstract Iterator<javax.xml.namespace.QName> getPorts();
+
+ /**
+ * Gets the location of the WSDL document for this Service.
+ *
+ * @return URL for the location of the WSDL document for
+ * this service
+ **/
+ public abstract java.net.URL getWSDLDocumentLocation();
+
+ /**
+ * Returns the configured handler resolver.
+ *
+ * @return HandlerResolver The <code>HandlerResolver</code> being
+ * used by this <code>Service</code> instance, or
<code>null</code>
+ * if there isn't one.
+ **/
+ public abstract HandlerResolver getHandlerResolver();
+
+ /**
+ * Sets the <code>HandlerResolver</code> for this
<code>Service</code>
+ * instance.
+ * <p>
+ * The handler resolver, if present, will be called once for each
+ * proxy or dispatch instance that is created, and the handler chain
+ * returned by the resolver will be set on the instance.
+ *
+ * @param handlerResolver The <code>HandlerResolver</code> to use
+ * for all subsequently created proxy/dispatch objects.
+ *
+ * @see javax.xml.ws.handler.HandlerResolver
+ **/
+ public abstract void setHandlerResolver(HandlerResolver handlerResolver);
+
+ /**
+ * Returns the executor for this <code>Service</code>instance.
+ *
+ * The executor is used for all asynchronous invocations that
+ * require callbacks.
+ *
+ * @return The <code>java.util.concurrent.Executor</code> to be
+ * used to invoke a callback.
+ *
+ * @see java.util.concurrent.Executor
+ **/
+ public abstract java.util.concurrent.Executor getExecutor();
+
+ /**
+ * Sets the executor for this <code>Service</code> instance.
+ *
+ * The executor is used for all asynchronous invocations that
+ * require callbacks.
+ *
+ * @param executor The <code>java.util.concurrent.Executor</code>
+ * to be used to invoke a callback.
+ *
+ * @throws SecurityException If the instance does not support
+ * setting an executor for security reasons (e.g. the
+ * necessary permissions are missing).
+ *
+ * @see java.util.concurrent.Executor
+ **/
+ public abstract void setExecutor(java.util.concurrent.Executor executor);
+
}
Added: stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate21.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate21.java
(rev 0)
+++ stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate21.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -0,0 +1,411 @@
+/*
+ * 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.xml.ws.spi;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.EndpointReference;
+import javax.xml.bind.JAXBContext;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public abstract class ServiceDelegate21 extends ServiceDelegate
+{
+ /**
+ * The getPort method returns a proxy. A service client
+ * uses this proxy to invoke operations on the target
+ * service endpoint. The <code>serviceEndpointInterface</code>
+ * specifies the service endpoint interface that is supported by
+ * the created dynamic proxy instance.
+ *
+ * @param portName Qualified name of the service endpoint in
+ * the WSDL service description
+ * @param serviceEndpointInterface Service endpoint interface
+ * supported by the dynamic proxy or instance
+ * @param features A list of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ * @return Object Proxy instance that
+ * supports the specified service endpoint
+ * interface
+ * @throws javax.xml.ws.WebServiceException This exception is thrown in the
+ * following cases:
+ * <UL>
+ * <LI>If there is an error in creation of
+ * the proxy
+ * <LI>If there is any missing WSDL metadata
+ * as required by this method
+ * <LI>If an illegal
+ * <code>serviceEndpointInterface</code>
+ * or <code>portName</code> is specified
+ * <LI>If a feature is enabled that is not compatible
+ * with this port or is unsupported.
+ * </UL>
+ * @see java.lang.reflect.Proxy
+ * @see java.lang.reflect.InvocationHandler
+ * @see javax.xml.ws.WebServiceFeature
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract <T> T getPort(QName portName,
+ Class<T> serviceEndpointInterface,
WebServiceFeature... features);
+
+ /**
+ * The getPort method returns a proxy.
+ * The parameter <code>endpointReference</code> specifies the
+ * endpoint that will be invoked by the returned proxy. If there
+ * are any reference parameters in the
+ * <code>endpointReference</code>, then those reference
+ * parameters MUST appear as SOAP headers, indicating them to be
+ * reference parameters, on all messages sent to the endpoint.
+ * The <code>endpointReference's</code> address MUST be used
+ * for invocations on the endpoint.
+ * The parameter <code>serviceEndpointInterface</code> specifies
+ * the service endpoint interface that is supported by the
+ * returned proxy.
+ * In the implementation of this method, the JAX-WS
+ * runtime system takes the responsibility of selecting a protocol
+ * binding (and a port) and configuring the proxy accordingly from
+ * the WSDL associated with this <code>Service</code> instance or
+ * from the WSDL Metadata from the <code>endpointReference</code>.
+ * If this <code>Service</code> instance has a WSDL and
+ * the <code>endpointReference</code>
+ * also has a WSDL, then the WSDL from this instance will be used.
+ * If this <code>Service</code> instance does not have a WSDL and
+ * the <code>endpointReference</code> does have a WSDL, then the
+ * WSDL from the <code>endpointReference</code> will be used.
+ * The returned proxy should not be reconfigured by the client.
+ * If this <code>Service</code> instance has a known proxy
+ * port that matches the information contained in
+ * the WSDL,
+ * then that proxy is returned, otherwise a WebServiceException
+ * is thrown.
+ * <p>
+ * Calling this method has the same behavior as the following
+ * <pre>
+ * port = service.getPort(portName, serviceEndpointInterface);
+ * </pre>
+ * where the <code>portName</code> is retrieved from the
+ * <code>wsaw:EndpontName</code> attribute of the
+ * <code>wsaw:ServiceName</code> element in the
+ * metadata of the <code>endpointReference</code> or from the
+ * <code>serviceEndpointInterface</code> and the WSDL
+ * associated with this <code>Service</code> instance.
+ * <br>
+ * See <a
href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">W... -
WSDL 1.0
+ * </a>.
+ *
+ * @param endpointReference The <code>EndpointReference</code>
+ * for the target service endpoint that will be invoked by the
+ * returned proxy.
+ * @param serviceEndpointInterface Service endpoint interface.
+ * @param features A list of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ * @return Object Proxy instance that supports the
+ * specified service endpoint interface.
+ * @throws javax.xml.ws.WebServiceException
+ * <UL>
+ * <LI>If there is an error during creation
+ * of the proxy.
+ * <LI>If there is any missing WSDL metadata
+ * as required by this method.
+ * <LI>If the <code>wsaw:EndpointName</code> is
+ * missing from the <code>endpointReference</code>
+ * or does not match a wsdl:Port
+ * in the WSDL metadata.
+ * <LI>If the <code>wsaw:ServiceName</code> in the
+ * <code>endpointReference</code> metadata does not
+ * match the <code>serviceName</code> of this
+ * <code>Service</code> instance.
+ * <LI>If an invalid
+ * <code>endpointReference</code>
+ * is specified.
+ * <LI>If an invalid
+ * <code>serviceEndpointInterface</code>
+ * is specified.
+ * <LI>If a feature is enabled that is not compatible
+ * with this port or is unsupported.
+ * </UL>
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract <T> T getPort(EndpointReference endpointReference,
+ Class<T> serviceEndpointInterface,
WebServiceFeature... features);
+
+ /**
+ * The getPort method returns a proxy. The parameter
+ * <code>serviceEndpointInterface</code> specifies the service
+ * endpoint interface that is supported by the returned proxy.
+ * In the implementation of this method, the JAX-WS
+ * runtime system takes the responsibility of selecting a protocol
+ * binding (and a port) and configuring the proxy accordingly.
+ * The returned proxy should not be reconfigured by the client.
+ *
+ * @param serviceEndpointInterface Service endpoint interface
+ * @param features An array of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ * @return Object instance that supports the
+ * specified service endpoint interface
+ * @throws javax.xml.ws.WebServiceException
+ * <UL>
+ * <LI>If there is an error during creation
+ * of the proxy
+ * <LI>If there is any missing WSDL metadata
+ * as required by this method
+ * <LI>If an illegal
+ * <code>serviceEndpointInterface</code>
+ * is specified
+ * <LI>If a feature is enabled that is not compatible
+ * with this port or is unsupported.
+ * </UL>
+ *
+ * @see WebServiceFeature
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract <T> T getPort(Class<T> serviceEndpointInterface,
+ WebServiceFeature... features);
+
+ /**
+ * Creates a <code>Dispatch</code> instance for use with objects of
+ * the users choosing.
+ *
+ * @param portName Qualified name for the target service endpoint
+ * @param type The class of object used for messages or message
+ * payloads. Implementations are required to support
+ * javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
+ * @param mode Controls whether the created dispatch instance is message
+ * or payload oriented, i.e. whether the user will work with complete
+ * protocol messages or message payloads. E.g. when using the SOAP
+ * protocol, this parameter controls whether the user will work with
+ * SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
+ * when type is SOAPMessage.
+ * @param features A list of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ *
+ * @return Dispatch instance
+ * @throws javax.xml.ws.WebServiceException If any error in the creation of
+ * the <code>Dispatch</code> object or if a
+ * feature is enabled that is not compatible with
+ * this port or is unsupported.
+ *
+ * @see javax.xml.transform.Source
+ * @see javax.xml.soap.SOAPMessage
+ * @see WebServiceFeature
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract <T> Dispatch<T> createDispatch(QName portName,
Class<T> type,
+ Service.Mode mode, WebServiceFeature...
features);
+
+ /**
+ * Creates a <code>Dispatch</code> instance for use with objects of
+ * the users choosing. If there
+ * are any reference parameters in the
+ * <code>endpointReference</code>, then those reference
+ * parameters MUST appear as SOAP headers, indicating them to be
+ * reference parameters, on all messages sent to the endpoint.
+ * The <code>endpointReference's</code> address MUST be used
+ * for invocations on the endpoint.
+ * In the implementation of this method, the JAX-WS
+ * runtime system takes the responsibility of selecting a protocol
+ * binding (and a port) and configuring the dispatch accordingly from
+ * the WSDL associated with this <code>Service</code> instance or
+ * from the WSDL Metadata from the <code>endpointReference</code>.
+ * If this <code>Service</code> instance has a WSDL and
+ * the <code>endpointReference</code>
+ * also has a WSDL, then the WSDL from this instance will be used.
+ * If this <code>Service</code> instance does not have a WSDL and
+ * the <code>endpointReference</code> does have a WSDL, then the
+ * WSDL from the <code>endpointReference</code> will be used.
+ * <p>
+ * This method behaves the same as calling
+ * <pre>
+ * dispatch = service.createDispatch(portName, type, mode, features);
+ * </pre>
+ * where the <code>portName</code> is retrieved from the
+ * <code>wsaw:EndpointName</code> attribute of the
<code>wsaw:ServiceName</code>
+ * element in the
+ * metadata of the <code>endpointReference</code>.
+ * <br>
+ * See <a
href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">W... -
WSDL 1.0
+ * </a>.
+ *
+ * @param endpointReference The <code>EndpointReference</code>
+ * for the target service endpoint that will be invoked by the
+ * returned <code>Dispatch</code> object.
+ * @param type The class of object used to messages or message
+ * payloads. Implementations are required to support
+ * javax.xml.transform.Source and javax.xml.soap.SOAPMessage.
+ * @param mode Controls whether the created dispatch instance is message
+ * or payload oriented, i.e. whether the user will work with complete
+ * protocol messages or message payloads. E.g. when using the SOAP
+ * protocol, this parameter controls whether the user will work with
+ * SOAP messages or the contents of a SOAP body. Mode MUST be MESSAGE
+ * when type is SOAPMessage.
+ * @param features An array of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ *
+ * @return Dispatch instance
+ * @throws javax.xml.ws.WebServiceException
+ * <UL>
+ * <LI>If there is any missing WSDL metadata
+ * as required by this method.
+ * <li>If the <code>wsaw:ServiceName</code>
element
+ * or the <code>wsaw:EndpointName</code> attribute
+ * is missing in the metdata of the
+ * <code>endpointReference</code>.
+ * <li>If the <code>wsaw:ServiceName</code> does
not
+ * match the <code>serviceName</code> of this
instance.
+ * <li>If the <code>wsaw:EndpointName</code> does
not
+ * match a valid wsdl:Port in the WSDL metadata.
+ * <li>If any error in the creation of
+ * the <code>Dispatch</code> object.
+ * <li>if a feature is enabled that is not
+ * compatible with this port or is unsupported.
+ * </UL>
+ *
+ * @see javax.xml.transform.Source
+ * @see javax.xml.soap.SOAPMessage
+ * @see WebServiceFeature;
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract <T> Dispatch<T> createDispatch(EndpointReference
endpointReference,
+ Class<T> type, Service.Mode
mode,
+ WebServiceFeature... features);
+
+ /**
+ * Creates a <code>Dispatch</code> instance for use with JAXB
+ * generated objects.
+ *
+ * @param portName Qualified name for the target service endpoint
+ * @param context The JAXB context used to marshall and unmarshall
+ * messages or message payloads.
+ * @param mode Controls whether the created dispatch instance is message
+ * or payload oriented, i.e. whether the user will work with complete
+ * protocol messages or message payloads. E.g. when using the SOAP
+ * protocol, this parameter controls whether the user will work with
+ * SOAP messages or the contents of a SOAP body.
+ * @param features A list of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ *
+ * @return Dispatch instance
+ * @throws javax.xml.ws.WebServiceException If any error in the creation of
+ * the <code>Dispatch</code> object or if a
+ * feature is enabled that is not compatible with
+ * this port or is unsupported.
+ *
+ * @see javax.xml.bind.JAXBContext
+ * @see WebServiceFeature
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract Dispatch<Object> createDispatch(QName portName,
+ JAXBContext context, Service.Mode
mode, WebServiceFeature... features);
+
+ /**
+ * Creates a <code>Dispatch</code> instance for use with JAXB
+ * generated objects. If there
+ * are any reference parameters in the
+ * <code>endpointReference</code>, then those reference
+ * parameters MUST appear as SOAP headers, indicating them to be
+ * reference parameters, on all messages sent to the endpoint.
+ * The <code>endpointReference's</code> address MUST be used
+ * for invocations on the endpoint.
+ * In the implementation of this method, the JAX-WS
+ * runtime system takes the responsibility of selecting a protocol
+ * binding (and a port) and configuring the dispatch accordingly from
+ * the WSDL associated with this <code>Service</code> instance or
+ * from the WSDL Metadata from the <code>endpointReference</code>.
+ * If this <code>Service</code> instance has a WSDL and
+ * the <code>endpointReference</code>
+ * also has a WSDL, then the WSDL from this instance will be used.
+ * If this <code>Service</code> instance does not have a WSDL and
+ * the <code>endpointReference</code> does have a WSDL, then the
+ * WSDL from the <code>endpointReference</code> will be used.
+ * <p>
+ * This method behavies the same as calling
+ * <pre>
+ * dispatch = service.createDispatch(portName, context, mode, features);
+ * </pre>
+ * where the <code>portName</code> is retrieved from the
+ * <code>wsaw:EndpointName</code> attribute of the
<code>wsaw:ServiceName</code>
+ * element in the
+ * metadata of the <code>endpointReference</code>.
+ * <br>
+ * See <a
href="http://www.w3.org/TR/2006/CR-ws-addr-wsdl-20060529/">W... -
WSDL 1.0
+ * </a>.
+ *
+ * @param endpointReference The <code>EndpointReference</code>
+ * for the target service endpoint that will be invoked by the
+ * returned <code>Dispatch</code> object.
+ * @param context The JAXB context used to marshall and unmarshall
+ * messages or message payloads.
+ * @param mode Controls whether the created dispatch instance is message
+ * or payload oriented, i.e. whether the user will work with complete
+ * protocol messages or message payloads. E.g. when using the SOAP
+ * protocol, this parameter controls whether the user will work with
+ * SOAP messages or the contents of a SOAP body.
+ * @param features An array of WebServiceFeatures to configure on the
+ * proxy. Supported features not in the <code>features
+ * </code> parameter will have their default values.
+ *
+ * @return Dispatch instance
+ * @throws javax.xml.ws.WebServiceException
+ * @throws javax.xml.ws.WebServiceException
+ * <UL>
+ * <li>If there is any missing WSDL metadata
+ * as required by this method.
+ * <li>If the <code>wsaw:ServiceName</code>
element
+ * or the <code>wsaw:EndpointName</code> attribute
+ * is missing in the metdata of the
+ * <code>endpointReference</code>.
+ * <li>If the <code>wsaw:ServiceName</code> does
not
+ * match the <code>serviceName</code> of this
instance.
+ * <li>If the <code>wsaw:EndpointName</code> does
not
+ * match a valid wsdl:Port in the WSDL metadata.
+ * <li>If any error in the creation of
+ * the <code>Dispatch</code> object.
+ * <li>if a feature is enabled that is not
+ * compatible with this port or is unsupported.
+ * </UL>
+ *
+ * @see javax.xml.bind.JAXBContext
+ * @see WebServiceFeature
+ *
+ * @since JAX-WS 2.1
+ **/
+ public abstract Dispatch<Object> createDispatch(EndpointReference
endpointReference,
+ JAXBContext context, Service.Mode
mode,
+ WebServiceFeature... features);
+
+}
Property changes on:
stack/native/trunk/src/main/java/javax/xml/ws/spi/ServiceDelegate21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
stack/native/trunk/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java
===================================================================
---
stack/native/trunk/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java 2007-09-26
13:10:41 UTC (rev 4631)
+++
stack/native/trunk/src/main/java/javax/xml/ws/wsaddressing/W3CEndpointReferenceBuilder.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -30,6 +30,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.spi.Provider;
+import javax.xml.ws.spi.Provider21;
import org.w3c.dom.Element;
@@ -240,7 +241,7 @@
* and is not present in the specified WSDL.
* <li>If the <code>endpointName</code> port is not
<code>null<code> and it
* is not present in <code>serviceName</code> service in the
WSDL.
- * <li>If the <code>wsdlDocumentLocation</code> is NOT
<code>null</code>
+ * <li>If the <code>wsdlDocumentLocation</code> is NOT
<code>null</code> Pr
* and does not represent a valid WSDL.
* </ul>
* @throws WebServiceException If an error occurs while creating the
@@ -248,7 +249,7 @@
*
*/
public W3CEndpointReference build() {
- return Provider.provider().createW3CEndpointReference(address,
+ return ((Provider21)Provider.provider()).createW3CEndpointReference(address,
serviceName, endpointName, metadata, wsdlDocumentLocation,
referenceParameters);
}
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-09-26
13:10:41 UTC (rev 4631)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -31,6 +31,9 @@
import javax.xml.bind.JAXBContext;
import javax.xml.soap.MimeHeaders;
import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPException;
import javax.xml.transform.Source;
import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Binding;
@@ -43,11 +46,13 @@
import javax.xml.ws.Service.Mode;
import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
import org.jboss.ws.core.MessageAbstraction;
import org.jboss.ws.core.ConfigProvider;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.core.client.HTTPRemotingConnection;
import org.jboss.ws.core.client.RemotingConnection;
import org.jboss.ws.core.client.SOAPRemotingConnection;
@@ -251,7 +256,19 @@
{
// jaxws/api/javax_xml_ws/Dispatch/Client.java#invokeTestJAXBNull
if (obj == null)
- throw new SOAPFaultException("Request object cannot be null");
+ {
+ try
+ {
+ SOAPFactory factory = SOAPFactory.newInstance();
+ SOAPFault fault = factory.createFault("Request object cannot be
null", new QName("http://org.jboss.ws", "Dispatch"));
+ fault.setFaultActor("client");
+ throw new SOAPFaultException(fault);
+ }
+ catch (SOAPException e)
+ {
+ //
+ }
+ }
String bindingID = ((Binding21)bindingProvider.getBinding()).getBindingID();
if (EndpointMetaData.SUPPORTED_BINDINGS.contains(bindingID) == false)
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2007-09-26
13:10:41 UTC (rev 4631)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -35,6 +35,7 @@
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.spi.Provider;
import javax.xml.ws.spi.ServiceDelegate;
+import javax.xml.ws.spi.Provider21;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import org.jboss.util.NotImplementedException;
@@ -46,7 +47,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-public class ProviderImpl extends Provider
+public class ProviderImpl extends Provider21
{
// 6.2 Conformance (Concrete javax.xml.ws.spi.Provider required): An implementation
MUST provide
// a concrete class that extends javax.xml.ws.spi.Provider. Such a class MUST have a
public constructor
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-09-26
13:10:41 UTC (rev 4631)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-09-26
13:11:47 UTC (rev 4632)
@@ -47,6 +47,7 @@
import javax.xml.ws.Service.Mode;
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.spi.ServiceDelegate;
+import javax.xml.ws.spi.ServiceDelegate21;
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
@@ -84,7 +85,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 03-May-2006
*/
-public class ServiceDelegateImpl extends ServiceDelegate
+public class ServiceDelegateImpl extends ServiceDelegate21
{
// provide logging
private final Logger log = Logger.getLogger(ServiceDelegateImpl.class);