public void testWSDLPortType() throws WSDLException,
IOException,
MissingResourceException,
InvalidServiceContractException {
RubyScript rs = new RubyScript("wsdlPortType",
"$SCA = { 'wsdlPortType' => 'HelloWorld', 'wsdlNamespace' => 'http://helloworld'}",
null,
getClass().getClassLoader());
RubySCAConfig scaConfig = new RubySCAConfig(rs.getRubyEngine().getGlobalVariables());
WSDLDefinitionRegistryImpl wsdlReg = new WSDLDefinitionRegistryImpl();
wsdlReg.setMonitor(NULL_MONITOR);
URL wsdlURL = getClass().getClassLoader()
.getResource("org/apache/tuscany/container/ruby/jruby/helloworld.wsdl");
wsdlReg.loadDefinition("http://helloworld",
wsdlURL);
RubyIntrospector introspector = new RubyIntrospector(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()