[jboss-svn-commits] JBossWS SVN: r1181 - in trunk/src/test: ant java/org/jboss/test/ws/jaxws/jsr181/webmethod
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Oct 9 20:01:05 EDT 2006
Author: jason.greene at jboss.com
Date: 2006-10-09 20:01:03 -0400 (Mon, 09 Oct 2006)
New Revision: 1181
Modified:
trunk/src/test/ant/build-jars-jaxws.xml
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpoint.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java
Log:
Fix JAX-WS/JSR-181 webmethod test
Modified: trunk/src/test/ant/build-jars-jaxws.xml
===================================================================
--- trunk/src/test/ant/build-jars-jaxws.xml 2006-10-09 23:35:37 UTC (rev 1180)
+++ trunk/src/test/ant/build-jars-jaxws.xml 2006-10-10 00:01:03 UTC (rev 1181)
@@ -166,6 +166,7 @@
<!-- jaxws-jsr181-webmethod -->
<war warfile="${build.test.dir}/libs/jaxws-jsr181-webmethod.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webmethod/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpoint.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.class"/>
</classes>
</war>
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-10-09 23:35:37 UTC (rev 1180)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/JSR181WebMethodTestCase.java 2006-10-10 00:01:03 UTC (rev 1181)
@@ -71,7 +71,7 @@
Service service = Service.create(wsdlURL, serviceName);
TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
- Object retObj = port.echoString("Hello");
+ Object retObj = port.echo("Hello");
assertEquals("Hello", retObj);
}
@@ -85,7 +85,7 @@
" <env:Header/>" +
" <env:Body>" +
" <ns1:echoString xmlns:ns1='" + targetNS + "'>" +
- " <String_1>Hello</String_1>" +
+ " <arg0>Hello</arg0>" +
" </ns1:echoString>" +
" </env:Body>" +
"</env:Envelope>";
@@ -96,7 +96,7 @@
NameImpl name = new NameImpl(new QName(targetNS, "echoStringResponse"));
SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl("result")).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl("return")).next();
assertEquals("Hello", soapElement.getValue());
}
@@ -135,13 +135,13 @@
"<ns1:noWebMethod xmlns:ns1='" + targetNS + "'>" +
" <String_1>Hello</String_1>" +
"</ns1:noWebMethod>";
-
- String expPayload =
+
+ String expPayload =
"<env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
" <faultcode>env:Client</faultcode>" +
" <faultstring>Endpoint {http://webmethod.jsr181.jaxws.ws.test.jboss.org/jaws}TestEndpointPort does not contain operation meta data for: {http://webmethod.jsr181.jaxws.ws.test.jboss.org/jaws}noWebMethod</faultstring>" +
"</env:Fault>";
-
+
Service service = Service.create(wsdlURL, serviceName);
Dispatch dispatch = service.createDispatch(portName, StreamSource.class, Mode.PAYLOAD);
StreamSource retObj = (StreamSource)dispatch.invoke(new StreamSource(new StringReader(reqPayload)));
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpoint.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpoint.java 2006-10-09 23:35:37 UTC (rev 1180)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpoint.java 2006-10-10 00:01:03 UTC (rev 1181)
@@ -21,7 +21,14 @@
*/
package org.jboss.test.ws.jaxws.jsr181.webmethod;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+ at WebService (name="TestEndpoint")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
public interface TestEndpoint
{
- String echoString(String input);
+ @WebMethod(operationName = "echoString", action = "urn:EchoString")
+ String echo(String input);
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java 2006-10-09 23:35:37 UTC (rev 1180)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webmethod/TestEndpointImpl.java 2006-10-10 00:01:03 UTC (rev 1181)
@@ -33,14 +33,13 @@
* @author Thomas.Diesler at jboss.org
* @since 12-Aug-2005
*/
- at WebService (name="TestEndpoint")
- at SOAPBinding(style = SOAPBinding.Style.RPC)
-public class TestEndpointImpl
+
+ at WebService(endpointInterface = "org.jboss.test.ws.jaxws.jsr181.webmethod.TestEndpoint")
+public class TestEndpointImpl
{
// Provide logging
private static Logger log = Logger.getLogger(TestEndpointImpl.class);
- @WebMethod(operationName = "echoString", action = "urn:EchoString")
public String echo(String input)
{
log.info("echo: " + input);
More information about the jboss-svn-commits
mailing list