ExtensionPointRegistry registry = new DefaultExtensionPointRegistry();
org.apache.tuscany.sca.core.FactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint(registry);
WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
JavaInterfaceFactory factory = new DefaultJavaInterfaceFactory(registry);
JavaInterfaceContract javaIC = factory.createJavaInterfaceContract();
JavaInterface iface = factory.createJavaInterface(HelloWorld.class);
DefaultDataBindingExtensionPoint dataBindings = new DefaultDataBindingExtensionPoint(registry);
JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null);
new JAXWSJavaInterfaceProcessor(registry).visitInterface(iface);
new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface);
javaIC.setInterface(iface);
WSDLInterfaceContract wsdlIC = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
assertNotNull(wsdlIC);
WSDLInterface wsdlInterface = (WSDLInterface)wsdlIC.getInterface();
assertNotNull(wsdlInterface);
assertEquals(1, wsdlInterface.getOperations().size());
assertEquals("sayHello", wsdlInterface.getOperations().get(0).getName());
assertNotNull(wsdlInterface.getPortType());
JavaInterfaceContract javaIC2 = factory.createJavaInterfaceContract();
JavaInterface iface2 = factory.createJavaInterface(TestJavaInterface.class);
new JAXWSJavaInterfaceProcessor(registry).visitInterface(iface2);
new DataBindingJavaInterfaceProcessor(registry).visitInterface(iface2);
javaIC2.setInterface(iface2);
WSDLInterfaceContract wsdlIC2 = BindingWSDLGenerator.createWSDLInterfaceContract(javaIC2, false, new XSDModelResolver(null, null), dataBindings, wsdlFactory, xsdFactory, documentBuilderFactory, null);
assertNotNull(wsdlIC2);