zoukankan      html  css  js  c++  java
  • lr soap请求webservice—web_custom_request

    image

    Action()
        {
           web_reg_save_param("Response","LB=", "RB=", LAST);
           web_add_header("SOAPAction","http://WebXml.com.cn/getWeather");
           web_custom_request("Sample_Request",
                              "Method=POST",
                              "Mode=HTML",
                              "RecContentType=text/xml",
                              "EncType=text/xml;charset=UTF-8",
                              "URL=http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx",
                              "Body="
                              "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://WebXml.com.cn/"> "
                              "   <soapenv:Header/> "
                              "   <soapenv:Body> "
                              "      <web:getWeather> "
                              "         <!--Optional:--> "
                              "         <web:theCityCode>792</web:theCityCode> "
                              "         <!--Optional:--> "
                              "         <web:theUserID></web:theUserID> "
                              "      </web:getWeather> "
                              "   </soapenv:Body> "
                              "</soapenv:Envelope>",
                              LAST);

           lr_convert_string_encoding(lr_eval_string("{Response}"),LR_ENC_UTF8,LR_ENC_SYSTEM_LOCALE,"ResponseUTF8");
           lr_output_message("Response is : %s",lr_eval_string("{ResponseUTF8}"));
           return 0;
        }

    image

  • 相关阅读:
    简单SSM配置详解
    Nginx 简介
    序列化与反序列化
    用HttpSessionListener与HttpSessionBindingListener实现在线人数统计
    Linux
    jsp标签精华(持续更新中)
    ZooKeeper 编程(一)
    maven环境快速搭建
    Web项目--------原Oracle数据库的项目同时兼容MySql
    JavaMail实现邮箱之间发送邮件功能
  • 原文地址:https://www.cnblogs.com/stay-sober/p/4172367.html
Copyright © 2011-2022 走看看