wsdl4j我用过:
public void read(String strWsdl) throws Exception {
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
reader.setFeature("javax.wsdl.verbose", false); //$NON-NLS-1$
reader.setFeature("javax.wsdl.importDocuments", true); //$NON-NLS-1$
Document doc = XMLUtil.getDocument( strWsdl, "UTF-8"); mDefinition = reader.readWSDL(null, doc);
}
public void read(String strWsdl) throws Exception {
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
reader.setFeature("javax.wsdl.verbose", false); //$NON-NLS-1$
reader.setFeature("javax.wsdl.importDocuments", true); //$NON-NLS-1$
Document doc = XMLUtil.getDocument( strWsdl, "UTF-8"); mDefinition = reader.readWSDL(null, doc);
}
这样是不完全的,还得借助别的一些包才能解析ComplexType,比如说Castor这个工具