Could you tell me why I am getting failed to fetch data from soap service?…
- User
Could you tell me why I am getting failed to fetch data from soap service?
C:\Users\Ninja\Downloads\StepsForSFDLOADER>python test2.py Request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> soap:Body 52233 830af0c3-4fa7-4efd-ac27-0a86bc69803f </soap:Body> </soap:Envelope>
Response:
Failed to fetch data from the SOAP service.
Heres the code
import requests import xml.etree.ElementTree as ET
Define the SOAP request
soap_request = """ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> soap:Body 52233 830af0c3-4fa7-4efd-ac27-0a86bc69803f </soap:Body> </soap:Envelope> """
Define the SOAP endpoint URL
soap_url = "http://mythologicinteractive.com/SFDGameServices.asmx"
def fetch_connect_requests(): # Define the headers for the SOAP request headers = { "User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.42000)", "Content-Type": "text/xml; charset=utf-8", "SOAPAction": 'https://mythologicinteractive.com/Games/SFD/GetConnectRequests', "Host": "mythologicinteractive.com", "Content-Length": str(len(soap_request)), "Expect": "100-continue", "Connection": "Keep-Alive", }
code - Assistant
Based on the response you've provided, it appears that the SOAP service did respond to your request, as indicated by the presence of the
GetConnectRequestsResponseelement in the response XML. However, the issue seems to lie with parsing the response and extracting the data.In your current code, you're trying to find elements with the tag name 'ConnectRequest' within the namespace 'https://mythologicinteractive.com/Games/SFD/'. However, in the provided sample response, the correct tag name is 'SFDConnectRequest' and not 'ConnectRequest'. This mistake in the tag name is likely the reason why your code is failing to fetch the data.
- User
Ok so could you give me also the information extracted from request time, client address and so on?
- Assistant