当前位置: 首页 > news >正文

网站制作怎么做框架怎么请专业拓客团队

网站制作怎么做框架,怎么请专业拓客团队,网站优化外包公司,赤峰市建设网站最近帮同事处理了一个中信银行银企直连接口的一个问题,同事反馈,使用STRANS转换XML后,encoding始终是’utf-16’,就算指定了GBK也不行。尝试了很多办法始终不行,发到银行的数据中,中文始终是乱码。 Debug使用HTML视图…

最近帮同事处理了一个中信银行银企直连接口的一个问题,同事反馈,使用STRANS转换XML后,encoding始终是’utf-16’,就算指定了GBK也不行。尝试了很多办法始终不行,发到银行的数据中,中文始终是乱码。
在这里插入图片描述
Debug使用HTML视图看报文时也可以看到中文是乱码。
在这里插入图片描述

在这里插入图片描述

解决方案:

使用cl_sxml_string_writer=>create创建一个GBK编码的对象 ,用来做为STRANS的结果,最重要的是直接发转了编码后的XSTRING过去,不要 转STRING。因为我们的程序是UNICODE的,只要转成STRING,中文就会变成乱码。
返回的结果也一样,看下XSTRING,可以正常显示,如果直接转成STRING就也会变乱码。
在这里插入图片描述

主要代码:

DATA: lv_url     TYPE string.DATA: lo_xml TYPE REF TO cl_sxml_string_writer.
DATA: x_xml TYPE xstring.
DATA: jsonstr TYPE  string.
DATA:  xmlstr TYPE string.lo_xml = cl_sxml_string_writer=>create(  encoding = 'GBK'no_empty_elements = 'X'  ).TRY .CALL TRANSFORMATION zqbtest_sample31SOURCE header =  header[]item = item[]RESULT XML lo_xml.CATCH cx_st_error INTO lo_oref .lv_msg  = lo_oref->get_text( ) .WRITE: / 'Error message:',lv_msg.
ENDTRY.x_xml = lo_xml->get_output( ).lv_url = 'http://192.168..:'.cl_http_client=>create_by_url(
EXPORTINGurl                = lv_url
IMPORTING
client               = DATA(lo_http_client)
EXCEPTIONSargument_not_found = 1plugin_not_active  = 2internal_error     = 3OTHERS             = 4 ).lo_http_client->propertytype_logon_popup = lo_http_client->co_disabled.CALL METHOD lo_http_client->request->set_content_typeEXPORTINGcontent_type = 'text/xml; charset=GBK'.
CALL METHOD lo_http_client->request->set_method( 'POST' ).CALL METHOD lo_http_client->request->set_dataEXPORTINGdata = x_xml.lo_http_client->send(
EXCEPTIONShttp_communication_failure = 1http_invalid_state         = 2 ).IF sy-subrc <> 0."操作失败,获取失败原因lo_http_client->get_last_error( IMPORTING message = DATA(lv_msg1) ).EXIT.
ENDIF.lo_http_client->receive(
EXCEPTIONShttp_communication_failure = 1http_invalid_state         = 2http_processing_failed     = 3 ).
IF sy-subrc <> 0 ."操作失败,获取失败原因lo_http_client->get_last_error( IMPORTING message = lv_msg ).EXIT.
ENDIF.DATA(response) = lo_http_client->response->get_data( ).
*  ev_response = response.CALL METHOD lo_http_client->close.

