{"id":1661,"date":"2014-07-18T18:57:46","date_gmt":"2014-07-18T10:57:46","guid":{"rendered":"http:\/\/www.gejoin.com\/?p=1661"},"modified":"2023-08-23T17:13:36","modified_gmt":"2023-08-23T09:13:36","slug":"gsoap%e4%bc%a0%e9%80%92%e7%bb%93%e6%9e%84%e4%bd%93%e6%95%b0%e7%bb%84%e4%b9%8b%e4%b8%8a%e7%bd%91%e4%b8%8d%e6%98%93","status":"publish","type":"post","link":"https:\/\/www.mujins.com\/?p=1661","title":{"rendered":"gSoap\u4f20\u9012\u7ed3\u6784\u4f53\u6570\u7ec4\u4e4b\u4e0a\u7f51\u4e0d\u6613"},"content":{"rendered":"<p>\u6bcf\u6b21\u9700\u8981\u7528\u5230\u7f51\u7edc\uff0c\u65e0\u8bbaPC\uff0cMac\u6216\u662f\u79fb\u52a8\u8bbe\u5907\uff0c\u4e00\u9635\u6124\u6012\u6d8c\u4e0a\u6765\u3002Google\u5168\u7ebf\u88ab\u5c01\uff0cDropbox\u88ab\u5c01\uff0cLine\u88ab\u5c01\uff0cAmazon WS \u88ab\u5c01,One Drive \u88ab\u5c01\uff0c\u624b\u673a\u4e0a\u767e\u5206\u4e4b\u516b\u5341\u5e94\u7528\u6302\u4e86\u2026\u2026\u5c31\u5728X\u5185\u6b7b\u53bb\u5427\uff01F**k G!!\u987a\u4fbf\u795d\u798fF* Sir\u3002\u5982\u4eca\u7684\u5c01\u9501\u5df2\u7ecf\u5230\u4e86\u4e27\u5fc3\u75c5\u72c2\u7684\u5730\u6b65\uff0c\u5f53\u5c40\u6ca1\u6709\u4efb\u4f55\u4e0b\u7ebf\u548c\u5c3a\u5ea6\uff01\u6211\u7684\u8fd9\u4e2a\u65e5\u8bb0\u672c\u4e5f\u5feb\u6302\u4e86\u3002\u4e0d\u8bf4\u4e86\uff0c\u6211\u8981\u7838\u7535\u8111\u4e86\u2026\u2026<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\u56fe\u7247\u5f15\u81eahttp:\/\/factsanddetails.com\/<\/p>\n<p>\u73b0\u5728\u89c1\u5230\u6700\u591a\u7684\u5df2\u7ecf\u4e0d\u662f&#8221;Connection is reset\uff08\u8fde\u63a5\u88ab\u91cd\u7f6e\uff09&#8221;,\u800c\u662f&#8221;This webpage is not available&#8221;,\u679c\u7136\u6ca1\u6709\u6700\u725b\u6700\u6709\u6700\u50bbX\u3002<br \/>\n\u6700\u8fd1\u7528\u5230\u5f3a\u5927\u7684C\u7248\u672cgSoap\u5e93\u5904\u7406Web service\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u3002\u867d\u7136\u4ee5\u524d\u7528\u8fc7\uff0c\u4f46\u8fd9\u6b21\u9700\u8981\u7528\u5230\u6570\u636e\u5e93\uff0c\u9700\u8981\u8fd4\u56de\u7ed3\u679c\u96c6\uff0c\u8fd9\u91cc\u5c31\u76f4\u63a5\u8d34\u51fa\u4ee3\u7801\uff0c\u5206\u522b\u8fd4\u56de\u5355\u6761\u7ed3\u6784\u4f53\u548c\u591a\u6761\u7684\u7ed3\u6784\u4f53\u6570\u7ec4\u3002<br \/>\n\u63a5\u53e3interface.h\u662f\u8fd9\u6837\u5b9a\u4e49\u7684\uff1a<\/p>\n<pre class=\"brush:c\">\/\/interface.h\n\/\/soapcpp2 -c -L -S -x  interface.h \n\/\/soapcpp2 -c -C -L -x   interface.h \nstruct  OnlWS__FunkGWResp\n{\n   char *Google;\n   char *MrFang;\n   char *GreatWall;\n   char *Blocks;\n   char *DnsPollution;\n   char *CNShit;\n};\n\nstruct  OnlWS__GetFreeNet\n{\n    char *Free;\n    char *FreeAgain;\n    char *FreeEver;\n};\n\nstruct OnlWS__GetFreeNetResp\n{\n    struct OnlWS__GetFreeNet * __ptr;\n    int  __size;\n}; \nint OnlWS__GetShitGW(char *option,struct OnlWS__FunkGWResp  *resp);\nint OnlWS__GetFreeInfo(char *option,struct OnlWS__GetFreeNetResp  *resp);<\/pre>\n<p>\u63a5\u53e3\u5b9a\u4e49\u597d\u540e\u4f7f\u7528gsoap\u63d0\u4f9b\u7684\u5de5\u5177\u751f\u6210\u670d\u52a1\u7aef\u4ee3\u7801\uff1a<\/p>\n<pre class=\"brush:bash\">soapcpp2 -c -L -S -x  interface.h<\/pre>\n<p>\u63a5\u4e0b\u6765\u5b9e\u73b0\u670d\u52a1\u7aef\u4ee3\u7801\u548c\u63a5\u53e3\u7684\u903b\u8f91\uff1a\uff08\u7565\u53bb\u4e00\u4e9b\u4ee3\u7801\uff09\uff0c\u63a5\u53e3\u5904\u7406\u903b\u8f91\u9700\u8981\u8fd4\u56de\u7ed3\u6784\u4f53\u6570\u7ec4\uff0c\u56e0\u6b64\u9700\u8981\u5f00\u8f9f\u4e00\u5b9a\u957f\u5ea6\u7684\u7a7a\u95f4\uff0c\u8fd9\u91cc\u4f7f\u7528\u94fe\u8868\u6765\u52a8\u6001\u5f00\u8f9f\u3002<\/p>\n<pre class=\"brush:bash\">    \/\/........\n    resp-&gt;__size=nRecCnt;\n    resp-&gt;__ptr= soap_malloc(soap,(resp-&gt;__size+1)*sizeof(*resp-&gt;__ptr));\n    \n    pLink-&gt;ptAnyNode= soap_malloc(SOME_DATA_STRUCT);\n    pLink-&gt;pNext=NULL;\n    tAnyLink *p ,*phead=pLink;\n    for(i=0;i&lt;resp-&gt;__size-1;i++)\n    {\n        p=(tAnyLink *)soap_malloc(soap,sizeof(tAnyLink));\n        p-&gt;ptAnyNode=(SOME_DATA_STRUCT *)soap_malloc(soap,sizeof(SOME_DATA_STRUCT));\n        p-&gt;pNext=NULL;\n        phead-&gt;pNext=p;\n        phead=p;\n    }\n\n<\/pre>\n<p>\u8fdb\u884c\u8d4b\u503c\u64cd\u4f5c\uff0c\u8fd4\u56de\u7ed3\u679c\u3002<\/p>\n<p>\u5ba2\u6237\u7aef\u5b9e\u73b0\u6bd4\u8f83\u7b80\u5355\uff0c\u56e0\u4e3a\u53ef\u4ee5\u76f4\u63a5\u53d6\u5230\u7ed3\u6784\u4f53\u6570\u7ec4\u7684\u957f\u5ea6\uff0c\u76f4\u63a5\u4f7f\u7528\u6570\u7ec4\u4e0b\u6807\u5373\u53ef\u83b7\u53d6\u5230\u7ed3\u679c\u3002\u8fd9\u91cc\u5217\u51faPython\u7684\u6d4b\u8bd5\u7a0b\u5e8f\uff1a\u4f7f\u7528suds \u5305\u6765\u5b8c\u6210\u5ba2\u6237\u7aef\u5904\u7406web service .<\/p>\n<pre class=\"brush:python\"># -*- coding: utf-8 -*-\nimport suds\nimport logging\nimport sys\n\ndef main():\n    print sys.stdout.encoding\n    url=\"http:\/\/192.168.101.181:11080\" \n    client=suds.client.Client(url)\n    rst=client.service.GetShitGW('WALL')\n    print client.last_received()\n    rs=client.service.GetFreeInfo('FREE')\n    print rs\n    print client.last_received()\n    \nif __name__=='__main__':\n    main()\n\n\n<\/pre>\n<p>\u770b\u770b\u8fd4\u56de\u7684\u60c5\u51b5\uff1a<\/p>\n<pre class=\"brush:other\">(GetFreeNetResp){\n   item[] = \n      (GetFreeNet){\n         Free = \"01\"\n         FreeAgain = \"A\"\n         FreeEver = \"2014-07-18 07:37:51.110000\"\n      },\n      (GetFreeNet){\n         Free = \"10\"\n         FreeAgain = \"B\"\n         FreeEver = \"2014-07-18 07:37:51.110000\"\n      },\n      (GetFreeNet){\n         Free = \"15\"\n         FreeAgain = \"G\"\n         FreeEver = \"2014-07-18 07:37:51.110000\"\n      },\n      (GetFreeNet){\n         Free = \"20\"\n         FreeAgain = \"C\"\n         FreeEver = \"2014-07-18 07:37:51.110000\"\n      },\n }\n<\/pre>\n<p>\u597d\u4e86\uff0c\u4e0a\u7f51\u4e0d\u6613\uff0c\u4e14\u884c\u4e14\u73cd\u60dc\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6bcf\u6b21\u9700\u8981\u7528\u5230\u7f51\u7edc\uff0c\u65e0\u8bbaPC\uff0cMac\u6216\u662f\u79fb\u52a8\u8bbe\u5907\uff0c\u4e00\u9635\u6124\u6012\u6d8c\u4e0a\u6765\u3002Google\u5168\u7ebf\u88ab\u5c01\uff0cDropbox\u88ab\u5c01\uff0cLine\u88ab\u5c01\uff0cAmazon WS \u88ab\u5c01,One Drive \u88ab\u5c01\uff0c\u624b\u673a\u4e0a\u767e\u5206\u4e4b\u516b\u5341\u5e94\u7528\u6302\u4e86\u2026\u2026\u5c31\u5728X\u5185\u6b7b\u53bb\u5427\uff01F**k G!!\u987a\u4fbf\u795d\u798fF* Sir\u3002\u5982\u4eca\u7684\u5c01\u9501\u5df2\u7ecf\u5230\u4e86\u4e27\u5fc3\u75c5\u72c2\u7684\u5730\u6b65\uff0c\u5f53\u5c40\u6ca1\u6709\u4efb\u4f55\u4e0b\u7ebf\u548c\u5c3a\u5ea6\uff01\u6211\u7684\u8fd9\u4e2a\u65e5\u8bb0\u672c\u4e5f\u5feb\u6302\u4e86\u3002\u4e0d\u8bf4\u4e86\uff0c\u6211\u8981\u7838\u7535\u8111\u4e86\u2026\u2026 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\u56fe\u7247\u5f15\u81eahttp:\/\/factsanddetails.com\/ \u73b0\u5728\u89c1\u5230\u6700\u591a\u7684\u5df2\u7ecf\u4e0d\u662f&#8221;Connection is reset\uff08\u8fde\u63a5\u88ab\u91cd\u7f6e\uff09&#8221;,\u800c\u662f&#8221;This webpage is not available&#8221;,\u679c\u7136\u6ca1\u6709\u6700\u725b\u6700\u6709\u6700\u50bbX\u3002 \u6700\u8fd1\u7528\u5230\u5f3a\u5927\u7684C\u7248\u672cgSoap\u5e93\u5904\u7406Web service\u670d\u52a1\u7aef\u548c\u5ba2\u6237\u7aef\u3002\u867d\u7136\u4ee5\u524d\u7528\u8fc7\uff0c\u4f46\u8fd9\u6b21\u9700\u8981\u7528\u5230\u6570\u636e\u5e93\uff0c\u9700\u8981\u8fd4\u56de\u7ed3\u679c\u96c6\uff0c\u8fd9\u91cc\u5c31\u76f4\u63a5\u8d34\u51fa\u4ee3\u7801\uff0c\u5206\u522b\u8fd4\u56de\u5355\u6761\u7ed3\u6784\u4f53\u548c\u591a\u6761\u7684\u7ed3\u6784\u4f53\u6570\u7ec4\u3002 \u63a5\u53e3interface.h\u662f\u8fd9\u6837\u5b9a\u4e49\u7684\uff1a \/\/interface.h \/\/soapcpp2 -c -L -S -x interface.h \/\/soapcpp2 -c -C -L -x interface.h struct OnlWS__FunkGWResp { char *Google; char *MrFang; char *GreatWall; char *Blocks; char *DnsPollution; char *CNShit; }; struct OnlWS__GetFreeNet { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1664,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[31,4,25],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts\/1661"}],"collection":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1661"}],"version-history":[{"count":4,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts\/1661\/revisions"}],"predecessor-version":[{"id":2099,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/wp\/v2\/posts\/1661\/revisions\/2099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=\/"}],"wp:attachment":[{"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mujins.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}