Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
82 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -10,6 +10,8 @@ class ServiceURL(object): | ||
path = '' # like /com.qianmi.dubbo.UserProvider | ||
ip = '127.0.0.1' | ||
port = '9090' | ||
version = '' | ||
group = '' | ||
|
||
def __init__(self, url): | ||
result = urlparse(url) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1 +1,8 @@ | ||
# coding=utf-8 | ||
__author__ = 'caozupeng' | ||
|
||
|
||
class ReferenceConfig(object): | ||
registry = None | ||
interface = '' | ||
version = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,16 @@ | ||
from pyjsonrpc import HttpClient | ||
|
||
__author__ = 'caozupeng' | ||
|
||
def test_client_every_new(): | ||
user_provider = HttpClient(url="http://{0}{1}".format('172.19.3.111:38081/', 'com.ofpay.demo.api.UserProvider2')) | ||
print user_provider.getUser('A003') | ||
print user_provider.queryUser( | ||
{u'age': 18, u'time': 1428463514153, u'sex': u'MAN', u'id': u'A003', u'name': u'zhangsan'}) | ||
print user_provider.queryAll() | ||
print user_provider.isLimit('MAN', 'Joe') | ||
print user_provider('getUser', 'A005') | ||
|
||
|
||
if __name__ == '__main__': | ||
test_client_every_new() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters