WSDLParser { public QName getOperationQname(String operationName) throws UnknownOperationException { if ("rpc".equals(parser.getOperationStyle(null, operationName))) { QName rpcMethodName = parser.getRPCRequestMethodName(null, operationName); if (rpcMethodName == null) { parser.getRPCResponseMethodName(null, operationName); } return rpcMethodName; } LinkedHashMap<String, XmlSchemaObject> parameters = parser.getInputParameters(null, operationName); if (parameters.size() > 0) { XmlSchemaObject xmlSchemaObject = parameters.values().iterator().next(); if (xmlSchemaObject instanceof XmlSchemaElement) { XmlSchemaElement element = (XmlSchemaElement)xmlSchemaObject; return element.getQName(); } } return null; } WSDLParser(String wsdlLocation); List<QName> getServices(); List<String> getPorts(QName serviceName); List<String> getOperations(String portName); List<String> getOperations(); boolean isWsrfService(); synchronized static void flushCache(String wsdlLocation); String getWSDLLocation(); String getOperationEndpointLocation(String portName); List<String> getOperationEndpointLocations(String operationName); @Deprecated String getStyle(); String getStyle(String operationName); List<TypeDescriptor> getOperationInputParameters(String operationName); List<TypeDescriptor> getOperationOutputParameters(
            String operationName); String getOperationNamespaceURI(String operationName); QName getOperationQname(String operationName); String getUse(String operationName); String getSOAPActionURI(String operationName); String getOperationDocumentation(String operationName); WSRF_Version isWSRFPort(String portName);  }
@Test public void testGetOperationElementQName() throws Exception { WSDLParser parser = new WSDLParser(wsdlResourcePath("eutils/eutils_lite.wsdl")); QName operationQName = parser.getOperationQname("run_eInfo"); assertEquals("element name is wrong", "eInfoRequest", operationQName .getLocalPart()); assertEquals("operation namespace is wrong", "http: .getNamespaceURI()); }
@Test public void testGetOperationElementQName2() throws Exception { URL tav744Url = getResource("TAV-744/InstrumentService__.wsdl"); WSDLParser parser = new WSDLParser(tav744Url.toExternalForm()); QName operationQName = parser.getOperationQname("getList"); assertEquals("operation element name is wrong", "GetListRequest", operationQName.getLocalPart()); assertEquals("operation namespace is wrong", "http: operationQName.getNamespaceURI()); }