发送报文到平台

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/YimBa/article/details/82837265
package com.jettech.webservice;

import org.apache.axis.client.Service;

import javax.xml.namespace.QName;

import org.apache.axis.client.Call;

import org.apache.axis2.AxisFault;

public class SendMessageServer {
	/**
	 * 发送报文到平台
	 * @param requestXml
	 * @throws Exception 
	 */
	public String sendMessageRPC(String requestXml) throws Exception{
		String returnStr ="";
		//请求IP地址
//		String baseUrl = SysConfig.getProperty("ELECTRICINVOICEPLAT_URL");
		String baseUrl = "//http://111.202.226.74:8080/LXKP_TB/services/WKWebService";
		try {

           //以下都是套路 
            Service service = new Service();

            Call call = (Call) service.createCall();

            call.setTargetEndpointAddress(baseUrl);
            

            call.setOperationName("doService");//WSDL里面描述的接口名称

            call.addParameter("requestXml", org.apache.axis.encoding.XMLType.XSD_STRING,
            		
            		javax.xml.rpc.ParameterMode.IN);//接口的参数

            call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);//设置返回类型  

			QName opAddEntry = new QName("http://impl.service.tax.inspur",
					"doService");
			
	        call.setOperationName(opAddEntry);  
	        call.setUseSOAPAction(true);  
	        call.setTimeout(1*60*1000);
	        
			returnStr = (String)call.invoke(new Object[]{requestXml});
		} catch (AxisFault e) {
			e.printStackTrace();
			throw e;
		}  catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
		return returnStr;
	}
	
}

所需jar包在这里:https://download.csdn.net/download/yimba/10685641

展开阅读全文

外围平台通过socket往我系统送报失败

10-17

1、日间外围平台有个交易需要通过走socket,通过报文形式往我平台发送信息,以前这部分交易是正常的。rn现根据业务需要,把我平台的18服务器迁移到了145机器上,导致外围平台的报文无法发送到我平台,导致交易失败。rn后通过抓包工具在我平台作了监测:rntcpdump tcp port 10003 --抓取10003的包rnnetstat -anc | grep 10003 --检测10003的端口状态变化rn看了一下抓取的包,期间只有一个Flags [P.]状态的包,而大部分都是Flags [.]、Flags [.],rn初步断定是TCP/IP三次握手协议并没有建立起来,导致我平台并不能接收到外围平台的报文,且我平台日志信息也没有记录到关于该交易的错误信息。rn且10003的端口在交易发起时,一直保持状态SYN_RECV的状态。rn求各位大神根据我提供的抓取包的信息,帮我判断一下是什么原因导致这个报文没有发送成功?以及应该从什么方面入手进行排查?以及有什么好的命令可以帮助进行排查。谢谢rnrntcpdump tcp port 10003rn20:52:16.636743 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [S], seq 3488142888, win 14600, options [mss 1460,sackOK,TS val 4094561406 ecr 0,nop,wscale 7], length 0rn20:52:16.636772 IP cmis1.bocd.com.cn.documentum_s > in-channel.bocd.com.cn.31131: Flags [S.], seq 4286161207, ack 3488142889, win 14480, options [mss 1460,sackOK,TS val 525283554 ecr 4094561406,nop,wscale 7], length 0rn20:52:16.637086 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], ack 1, win 115, options [nop,nop,TS val 4094561407 ecr 525283554], length 0rn20:52:16.637280 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094561407 ecr 525283554], length 1448rn20:52:16.637394 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [P.], seq 1449:2746, ack 1, win 115, options [nop,nop,TS val 4094561407 ecr 525283554], length 1297rn20:52:16.837832 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094561608 ecr 525283554], length 1448rn20:52:17.239826 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094562010 ecr 525283554], length 1448rn20:52:17.636491 IP cmis1.bocd.com.cn.documentum_s > in-channel.bocd.com.cn.31131: Flags [S.], seq 4286161207, ack 3488142889, win 14480, options [mss 1460,sackOK,TS val 525284554 ecr 4094562010,nop,wscale 7], length 0rn20:52:17.636752 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], ack 1, win 115, options [nop,nop,TS val 4094562407 ecr 525284554,nop,nop,sack 1 0:1], length 0rn20:52:18.043843 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094562814 ecr 525284554], length 1448rn20:52:19.636493 IP cmis1.bocd.com.cn.documentum_s > in-channel.bocd.com.cn.31131: Flags [S.], seq 4286161207, ack 3488142889, win 14480, options [mss 1460,sackOK,TS val 525286554 ecr 4094562814,nop,wscale 7], length 0rn20:52:19.636673 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], ack 1, win 115, options [nop,nop,TS val 4094564407 ecr 525286554,nop,nop,sack 1 0:1], length 0rn20:52:19.651788 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094564422 ecr 525286554], length 1448rn20:52:22.867727 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094567638 ecr 525286554], length 1448rn20:52:24.036691 IP cmis1.bocd.com.cn.documentum_s > in-channel.bocd.com.cn.31131: Flags [S.], seq 4286161207, ack 3488142889, win 14480, options [mss 1460,sackOK,TS val 525290954 ecr 4094567638,nop,wscale 7], length 0rn20:52:24.036935 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], ack 1, win 115, options [nop,nop,TS val 4094568807 ecr 525290954,nop,nop,sack 1 0:1], length 0rn20:52:29.299574 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094574070 ecr 525290954], length 1448rn20:52:32.036489 IP cmis1.bocd.com.cn.documentum_s > in-channel.bocd.com.cn.31131: Flags [S.], seq 4286161207, ack 3488142889, win 14480, options [mss 1460,sackOK,TS val 525298954 ecr 4094574070,nop,wscale 7], length 0rn20:52:32.036706 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], ack 1, win 115, options [nop,nop,TS val 4094576807 ecr 525298954,nop,nop,sack 1 0:1], length 0rn20:52:42.163247 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094586934 ecr 525298954], length 1448rn20:52:48.036495 IP cmis1.bocd.com.cn.documentum_s > in-channel.bocd.com.cn.31131: Flags [S.], seq 4286161207, ack 3488142889, win 14480, options [mss 1460,sackOK,TS val 525314954 ecr 4094586934,nop,wscale 7], length 0rn20:52:48.036799 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], ack 1, win 115, options [nop,nop,TS val 4094592807 ecr 525314954,nop,nop,sack 1 0:1], length 0rn20:53:07.890641 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [.], seq 1:1449, ack 1, win 115, options [nop,nop,TS val 4094612662 ecr 525314954], length 1448rn20:53:16.696267 IP in-channel.bocd.com.cn.31131 > cmis1.bocd.com.cn.documentum_s: Flags [F.], seq 2746, ack 1, win 115, options [nop,nop,TS val 4094621468 ecr 525314954], length 0rnrnrnrnnetstat -anc | grep 10003rnrntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 111.111.240.145:10003 111.111.240.220:31572 SYN_RECV rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 :::10003 :::* LISTEN rntcp 0 0 :::10003 :::* LISTEN rnrnrnrnrn 论坛

没有更多推荐了,返回首页