2016-11-21 6 views
2

Ich bin nicht vertraut mit SOAP Webservices und ich muss eine Anfrage an eine senden. Ich schrieb den nächsten Schnipsel:Unerkannte Soap-Aktion

# WSDL http://webservices.sathomologa.sef.sc.gov.br/wsDfeSiv/Recepcao.asmx?WSDL 
$this->client = new SoapClient(static::SERVICE_WSDL, ['exceptions' => 0]); 

# Raw XML data 
$data = $this->xml->saveXML(); 
# URL http://webservices.sathomologa.sef.sc.gov.br/wsDfeSiv/Recepcao.asmx 
$location = static:SERVICE_URL; 
$action = static::SERVICE_URL . '?op=Enviar'; 
$v = SOAP_1_1; 

$response = $this->client->__doRequest($data, $location, $action, $v); 

Und ich bekomme die nächste Test Antwort:

soap: Clientserver nicht den Wert der HTTP-Header- Soapaction erkannt hat: http://webservices.sathomologa.sef.sc.gov.br/wsDfeSiv/Recepcao.asmx?op=Enviar.

Irgendwelche Ideen?

Antwort

0

Lesen der specification von Enviar Methode, sah ich den nächsten Header:

Soapaction: "http://tempuri.org/Enviar"

Also, ich $action = static::SERVICE_URL . '?op=Enviar';-$action = http://tempuri.org/Enviar; geändert und arbeitet für mich.

Verwandte Themen