SOAP Request error

need to send the following SOAP request using PHP:

 <soapenv:Body>
      <imen:menuUser>
         <pCulturalRef>?</pCulturalRef>
         <pTobIn>
            <GET_MENU_USER>
               <WEBUSER></WEBUSER>
            </GET_MENU_USER>
         </pTobIn>
      </imen:menuUser>
   </soapenv:Body>

1-In php

 $info = $client->__soapCall("menuUser",array("WEBUSER"=>'test'));

but i always get this error result :

{#275 ▼
  +"pTobOut": {#281 
    +"Response": {#278 
      +"ERROR": "Required Field WEBUSER"
      +"DATA": {#282}}}}

any help plz .

Hi @nadim ,

By the XML you shared it appears the WEBUSER field should be contained inside pTobIn/GET_MENU_USER.

In fact, it would probably be easier if you called the method directly, without going through __soapCall.

Try

var_dump($client->__getFunctions());

To see the methods available and their signatures, then you can simply call menuUser.

i tried it
try {
$info = $client->__soapCall(‘menuuser’,array(“pTobIn”=>array(
“GET_MENU_USER” => array(
“WEBUSER”=> “test”
)
)));
dd($info->pTobOut->Response);

but now it get me this error
Array to string conversion

further inofrmation
Request-response. The endpoint receives a message, and sends a correlated message.

Input:

_menuUserRequest ( soap:body, use = literal )

pWebuser type string

pCulturalRef type string

pTobIn type tobMenupGetMenuUserIn

  • GET_MENU_USER
    • WEBUSER - required , cannot be null; - type string
Sponsor our Newsletter | Privacy Policy | Terms of Service