[jboss-svn-commits] JBL Code SVN: r25359 - in labs/jbossesb/trunk/product/services/soap/src/test: resources and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Feb 20 00:55:04 EST 2009


Author: beve
Date: 2009-02-20 00:55:03 -0500 (Fri, 20 Feb 2009)
New Revision: 25359

Added:
   labs/jbossesb/trunk/product/services/soap/src/test/resources/test-in.wsdl
Removed:
   labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl
Modified:
   labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java
   labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
Log:
Work for https://jira.jboss.org/jira/browse/JBESB-2432 "soap projects test cannot be run from command line (from soap directory)"


Modified: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java	2009-02-20 05:50:35 UTC (rev 25358)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/AbstractWsdlContractPublisherUnitTest.java	2009-02-20 05:55:03 UTC (rev 25359)
@@ -28,6 +28,7 @@
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URI;
+import java.net.URL;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 
@@ -35,6 +36,7 @@
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.addressing.EPR;
 import org.jboss.internal.soa.esb.publish.ContractInfo;
+import org.jboss.internal.soa.esb.util.StreamUtils;
 import org.custommonkey.xmlunit.XMLUnit;
 import org.custommonkey.xmlunit.XMLAssert;
 import org.xml.sax.SAXException;
@@ -64,7 +66,7 @@
         Action actionConfig = new Action(null, null, null, new Properties());
 
         actionConfig.getProperties().setProperty("rewrite-endpoint-url", "false");
-        execTransformTest(actionConfig, "test-in.wsdl"); // Neither transforms - should be unchanged from the in-wsdl
+        execTransformTest(actionConfig, "/test-in.wsdl"); // Neither transforms - should be unchanged from the in-wsdl
     }
 
     public void test_transform_04() throws ConfigurationException, IOException, SAXException {
@@ -79,7 +81,6 @@
         publisher.setActionConfig(actionConfig);
         ContractInfo contractInfo = publisher.getContractInfo(new EPR(URI.create("http://x.y.x:8989/")));
 
-        //System.out.println(contractInfo.getData());
         XMLUnit.setIgnoreWhitespace( true );
         XMLAssert.assertXMLEqual(new InputStreamReader(getClass().getResourceAsStream(expected)), new StringReader(contractInfo.getData()));
     }
@@ -87,8 +88,8 @@
     private class TestWsdlContractPublisher extends AbstractWsdlContractPublisher {
 
         public String getWsdlAddress() {
-            // cwd needs to be the root of the "soap" service
-            File testFile = new File("services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl");
+            URL resource = getClass().getResource("/test-in.wsdl");
+            File testFile = new File(resource.getFile());
 
             try {
                 return testFile.toURL().toString();

Modified: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java	2009-02-20 05:50:35 UTC (rev 25358)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java	2009-02-20 05:55:03 UTC (rev 25359)
@@ -44,7 +44,7 @@
 	
     public void test() throws ConfigurationException, IOException, SAXException {
         JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
-        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
+        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
         String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected.wsdl")));
         EPR epr = new EPR(URI.create("socket://x.y.x:8989/"));
 
@@ -59,7 +59,7 @@
 
     public void test_http_rewrite() throws ConfigurationException, IOException, SAXException {
         JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
-        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
+        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
         String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected-http-rewrite.wsdl")));
         EPR epr = new EPR(URI.create("http://x.y.x:8989/"));
 
@@ -75,8 +75,8 @@
 
     public void test_http_norewrite() throws ConfigurationException, IOException, SAXException {
         JBossWSWebserviceContractPublisher publisher = new JBossWSWebserviceContractPublisher();
-        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
-        String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl"))); // expected same as input wsdl
+        String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl")));
+        String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("/test-in.wsdl"))); // expected same as input wsdl
         EPR epr = new EPR(URI.create("http://x.y.x:8989/"));
 
         publisher.setActionConfig(buildActionConfig(false));

Deleted: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl	2009-02-20 05:50:35 UTC (rev 25358)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/test-in.wsdl	2009-02-20 05:55:03 UTC (rev 25359)
@@ -1,55 +0,0 @@
-<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld">
-    <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl" namespace="http://org.jboss.ws/xop/doclit"/>
-    <types/>
-    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
-        <part name="String_1" type="xsd:string"/>
-
-    </message>
-    <message name="GoodbyeWorldWS_sayGoodbye">
-        <part name="String_1" type="xsd:string"/>
-    </message>
-    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
-    <message name="GoodbyeWorldWS_sayGoodbyeResponse">
-        <part name="result" type="xsd:string"/>
-    </message>
-    <portType name="ReptilesNotifyWS">
-
-        <operation name="sayGoodbye" parameterOrder="String_1">
-            <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
-            <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
-        </operation>
-        <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
-            <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
-            <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
-        </operation>
-    </portType>
-
-    <binding name="GoodbyeWorldWSBinding" type="tns:ReptilesNotifyWS">
-        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
-        <operation name="sayGoodbye">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-            </input>
-            <output>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-
-            </output>
-        </operation>
-        <operation name="sayGoodbyeWithoutResponse">
-            <soap:operation soapAction=""/>
-            <input>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-            </input>
-            <output>
-                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
-
-            </output>
-        </operation>
-    </binding>
-    <service name="GoodbyeWorldWSService">
-        <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
-            <soap:address location="http://tfennelly:8080/Quickstart_webservice_jbossws_adapter_01/GoodbyeWorldWS"/>
-        </port>
-    </service>
-</definitions>
\ No newline at end of file

Added: labs/jbossesb/trunk/product/services/soap/src/test/resources/test-in.wsdl
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/resources/test-in.wsdl	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/soap/src/test/resources/test-in.wsdl	2009-02-20 05:55:03 UTC (rev 25359)
@@ -0,0 +1,55 @@
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld">
+    <import location="http://127.0.0.1:8080/contract/contract.jsp?wsdl&amp;resource=MTOMEndpoint_PortType61314.wsdl" namespace="http://org.jboss.ws/xop/doclit"/>
+    <types/>
+    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
+        <part name="String_1" type="xsd:string"/>
+
+    </message>
+    <message name="GoodbyeWorldWS_sayGoodbye">
+        <part name="String_1" type="xsd:string"/>
+    </message>
+    <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+    <message name="GoodbyeWorldWS_sayGoodbyeResponse">
+        <part name="result" type="xsd:string"/>
+    </message>
+    <portType name="ReptilesNotifyWS">
+
+        <operation name="sayGoodbye" parameterOrder="String_1">
+            <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
+            <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
+            <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
+            <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+        </operation>
+    </portType>
+
+    <binding name="GoodbyeWorldWSBinding" type="tns:ReptilesNotifyWS">
+        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <operation name="sayGoodbye">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+        <operation name="sayGoodbyeWithoutResponse">
+            <soap:operation soapAction=""/>
+            <input>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+            </output>
+        </operation>
+    </binding>
+    <service name="GoodbyeWorldWSService">
+        <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+            <soap:address location="http://tfennelly:8080/Quickstart_webservice_jbossws_adapter_01/GoodbyeWorldWS"/>
+        </port>
+    </service>
+</definitions>
\ No newline at end of file




More information about the jboss-svn-commits mailing list