Обновите значение SOAP с помощью формы PHP - PullRequest
0 голосов
/ 12 апреля 2019

У меня была php-форма для обновления значения SOAP в wsdl, если при использовании SOAPUI он хорошо работает в этом примере сообщения:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sub="http://subscriberprovisioning.ws.domain.com/">
   <soap:Header/>
   <soap:Body>
      <sub:wsUpdateSubscriberProfile>
         <!--Optional:-->
         <subscriberProfile>
            <!--Zero or more repetitions:-->
            <entry>
               <!--Optional:-->
               <key>RSID</key>
               <!--Optional:-->
               <value>12346</value>
            </entry>
         </subscriberProfile>
         <!--Optional:-->
         <subscriberID>123456</subscriberID>
      </sub:wsUpdateSubscriberProfile>
   </soap:Body>
</soap:Envelope>

Но когда я попытался использовать php-форму, эти параметры непередал в wsdl, здесь мой код process.php:

 <?php  
    $rsid= $_POST['RSID'];  
    $number= $_POST['subscriberID'];   
    $soap_exception_occured = false;

    $wsdl_path = 'http://ipnumber:80/services/SubscriberProvisioningService?wsdl';
    $response = '';
    ini_set('soap.wsdl_cache_enabled', '0'); 
    error_reporting(0);
    @ini_set('display_errors', 0);
    try {
        $client = new SoapClient($wsdl_path);
        }
    catch(SoapFault $exception) {
        $soap_exception_occured = true;
        $response .= '\nError occoured when connecting to the SOAP Server!';
        $response .= '\nSoap Exception: '.$exception;
        } 
    $subscriberID=$_POST['subscriberID'];
    $subscriberID = array("RSID" => $rsid, "subscriberID" => $number);
    $profile = new stdClass(); 
    $profile = $client->wsUpdateSubscriberProfile($subscriberID); 
    ?>

и форма:

<form method="POST" action="process.php">
        <div class="inner-form">
          <div class="input-field first-wrap">
              <input name="RSID" id="RSID" type="text" placeholder="Type RSID" />
          </div>
          <div class="input-field second-wrap">
            <input name="subscriberID" id="subscriberID" type="text" placeholder="Type Subscriber ID" />
          </div>
          <div class="input-field third-wrap">
            <button class="btn-search" type="submit">

            </button>
          </div>
        </div>
      </form>

у кого-нибудь есть предложение, как передать это:

<subscriberProfile>
    <!--Zero or more repetitions:-->
    <entry>
       <!--Optional:-->
       <key>RSID</key>
       <!--Optional:-->
       <value>12346</value>
    </entry>
 </subscriberProfile>

Спасибо

...