Author: alessio.soldano(a)jboss.com
Date: 2008-02-22 12:16:51 -0500 (Fri, 22 Feb 2008)
New Revision: 5776
Added:
framework/trunk/src/test/resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
Log:
[JBWS-1990] Support for SOAP 1.2 in wsconsume - test
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
===================================================================
---
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2008-02-22
17:16:13 UTC (rev 5775)
+++
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2008-02-22
17:16:51 UTC (rev 5776)
@@ -21,24 +21,25 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
-import junit.framework.TestCase;
-import org.jboss.wsf.spi.tools.WSContractConsumer;
-
-import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceFeature;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.PrintStream;
+import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
-import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
-import java.lang.reflect.Method;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+
+import junit.framework.TestCase;
+
+import org.jboss.wsf.spi.tools.WSContractConsumer;
+
/**
* Test the WSContractConsumer API across different implementations.
- * NOTE: All tests expect to be execurted below 'output/tests'.
+ * NOTE: All tests expect to be executed below 'output/tests'.
*
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
@@ -287,6 +288,23 @@
}
+ /**
+ * Tests the SOAP 1.2 binding extension
+ *
+ */
+ public void testSOAP12Extension() throws Exception
+ {
+ consumer.setOutputDirectory(outputDirectory);
+
consumer.setTargetPackage("org.jboss.test.ws.tools.testSOAP12Extension");
+ consumer.setGenerateSource(true);
+ consumer.setExtension(true);
+
consumer.consume("resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl");
+ File sei = new
File("wsconsume/java/org/jboss/test/ws/tools/testSOAP12Extension/EndpointInterface.java");
+ assertTrue("SEI not generated", sei.exists());
+ File service = new
File("wsconsume/java/org/jboss/test/ws/tools/testSOAP12Extension/TestService.java");
+ assertTrue("Service not generated", service.exists());
+ }
+
private void consumeWSDL() throws Exception
{
consumer.setOutputDirectory(outputDirectory);
Added: framework/trunk/src/test/resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl
===================================================================
--- framework/trunk/src/test/resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl
(rev 0)
+++
framework/trunk/src/test/resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl 2008-02-22
17:16:51 UTC (rev 5776)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<definitions name="TestService"
+
targetNamespace="http://www.openuri.org/2004/04/HelloWorld"
+
xmlns:tns="http://www.openuri.org/2004/04/HelloWorld"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+ <types/>
+ <message name="EndpointInterface_echo">
+ <part name="String_1" type="xsd:string"/>
+ </message>
+ <message name="EndpointInterface_echoResponse">
+ <part name="result" type="xsd:string"/>
+ </message>
+ <portType name="EndpointInterface">
+ <operation name="echo" parameterOrder="String_1">
+ <input message="tns:EndpointInterface_echo"/>
+ <output message="tns:EndpointInterface_echoResponse"/>
+ </operation>
+ </portType>
+ <binding name="EndpointInterfaceBinding"
type="tns:EndpointInterface">
+ <soap12:binding
transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/>
+ <operation name="echo">
+ <soap12:operation soapAction=""/>
+ <input>
+ <soap12:body use="literal"
namespace="http://www.openuri.org/2004/04/HelloWorld"/>
+ </input>
+ <output>
+ <soap12:body use="literal"
namespace="http://www.openuri.org/2004/04/HelloWorld"/>
+ </output>
+ </operation>
+ </binding>
+ <service name="TestService">
+ <port name="EndpointInterfacePort"
binding="tns:EndpointInterfaceBinding">
+ <soap12:address location="REPLACE_WITH_ACTUAL_URL"/>
+ </port>
+ </service>
+</definitions>
Property changes on:
framework/trunk/src/test/resources/jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF