axis2 aar服务端 调用端 生成map案例,改善字符串特殊字符会转义的情况

本文展示了如何在Axis2 AAR服务端定义方法,并在客户端进行调用,以避免字符串中的特殊字符被自动转义的问题。通过具体的调用案例,说明了正确传递包含特殊字符的Map参数的方法。
摘要由CSDN通过智能技术生成

服务端方法:

public static   Map<String, String>    GETDATA(String xml)
    {
		Map<String, String> ret_map = new HashMap<String, String>();
		
        

		ret_map.put("result", ""+result);
		ret_map.put("restr", restr);
		return ret_map;
    } 

 客户端调用案例:

  private static void axis2WebService() {  
        try {  
        	
        	
        	  
   
   		   
   		  String xml="";
   		try {
   			xml = "<root></root>";
   		} catch (Exception e) {
   			// TODO Auto-generated catch block
   			e.printStackTrace();
   		}
            String soapBindingAddress = "http://localhost:8080/axis2/services/Service?wsdl";  
            ServiceClient sender = new ServiceClient();  
            EndpointReference endpointReference = new EndpointReference(soapBindingAddress);  
            Options 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值