愤怒的小鸟

axis Header 中添加用户名密码

Call call = (Call) service.createCall();
SOAPHeaderElement cpHeader = new SOAPHeaderElement("http://tempuri.org/", "NewValidateSoapHeader");
			cpHeader.setPrefix("cp");
			cpHeader.setMustUnderstand(true);
			 SOAPElement ele = cpHeader.addChildElement("UserName");  
		        ele.addTextNode("");  
		        ele = cpHeader.addChildElement("PassWord");  
		        ele.addTextNode("");  
		    call.addHeader(cpHeader);

  

posted @ 2015-06-23 16:34  靳龙  阅读(1003)  评论(0编辑  收藏  举报