1 17 package org.apache.servicemix.itests; 18 19 import java.io.StringWriter ; 20 21 import javax.wsdl.Definition; 22 import javax.wsdl.factory.WSDLFactory; 23 24 import org.apache.servicemix.tck.SpringTestSupport; 25 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext; 26 import org.springframework.context.support.AbstractXmlApplicationContext; 27 28 public class Jsr181HttpTest extends SpringTestSupport { 29 30 protected AbstractXmlApplicationContext createBeanFactory() { 31 return new ClassPathXmlApplicationContext("org/apache/servicemix/itests/jsr181http.xml"); 32 } 33 34 public void test() throws Exception { 35 WSDLFactory wsdlFactory = WSDLFactory.newInstance(); 36 Definition def = wsdlFactory.newWSDLReader().readWSDL("http://localhost:8194/Service/?wsdl"); 37 StringWriter writer = new StringWriter (); 38 wsdlFactory.newWSDLWriter().writeWSDL(def, writer); 39 System.err.println(writer.toString()); 40 } 41 42 } 43 | Popular Tags |