kyriazo
06/05/2024, 10:49 AMnickms
06/05/2024, 10:58 AMkyriazo
06/05/2024, 11:01 AMnstefanis
06/05/2024, 11:32 AM$client = new \SoapClient("https://www1.gsis.gr/webtax2/wsgsis/RgWsPublic/RgWsPublicPort?WSDL", ['trace' => TRUE]);
//$version = $client->rgWsPublicVersionInfo();
$authHeader = new \stdClass();
$authHeader->UsernameToken = new \stdClass();
$authHeader->UsernameToken->Username = "$username";
$authHeader->UsernameToken->Password = "$password";
$Headers[] = new \SoapHeader('https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $authHeader, TRUE);
$client->__setSoapHeaders($Headers);
$result = $client->rgWsPublicAfmMethod(
[
'afmCalledBy' => "$store_vat",
'afmCalledFor' => "$vat_number",
]
);
if ($result['RgWsPublicBasicRt_out']->deactivationFlagDescr = "ΕΝΕΡΓΟΣ ΑΦΜ " && $result['RgWsPublicBasicRt_out']->afm) {
$result['RgWsPublicBasicRt_out']->countryCode = 'GR';
return $result['RgWsPublicBasicRt_out'];
}nstefanis
06/05/2024, 11:33 AMkyriazo
06/05/2024, 11:44 AM<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:reg="http://gsis.ggps.interoperability/RegistryInterface">
<soapenv:Header>
<wsse:Security
soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility1.0.xsd"
>
<wsse:UsernameToken wsu:Id="UsernameToken-1">
<wsse:Username>XXXX</wsse:Username>
<wsse:Password Type='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wssusername-token-profile-1.0#PasswordText'>XXXX</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<reg:retrieveInfoByAFMRequest>
<auditRecord>
<auditProtocol>1</auditProtocol>
<auditTransactionDate>2016-12-19T12:43:26Z</auditTransactionDate>
</auditRecord>
<retrieveInfoByAFMRecord>
<afm>123456789</afm>
</retrieveInfoByAFMRecord>
</reg:retrieveInfoByAFMRequest>
</soapenv:Body>
</soapenv:Envelope>
αλλα στο request μου με το mustUndestand ενεργοποιημένο παιρνω πίσω αυτο
<faultstring>MustUnderstand headers: [{http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.</faultstring>
η με κλειστο
<faultstring>These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}UsernameToken</faultstring>