How to build a SOAP request to?


Asking for help in composing a SOAP request to this SOAP never worked.

The WSDL description

Sending request:
$client = new \SoapClient($service ['trace' => true]);

 $message = new Message();
 $message->Message = 'Message';
 $message->AuthRequest = 'AuthRequest';
 $message->AuthAppInfo = 'AuthAppInfo';
 $message->MasterToken = 'MasterToken'.env('MASTER_TOKEN');

 $data = $client->getMessage($message);

 $this->log($client->__getLastRequest(), 'request');
 $this->log($client->__getLastResponse(), 'response');

The Message Class
class Message
 public $Message;
 public $AuthRequest;
 public $AuthAppInfo;
 public $MasterToken;

Get errors like this:
Unmarshalling Error: cvc-complex-type.2.4.b: The content of element 'ns1:Message' is not complete. One of '{WC[##other:"urn://x-artefacts-gnivc-EN/inplat/servin/OpenApiMessageConsumerService/types/1.0"]}' is expected.
April 19th 20 at 12:35
1 answer
April 19th 20 at 12:37
If I understand correctly the WSDL, then the getMessage request only one parameter - MessageId.
6.1.2. Method of receiving message GetMessage designed to receive xml messages in accordance with a particular for a particular service scheme. Method signature: GetMessageResponse GetMessage(GetMessageRequest request) throws AuthenticationException, MessageNotFoundException,
GetMessageRequest request containing a single element MessageId – the message ID assigned to the request you want to send to get a response.
GetMessageResponse – reply containing 2 elements: ProcessingStatus status of the query, and the Message – the message that is allowed to contain any xmlс the obligatory indication of the scheme. ProcessingStatus – an enumeration with two values: PROCESSING –the request is processed, COMPLETED –the request has finished processing.
The Message element is returned only if ProcessingStatus is equal to COMPLETED
Generally there is an implementation in Ruby, trying in php to move, so the Ruby code
let(:correct_namespaces) do
 'xmlns:xs' => '',
 'xmlns:tns' => 'urn://x-artefacts-gnivc-EN/ais3/kkt/AuthService/types/1.0',
 'targetNamespace' => 'urn://x-artefacts-gnivc-EN/ais3/kkt/AuthService/types/1.0'
 let(:correct_message_hash) do
 'Message' => {
 'tns:AuthRequest' => {
 'tns:AuthAppInfo' => {
 'tns:MasterToken' => 'test_key'

AuthRequest and AuthAppInfo is in xsd
It seems to be all the same, but not working. - Jermey_Olson commented on April 19th 20 at 12:40
@Jermey_Olson, except that the WSDL you are not from authorization and from asynchronous API validation check (OpenApiAsyncMessageConsumerService). - ernestina_Me commented on April 19th 20 at 12:43
@ernestina_Me, Yes, thank you, I will update the WSDL description - Jermey_Olson commented on April 19th 20 at 12:46
@Jermey_Olson, And it is a synchronous API validation check.
If you believe the same documentation, the Message needs to emerge here is the query:
<tns:AuthRequest xmlns:tns="urn://x-artefacts-gnivc-EN/ais3/kkt/AuthService/types/1.0">

But then I couldn't help with namespaces in SOAP ever was not the case. - ernestina_Me commented on April 19th 20 at 12:49
@ernestina_Me, Tried it as a string to send, the result is slightly different but the picture is the same. About AppId not given. - Jermey_Olson commented on April 19th 20 at 12:52

Find more questions by tags SOAPPHP