How to get requests from a website? I found this: http://www.yodaspeak.co.uk/webservice/yodatalk.php?wsdl
But I can figure out how to send a request to it and get a response.
So far I've tried with:
import requests
yoda_params = {"inputText": 'Is this working?'}
yoda_url = 'http://www.yodaspeak.co.uk/webservice/yodatalk.php?'
yoda_re = requests.get(yoda_url, params=yoda_params)
yoda_text = yoda_re.json()
print(yoda_text)
But it didn't worked.
Name: yodaTalk
Binding: http://www.yodaspeak.co.uk/webservice/yodatalkBinding
Endpoint: http://www.yodaspeak.co.uk/webservice/yodatalk.php
SoapAction: uri:http://www.yodaspeak.co.uk/webservice/yodatalk#yodaTalk
Style: rpc
Input:
use: literal
namespace: uri:http://www.yodaspeak.co.uk/webservice/yodatalk
encodingStyle:
message: yodaTalkRequest
parts:
inputText: xsd:string
Output:
use: literal
namespace: uri:http://www.yodaspeak.co.uk/webservice/yodatalk
encodingStyle:
message: yodaTalkResponse
parts:
return: xsd:string
Namespace: uri:http://www.yodaspeak.co.uk/webservice/yodatalk
Transport: http://schemas.xmlsoap.org/soap/http
Documentation: Pass any string and it will be returned as Yoda-Speak.
I also found this by mistake while trying to put InputText=Something in the url
Update:
I tried with zeep but when I run python -mzeep 'http://www.yodaspeak.co.uk/webservice/yodatalk.php?wsdl
I get:
No namespace defined for 'http' ('http://www.yodaspeak.co.uk/webservice/yodatalkPortType')
Try using any soap library (for example, zeep ). There's wsdl
in http://www.yodaspeak.co.uk/webservice/yodatalk.php?wsdl
, so it's about soap
using, I suppose.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.