// assertEquals(new QName("http://helloworld", "HelloWorld"), wsdlServiceContract.getPortType().getQName());
}
public void testWSDLPortType() throws WSDLException, IOException, MissingResourceException,
InvalidServiceContractException {
RhinoScript rs = new RhinoScript("wsdlPortType",
"SCA = { wsdlPortType : 'HelloWorld', wsdlNamespace : 'http://helloworld',};", null,
getClass().getClassLoader());
RhinoSCAConfig scaConfig = new RhinoSCAConfig(rs.getScriptScope());
WSDLDefinitionRegistryImpl wsdlReg = new WSDLDefinitionRegistryImpl();
wsdlReg.setSchemaRegistry(new XMLSchemaRegistryImpl());
wsdlReg.setMonitor(NULL_MONITOR);
URL wsdlURL =
getClass().getClassLoader().getResource("org/apache/tuscany/container/javascript/rhino/helloworld.wsdl");
wsdlReg.loadDefinition("http://helloworld", wsdlURL);
JavaScriptIntrospector introspector =
new JavaScriptIntrospector(wsdlReg, new JavaInterfaceProcessorRegistryImpl());
ComponentType comonentType = introspector.introspectScript(scaConfig, rs.getClassLoader());
assertNotNull(comonentType);
Map services = comonentType.getServices();
assertEquals(1, services.size());
ServiceDefinition serviceDefinition = (ServiceDefinition) services.values().iterator().next();
ServiceContract serviceContract = serviceDefinition.getServiceContract();