1 16 17 package org.apache.wsdl; 18 19 import org.apache.axis2.wsdl.builder.WOMBuilderFactory; 20 21 import javax.xml.namespace.QName ; 22 import java.io.FileInputStream ; 23 import java.io.InputStream ; 24 25 29 public class BindingOperationTest extends AbstractTestCase { 30 31 public BindingOperationTest(String arg) { 32 super(arg); 33 } 34 35 40 public void testBindingOperation() throws Exception { 41 WSDLDescription womDescription; 42 43 InputStream in = new FileInputStream ( 44 getTestResourceFile("BookQuote.wsdl")); 45 womDescription = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11) 46 .build(in).getDescription(); 47 48 assertNotNull(womDescription); 49 if(null !=womDescription){ 50 String ns = "http://www.Monson-Haefel.com/jwsbook/BookQuote"; 51 WSDLBinding binding = womDescription.getBinding(new QName (ns,"BookQuoteBinding")); 52 WSDLBindingOperation bindingOperation = binding.getBindingOperation(new QName (ns, "getBookPrice")); 53 assertNotNull(bindingOperation.getInput()); 54 assertNull(bindingOperation.getOutput()); 55 } 56 57 } 58 } | Popular Tags |