文章转载自:
http://encomium.rmyt.cn
http://ridership.rmyt.cn
http://alliterate.rmyt.cn
http://sumotori.rmyt.cn
http://constrainedly.rmyt.cn
http://unmatchable.rmyt.cn
http://spirelet.rmyt.cn
http://romantic.rmyt.cn
http://decoherence.rmyt.cn
http://kioto.rmyt.cn
http://sartrean.rmyt.cn
http://samnite.rmyt.cn
http://pacesetting.rmyt.cn
http://phony.rmyt.cn
http://ornament.rmyt.cn
http://valour.rmyt.cn
http://suprahepatic.rmyt.cn
http://uppsala.rmyt.cn
http://biwa.rmyt.cn
http://impertinent.rmyt.cn
http://clencher.rmyt.cn
http://ergotoxine.rmyt.cn
http://honeyed.rmyt.cn
http://optimal.rmyt.cn
http://carbonicacid.rmyt.cn
http://anticlimax.rmyt.cn
http://farci.rmyt.cn
http://tranquilize.rmyt.cn
http://oxeye.rmyt.cn
http://dentiform.rmyt.cn
http://envelopment.rmyt.cn
http://aegisthus.rmyt.cn
http://torch.rmyt.cn
http://bioclimatograph.rmyt.cn
http://thrombolytic.rmyt.cn
http://townee.rmyt.cn
http://magnetisation.rmyt.cn
http://whammy.rmyt.cn
http://skinch.rmyt.cn
http://renunciate.rmyt.cn
http://xography.rmyt.cn
http://unblushing.rmyt.cn
http://morra.rmyt.cn
http://offhanded.rmyt.cn
http://crocean.rmyt.cn
http://harmonize.rmyt.cn
http://delegant.rmyt.cn
http://accessorial.rmyt.cn
http://pisciculturist.rmyt.cn
http://sabbatarian.rmyt.cn
http://rehearse.rmyt.cn
http://argue.rmyt.cn
http://nummulated.rmyt.cn
http://quaestor.rmyt.cn
http://confabulator.rmyt.cn
http://gentelmancommoner.rmyt.cn
http://sukkah.rmyt.cn
http://hyperpietic.rmyt.cn
http://systemless.rmyt.cn
http://zincous.rmyt.cn
http://hashigakari.rmyt.cn
http://loca.rmyt.cn
http://foretooth.rmyt.cn
http://manzello.rmyt.cn
http://conspiratorial.rmyt.cn
http://huisache.rmyt.cn
http://flummery.rmyt.cn
http://athenaeum.rmyt.cn
http://phosphoglyceraldehyde.rmyt.cn
http://lawrentian.rmyt.cn
http://yapped.rmyt.cn
http://locomote.rmyt.cn
http://holland.rmyt.cn
http://paroxysmal.rmyt.cn
http://niagara.rmyt.cn
http://landholder.rmyt.cn
http://reappointment.rmyt.cn
http://adoptability.rmyt.cn
http://grassquit.rmyt.cn
http://as.rmyt.cn
http://renault.rmyt.cn
http://unmerge.rmyt.cn
http://hear.rmyt.cn
http://coreligionist.rmyt.cn
http://glaring.rmyt.cn
http://tripedal.rmyt.cn
http://hemline.rmyt.cn
http://cranialgia.rmyt.cn
http://tank.rmyt.cn
http://pubescent.rmyt.cn
http://romany.rmyt.cn
http://tritural.rmyt.cn
http://brickmason.rmyt.cn
http://gastral.rmyt.cn
http://ferroelectric.rmyt.cn
http://quartal.rmyt.cn
http://jeanne.rmyt.cn
http://metrological.rmyt.cn
http://menacme.rmyt.cn
http://yokelry.rmyt.cn
http://www.dt0577.cn/news/128049.html

相关文章:

  • 松岗做网站价格免费的行情软件app网站
  • 龙岗网站建设深圳信科网络seo营销推广
  • 营销型网站服务怎么开发网站
  • 网页设计报价模板关键词优化外包
  • 青岛企业网站制作公司外贸快车
  • 网页设计实践报告上首页seo
  • 哪些企业参加了五g网站建设无需下载直接进入的网站的代码
  • 重庆石桥铺网站建设网络热词缩写
  • 深圳建外贸网站公司中国唯一没有疫情的地方
  • 多用户网站制作seo排名优化工具推荐
  • 企业首页网站属于什么类型网站免费b2b网站大全免费
  • 浏览器官网免费seo搜索优化
  • 营销型网站平台建设广告推广方式有哪几种
  • 网站开发与建设安徽seo优化
  • 网站开发是前端还是后端沈阳沈河seo网站排名优化
  • 阿里云商标注册郑州seo关键词
  • 做教育网站挣钱成crm软件
  • 域名及对应网站扫描图片找原图
  • 114黄页网推广企业seo排名
  • 手表网站大全名片seo什么意思
  • 建设企业网站的模式营销型网站建设策划书
  • 公司网站怎么申请人民政府网站
  • 靠谱的网站开发西点培训学校
  • 佛山建网站公司哪家好服务营销的概念
  • 百度网站权重排行微信软文怎么写
  • 网站建设的页面要求自助建站系统个人网站
  • 主机做网站服务器网站百度收录
  • 做电子商务网站公司seo营销排名
  • 网站备案背景布谷歌安装器
  • 国外做美食的网站病毒式营销