操作失败,没有该服务权限![ 机构号:99 ,用户ID:50000009 ,服务号:0101030112 ]
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了操作失败,没有该服务权限![ 机构号:99 ,用户ID:50000009 ,服务号:0101030112 ]相关的知识,希望对你有一定的参考价值。
操作失败,没有该服务权限![ 机构号:99 ,用户ID:50000009 ,服务号:0101030112 ]
此时我们可以把代码 SERVICE_NO 改成 10个0 即 0000000000 ,就可以进行权限查看.
然后把response响应大对象打印出来看看,就知道连到哪里去了
package com.isoftstone.common; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import com.isoftstone.core.common.tools.XmlTool; import com.isoftstone.core.dto.RequestBusinessObject; import com.isoftstone.core.dto.ResponseBusinessObject; import com.isoftstone.fwk.dao.DaoException; import com.isoftstone.fwk.util.SpringUtils; import com.isoftstone.httpclient.ESBClient; import com.isoftstone.platform.constants.PltmConstants; import com.isoftstone.platform.service.PltmPacketService; import com.isoftstone.platform.vo.PltmPacketVO; public class JavaCTool {//需要晓飞最新esb.jar支持 /** 创建一个logger对象 **/ private static Logger logger = Logger.getLogger(JavaCTool.class); /** * 在进行特殊判断以后 , 调用javac保存与平台通信报文 * 当前特殊判断只针对投保查询检验是不进行核心同步保存的,而是返回false * @param recvOutMap * @param pltmPacketVO * @param sendOutMap * @return */ public static boolean callJavaCAfterJudgement(Map<String, List<Map<String, Object>>> recvOutMap ,PltmPacketVO pltmPacketVO,Map sendOutMap){ // boolean flag = true; // if(sendOutMap != null){//此处的判断主是要因为 投保查询检验时,核心不需要第一次平台返回的提问报文,只需要第二次和平台通信的报文即可.所以如果是查询检验问题,那么return false,从而不发送报文给核心 // List list = (List) sendOutMap.get("CHECKCODE"); // if(list != null && list.size() > 0){//判断投保查询校验list是否存在 // Map innerMap = (Map) list.get(0); // String renewalFlag = (String) innerMap.get("RENEWAL_FLAG") ; // if( renewalFlag != null ){ // if( "1".equals( renewalFlag ) ){ // flag = false ; // } // } // } // } // if(flag == true){ return callJavaC(recvOutMap,pltmPacketVO,sendOutMap); // }else{ // return false; // } } /* * @param recvOutMap 接收外围map * @param pltmPacketVo 本系统返回的大日志对象,包含接收外围,上平台,平台返回,发送外围,成功失败等内容. * @param sendOutMap 发送给外围map */ public static boolean callJavaC(Map<String, List<Map<String, Object>>> recvOutMap ,PltmPacketVO pltmPacketVO,Map sendOutMap){ PltmPacketService pltmPacketService = (PltmPacketService) SpringUtils.getSpringBean("pltmPacketService"); ResponseBusinessObject responseBO = null; Map<String, List<Map<String, Object>>> sendV5Map = new HashMap<String, List<Map<String, Object>>>();//发送V5的通信 map try { List<Map<String, Object>> recvOutBaseList = recvOutMap.get("BASE"); List<Map<String, Object>> recvOutVhlList = recvOutMap.get("VHL"); if( (recvOutVhlList == null)||(recvOutVhlList.size()== 0) ) return false; String dptcde = (String) recvOutBaseList.get(0).get("DPT_CDE");//8位出单机构 List headList = (List) sendOutMap.get("HEAD");//ERROR_CODE start if( (headList == null)||(headList.size()== 0) ) return false; Map headMap = (Map)headList.get(0); List vhlList = (List) sendOutMap.get("VHL");//QUERY_SEQUENCE_NO start if( (vhlList == null)||(vhlList.size()== 0) ) return false; Map vhlmap = (Map)vhlList.get(0); Map<String, Object> recvOutVhlMap = recvOutVhlList.get(0); //错误码如果是0000表示平台通信完全正常,此时才继续往下走和v5通信 if("0000".equals(headMap.get("ERROR_CODE")) &&PltmConstants.FOUR.equals(pltmPacketVO.getCSucMrk()) && PltmConstants.V5FAIL_MRK.equals(pltmPacketVO.getCSendV5Mrk()) ){ //如果和平台交互标志为4 //准备javaC通信,将数据填充到sendV5Map List<Map<String, Object>> baseList = new ArrayList<Map<String, Object>>();//1 Map<String,Object> baseMap = new HashMap<String,Object>(); String cQueryCde = (String)vhlmap.get("QUERY_CDE"); String cCarMark = (String)recvOutVhlMap.get("CAR_MARK"); String cEngineNo = (String)recvOutVhlMap.get("ENGINE_NO"); String cRackNo = (String)recvOutVhlMap.get("RACK_NO"); baseMap.put("DPT_CDE",dptcde);//DPT_CDE end baseMap.put("CAR_MARK",cCarMark);//CAR_MARK end baseMap.put("ENGINE_NO",cEngineNo);//ENGINE_NO end baseMap.put("RACK_NO",cRackNo);//RACK_NO end baseMap.put("QUERY_SEQUENCE_NO",cQueryCde);//QUERY_SEQUENCE_NO end baseMap.put("REQUESTXML", pltmPacketVO.getCSendPltm().replace("</", "$($").replace("/>", "$)$").replace("<", "#(#").replace(">", "#)#")); baseMap.put("RESPONSEXML", pltmPacketVO.getCRecvPltm().replace("</", "$($").replace("/>", "$)$").replace("<", "#(#").replace(">", "#)#")); baseList.add(baseMap); sendV5Map.put("BASE",baseList); //填充完毕 //开始调用javaC通信,v5通信成功后 logger.info("同步查询码为 "+cQueryCde+" 的[请求与返回]报文给核心,开始"); SaveQueryInfoService(recvOutMap,sendV5Map);//2 logger.info("同步查询码为 "+cQueryCde+" 的[请求与返回]报文给核心,结束"); //v5通信成功后,置通信成功标志 pltmPacketService.updateSendV5Mrk(pltmPacketVO.getCPkId(),PltmConstants.V5SUCC_MRK);//3 logger.info("把 查询码为 "+cQueryCde+" 的与核心通信成功标志修改为1"); }else{ return false; } }catch (NullPointerException npE) {//1 logger.warn("[生成V5交互报文失败] : "+npE); return false; } catch (DaoException daoE) {//3 logger.warn("[更新日志失败]:"+daoE); return false; }catch (Exception e) {//2 logger.error(e.getMessage()); logger.error("与核心数据同步失败,可能原因:超时"); return false; } return true; } /* * @author * @param recvOutMap 用于提取部分Head信息到sendV5Map中云 * @param sendV5Map 缺少Head信息的map,在设置完Head之后,转成requestBO,用于和V5进行通信 */ public static ResponseBusinessObject SaveQueryInfoService(Map<String, List<Map<String, Object>>> recvOutMap ,Map sendV5Map )throws Exception{ ESBClient esbClient = new ESBClient(); List list = new ArrayList(); Map head = new HashMap(); head.put("REQUEST_TYPE", ""); head.put("SYSNAME", "platproxy"); head.put("SYSCODE", "02"); head.put("USERCDE", "100009999"); head.put("DPTCDE", recvOutMap.get("HEAD").get(0).get("DPTCDE")); head.put("TYPE", "Q"); head.put("DATA", "A"); head.put("SERVICE_NO","0000000000"); head.put("SERVICENAME","SaveQueryInfo"); head.put("USERID", "50000009"); list.add(head); sendV5Map.put("HEAD", list); //esb设置连接超时 ESBClient client = new ESBClient(30*1000,30*1000,30*1000); RequestBusinessObject requestBO = null; ResponseBusinessObject responseObject = null; try { requestBO = XmlTool.getFromCoreMap(sendV5Map); // String s = XmlTool.convertToXml(requestBO); responseObject = client.invoke(requestBO); String s = XmlTool.convertToXml(responseObject); System.out.println("核心返回信息________________+:\n"+s); } catch (Exception e) { throw e; } return responseObject; } // }
以上是关于操作失败,没有该服务权限![ 机构号:99 ,用户ID:50000009 ,服务号:0101030112 ]的主要内容,如果未能解决你的问题,请参考以下文章
解决linux用户切换失败 su:execute /usr/bin 没有权限