Author: thomas.diesler(a)jboss.com
Date: 2007-01-30 17:33:08 -0500 (Tue, 30 Jan 2007)
New Revision: 2200
Added:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingServiceImpl.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerServiceImpl.java
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/META-INF/
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/META-INF/wsdl/
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/META-INF/
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/META-INF/wsdl/
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl
Removed:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocumentHolder.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingHandler.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/xop/
Modified:
branches/jbossws-1.2.0/build/build.xml
branches/jbossws-1.2.0/jbossws-tests/ant-import/build-jars-jaxws.xml
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocument.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/SecurityHeader.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerRecord.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerService.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/USAddress.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingStatefulTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/WEB-INF/web.xml
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/WEB-INF/web.xml
Log:
Remove jaxrpc clients from jaxws samples
Modified: branches/jbossws-1.2.0/build/build.xml
===================================================================
--- branches/jbossws-1.2.0/build/build.xml 2007-01-30 21:23:58 UTC (rev 2199)
+++ branches/jbossws-1.2.0/build/build.xml 2007-01-30 22:33:08 UTC (rev 2200)
@@ -52,10 +52,10 @@
</target>
<target name="main" description="Executes the default target
(most)." depends="most">
- <echo message="**********************************"/>
- <echo message="* JBossWS core sucessfully build *"/>
- <echo message="* ant hudson-setup *"/>
- <echo message="**********************************"/>
+ <echo message="***********************************"/>
+ <echo message="* JBossWS core successfully build *"/>
+ <echo message="* ant hudson-setup *"/>
+ <echo message="***********************************"/>
</target>
<target name="most" description="Builds almost everything."
depends="jars"/>
Modified: branches/jbossws-1.2.0/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-30
21:23:58 UTC (rev 2199)
+++ branches/jbossws-1.2.0/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-01-30
22:33:08 UTC (rev 2200)
@@ -412,8 +412,8 @@
<!-- jaxws-samples-webparam -->
<war warfile="${tests.output.dir}/libs/jaxws-samples-webparam.war"
webxml="${tests.output.dir}/resources/jaxws/samples/webparam/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/samples/webparam/PingService.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/webparam/PingDocument*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/webparam/PingServiceImpl.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/webparam/PingDocument.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/webparam/SecurityHeader.class"/>
</classes>
</war>
@@ -421,7 +421,7 @@
<!-- jaxws-samples-webresult -->
<war warfile="${tests.output.dir}/libs/jaxws-samples-webresult.war"
webxml="${tests.output.dir}/resources/jaxws/samples/webresult/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
- <include
name="org/jboss/test/ws/jaxws/samples/webresult/CustomerService.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/webresult/CustomerServiceImpl.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/webresult/CustomerRecord.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/webresult/USAddress.class"/>
</classes>
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/JSR181WebParamTestCase.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -25,15 +25,15 @@
import java.net.URL;
import javax.xml.namespace.QName;
-import javax.xml.rpc.ParameterMode;
-import javax.xml.rpc.Service;
+import javax.xml.ws.Holder;
+import javax.xml.ws.Service;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.client.CallImpl;
-import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
+import org.jboss.ws.core.StubExt;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
@@ -45,104 +45,75 @@
*/
public class JSR181WebParamTestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() +
":8080/jaxws-samples-webparam/TestService";
private String targetNS = "http://www.openuri.org/jsr181/WebParamExample";
+
+ private static PingService port;
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(JSR181WebParamTestCase.class,
"jaxws-samples-webparam.war");
}
- public void testEcho() throws Exception
+ public void setUp() throws Exception
{
- QName serviceName = new QName(targetNS, "PingServiceService");
- QName portName = new QName(targetNS, "PingServicePort");
- URL wsdlURL = new URL(endpointURL + "?wsdl");
+ if (port == null)
+ {
+ QName serviceName = new QName(targetNS, "PingServiceService");
+ URL wsdlURL = new
File("resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl").toURL();
- File mappingFile = new
File("resources/jaxws/samples/webparam/jaxrpc-mapping.xml");
- assertTrue(mappingFile.exists());
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(PingService.class);
+ }
+ }
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName,
mappingFile.toURL());
- CallImpl call = (CallImpl)service.createCall(portName, "echo");
-
- PingDocument doc = new PingDocument("Hello Kermit");
- Object retObj = call.invoke(new Object[]{doc});
- assertEquals(doc, retObj);
+ public void testEcho() throws Exception
+ {
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ PingDocument retObj = port.echo(doc);
+ assertEquals(doc.getContent(), retObj.getContent());
}
public void testPingOneWay() throws Exception
{
- QName serviceName = new QName(targetNS, "PingServiceService");
- QName portName = new QName(targetNS, "PingServicePort");
- URL wsdlURL = new URL(endpointURL + "?wsdl");
-
- File mappingFile = new
File("resources/jaxws/samples/webparam/jaxrpc-mapping.xml");
- assertTrue(mappingFile.exists());
-
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName,
mappingFile.toURL());
- CallImpl call = (CallImpl)service.createCall(portName, "PingOneWay");
-
- OperationMetaData opMetaData = call.getOperationMetaData();
+ StubExt stub = (StubExt)port;
+ EndpointMetaData epMetaData = stub.getEndpointMetaData();
+ OperationMetaData opMetaData = epMetaData.getOperation(new QName(targetNS,
"PingOneWay"));
ParameterMetaData param = opMetaData.getParameter(new QName("Ping"));
assertNotNull ("Expected param", param);
- PingDocument doc = new PingDocument("Hello Kermit!");
- Object retObj = call.invoke(new Object[]{doc});
- assertNull("Expected null return", retObj);
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ port.pingOneWay(doc);
}
public void testPingTwoWay() throws Exception
{
- QName serviceName = new QName(targetNS, "PingServiceService");
- QName portName = new QName(targetNS, "PingServicePort");
- URL wsdlURL = new URL(endpointURL + "?wsdl");
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ Holder<PingDocument> holder = new Holder<PingDocument>(doc);
- File mappingFile = new
File("resources/jaxws/samples/webparam/jaxrpc-mapping.xml");
- assertTrue(mappingFile.exists());
-
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName,
mappingFile.toURL());
- CallImpl call = (CallImpl)service.createCall(portName, "PingTwoWay");
-
- OperationMetaData opMetaData = call.getOperationMetaData();
- ParameterMetaData param = opMetaData.getParameter(new QName("Ping"));
- assertNotNull ("Expected param", param);
- assertEquals (ParameterMode.INOUT, param.getMode());
-
- PingDocument doc = new PingDocument("Hello Kermit");
- PingDocumentHolder holder = new PingDocumentHolder(doc);
-
- Object retObj = call.invoke(new Object[]{holder});
- assertNull("Expected null return", retObj);
+ port.pingTwoWay(holder);
assertEquals("Hello Kermit Response", holder.value.getContent());
}
public void testSecurePing() throws Exception
{
- QName serviceName = new QName(targetNS, "PingServiceService");
- QName portName = new QName(targetNS, "PingServicePort");
- URL wsdlURL = new URL(endpointURL + "?wsdl");
+ StubExt stub = (StubExt)port;
+ EndpointMetaData epMetaData = stub.getEndpointMetaData();
+ OperationMetaData opMetaData = epMetaData.getOperation(new QName(targetNS,
"SecurePing"));
- File mappingFile = new
File("resources/jaxws/samples/webparam/jaxrpc-mapping.xml");
- assertTrue(mappingFile.exists());
-
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName,
mappingFile.toURL());
- CallImpl call = (CallImpl)service.createCall(portName, "SecurePing");
-
- OperationMetaData opMetaData = call.getOperationMetaData();
ParameterMetaData param1 = opMetaData.getParameter(new QName("Ping"));
assertNotNull ("Expected param", param1);
ParameterMetaData param2 = opMetaData.getParameter(new QName(targetNS,
"SecHeader"));
assertNotNull ("Expected param", param2);
assertTrue ("Expected header param", param2.isInHeader());
- PingDocument doc = new PingDocument("Hello Kermit");
- SecurityHeader secHeader = new SecurityHeader("some secret");
+ PingDocument doc = new PingDocument();
+ doc.setContent("Hello Kermit");
+ SecurityHeader secHeader = new SecurityHeader();
+ secHeader.setValue("some secret");
- Object retObj = call.invoke(new Object[]{doc, secHeader});
- assertNull("Expected null return", retObj);
+ port.securePing(doc, secHeader);
}
}
\ No newline at end of file
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocument.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocument.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocument.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,72 +1,63 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.samples.webparam;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import org.jboss.test.ws.jaxws.samples.webparam.PingDocument;
+
+/**
+ * <p>Java class for PingDocument complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="PingDocument">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="content"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PingDocument", propOrder = { "content" })
-public class PingDocument
-{
- @XmlElement(namespace = "http://www.openuri.org/jsr181/WebParamExample",
required = true)
- private String content;
+@XmlType(name = "PingDocument", propOrder = {
+ "content"
+})
+public class PingDocument {
- public PingDocument()
- {
- }
+ @XmlElement(namespace = "http://www.openuri.org/jsr181/WebParamExample")
+ protected String content;
- public PingDocument(String content)
- {
- this.content = content;
- }
+ /**
+ * Gets the value of the content property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getContent() {
+ return content;
+ }
- public String getContent()
- {
- return content;
- }
+ /**
+ * Sets the value of the content property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setContent(String value) {
+ this.content = value;
+ }
- public void setContent(String content)
- {
- this.content = content;
- }
-
- public boolean equals(Object obj)
- {
- if (obj instanceof PingDocument == false)
- return false;
- PingDocument other = (PingDocument)obj;
- return toString().equals(other.toString());
- }
-
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- public String toString()
- {
- return "[" + content + "]";
- }
}
Deleted:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocumentHolder.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocumentHolder.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingDocumentHolder.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.webparam;
-
-import javax.xml.rpc.holders.Holder;
-
-public class PingDocumentHolder implements Holder
-{
- public PingDocument value;
-
- public PingDocumentHolder()
- {
-
- }
- public PingDocumentHolder(PingDocument value)
- {
- this.value = value;
- }
-}
Deleted:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.webparam;
-
-import javax.jws.Oneway;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.ws.Holder;
-
-import org.jboss.logging.Logger;
-
-/**
- * Test the JSR-181 annotation: javax.jws.WebParam
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 07-Oct-2005
- */
-@WebService(targetNamespace = "http://www.openuri.org/jsr181/WebParamExample")
-@SOAPBinding(style = SOAPBinding.Style.RPC)
-public class PingService
-{
- // Provide logging
- private static Logger log = Logger.getLogger(PingService.class);
-
- @WebMethod
- public PingDocument echo(PingDocument p)
- {
- log.info("echo: " + p);
- return p;
- }
-
- @Oneway
- @WebMethod(operationName = "PingOneWay")
- public void ping(@WebParam(name = "Ping") PingDocument p)
- {
- log.info("ping: " + p);
- }
-
- @WebMethod(operationName = "PingTwoWay")
- public void ping(@WebParam(name = "Ping", mode = WebParam.Mode.INOUT)
Holder<PingDocument> p)
- {
- log.info("ping: " + p.value);
- p.value = new PingDocument(p.value.getContent() + " Response");
- }
-
- @Oneway
- @WebMethod(operationName = "SecurePing")
- public void ping(@WebParam(name = "Ping") PingDocument p, @WebParam(name =
"SecHeader", header = true) SecurityHeader secHdr)
- {
- log.info("ping: " + p + "," + secHdr);
- }
-}
\ No newline at end of file
Added:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -0,0 +1,73 @@
+
+package org.jboss.test.ws.jaxws.samples.webparam;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebParam.Mode;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+import javax.xml.ws.Holder;
+import org.jboss.test.ws.jaxws.samples.webparam.PingDocument;
+import org.jboss.test.ws.jaxws.samples.webparam.PingService;
+import org.jboss.test.ws.jaxws.samples.webparam.SecurityHeader;
+
+
+/**
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
+ */
+@WebService(name = "PingService", targetNamespace =
"http://www.openuri.org/jsr181/WebParamExample", wsdlLocation =
"META-INF/wsdl/PingService.wsdl")
+@SOAPBinding(style = Style.RPC)
+public interface PingService {
+
+
+ /**
+ *
+ * @param ping
+ */
+ @WebMethod(operationName = "PingOneWay")
+ @Oneway
+ public void pingOneWay(
+ @WebParam(name = "Ping", partName = "Ping")
+ PingDocument ping);
+
+ /**
+ *
+ * @param ping
+ */
+ @WebMethod(operationName = "PingTwoWay")
+ public void pingTwoWay(
+ @WebParam(name = "Ping", mode = Mode.INOUT, partName =
"Ping")
+ Holder<PingDocument> ping);
+
+ /**
+ *
+ * @param secHeader
+ * @param ping
+ */
+ @WebMethod(operationName = "SecurePing")
+ @Oneway
+ public void securePing(
+ @WebParam(name = "Ping", partName = "Ping")
+ PingDocument ping,
+ @WebParam(name = "SecHeader", targetNamespace =
"http://www.openuri.org/jsr181/WebParamExample", header = true, partName =
"SecHeader")
+ SecurityHeader secHeader);
+
+ /**
+ *
+ * @param arg0
+ * @return
+ * returns org.jboss.test.ws.jaxws.samples.webparam.PingDocument
+ */
+ @WebMethod
+ @WebResult(targetNamespace =
"http://www.openuri.org/jsr181/WebParamExample", partName = "return")
+ public PingDocument echo(
+ @WebParam(name = "arg0", partName = "arg0")
+ PingDocument arg0);
+
+}
Copied:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingServiceImpl.java
(from rev 2197,
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingService.java)
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingServiceImpl.java
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/PingServiceImpl.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.webparam;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Holder;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.WebParam
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Oct-2005
+ */
+@WebService(name = "PingService", targetNamespace =
"http://www.openuri.org/jsr181/WebParamExample")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class PingServiceImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(PingServiceImpl.class);
+
+ @WebMethod
+ public PingDocument echo(PingDocument p)
+ {
+ log.info("echo: " + p);
+ return p;
+ }
+
+ @Oneway
+ @WebMethod(operationName = "PingOneWay")
+ public void ping(@WebParam(name = "Ping") PingDocument p)
+ {
+ log.info("ping: " + p);
+ }
+
+ @WebMethod(operationName = "PingTwoWay")
+ public void ping(@WebParam(name = "Ping", mode = WebParam.Mode.INOUT)
Holder<PingDocument> p)
+ {
+ log.info("ping: " + p.value);
+ PingDocument resDoc = new PingDocument();
+ resDoc.setContent(p.value.getContent() + " Response");
+ p.value = resDoc;
+ }
+
+ @Oneway
+ @WebMethod(operationName = "SecurePing")
+ public void ping(@WebParam(name = "Ping") PingDocument p, @WebParam(name =
"SecHeader", header = true) SecurityHeader secHdr)
+ {
+ log.info("ping: " + p + "," + secHdr);
+ }
+}
\ No newline at end of file
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/SecurityHeader.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/SecurityHeader.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webparam/SecurityHeader.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,64 +1,63 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.samples.webparam;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import org.jboss.test.ws.jaxws.samples.webparam.SecurityHeader;
+
+/**
+ * <p>Java class for SecurityHeader complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="SecurityHeader">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="value"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "SecurityHeader", propOrder = { "value" })
-public class SecurityHeader
-{
- @XmlElement(namespace = "http://www.openuri.org/jsr181/WebParamExample",
required = true)
- private String value;
+@XmlType(name = "SecurityHeader", propOrder = {
+ "value"
+})
+public class SecurityHeader {
- public SecurityHeader()
- {
- }
+ @XmlElement(namespace = "http://www.openuri.org/jsr181/WebParamExample")
+ protected String value;
- public SecurityHeader(String value)
- {
- this.value = value;
- }
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue() {
+ return value;
+ }
- public String getValue()
- {
- return value;
- }
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
- public void setValue(String content)
- {
- this.value = content;
- }
-
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- public String toString()
- {
- return "[" + value + "]";
- }
}
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerRecord.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerRecord.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerRecord.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,24 +1,4 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.samples.webresult;
import javax.xml.bind.annotation.XmlAccessType;
@@ -26,65 +6,113 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for CustomerRecord complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="CustomerRecord">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="firstName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="lastName"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="address"
type="{http://webresult.samples.jaxws.ws.test.jboss.org/}USAddress&q...
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "CustomerRecord", propOrder = { "firstName",
"lastName", "address" })
-public class CustomerRecord
-{
- @XmlElement(required = true, nillable = true)
- private String firstName;
- @XmlElement(required = true, nillable = true)
- private String lastName;
- @XmlElement(required = true, nillable = true)
- private USAddress address;
+@XmlType(name = "CustomerRecord", propOrder = {
+ "firstName",
+ "lastName",
+ "address"
+})
+public class CustomerRecord {
- public CustomerRecord()
- {
- }
+ @XmlElement(nillable = true)
+ protected String firstName;
+ @XmlElement(nillable = true)
+ protected String lastName;
+ @XmlElement(nillable = true)
+ protected USAddress address;
- public CustomerRecord(String firstName, String lastName, USAddress address)
- {
- this.address = address;
- this.firstName = firstName;
- this.lastName = lastName;
- }
+ /**
+ * Gets the value of the firstName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFirstName() {
+ return firstName;
+ }
- public USAddress getAddress()
- {
- return address;
- }
+ /**
+ * Sets the value of the firstName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFirstName(String value) {
+ this.firstName = value;
+ }
- public void setAddress(USAddress address)
- {
- this.address = address;
- }
+ /**
+ * Gets the value of the lastName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLastName() {
+ return lastName;
+ }
- public String getFirstName()
- {
- return firstName;
- }
+ /**
+ * Sets the value of the lastName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLastName(String value) {
+ this.lastName = value;
+ }
- public void setFirstName(String firstName)
- {
- this.firstName = firstName;
- }
+ /**
+ * Gets the value of the address property.
+ *
+ * @return
+ * possible object is
+ * {@link USAddress }
+ *
+ */
+ public USAddress getAddress() {
+ return address;
+ }
- public String getLastName()
- {
- return lastName;
- }
+ /**
+ * Sets the value of the address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link USAddress }
+ *
+ */
+ public void setAddress(USAddress value) {
+ this.address = value;
+ }
- public void setLastName(String lastName)
- {
- this.lastName = lastName;
- }
-
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- public String toString()
- {
- return "[first=" + firstName + ",last=" + lastName +
",addr=" + address + "]";
- }
}
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerService.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerService.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerService.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,57 +1,44 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.samples.webresult;
import javax.jws.WebMethod;
-import javax.jws.WebService;
import javax.jws.WebParam;
import javax.jws.WebResult;
+import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-
-import org.jboss.logging.Logger;
+import javax.jws.soap.SOAPBinding.Style;
import org.jboss.test.ws.jaxws.samples.webresult.CustomerRecord;
+import org.jboss.test.ws.jaxws.samples.webresult.CustomerService;
+import org.jboss.test.ws.jaxws.samples.webresult.USAddress;
+
/**
- * Test the JSR-181 annotation: javax.jws.WebParam
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 07-Oct-2005
+ * This class was generated by the JAXWS SI.
+ * JAX-WS RI 2.0-b26-ea3
+ * Generated source version: 2.0
+ *
*/
-@WebService
-@SOAPBinding(style = SOAPBinding.Style.RPC)
-public class CustomerService
-{
- // Provide logging
- private static Logger log = Logger.getLogger(CustomerService.class);
+@WebService(name = "CustomerService", targetNamespace =
"http://webresult.samples.jaxws.ws.test.jboss.org/", wsdlLocation =
"META-INF/wsdl/CustomerService.wsdl")
+@SOAPBinding(style = Style.RPC)
+public interface CustomerService {
- @WebMethod
- @WebResult(name = "CustomerRecord")
- public CustomerRecord locateCustomer(
- @WebParam(name = "FirstName") String firstName,
- @WebParam(name = "LastName") String lastName,
- @WebParam(name = "Address") USAddress addr)
- {
- CustomerRecord rec = new CustomerRecord(firstName, lastName, addr);
- log.info("locateCustomer: " + rec);
- return rec;
- }
-}
\ No newline at end of file
+
+ /**
+ *
+ * @param address
+ * @param firstName
+ * @param lastName
+ * @return
+ * returns org.jboss.test.ws.jaxws.samples.webresult.CustomerRecord
+ */
+ @WebMethod
+ @WebResult(name = "CustomerRecord", targetNamespace =
"http://webresult.samples.jaxws.ws.test.jboss.org/", partName =
"CustomerRecord")
+ public CustomerRecord locateCustomer(
+ @WebParam(name = "FirstName", partName = "FirstName")
+ String firstName,
+ @WebParam(name = "LastName", partName = "LastName")
+ String lastName,
+ @WebParam(name = "Address", partName = "Address")
+ USAddress address);
+
+}
Copied:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerServiceImpl.java
(from rev 2197,
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerService.java)
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerServiceImpl.java
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/CustomerServiceImpl.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.webresult;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.ws.jaxws.samples.webresult.CustomerRecord;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.WebParam
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Oct-2005
+ */
+@WebService
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class CustomerServiceImpl
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(CustomerServiceImpl.class);
+
+ @WebMethod
+ @WebResult(name = "CustomerRecord")
+ public CustomerRecord locateCustomer(
+ @WebParam(name = "FirstName") String firstName,
+ @WebParam(name = "LastName") String lastName,
+ @WebParam(name = "Address") USAddress addr)
+ {
+ CustomerRecord rec = new CustomerRecord();
+ rec.setFirstName(firstName);
+ rec.setLastName(lastName);
+ rec.setAddress(addr);
+ log.info("locateCustomer: " + rec);
+ return rec;
+ }
+}
\ No newline at end of file
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/JSR181WebResultTestCase.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -26,19 +26,17 @@
import java.net.URL;
import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Service;
import junit.framework.Test;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.core.jaxrpc.client.CallImpl;
-import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
/**
@@ -49,30 +47,33 @@
*/
public class JSR181WebResultTestCase extends JBossWSTest
{
- private String endpointURL = "http://" + getServerHost() +
":8080/jaxws-samples-webresult/TestService";
private String targetNS =
"http://webresult.samples.jaxws.ws.test.jboss.org/";
+
+ private static CustomerService port;
public static Test suite()
{
return JBossWSTestSetup.newTestSetup(JSR181WebResultTestCase.class,
"jaxws-samples-webresult.war");
}
- public void testLocateCustomer() throws Exception
+ public void setUp() throws Exception
{
- QName serviceName = new QName(targetNS, "CustomerServiceService");
- QName portName = new QName(targetNS, "CustomerServicePort");
- URL wsdlURL = new URL(endpointURL + "?wsdl");
+ if (port == null)
+ {
+ QName serviceName = new QName(targetNS, "CustomerServiceService");
+ URL wsdlURL = new
File("resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl").toURL();
- File mappingFile = new
File("resources/jaxws/samples/webresult/jaxrpc-mapping.xml");
- assertTrue(mappingFile.exists());
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(CustomerService.class);
+ }
+ }
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- Service service = factory.createService(wsdlURL, serviceName,
mappingFile.toURL());
- CallImpl call = (CallImpl)service.createCall(portName,
"locateCustomer");
+ public void testLocateCustomer() throws Exception
+ {
+ USAddress addr = new USAddress();
+ addr.setAddress("Wall Street");
- USAddress addr = new USAddress("Wall Street");
-
- CustomerRecord retObj = (CustomerRecord)call.invoke(new
Object[]{"Mickey", "Mouse", addr});
+ CustomerRecord retObj = port.locateCustomer("Mickey", "Mouse",
addr);
assertEquals("Mickey", retObj.getFirstName());
assertEquals("Mouse", retObj.getLastName());
assertEquals("Wall Street", retObj.getAddress().getAddress());
@@ -98,7 +99,7 @@
"</env:Envelope>";
SOAPMessage reqMsg = msgFactory.createMessage(null, new
ByteArrayInputStream(reqEnv.getBytes()));
- URL epURL = new URL(endpointURL);
+ URL epURL = new URL("http://" + getServerHost() +
":8080/jaxws-samples-webresult");
SOAPMessage resMsg = con.call(reqMsg, epURL);
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/USAddress.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/USAddress.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webresult/USAddress.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,64 +1,63 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+
package org.jboss.test.ws.jaxws.samples.webresult;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import org.jboss.test.ws.jaxws.samples.webresult.USAddress;
+
+/**
+ * <p>Java class for USAddress complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within
this class.
+ *
+ * <pre>
+ * <complexType name="USAddress">
+ * <complexContent>
+ * <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="address"
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "USAddress", propOrder = { "address" })
-public class USAddress
-{
- @XmlElement(required = true, nillable = true)
- private String address;
+@XmlType(name = "USAddress", propOrder = {
+ "address"
+})
+public class USAddress {
- public USAddress()
- {
- }
+ @XmlElement(nillable = true)
+ protected String address;
- public USAddress(String address)
- {
- this.address = address;
- }
+ /**
+ * Gets the value of the address property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getAddress() {
+ return address;
+ }
- public String getAddress()
- {
- return address;
- }
+ /**
+ * Sets the value of the address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setAddress(String value) {
+ this.address = value;
+ }
- public void setAddress(String content)
- {
- this.address = content;
- }
-
- public int hashCode()
- {
- return toString().hashCode();
- }
-
- public String toString()
- {
- return "[" + address + "]";
- }
}
Deleted:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingHandler.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingHandler.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingHandler.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.samples.wsaddressing;
-
-import javax.xml.rpc.handler.GenericHandler;
-
-/**
- * An abstract handler for the ws-addressing
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 29-Nov-2005
- */
-public abstract class AddressingHandler extends GenericHandler
-{
- /**
- * Get the JBoss server host from system property "jbosstest.server.host"
- * This defaults to "" + getServerHost() + ""
- */
- public String getServerHost()
- {
- String hostName = System.getProperty("jbosstest.server.host",
"localhost");
- return hostName;
- }
-}
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingStatefulTestCase.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingStatefulTestCase.java 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/wsaddressing/AddressingStatefulTestCase.java 2007-01-30
22:33:08 UTC (rev 2200)
@@ -49,7 +49,7 @@
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(AddressingStatefulTestCase.class,
"jaxws-samples-wsaddressing.war, jaxws-samples-wsaddressing-client.jar");
+ return JBossWSTestSetup.newTestSetup(AddressingStatefulTestCase.class,
"jaxws-samples-wsaddressing.war");
}
protected void setUp() throws Exception
Added:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl 2007-01-30
22:33:08 UTC (rev 2200)
@@ -0,0 +1,95 @@
+<definitions name='PingServiceService'
targetNamespace='http://www.openuri.org/jsr181/WebParamExample'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://www.openuri.org/jsr181/WebParamExample'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema
targetNamespace='http://www.openuri.org/jsr181/WebParamExample'
version='1.0'
xmlns:tns='http://www.openuri.org/jsr181/WebParamExample'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='SecHeader' nillable='true'
type='tns:SecurityHeader'/>
+ <xs:complexType name='PingDocument'>
+ <xs:sequence>
+ <xs:element form='qualified' name='content'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='SecurityHeader'>
+ <xs:sequence>
+ <xs:element form='qualified' name='value'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+
+ <message name='PingService_PingTwoWay'>
+ <part name='Ping' type='tns:PingDocument'/>
+ </message>
+ <message name='PingService_SecurePing'>
+ <part name='Ping' type='tns:PingDocument'/>
+ <part element='tns:SecHeader' name='SecHeader'/>
+ </message>
+ <message name='PingService_PingOneWay'>
+ <part name='Ping' type='tns:PingDocument'/>
+ </message>
+ <message name='PingService_echo'>
+ <part name='arg0' type='tns:PingDocument'/>
+ </message>
+ <message name='PingService_PingTwoWayResponse'>
+ <part name='Ping' type='tns:PingDocument'/>
+ </message>
+ <message name='PingService_echoResponse'>
+ <part name='return' type='tns:PingDocument'/>
+ </message>
+
+ <portType name='PingService'>
+ <operation name='PingOneWay'>
+ <input message='tns:PingService_PingOneWay'/>
+ </operation>
+ <operation name='PingTwoWay'>
+ <input message='tns:PingService_PingTwoWay'/>
+ <output message='tns:PingService_PingTwoWayResponse'/>
+ </operation>
+ <operation name='SecurePing'>
+ <input message='tns:PingService_SecurePing'/>
+ </operation>
+ <operation name='echo'>
+ <input message='tns:PingService_echo'/>
+ <output message='tns:PingService_echoResponse'/>
+ </operation>
+ </portType>
+
+ <binding name='PingServiceBinding' type='tns:PingService'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='PingOneWay'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body
namespace='http://www.openuri.org/jsr181/WebParamExample'
use='literal'/>
+ </input>
+ </operation>
+ <operation name='PingTwoWay'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body
namespace='http://www.openuri.org/jsr181/WebParamExample'
use='literal'/>
+ </input>
+ <output>
+ <soap:body
namespace='http://www.openuri.org/jsr181/WebParamExample'
use='literal'/>
+ </output>
+ </operation>
+ <operation name='SecurePing'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body
namespace='http://www.openuri.org/jsr181/WebParamExample'
parts='Ping' use='literal'/>
+ <soap:header message='tns:PingService_SecurePing' part='SecHeader'
use='literal'></soap:header>
+ </input>
+ </operation>
+ <operation name='echo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body
namespace='http://www.openuri.org/jsr181/WebParamExample'
use='literal'/>
+ </input>
+ <output>
+ <soap:body
namespace='http://www.openuri.org/jsr181/WebParamExample'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name='PingServiceService'>
+ <port binding='tns:PingServiceBinding' name='PingServicePort'>
+ <soap:address
location='http://@jbosstest.host.name@:8080/jaxws-samples-webparam'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/META-INF/wsdl/PingService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/WEB-INF/web.xml
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/WEB-INF/web.xml 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webparam/WEB-INF/web.xml 2007-01-30
22:33:08 UTC (rev 2200)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>TestService</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.samples.webparam.PingService</servlet-class>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.webparam.PingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
Added:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl
(rev 0)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl 2007-01-30
22:33:08 UTC (rev 2200)
@@ -0,0 +1,53 @@
+<definitions name='CustomerServiceService'
targetNamespace='http://webresult.samples.jaxws.ws.test.jboss.org/'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://webresult.samples.jaxws.ws.test.jboss.org/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema
targetNamespace='http://webresult.samples.jaxws.ws.test.jboss.org/'
version='1.0'
xmlns:tns='http://webresult.samples.jaxws.ws.test.jboss.org/'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:complexType name='USAddress'>
+ <xs:sequence>
+ <xs:element name='address' nillable='true'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='CustomerRecord'>
+ <xs:sequence>
+ <xs:element name='firstName' nillable='true'
type='xs:string'/>
+ <xs:element name='lastName' nillable='true'
type='xs:string'/>
+ <xs:element name='address' nillable='true'
type='tns:USAddress'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+
+ <message name='CustomerService_locateCustomer'>
+ <part name='FirstName' type='xsd:string'/>
+ <part name='LastName' type='xsd:string'/>
+ <part name='Address' type='tns:USAddress'/>
+ </message>
+ <message name='CustomerService_locateCustomerResponse'>
+ <part name='CustomerRecord' type='tns:CustomerRecord'/>
+ </message>
+
+ <portType name='CustomerService'>
+ <operation name='locateCustomer' parameterOrder='FirstName LastName
Address'>
+ <input message='tns:CustomerService_locateCustomer'/>
+ <output message='tns:CustomerService_locateCustomerResponse'/>
+ </operation>
+ </portType>
+
+ <binding name='CustomerServiceBinding'
type='tns:CustomerService'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='locateCustomer'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body
namespace='http://webresult.samples.jaxws.ws.test.jboss.org/'
use='literal'/>
+ </input>
+ <output>
+ <soap:body
namespace='http://webresult.samples.jaxws.ws.test.jboss.org/'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name='CustomerServiceService'>
+ <port binding='tns:CustomerServiceBinding'
name='CustomerServicePort'>
+ <soap:address
location='http://@jbosstest.host.name@:8080/jaxws-samples-webresult'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/META-INF/wsdl/CustomerService.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/WEB-INF/web.xml
===================================================================
---
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/WEB-INF/web.xml 2007-01-30
21:23:58 UTC (rev 2199)
+++
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/webresult/WEB-INF/web.xml 2007-01-30
22:33:08 UTC (rev 2200)
@@ -7,7 +7,7 @@
<servlet>
<servlet-name>TestService</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.samples.webresult.CustomerService</servlet-class>
+
<servlet-class>org.jboss.test.ws.jaxws.samples.webresult.CustomerServiceImpl</servlet-class>
</servlet>
<servlet-mapping>