我将Web Service of Chronopost与库Zeep一起使用。你知道吗
但我无法在方法searchDeliverySlot上进行身份验证
wsdl = 'https://ws.chronopost.fr/rdv-cxf/services/CreneauServiceWS?wsdl'
client = zeep.Client(wsdl=wsdl)
header = xsd.Element(
'{http://cxf.soap.ws.creneau.chronopost.fr/}searchDeliverySlot',
xsd.ComplexType([
xsd.Element(
'{http://cxf.soap.ws.creneau.chronopost.fr/}accountNumber',
xsd.String()),
xsd.Element(
'{http://cxf.soap.ws.creneau.chronopost.fr/}password',
xsd.String()),
])
)
header_value = header(accountNumber='xxxxxx', password='xxxxx')
data = client.service.searchDeliverySlot(callerTool='RDVWS',productType='FRESH',shipperZipCode='73000',recipientZipCode='73000',dateBegin=datetime.date(2017, 10, 30),isDeliveryDate=True
, _soapheaders=[header_value]
)
我得到这个错误
{
'code': 30,
'message': 'Invalid accesColis password null',
'meshCode': None,
'slotList': [],
'transactionID': None
}
你能帮我验证一下服务吗
谢谢
是的,我找到了正确的语法。要做到这一点,我需要帮助我使用soapui来显示要发送的正确xml对象
相关问题 更多 >
编程相关推荐