Author: thomas.diesler(a)jboss.com
Date: 2007-06-01 10:25:39 -0400 (Fri, 01 Jun 2007)
New Revision: 3365
Added:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBare.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPO.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPOResponse.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPO.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPOResponse.java
Removed:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrder.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrderAck.java
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
trunk/integration/sunri/src/test/resources/excludes-jboss50.txt
trunk/testsuite/ant-import/build-jars-jaxws.xml
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBareServiceImpl.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrapped.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrappedServiceImpl.java
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java
Log:
Enable sunri soapbinding
Modified:
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-01
14:24:52 UTC (rev 3364)
+++
trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -192,56 +192,68 @@
if (sepMetaData == null)
throw new IllegalStateException("Cannot obtain endpoint meta data");
- ServletRequestContext reqContext = (ServletRequestContext)context;
-
Type type = sepMetaData.getType();
-
- ServletContext servletContext = reqContext.getServletContext();
- HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
- HttpServletResponse httpResponse = reqContext.getHttpServletResponse();
- ServletHeaderSource headerSource = new ServletHeaderSource(httpRequest,
httpResponse);
-
+
// Build the message context
CommonMessageContext msgContext;
if (type == EndpointMetaData.Type.JAXRPC)
{
msgContext = new SOAPMessageContextJAXRPC();
- msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
- msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
- msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
}
else
{
msgContext = new SOAPMessageContextJAXWS();
msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, new
Boolean(false));
msgContext.put(MessageContextJAXWS.INBOUND_MESSAGE_ATTACHMENTS, new
HashMap<String, DataHandler>());
- msgContext.put(MessageContextJAXWS.HTTP_REQUEST_HEADERS,
headerSource.getHeaderMap());
- msgContext.put(MessageContextJAXWS.HTTP_REQUEST_METHOD,
httpRequest.getMethod());
- msgContext.put(MessageContextJAXWS.QUERY_STRING, httpRequest.getQueryString());
- msgContext.put(MessageContextJAXWS.PATH_INFO, httpRequest.getPathInfo());
- msgContext.put(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
- msgContext.put(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
- msgContext.put(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
+ }
+ // Set servlet specific properties
+ HttpServletResponse httpResponse = null;
+ ServletHeaderSource headerSource = null;
+ if (context instanceof ServletRequestContext)
+ {
+ ServletRequestContext reqContext = (ServletRequestContext)context;
+
+ ServletContext servletContext = reqContext.getServletContext();
+ HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
+ httpResponse = reqContext.getHttpServletResponse();
+ headerSource = new ServletHeaderSource(httpRequest, httpResponse);
+
+ if (type == EndpointMetaData.Type.JAXRPC)
+ {
+ msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
+ msgContext.put(MessageContextJAXRPC.SERVLET_REQUEST, httpRequest);
+ msgContext.put(MessageContextJAXRPC.SERVLET_RESPONSE, httpResponse);
+ }
+ else
+ {
+ msgContext.put(MessageContextJAXWS.HTTP_REQUEST_HEADERS,
headerSource.getHeaderMap());
+ msgContext.put(MessageContextJAXWS.HTTP_REQUEST_METHOD,
httpRequest.getMethod());
+ msgContext.put(MessageContextJAXWS.QUERY_STRING,
httpRequest.getQueryString());
+ msgContext.put(MessageContextJAXWS.PATH_INFO, httpRequest.getPathInfo());
+ msgContext.put(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
+ msgContext.put(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
+ msgContext.put(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
+ }
}
- msgContext.setEndpointMetaData(sepMetaData);
// Associate a message context with the current thread
MessageContextAssociation.pushMessageContext(msgContext);
+ msgContext.setEndpointMetaData(sepMetaData);
try
{
- MessageAbstraction resMessage = processRequest(endpoint, headerSource,
reqContext, inStream);
+ MessageAbstraction resMessage = processRequest(endpoint, headerSource, context,
inStream);
// Replace the message context with the response context
msgContext = MessageContextAssociation.peekMessageContext();
Map<String, List<String>> headers = (Map<String,
List<String>>)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
- if (headers != null)
+ if (headerSource != null && headers != null)
headerSource.setHeaderMap(headers);
Integer code = (Integer)msgContext.get(MessageContextJAXWS.HTTP_RESPONSE_CODE);
- if (code != null)
+ if (httpResponse != null && code != null)
httpResponse.setStatus(code.intValue());
boolean isFault = false;
@@ -258,7 +270,7 @@
// by a null envelope.
SOAPEnvelope soapEnv = part.getEnvelope();
isFault = soapEnv != null && soapEnv.getBody().hasFault();
- if (isFault && httpResponse != null)
+ if (httpResponse != null && isFault)
{
httpResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
@@ -308,7 +320,7 @@
/**
* Handle a request to this web service endpoint
*/
- private MessageAbstraction processRequest(Endpoint ep, MimeHeaderSource headerSource,
ServletRequestContext reqContext, InputStream inputStream)
+ private MessageAbstraction processRequest(Endpoint ep, MimeHeaderSource headerSource,
InvocationContext reqContext, InputStream inputStream)
throws BindingException
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
Modified: trunk/integration/sunri/src/test/resources/excludes-jboss50.txt
===================================================================
--- trunk/integration/sunri/src/test/resources/excludes-jboss50.txt 2007-06-01 14:24:52
UTC (rev 3364)
+++ trunk/integration/sunri/src/test/resources/excludes-jboss50.txt 2007-06-01 14:25:39
UTC (rev 3365)
@@ -8,9 +8,10 @@
# [JBWS-1673] Fix JAXR samples for SunRI
org/jboss/test/ws/jaxws/samples/jaxr/**
-#org/jboss/test/ws/jaxws/samples/provider/**
+# [JBWS-1674] Fix @WebServiceRef with SunRI
org/jboss/test/ws/jaxws/samples/retail/**
-org/jboss/test/ws/jaxws/samples/soapbinding/**
+
+#org/jboss/test/ws/jaxws/samples/soapbinding/**
org/jboss/test/ws/jaxws/samples/swaref/**
org/jboss/test/ws/jaxws/samples/webmethod/**
org/jboss/test/ws/jaxws/samples/webservice/**
Modified: trunk/testsuite/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-06-01 14:24:52 UTC (rev 3364)
+++ trunk/testsuite/ant-import/build-jars-jaxws.xml 2007-06-01 14:25:39 UTC (rev 3365)
@@ -201,6 +201,8 @@
<!-- jaxws-samples-soapbinding -->
<war warfile="${tests.output.dir}/libs/jaxws-samples-soapbinding.war"
webxml="${tests.output.dir}/resources/jaxws/samples/soapbinding/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/**"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/soapbinding/DocBare.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/soapbinding/DocWrapped.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/soapbinding/ExampleSEI.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/soapbinding/DocBareServiceImpl.class"/>
@@ -208,8 +210,6 @@
<include
name="org/jboss/test/ws/jaxws/samples/soapbinding/ExampleServiceImpl.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/soapbinding/SubmitBareRequest.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/soapbinding/SubmitBareResponse.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrder.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrderAck.class"/>
</classes>
</war>
Added: trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBare.java
===================================================================
--- trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBare.java
(rev 0)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBare.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -0,0 +1,47 @@
+/*
+ * 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.soapbinding;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Test the JSR-181 annotation: javax.jws.SOAPBinding
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @since 16-Oct-2005
+ */
+@WebService(name = "DocBare", serviceName = "DocBareService")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface DocBare
+{
+ @WebMethod(operationName = "SubmitPO")
+ SubmitBareResponse submitPO(SubmitBareRequest poRequest);
+
+ @WebMethod(operationName = "SubmitNamespacedPO")
+ @WebResult(targetNamespace = "http://namespace/result", name =
"SubmitBareResponse")
+ SubmitBareResponse submitNamespacedPO(@WebParam(targetNamespace =
"http://namespace/request") SubmitBareRequest poRequest);
+}
Property changes on:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBare.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBareServiceImpl.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBareServiceImpl.java 2007-06-01
14:24:52 UTC (rev 3364)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocBareServiceImpl.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -38,10 +38,10 @@
*/
@WebService(name = "DocBare", serviceName="DocBareService")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
-public class DocBareServiceImpl
+public class DocBareServiceImpl implements DocBare
{
// Provide logging
- private static Logger log = Logger.getLogger(ExampleServiceImpl.class);
+ private static Logger log = Logger.getLogger(DocBareServiceImpl.class);
@WebMethod(operationName = "SubmitPO")
public SubmitBareResponse submitPO(SubmitBareRequest poRequest)
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrapped.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrapped.java 2007-06-01
14:24:52 UTC (rev 3364)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrapped.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -33,12 +33,12 @@
{
@WebMethod(operationName = "SubmitPO")
@WebResult(name = "PurchaseOrderAck")
- public PurchaseOrderAck submitPO(@WebParam(name = "PurchaseOrder")
- PurchaseOrder purchaseOrder);
+ public String submitPO(@WebParam(name = "PurchaseOrder")
+ String product);
@WebMethod(operationName = "SubmitNamespacedPO")
@WebResult(name = "NamespacedPurchaseOrderAck", targetNamespace =
"http://namespace/result")
- public PurchaseOrderAck submitNamespacedPO(@WebParam(name =
"NamespacedPurchaseOrder", targetNamespace =
"http://namespace/purchase")
- PurchaseOrder purchaseOrder, @WebParam(name = "NamespacedString",
targetNamespace = "http://namespace/string")
+ public String submitNamespacedPO(@WebParam(name = "NamespacedPurchaseOrder",
targetNamespace = "http://namespace/purchase")
+ String product, @WebParam(name = "NamespacedString", targetNamespace =
"http://namespace/string")
String string);
}
\ No newline at end of file
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrappedServiceImpl.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrappedServiceImpl.java 2007-06-01
14:24:52 UTC (rev 3364)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/DocWrappedServiceImpl.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -1,27 +1,31 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.samples.soapbinding;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
import org.jboss.logging.Logger;
@@ -33,23 +37,27 @@
* @since 16-Oct-2005
*/
-@WebService(name="DocWrapped", serviceName="DocWrappedService",
endpointInterface = "org.jboss.test.ws.jaxws.samples.soapbinding.DocWrapped")
+@WebService(name = "DocWrapped", serviceName = "DocWrappedService")
+@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public class DocWrappedServiceImpl implements DocWrapped
{
// Provide logging
- private static Logger log = Logger.getLogger(ExampleServiceImpl.class);
+ private static Logger log = Logger.getLogger(DocWrappedServiceImpl.class);
- public PurchaseOrderAck submitPO(PurchaseOrder purchaseOrder)
+ @WebMethod(operationName = "SubmitPO")
+ @WebResult(name = "PurchaseOrderAck")
+ public String submitPO(@WebParam(name = "PurchaseOrder") String product)
{
- log.info("submitPO: " + purchaseOrder);
- PurchaseOrderAck poAck = new PurchaseOrderAck(purchaseOrder.getProduct());
- return poAck;
+ log.info("submitPO: " + product);
+ return product;
}
- public PurchaseOrderAck submitNamespacedPO(PurchaseOrder purchaseOrder, String
string)
+ @WebMethod(operationName = "SubmitNamespacedPO")
+ @WebResult(name = "NamespacedPurchaseOrderAck", targetNamespace =
"http://namespace/result")
+ public String submitNamespacedPO(@WebParam(name = "NamespacedPurchaseOrder",
targetNamespace = "http://namespace/purchase")
+ String product, @WebParam(name = "NamespacedString", targetNamespace =
"http://namespace/string") String string)
{
- log.info("submitNamespacedPO: " + purchaseOrder + ", " +
string);
- PurchaseOrderAck poAck = new PurchaseOrderAck(purchaseOrder.getProduct());
- return poAck;
+ log.info("submitNamespacedPO: " + product + ", " + string);
+ return product;
}
}
Deleted:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrder.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrder.java 2007-06-01
14:24:52 UTC (rev 3364)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrder.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -1,55 +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.soapbinding;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PurchaseOrderType",
namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/", propOrder = {
"product" })
-public class PurchaseOrder
-{
- @XmlElement(namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/",
required = true)
- private String product;
-
- public PurchaseOrder()
- {
- }
-
- public PurchaseOrder(String product)
- {
- this.product = product;
- }
-
- public String getProduct()
- {
- return product;
- }
-
- public void setProduct(String product)
- {
- this.product = product;
- }
-}
Deleted:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrderAck.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrderAck.java 2007-06-01
14:24:52 UTC (rev 3364)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/PurchaseOrderAck.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -1,55 +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.soapbinding;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-(a)XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "PurchaseOrderAckType",
namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/", propOrder = {
"product" })
-public class PurchaseOrderAck
-{
- @XmlElement(namespace="http://soapbinding.samples.jaxws.ws.test.jboss.org/",
required = true)
- private String product;
-
- public PurchaseOrderAck()
- {
- }
-
- public PurchaseOrderAck(String product)
- {
- this.product = product;
- }
-
- public String getProduct()
- {
- return product;
- }
-
- public void setProduct(String product)
- {
- this.product = product;
- }
-}
Modified:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java 2007-06-01
14:24:52 UTC (rev 3364)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/SOAPBindingTestCase.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -71,6 +71,19 @@
public void testDocBareService() throws Exception
{
QName serviceName = new QName(targetNS, "DocBareService");
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ DocBare port = (DocBare)service.getPort(DocBare.class);
+
+ SubmitBareRequest poReq = new SubmitBareRequest("Ferrari");
+ SubmitBareResponse poRes = port.submitPO(poReq);
+ assertEquals("Ferrari", poRes.getProduct());
+ }
+
+ public void testDocBareDispatchService() throws Exception
+ {
+ QName serviceName = new QName(targetNS, "DocBareService");
QName portName = new QName(targetNS, "DocBarePort");
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-samples-soapbinding/DocBareService?wsdl");
@@ -150,9 +163,11 @@
Service service = Service.create(wsdlURL, serviceName);
DocWrapped port = (DocWrapped)service.getPort(DocWrapped.class);
- PurchaseOrderAck poRes = port.submitPO(new PurchaseOrder("Ferarri"));
-
- assertEquals("Ferarri", poRes.getProduct());
+ String poRes = port.submitPO("Ferrari");
+ assertEquals("Ferrari", poRes);
+
+ poRes = port.submitNamespacedPO("Ferrari", "message");
+ assertEquals("Ferrari", poRes);
}
public void testDocWrappedServiceMessageAccess() throws Exception
@@ -164,9 +179,7 @@
" <env:Header/>" +
" <env:Body>" +
" <ns1:SubmitPO xmlns:ns1='" + targetNS + "'>"
+
- " <PurchaseOrder>" +
- " <ns1:product>Ferrari</ns1:product>" +
- " </PurchaseOrder>" +
+ " <PurchaseOrder>Ferrari</PurchaseOrder>" +
" </ns1:SubmitPO>" +
" </env:Body>" +
"</env:Envelope>";
@@ -183,7 +196,6 @@
QName qname = new QName(targetNS, "SubmitPOResponse");
SOAPElement soapElement =
(SOAPElement)resMsg.getSOAPBody().getChildElements(qname).next();
soapElement = (SOAPElement)soapElement.getChildElements(new
QName("PurchaseOrderAck")).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new QName(targetNS,
"product")).next();
assertEquals("Ferrari", soapElement.getValue());
}
@@ -201,10 +213,8 @@
" <env:Header/>" +
" <env:Body>" +
" <ns1:SubmitNamespacedPO xmlns:ns1='" + targetNS +
"'>" +
- " <ns2:NamespacedPurchaseOrder xmlns:ns2='" + purchaseNamespace
+ "'>" +
- " <ns1:product>Ferrari</ns1:product>" +
- " </ns2:NamespacedPurchaseOrder>" +
- " <ns3:NamespacedString xmlns:ns3='" + stringNamespace +
"'>Ferrari</ns3:NamespacedString>" +
+ " <ns2:NamespacedPurchaseOrder xmlns:ns2='" + purchaseNamespace
+ "'>Ferrari</ns2:NamespacedPurchaseOrder>" +
+ " <ns3:NamespacedString xmlns:ns3='" + stringNamespace +
"'>message</ns3:NamespacedString>" +
" </ns1:SubmitNamespacedPO>" +
" </env:Body>" +
"</env:Envelope>";
@@ -216,7 +226,6 @@
QName qname = new QName(targetNS, "SubmitNamespacedPOResponse");
SOAPElement soapElement =
(SOAPElement)resMsg.getSOAPBody().getChildElements(qname).next();
soapElement = (SOAPElement)soapElement.getChildElements(new QName(resultNamespace,
"NamespacedPurchaseOrderAck")).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new QName(targetNS,
"product")).next();
assertEquals("Ferrari", soapElement.getValue());
}
}
Added:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPO.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPO.java
(rev 0)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPO.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -0,0 +1,59 @@
+
+package org.jboss.test.ws.jaxws.samples.soapbinding.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "SubmitNamespacedPO", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SubmitNamespacedPO", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/", propOrder = {
+ "namespacedPurchaseOrder",
+ "namespacedString"
+})
+public class SubmitNamespacedPO {
+
+ @XmlElement(name = "NamespacedPurchaseOrder", namespace =
"http://namespace/purchase")
+ private String namespacedPurchaseOrder;
+ @XmlElement(name = "NamespacedString", namespace =
"http://namespace/string")
+ private String namespacedString;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getNamespacedPurchaseOrder() {
+ return this.namespacedPurchaseOrder;
+ }
+
+ /**
+ *
+ * @param namespacedPurchaseOrder
+ * the value for the namespacedPurchaseOrder property
+ */
+ public void setNamespacedPurchaseOrder(String namespacedPurchaseOrder) {
+ this.namespacedPurchaseOrder = namespacedPurchaseOrder;
+ }
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getNamespacedString() {
+ return this.namespacedString;
+ }
+
+ /**
+ *
+ * @param namespacedString
+ * the value for the namespacedString property
+ */
+ public void setNamespacedString(String namespacedString) {
+ this.namespacedString = namespacedString;
+ }
+
+}
Property changes on:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPOResponse.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPOResponse.java
(rev 0)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPOResponse.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.samples.soapbinding.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "SubmitNamespacedPOResponse", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SubmitNamespacedPOResponse", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/")
+public class SubmitNamespacedPOResponse {
+
+ @XmlElement(name = "NamespacedPurchaseOrderAck", namespace =
"http://namespace/result")
+ private String namespacedPurchaseOrderAck;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getNamespacedPurchaseOrderAck() {
+ return this.namespacedPurchaseOrderAck;
+ }
+
+ /**
+ *
+ * @param namespacedPurchaseOrderAck
+ * the value for the namespacedPurchaseOrderAck property
+ */
+ public void setNamespacedPurchaseOrderAck(String namespacedPurchaseOrderAck) {
+ this.namespacedPurchaseOrderAck = namespacedPurchaseOrderAck;
+ }
+
+}
Property changes on:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitNamespacedPOResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPO.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPO.java
(rev 0)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPO.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.samples.soapbinding.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "SubmitPO", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SubmitPO", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/")
+public class SubmitPO {
+
+ @XmlElement(name = "PurchaseOrder", namespace = "")
+ private String purchaseOrder;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getPurchaseOrder() {
+ return this.purchaseOrder;
+ }
+
+ /**
+ *
+ * @param purchaseOrder
+ * the value for the purchaseOrder property
+ */
+ public void setPurchaseOrder(String purchaseOrder) {
+ this.purchaseOrder = purchaseOrder;
+ }
+
+}
Property changes on:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPOResponse.java
===================================================================
---
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPOResponse.java
(rev 0)
+++
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPOResponse.java 2007-06-01
14:25:39 UTC (rev 3365)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.samples.soapbinding.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "SubmitPOResponse", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "SubmitPOResponse", namespace =
"http://soapbinding.samples.jaxws.ws.test.jboss.org/")
+public class SubmitPOResponse {
+
+ @XmlElement(name = "PurchaseOrderAck", namespace = "")
+ private String purchaseOrderAck;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ public String getPurchaseOrderAck() {
+ return this.purchaseOrderAck;
+ }
+
+ /**
+ *
+ * @param purchaseOrderAck
+ * the value for the purchaseOrderAck property
+ */
+ public void setPurchaseOrderAck(String purchaseOrderAck) {
+ this.purchaseOrderAck = purchaseOrderAck;
+ }
+
+}
Property changes on:
trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPOResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF