//生成调用Webservice方法的SOAP请求信息。该信息由SoapSerializationEnvelope对象描述 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.headerOut = new Element[1]; envelope.headerOut[0] = buildAuthHeader();
......
public static Element buildAuthHeader(){ Element hElement = new Element().createElement(Constants.NAMESPACE, "AuthHead"); Element passwordElement = new Element().createElement(Constants.NAMESPACE, "loginInfo"); passwordElement.setName("loginInfo");