LexisNexis SUDS SOAP请求

2024-05-18 21:05:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我也有肥皂问题。我试图用python和SUDS实现一个接口。在

我正在尝试创建一个应用程序,在python中验证和搜索LexisNexis。所以,如果有人知道这是否已经实现了,那也太好了。我已经搜索了相当多的交易,并且确实找到了这个站点:https://hkn.eecs.berkeley.edu/~dhsu/hacks.shtml,这很好,但是没有SOAP代码。在

到目前为止我所做的:

我知道信封应该看起来像:

<?xml version="1.0" encoding="utf-8"?>
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <Authenticate xmlns="http://authenticate.authentication.services.v1.wsapi.lexisnexis.com">
    <authId>id</authId>
    <password>password</password>
  </Authenticate>
</soap:Body>

我可以建造它(我想)

^{pr2}$

返回:

<Authenticate xmlns="http://authenticate.authentication.services.v1.wsapi.lexisnexis.com">
   <authId>authId</authId>
   <password>password</password>
</Authenticate>

但是,我不能让客户工作。我得到以下信息:

模式
- 身份验证.xsd在

目标命名空间
-http://authenticate.authentication.services.v1.wsapi.lexisnexis.com

命名空间表

我可能做错了,但我试过:

client = Client('http://authenticate.authentication.services.v1.wsapi.lexisnexis.com')

以及

imp = Import('http://www.w3.org/2001/XMLSchema',
                 location='http://www.w3.org/2001/XMLSchema.xsd')
imp.filter.add('http://security.common.services.v1.wsapi.lexisnexis.com')
wsdl_url = 'http://authenticate.authentication.services.v1.wsapi.lexisnexis.com'
client = Client(wsdl_url, doctor=ImportDoctor(imp))

然而,两者都导致

<urlopen error [Errno 8] nodename nor servname provided, or not known>

很抱歉我对SUDS这么陌生,这是我第一次使用lexisnexisapi。在

非常感谢


Tags: orgcomhttpauthenticationwwwservicepasswordsoap
2条回答

您的错误与suds无关,而与底层urllib连接请求有关:

<urlopen error [Errno 8] nodename nor servname provided, or not known>

当主机名不正确或根本没有响应时,此错误很常见。下面是一个简单的例子:

^{pr2}$

这也失败了!请检查您的URL,然后重试。在

LexisNexis为API开发人员提供了一个WSDL文件,与他们的用户名和密码一起使用。您必须确保您正在使用此WSDL。要使用SUDS在本地访问WSDL文件,请将url输入为file://path/to/file.wsdl在

相关问题 更多 >

    热门问题