|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
[mule-scm] [mule] [15954] branches/mule-3.x: Merged revisions 15938 via svnmerge from
Log MessageMerged revisions 15938 via svnmerge from https://svn.codehaus.org/mule/branches/mule-2.2.x ........ r15938 | dirk.olmes | 2009-11-03 12:05:25 +0100 (Tue, 03 Nov 2009) | 1 line Add more comments in the XML request document ........ Modified PathsProperty Changed
DiffProperty changes: branches/mule-3.x
Name: svnmerge-integrated
- /branches/mule-2.2.x:1-14052,14055-14056,14058-14062,14064,14066-14073,14076-14084,14086-14088,14091-14095,14097-14098,14100-14101,14103-14104,14106-14109,14111-14115,14117-14121,14123-14132,14135-14140,14142-14149,14152-14154,14156-14162,14165-14171,14173-14180,14182,14184-14189,14191-14195,14197-14203,14205,14207-14208,14210-14211,14214-14215,14217-14227,14230,14232-14236,14239,14241,14244,14246-14248,14250,14252-14253,14255-14256,14258-14263,14266-14269,14271-14278,14281-14282,14284,14286-14288,14292-14295,14297-14299,14301-14303,14306-14308,14310-14311,14313-14319,14321-14325,14327-14329,14331,14333-14339,14341-14343,14345-14357,14364-14368,14370-14374,14376-14378,14380-14381,14383-14397,14399-14400,14402,14404-14405,14407-14408,14410-14411,14413-14418,14421-14434,14436,14438,14440-14444,14449-14457,14459,14461-14462,14464-14469,14471-14475,14478-14480,14482-14484,14486-14504,14508-14535,14537-14592,14594-14595,14597-14638,14640-14644,14646-14647,14649-14761,14763-14
838,14840-14869,14872-14881,14890,14897,14899,14904,14906-14908,14910-14911,14913,14916,14921,14943,14946-14948,14969,14991,15010,15012,15022,15027,15040,15044,15063,15066,15076,15088,15094,15098,15101,15107,15112,15126,15132,15143,15189,15192,15200,15204,15207,15215,15220,15229-15230,15241,15245,15271,15284,15291,15293-15294,15296,15298-15299,15302,15307,15311,15315,15317-15322,15324-15355,15357-15365,15367,15369-15372,15374,15377,15387,15418,15420-15430,15433,15440,15442-15443,15450,15452,15456-15462,15465,15467-15470,15489-15492,15513,15532,15554,15556-15561,15563-15586,15588-15589,15591-15596,15599-15665,15667-15688,15690-15721,15723-15745,15747-15753,15755-15756,15760-15765,15774-15777,15781-15794,15796-15800,15802-15804,15806-15828,15830-15833,15835-15858,15863,15865-15875,15881-15884,15889,15892-15902,15908-15910,15912-15913,15915-15921,15923 /branches/mule-3.x-messaging:1-15430 /branches/mule-3.x-xmpp:1-15727
+ /branches/mule-3.x-messaging:1-15430 /branches/mule-2.2.x:1-14052,14055-14056,14058-14062,14064,14066-14073,14076-14084,14086-14088,14091-14095,14097-14098,14100-14101,14103-14104,14106-14109,14111-14115,14117-14121,14123-14132,14135-14140,14142-14149,14152-14154,14156-14162,14165-14171,14173-14180,14182,14184-14189,14191-14195,14197-14203,14205,14207-14208,14210-14211,14214-14215,14217-14227,14230,14232-14236,14239,14241,14244,14246-14248,14250,14252-14253,14255-14256,14258-14263,14266-14269,14271-14278,14281-14282,14284,14286-14288,14292-14295,14297-14299,14301-14303,14306-14308,14310-14311,14313-14319,14321-14325,14327-14329,14331,14333-14339,14341-14343,14345-14357,14364-14368,14370-14374,14376-14378,14380-14381,14383-14397,14399-14400,14402,14404-14405,14407-14408,14410-14411,14413-14418,14421-14434,14436,14438,14440-14444,14449-14457,14459,14461-14462,14464-14469,14471-14475,14478-14480,14482-14484,14486-14504,14508-14535,14537-14592,14594-14595,14597-14638,14640-1
4644,14646-14647,14649-14761,14763-14838,14840-14869,14872-14881,14890,14897,14899,14904,14906-14908,14910-14911,14913,14916,14921,14943,14946-14948,14969,14991,15010,15012,15022,15027,15040,15044,15063,15066,15076,15088,15094,15098,15101,15107,15112,15126,15132,15143,15189,15192,15200,15204,15207,15215,15220,15229-15230,15241,15245,15271,15284,15291,15293-15294,15296,15298-15299,15302,15307,15311,15315,15317-15322,15324-15355,15357-15365,15367,15369-15372,15374,15377,15387,15418,15420-15430,15433,15440,15442-15443,15450,15452,15456-15462,15465,15467-15470,15489-15492,15513,15532,15554,15556-15561,15563-15586,15588-15589,15591-15596,15599-15665,15667-15688,15690-15721,15723-15745,15747-15753,15755-15756,15760-15765,15774-15777,15781-15794,15796-15800,15802-15804,15806-15828,15830-15833,15835-15858,15863,15865-15875,15881-15884,15889,15892-15902,15908-15910,15912-15913,15915-15921,15923,15938 /branches/mule-3.x-xmpp:1-15727
Modified: branches/mule-3.x/transports/cxf/src/test/java/org/mule/transport/cxf/ProxyTestCase.java (15953 => 15954)--- branches/mule-3.x/transports/cxf/src/test/java/org/mule/transport/cxf/ProxyTestCase.java 2009-11-03 17:24:47 UTC (rev 15953) +++ branches/mule-3.x/transports/cxf/src/test/java/org/mule/transport/cxf/ProxyTestCase.java 2009-11-03 17:56:48 UTC (rev 15954) @@ -18,7 +18,6 @@ import org.mule.tck.functional.FunctionalTestComponent; import org.mule.transport.cxf.testmodels.AsyncService; import org.mule.transport.http.HttpConnector; -import org.mule.transport.http.HttpConstants; import org.mule.util.concurrent.Latch; import java.util.HashMap; @@ -29,17 +28,43 @@ public class ProxyTestCase extends FunctionalTestCase { String msg = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" - + "<soap:Body><test xmlns=\"http://foo\"> foo </test>" + "</soap:Body>" + "</soap:Envelope>"; + + "<soap:Body><test xmlns=\"http://foo\"> foo </test>" + "</soap:Body>" + "</soap:Envelope>"; - String msgWithComment = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><!-- This is a comment -->" - + "<soap:Body><!-- This is a comment --><test xmlns=\"http://foo\"> foo </test>" - + "</soap:Body>" + "</soap:Envelope>"; - + String doGoogleSearch = "<urn:doGoogleSearch xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:urn=\"urn:GoogleSearch\">"; + + String msgWithComment = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + + "<!-- comment 1 -->" + + "<soap:Header>" + + "<!-- comment 2 -->" + + "</soap:Header>" + + "<!-- comment 3 -->" + + "<soap:Body>" + + "<!-- comment 4 -->" + + doGoogleSearch + + "<!-- this comment breaks it -->" + + "<key>1</key>" + + "<!-- comment 5 -->" + + "<q>a</q>" + + "<start>0</start>" + + "<maxResults>1</maxResults>" + + "<filter>false</filter>" + + "<restrict>a</restrict>" + + "<safeSearch>true</safeSearch>" + + "<lr>a</lr>" + + "<ie>b</ie>" + + "<oe>c</oe>" + + "</urn:doGoogleSearch>" + + "<!-- comment 6 -->" + + "</soap:Body>" + + "<!-- comment 7 -->" + + "</soap:Envelope>"; + public void testServerWithEcho() throws Exception { MuleClient client = new MuleClient(); MuleMessage result = client.send("http://localhost:63081/services/Echo", msg, null); String resString = result.getPayloadAsString(); +// System.out.println(resString); assertTrue(resString.indexOf("<test xmlns=\"http://foo\"> foo </test>") != -1); } @@ -55,29 +80,6 @@ assertTrue(resString.indexOf("<test xmlns=\"http://foo\"") != -1); } - public void testProxyStreamClsoing() throws Exception - { - String msg = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" - + "<soap:Body> <test xmlns=\"http://foo\"></test>" + "</soap:Body>" + "</soap:Envelope>"; - - MuleClient client = new MuleClient(); - for (int i = 0; i < 20; i++) - { - MuleMessage result = client.send("http://localhost:63081/services/envelope-proxy", msg, null); - - String resString = result.getPayloadAsString(); - assertTrue(resString.indexOf("<test xmlns=\"http://foo\"") != -1); - } - - for (int i = 0; i < 20; i++) - { - MuleMessage result = client.send("http://localhost:63081/services/proxy", msg, null); - - String resString = result.getPayloadAsString(); - assertTrue(resString.indexOf("<test xmlns=\"http://foo\"") != -1); - } - } - public void testServerClientProxyWithWsdl() throws Exception { final Latch latch = new Latch(); @@ -134,37 +136,36 @@ assertTrue(resString.indexOf("<transformed xmlns=\"http://foo\">") != -1); } - public void testProxyWithDatabinding() throws Exception + public void testProxyWithDatabinding() throws Exception { String msg = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" - + "<soap:Body><greetMe xmlns=\"http://apache.org/hello_world_soap_http/types\"><requestType>Dan</requestType></greetMe>" - + "</soap:Body>" + "</soap:Envelope>"; + + "<soap:Body><greetMe xmlns=\"http://apache.org/hello_world_soap_http/types\"><requestType>Dan</requestType></greetMe>" + + "</soap:Body>" + "</soap:Envelope>"; MuleClient client = new MuleClient(); - MuleMessage result = client.send("http://localhost:63081/services/greeter-databinding-proxy", msg, - null); + MuleMessage result = client.send("http://localhost:63081/services/greeter-databinding-proxy", msg, null); String resString = result.getPayloadAsString(); assertTrue(resString.indexOf("greetMeResponse") != -1); } - public void testProxyWithFault() throws Exception + public void testProxyWithFault() throws Exception { String msg = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" - + "<soap:Body><invalid xmlns=\"http://apache.org/hello_world_soap_http/types\"><requestType>Dan</requestType></invalid>" - + "</soap:Body>" + "</soap:Envelope>"; + + "<soap:Body><invalid xmlns=\"http://apache.org/hello_world_soap_http/types\"><requestType>Dan</requestType></invalid>" + + "</soap:Body>" + "</soap:Envelope>"; MuleClient client = new MuleClient(); MuleMessage result = client.send("http://localhost:63081/services/greeter-proxy", msg, null); String resString = result.getPayloadAsString(); - + assertTrue(resString.indexOf("invalid was not recognized") != -1); } - public void testProxyWithIntermediateTransform() throws Exception + public void testProxyWithIntermediateTransform() throws Exception { String msg = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" - + "<soap:Body><greetMe xmlns=\"http://apache.org/hello_world_soap_http/types\"><requestType>Dan</requestType></greetMe>" - + "</soap:Body>" + "</soap:Envelope>"; + + "<soap:Body><greetMe xmlns=\"http://apache.org/hello_world_soap_http/types\"><requestType>Dan</requestType></greetMe>" + + "</soap:Body>" + "</soap:Envelope>"; MuleClient client = new MuleClient(); MuleMessage result = client.send("http://localhost:63081/services/transform-proxy", msg, null); @@ -172,17 +173,17 @@ assertTrue(resString.indexOf("greetMeResponse") != -1); } - public void testSoapActionRouting() throws Exception + public void testSoapActionRouting() throws Exception { String msg = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" - + "<soap:Body> <test xmlns=\"http://foo\"></test>" + "</soap:Body>" + "</soap:Envelope>"; + + "<soap:Body> <test xmlns=\"http://foo\"></test>" + "</soap:Body>" + "</soap:Envelope>"; Map<String, Object> httpHeaders = new HashMap<String, Object>(); - + Map<String, Object> props = new HashMap<String, Object>(); props.put(HttpConnector.HTTP_CUSTOM_HEADERS_MAP_PROPERTY, httpHeaders); props.put("SOAPAction", "http://acme.com/transform"); - + MuleClient client = new MuleClient(); MuleMessage result = client.send("http://localhost:63081/services/routeBasedOnSoapAction", msg, props); String resString = result.getPayloadAsString(); @@ -193,11 +194,9 @@ public void testOneWaySend() throws Exception { MuleClient client = new MuleClient(); - MuleMessage result = client.send("http://localhost:63081/services/routeBasedOnSoapAction", + MuleMessage result = client.send("http://localhost:63081/services/oneway", prepareOneWayTestMessage(), prepareOneWayTestProperties()); assertEquals("", result.getPayloadAsString()); - int status = result.getIntProperty(HttpConnector.HTTP_STATUS_PROPERTY, -1); - assertEquals(HttpConstants.SC_OK, status); AsyncService component = (AsyncService) getComponent("asyncService"); assertTrue(component.getLatch().await(10000, TimeUnit.MILLISECONDS)); @@ -205,35 +204,13 @@ public void testOneWayDispatch() throws Exception { - new MuleClient().dispatch("http://localhost:63081/services/routeBasedOnSoapAction", - prepareOneWayTestMessage(), prepareOneWayTestProperties()); + new MuleClient().dispatch("http://localhost:63081/services/oneway", prepareOneWayTestMessage(), + prepareOneWayTestProperties()); AsyncService component = (AsyncService) getComponent("asyncService"); assertTrue(component.getLatch().await(10000, TimeUnit.MILLISECONDS)); } - public void testOneWaySendAsyncEndpoint() throws Exception - { - MuleClient client = new MuleClient(); - MuleMessage result = client.send("http://localhost:63081/services/routeBasedOnSoapActionAsync", - prepareOneWayTestMessage(), prepareOneWayTestProperties()); - assertEquals("", result.getPayloadAsString()); - - AsyncService component = (AsyncService) getComponent("asyncService"); - assertTrue(component.getLatch().await(10000, TimeUnit.MILLISECONDS)); - int status = result.getIntProperty(HttpConnector.HTTP_STATUS_PROPERTY, -1); - assertEquals(HttpConstants.SC_OK, status); - } - - public void testOneWayDispatchAsyncEndpoint() throws Exception - { - new MuleClient().dispatch("http://localhost:63081/services/routeBasedOnSoapActionAsync", - prepareOneWayTestMessage(), prepareOneWayTestProperties()); - - AsyncService component = (AsyncService) getComponent("asyncService"); - assertTrue(component.getLatch().await(10000, TimeUnit.MILLISECONDS)); - } - /** * MULE-4549 ReversibleXMLStreamReader chokes on comments with ClassCastException * @throws Exception @@ -261,8 +238,8 @@ props.put(HttpConnector.HTTP_CUSTOM_HEADERS_MAP_PROPERTY, httpHeaders); props.put("SOAPAction", "http://acme.com/oneway"); return props; - } - + } + protected String getConfigResources() { return "proxy-conf.xml"; To unsubscribe from this list please visit: |
| Free embeddable forum powered by Nabble | Forum Help |