Hallo!
Ich verwende folgendes Script um eine abfrage zu senden, die anforderung vom serverbetreiber ist das encoding format ISO-8859-1
leider kommt immer ein fehler zurück sobald jemand ein doppel ss oder einen umlaut sendet, wenn aber eine addresse ohne doppel ss oder umlaute eingegeben wird funktioniert alles prima!
PHP-Code:
$xml = "<?xml version='1.0' encoding='ISO-8859-1'?>
<SOAP-ENV:Envelope xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/1999/XMLSchema'>
<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<soap:Body>
<ns2:checkFeasibility xmlns:ns2='http://sxxxxt/'>
<Request fcType='ADDRESS' locale='EN'>
<address street='$_POST[strasse]' houseNumber='$_POST[hausnummer]' zipcode='$_POST[plz]'
city='$_POST[ort]' block='$_POST[block]' stairs='$_POST[stiege]' floor='$_POST[stock]' door='$_POST[tuer]'/>
</Request>
</ns2:checkFeasibility>
</soap:Body>
</soap:Envelope>
</SOAP-ENV:Envelope>";
define( 'HOST', 'https://host.domain.at:443/ixxxi/Service?wsdl' );
header( 'Content-Type: text/xml' );
requestCurl( $xml );
function requestCurl( $data ) {
$ch = curl_init( HOST );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $data );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );
if( !$data = curl_exec( $ch )) {
//echo 'Curl execution error.', curl_error( $ch ) ."\n";
return FALSE;
}
curl_close( $ch );
return $data;
}
Der Fehler sieht dann so aus:
XML-Verarbeitungsfehler: nicht wohlgeformt
Adresse:
Parallels Confixx
Zeile Nr. 1, Spalte 81035:
street="Schulstrae"
auch mit ulauten im ort ist das, das selbe!
mfg.
erti