WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
WSDLDefinitions wsdlDefinitions = factory.parse(wsdlFile.toURL());
WSDLInterface wsdlInterface = wsdlDefinitions.getInterface(new QName(wsdlDefinitions.getTargetNamespace(), "JaxRpcTestService"));
// check if the schema has been extracted
WSDLTypes wsdlTypes = wsdlDefinitions.getWsdlTypes();
assertNotNull(WSDLUtils.getSchemaModel(wsdlTypes));
// check the echoString operation
WSDLInterfaceOperation wsdlOperation = wsdlInterface.getOperation("echoString");
assertEquals(Constants.URI_STYLE_DOCUMENT, wsdlOperation.getStyle());
WSDLInterfaceOperationInput wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoString"));
assertEquals(new QName(TARGET_NAMESPACE, "echoString"), wsdlInput.getXMLType());
WSDLInterfaceOperationOutput wsdlOutput = wsdlOperation.getOutput(new QName(TARGET_NAMESPACE, "echoStringResponse"));
assertEquals(new QName(TARGET_NAMESPACE, "echoStringResponse"), wsdlOutput.getXMLType());
// check the echoSimpleUserType operation
wsdlOperation = wsdlInterface.getOperation("echoSimpleUserType");
assertEquals(Constants.URI_STYLE_DOCUMENT, wsdlOperation.getStyle());
wsdlInput = wsdlOperation.getInput(new QName(TARGET_NAMESPACE, "echoSimpleUserType"));
assertEquals(new QName(TARGET_NAMESPACE, "echoSimpleUserType"), wsdlInput.getXMLType());
wsdlOutput = wsdlOperation.getOutput(new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse"));
assertEquals(new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse"), wsdlOutput.getXMLType());
QName xmlName = new QName(TARGET_NAMESPACE, "echoString");
QName xmlType = new QName(TARGET_NAMESPACE, "echoString");
assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));
xmlName = new QName(TARGET_NAMESPACE, "echoStringResponse");
xmlType = new QName(TARGET_NAMESPACE, "echoStringResponse");
assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));
xmlName = new QName(TARGET_NAMESPACE, "echoSimpleUserType");
xmlType = new QName(TARGET_NAMESPACE, "echoSimpleUserType");
assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));
xmlName = new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse");
xmlType = new QName(TARGET_NAMESPACE, "echoSimpleUserTypeResponse");
assertEquals(xmlType, wsdlTypes.getXMLType(xmlName));
}