Author: alessio.soldano(a)jboss.com
Date: 2010-05-05 07:23:30 -0400 (Wed, 05 May 2010)
New Revision: 12165
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java
framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
Log:
[JBWS-3015] Testcase erroneously not committed before
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java 2010-05-05
09:36:52 UTC (rev 12164)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java 2010-05-05
11:23:30 UTC (rev 12165)
@@ -73,6 +73,10 @@
}
private EndpointService service6;
+ //Test on field without name and no wsdl override in descriptor
+ @WebServiceRef
+ public EndpointService service7;
+
// Test on field with name and value
@WebServiceRef(name = "Port2", value = EndpointService.class)
public Endpoint port2;
@@ -122,6 +126,8 @@
ports.add(((EndpointService)initCtx.lookup(envRoot +
"/env/EndpointService5")).getEndpointPort());
ports.add((Endpoint)service6.getPort(Endpoint.class));
ports.add(((EndpointService)initCtx.lookup(envRoot + "/env/" +
getClass().getName() + "/service6")).getEndpointPort());
+ ports.add((Endpoint)service7.getPort(Endpoint.class));
+ ports.add(((EndpointService)initCtx.lookup(envRoot + "/env/" +
getClass().getName() + "/service7")).getEndpointPort());
ports.add((Endpoint)initCtx.lookup(envRoot + "/env/port1"));
ports.add(port2);
ports.add((Endpoint)initCtx.lookup(envRoot + "/env/Port2"));
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java 2010-05-05
09:36:52 UTC (rev 12164)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java 2010-05-05
11:23:30 UTC (rev 12165)
@@ -21,55 +21,88 @@
*/
package org.jboss.test.ws.jaxws.samples.webserviceref;
-import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
/**
- * This class was generated by the JAXWS SI.
- * JAX-WS RI 2.0-b26-ea3
- * Generated source version: 2.0
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
+ * Generated source version: 2.2
*
*/
-@WebServiceClient(name = "EndpointService", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"file://bogus-location/jaxws-samples-webserviceref?wsdl")
-public class EndpointService
- extends Service
+@WebServiceClient(name = "EndpointService", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"META-INF/wsdl/Endpoint.wsdl")
+public class EndpointService extends Service
{
- private final static URL WSDL_LOCATION;
- private final static QName TESTENDPOINTSERVICE = new
QName("http://org.jboss.ws/wsref", "EndpointService");
- private final static QName TESTENDPOINTPORT = new
QName("http://org.jboss.ws/wsref", "EndpointPort");
+ private final static URL ENDPOINTSERVICE_WSDL_LOCATION;
+ private final static WebServiceException ENDPOINTSERVICE_EXCEPTION;
+ private final static QName ENDPOINTSERVICE_QNAME = new
QName("http://org.jboss.ws/wsref", "EndpointService");
- static {
- URL url = null;
- try {
- url = new
URL("file://bogus-location/jaxws-samples-webserviceref?wsdl");
- } catch (MalformedURLException e) {
- e.printStackTrace();
- }
- WSDL_LOCATION = url;
- }
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ url = EndpointService.class.getResource("bogusAddress"); //invalid
address on purpose, to test JBWS-3015 via service7 in EJB3Client
+ if (url == null)
+ {
+ e = new WebServiceException("Cannot find wsdl, please put in
classpath");
+ }
+ ENDPOINTSERVICE_WSDL_LOCATION = url;
+ ENDPOINTSERVICE_EXCEPTION = e;
+ }
- public EndpointService(URL wsdlLocation, QName serviceName) {
- super(wsdlLocation, serviceName);
- }
+ public EndpointService()
+ {
+ super(__getWsdlLocation(), ENDPOINTSERVICE_QNAME);
+ }
- public EndpointService() {
- super(WSDL_LOCATION, TESTENDPOINTSERVICE);
- }
+ public EndpointService(URL wsdlLocation)
+ {
+ super(wsdlLocation, ENDPOINTSERVICE_QNAME);
+ }
- /**
- *
- * @return
- * returns Endpoint
- */
- @WebEndpoint(name = "EndpointPort")
- public Endpoint getEndpointPort() {
- return (Endpoint)super.getPort(TESTENDPOINTPORT, Endpoint.class);
- }
+ public EndpointService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+ /**
+ *
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort()
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref",
"EndpointPort"), Endpoint.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.
Supported features not in the <code>features</code> parameter will have their
default values.
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref",
"EndpointPort"), Endpoint.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (ENDPOINTSERVICE_EXCEPTION != null)
+ {
+ throw ENDPOINTSERVICE_EXCEPTION;
+ }
+ return ENDPOINTSERVICE_WSDL_LOCATION;
+ }
+
}
Modified:
framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml
===================================================================
---
framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2010-05-05
09:36:52 UTC (rev 12164)
+++
framework/trunk/testsuite/test/resources/jaxws/samples/webserviceref/META-INF/jboss.xml 2010-05-05
11:23:30 UTC (rev 12165)
@@ -90,6 +90,13 @@
<service-qname>{http://org.jboss.ws/wsref}EndpointService</service-qname>
<wsdl-override>META-INF/wsdl/Endpoint.wsdl</wsdl-override>
</service-ref>
+
+ <!--
+ @WebServiceRef
+ -->
+ <service-ref>
+
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.EJB3Client/service7</service-ref-name>
+ </service-ref>
</session>
</enterprise-beans>
Show replies by date