报错:“First Element must contain the local name, Envelope , but found definitions”;
原因:EndpointReference end = new EndpointReference(url) ,url错误;
源代码:
1 import org.apache.axiom.om.OMAbstractFactory; 2 import org.apache.axiom.om.OMElement; 3 import org.apache.axiom.om.OMFactory; 4 import org.apache.axiom.om.OMNamespace; 5 import org.apache.axis2.AxisFault; 6 import org.apache.axis2.addressing.EndpointReference; 7 import org.apache.axis2.client.Options; 8 import org.apache.axis2.client.ServiceClient; 9 10 public class Test { 11 public static void main(String[] args) throws AxisFault { 12 OMElement element = test("22","444","123"); 13 System.out.println(element.getText()); 14 } 15 16 private static OMElement test(String contractNo, String contractName, String auditMoney) thro