Ich habe nicht dass Gefühl dass meine Frage verstanden wurde deswegen bitte ich euch mir die Folgende zu beantworten dann weiß ich was ich wissen muss.
Folgendes ist Script 1 von Server 1 mit der IP 192.168.100.234 (ich habe es mal in Python geschrieben (script1 spielt für mich zuerst keine Rolle))
Code: Alles auswählen
def frame_xml(AddressVerified,AmountPaid):
xml_data = """<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/ metadata" xmlns="http://www.w3.org/2005/Atom">
<category scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" term="SS.WebData.Order" />
<title />
<POST>here_i_am</POST>
<id />
<content type="application/xml">
<m:properties>
<d:AddressVerified m:type="Edm.Byte">%s</d:AddressVerified>
<d:AmountPaid m:type="Edm.Decimal">%s</d:AmountPaid>
</m:properties>
</content>
</entry>"""%(AddressVerified,AmountPaid)
return xml_data
headers = {'Content-Type': 'application/xml'}
xml_data = frame_xml('AddressVerified','AmountPaid')
print requests.post('http://192.168.0.125/randalone/brd-app/script2.py', data=xml_data, headers=headers).text
Meine neue Frage ist folgende:
Wie müsste script2.py aussehen wenn ich
Script1 als Response eine txt Datei mit dem Inhalt "JA" geben möchte sollte in der XML der POST den Inhalt "here_i_am" enthalten
und wenn nicht dann den Statuscode 444
Und um die Frage die wahrscheinlich gleich wieder kommt zu beantworten ich benutze in Script 2 kein Framework da Script2 keiene visuelle Darstellung benötigt.