1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
/**
* CityBBBTestCase.java
*
* This file was auto-generated from WSDL
* by the Apache Axis Wsdl2java emitter.
*/
package test.wsdl.wrapped;
public class City_BBBTestCase extends junit.framework.TestCase {
public City_BBBTestCase(String name) {
super(name);
}
public void testCity_BBBPortWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
java.net.URL url = new java.net.URL(new test.wsdl.wrapped.City_BBBLocator().getCity_BBBPortAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.wrapped.City_BBBLocator().getServiceName());
assertTrue(service != null);
}
public void test1CityBBBPortGetAttraction() throws Exception {
City_BBBPortType binding;
binding = new City_BBBLocator().getCity_BBBPort();
assertTrue("binding is null", binding != null);
Attraction value = binding.getAttraction("Christmas");
assertEquals("OID value was wrong", value.get_OID(),
City_BBBBindingImpl.OID_STRING);
}
public void test2CityBBBPortGetAttractions() throws Exception {
City_BBBPortType binding;
try {
binding = new City_BBBLocator().getCity_BBBPort();
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertTrue("binding is null", binding != null);
// Invoke getAttractions with two inputs
String[] attName = new String[] {"Christmas", "Xmas"};
Attraction[] value = binding.getAttractions(attName);
assertEquals("OID value was wrong for first attraction", value[0].get_OID(),
City_BBBBindingImpl.OID_STRING);
assertEquals("OID value was wrong for second attaction", value[1].get_OID(),
City_BBBBindingImpl.OID_STRING);
}
public void test3CityBBBPortGetAttractions() throws Exception {
City_BBBPortType binding;
try {
binding = new City_BBBLocator().getCity_BBBPort();
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertTrue("binding is null", binding != null);
// Invoke getAttractions with one input
String[] attName = new String[] {"Christmas"};
Attraction[] value = binding.getAttractions(attName);
assertEquals("OID value was wrong for first attraction", value[0].get_OID(),
City_BBBBindingImpl.OID_STRING);
}
public void test4CityBBBPortGetAttractions() throws Exception {
City_BBBPortType binding;
try {
binding = new City_BBBLocator().getCity_BBBPort();
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertTrue("binding is null", binding != null);
// Invoke getAttractions with one input
String[] attName = new String[] {"Christmas", null};
Attraction[] value = binding.getAttractions(attName);
assertEquals("Expected returned Attraction length of 2", value.length, 2);
assertEquals("OID value was wrong for first attraction", value[0].get_OID(),
City_BBBBindingImpl.OID_STRING);
assertEquals("Attracton[1] should be null", value[1], null);
}
public void test5CityBBBPortGetAttractions() throws Exception {
City_BBBPortType binding;
try {
binding = new City_BBBLocator().getCity_BBBPort();
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertTrue("binding is null", binding != null);
// Invoke getAttractions with one input
String[] attName = new String[] {"Christmas", ""};
Attraction[] value = binding.getAttractions(attName);
assertEquals("Expected returned Attraction length of 2", value.length, 2);
assertEquals("OID value was wrong for first attraction", value[0].get_OID(),
City_BBBBindingImpl.OID_STRING);
assertEquals("Attracton[1] should be null", value[1], null);
}
public void test6CityBBBPortGetAttractions() throws Exception {
City_BBBPortType binding;
try {
binding = new City_BBBLocator().getCity_BBBPort();
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertTrue("binding is null", binding != null);
// Invoke getAttractions2 with two inputs
Query[] query = new Query[2];
query[0] = new Query();
query[0].setValue("Christmas");
query[1] = new Query();
query[1].setValue("Xmas");
Attraction[] value = binding.getAttractions2(query);
assertEquals("OID value was wrong for first attraction", value[0].get_OID(),
City_BBBBindingImpl.OID_STRING);
assertEquals("OID value was wrong for second attaction", value[1].get_OID(),
City_BBBBindingImpl.OID_STRING);
}
public void test7CityBBBPortGetAttractions() throws Exception {
City_BBBPortType binding;
try {
binding = new City_BBBLocator().getCity_BBBPort();
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}
assertTrue("binding is null", binding != null);
// Invoke getAttractions2 with one input
Query[] query = new Query[1];
query[0] = new Query();
query[0].setValue("Christmas");
Attraction[] value = binding.getAttractions2(query);
assertEquals("OID value was wrong for first attraction", value[0].get_OID(),
City_BBBBindingImpl.OID_STRING);
}
}
|