pythonºÍdotnetµÄwebservice»¥·Ã
2007-08-22 22:46
Ò»¡¢ÓÃSOAPpy·ÃÎÊdotnet webservice
dotnetµÄwebservice
<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello World"
End Function
<WebMethod()> _
Public Function HelloWorld2(ByVal s As String) As String
Return "Hello World2" + s
End Function
<WebMethod()> _
Public Function HelloWorld3(ByVal i As Int16, ByVal j As Int16) As String
Return "Hello World3" + (i + j).ToString()
End Function
ÃüÃû¿ÕÒôºó¼ÓÒ»¾ä SoapDocumentService(Use:=SoapBindingUse.Encoded)
·ÃÎÊ
>>>from SOAPpy import WSDL
>>> server= WSDL.Proxy("http://192.168.1.3/mywebservice/Service1.asmx?WSDL
")
>>> server.HelloWorld()
'Hello World'
>>> server.HelloWorld('abcdefg')
'Hello World'
>>> server.HelloWorld2('abcdefg')
'Hello World2'
>>> server.HelloWorld2(s = 'abcdefg') #ÓвÎÊýʱ£¬Ðè´øÉϲÎÊýÃû
'Hello World2abcdefg'
>>> server.HelloWorld3(i=1,j=2) #ÔÝδ½â¾ö
Traceback (most recent call last):
File "<pyshell#43>", line 1, in -toplevel-
server.HelloWorld3(i=1,j=2)
File "c:\python24\Lib\site-packages\SOAPpy\Client.py", line 453, in __call__
Ïà¹ØÎĵµ£º
'''gen_python_api.py generates a python.api file for SciTE
The generated api file includes
*) all Python keywords
*) all builtin functions
*) all module attributes
Module functions are represented by their docstring if available,
otherwise by the function definition from the source file. ......
writeblog.csdn.net writeblog.csdn.net/PostEdit.aspx
Õâ¸ö³ÌÐòºÜÔçÒÔǰ¾Íд¹ýÁË£¬¶øÇÒÊDzο¼µÄ±ðÈ˵Äд£¬¾ßÌå˵ķ¢ÔÚÄÄÀïÎÒ¶¼Íü¼ÇÁË¡£ÕâÀï¾ÍËãÊǰëÔ´´ÁË£¬ÈçÓÐÇÖȨÇ뼰ʱ֪ͨ¸ÄÕý¡£
ÒòΪ´Ó½ñÌì1ÔÂ1ºÅ¿ªÊ¼£¬GoogleÉ϶©ÔĵÄÌìÆøÔ¤±¨·þÎñÒѾȡÏûÁË£¬¹À¼ÆÊÇGoogle±»Ê©¼ÓѹÁ¦ÁË¡£·´ÕýÊÇÊÕ²»µ½ÌìÆøÔ¤±¨ÁË¡£ÕýºÃÖØÊ°ÒÔǰ ......
PythonºÍRubyµÄ¶Ô±È£¬¾ÀÕýһЩÎó½â
ÏÂÃæÊÇÎÒÔÚ¿´Á½Æª¹ØÓÚPythonºÍRuby¶Ô±ÈµÄÎÄÕÂʱ£¬Ëù×÷µÄ¾ÀÕý£¬ÔÎͼÊǹ㷺Á÷Ðеģ¬±È½ÏºÃÕÒ¡£
------------------------------------------------------
¡¶rubyºÍpythonµÄ±È½Ï¡·¸üÕýÒ»µãÊÂÇé
1¡¢Îĵµ¡¢¿ªÔ´ÏîÄ¿¡¢¿âÖ§³Ö£¬ÕâЩ¶«Î÷Ruby²»Òª¸úPython±È£¬²»ÊǼ¸¸öÊýÁ¿¼¶µÄÎÊÌ⣬ºÎ±ØÃ²Ë ......
ת×Ô http://www.javaeye.com/topic/561786
ÔÌû£ºhttp://www.cnblogs.com/jingleguo/archive/2008/06/02/1211820.html
µ±pythonÖм䴦Àí·ÇASCII±àÂëʱ£¬¾³£»á³öÏÖÈçÏ´íÎó£º
UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal not in range(128)
0x??Êdz¬³ö128µÄÊý×Ö£¬pythonÔÚĬÈϵ ......
[root@pku-fan MySQL]# cat limbs.sql
CREATE DATABASE cookbook;
USE cookbook;
DROP TABLE IF EXISTS limbs;
CREATE TABLE limbs
(
thing VARCHAR(20), # what the thing is
legs INT, ......