| 1 |
/** |
| 2 |
* CPWSImplServiceTestCase.java |
| 3 |
* |
| 4 |
* This file was auto-generated from WSDL |
| 5 |
* by the Apache Axis 1.2alpha Dec 09, 2003 (01:27:53 EST) WSDL2Java emitter. |
| 6 |
*/ |
| 7 |
|
| 8 |
package test.wsdl.xsd; |
| 9 |
|
| 10 |
import junit.framework.TestCase; |
| 11 |
import org.apache.axis.Constants; |
| 12 |
import org.apache.axis.wsdl.gen.Parser; |
| 13 |
import org.apache.axis.wsdl.symbolTable.DefinedType; |
| 14 |
import org.apache.axis.wsdl.symbolTable.ElementDecl; |
| 15 |
import org.apache.axis.wsdl.symbolTable.SchemaUtils; |
| 16 |
import org.apache.axis.wsdl.symbolTable.SymbolTable; |
| 17 |
|
| 18 |
import javax.xml.namespace.QName; |
| 19 |
import java.util.Vector; |
| 20 |
|
| 21 |
public class CPWSImplServiceTestCase extends TestCase { |
| 22 |
public CPWSImplServiceTestCase(java.lang.String name) { |
| 23 |
super(name); |
| 24 |
} |
| 25 |
|
| 26 |
/** Test case for Bug 25161 |
| 27 |
Axis 1.2 alpha WSDL xsd types problem prevent .Net integration */ |
| 28 |
public void testCPWebServicesWSDL() throws Exception { |
| 29 |
String url = new test.wsdl.xsd.CPWSImplServiceLocator().getCPWebServicesAddress(); |
| 30 |
Parser wsdlParser = new Parser(); |
| 31 |
System.out.println("Reading WSDL document from '" + url + "?WSDL'"); |
| 32 |
wsdlParser.run(url + "?WSDL"); |
| 33 |
SymbolTable symbolTable = wsdlParser.getSymbolTable(); |
| 34 |
Vector v = symbolTable.getSymbols(new QName("http://datatypes.cs.amdocs.com", "CSText")); |
| 35 |
DefinedType type = (DefinedType) v.get(0); |
| 36 |
assertNotNull(type); |
| 37 |
Vector v2 = SchemaUtils.getContainedElementDeclarations( |
| 38 |
type.getNode(), symbolTable); |
| 39 |
ElementDecl element = (ElementDecl) v2.get(0); |
| 40 |
assertNotNull(element); |
| 41 |
assertEquals(Constants.XSD_STRING, element.getType().getQName()); |
| 42 |
} |
| 43 |
} |