最近在接tr069的东西。但是遇到一点问题,
使用的是netty
以下是心跳进来过后的流程
result="<SOAP-ENV:Envelope xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:cwmp=\"urn:dslforum-org:cwmp-1-0\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +
" <SOAP-ENV:Header>" +
" <cwmp:ID SOAP-ENV:mustUnderstand=\"1\">{0}</cwmp:ID>" +
" <cwmp:NoMoreRequests>0</cwmp:NoMoreRequests>" +
" </SOAP-ENV:Header>" +
" <SOAP-ENV:Body>" +
" <cwmp:InformResponse xmlns:cwmp=\"urn:dslforum-org:cwmp-1-0\"><MaxEnvelopes>1</MaxEnvelopes>" +
" </cwmp:InformResponse>" +
" </SOAP-ENV:Body>" +
"</SOAP-ENV:Envelope>";
//将会话ID替换了
String res = MessageFormat.format(result,sss);
FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, OK, Unpooled.wrappedBuffer(res.getBytes("UTF-8")));
response.headers().set(CONTENT_TYPE, "text/xml");
response.headers().set(CONTENT_LENGTH, response.content().readableBytes());
// 发送响应
ChannelFuture channelFuture = channelHandlerContext.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答
本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。
因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。