Jump to content

Recommended Posts

I am having a huge headache.  I am doing this in SoapUI:

DESIRED CALL / REQUEST
 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:own="www.ownyourliferewards.co.za" xmlns:own1="http://schemas.datacontract.org/2004/07/OwnYourLife.WebServices.WebServicesBase" xmlns:own2="http://schemas.datacontract.org/2004/07/OwnYourLife.WebServices.Generic.DataObjects">
       <soapenv:Header/>
       <soapenv:Body>
          <own:AuthenticateMember>
             <!--Optional:-->
             <own:request>
                <!--Optional:-->
                <own1:SecurityToken>9415CD31-0C7E-40AB-A45F-D3538B98B96B</own1:SecurityToken>
                <!--Optional:-->
                <own2:MembershipNumber>200803407801</own2:MembershipNumber>
             </own:request>
          </own:AuthenticateMember>
       </soapenv:Body>
    </soapenv:Envelope>

I am doing the following in PHP and Nusoap:

   

<?php
    require_once('nusoap.php');
    $client = new nusoap_client('https://integrationqa.ownyourliferewards.co.za/RTService.svc?wsdl' 'wsdl');
    $client->soap_defencoding='utf-8';
    $err = $client->getError();
    
    if ($err) {
        echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
    }
    
    $param = array('request'=> array('MembershipNumber' => '200803407801', 'SecurityToken' => '9415CD31-0C7E-40AB-A45F-D3538B98B96B' ));
    $result = $client->call('AuthenticateMember', $param, '', '', $header );
    if ($client->fault) {
        echo '<h2>Fault</h2><pre>';
        print_r($result);
        echo '</pre>';
    } else {
        // Check for errors
        $err = $client->getError();
        if ($err) {
            // Display the error
            echo '<h2>Error</h2><pre>' . $err . '</pre>';
        } else {
            // Display the result
            echo '<h2>Result</h2><pre>';
            print_r($result);
            echo '</pre>';
        }
    }
    echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';

WHAT I AM GETTING WITH THE ABOVE CODE:

   

<?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
        <SOAP-ENV:Body>
            <AuthenticateMember xmlns="www.ownyourliferewards.co.za">
                <request>
                    <MembershipNumber>200803407801</MembershipNumber>
                    <SecurityToken>9415CD31-0C7E-40AB-A45F-D3538B98B96B</SecurityToken>
                </request>
            </AuthenticateMember>
        </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

As you can see, there are some important bits missing.

1) The `own:`, `own1:`, and `own2:` "namespaces" (if that is what they are) are missing.

2) There is no header as per the desired example.

Any kind of fix or workaround will be sincerely appreciated.

Edited by jacquesg1
Link to comment
https://forums.phpfreaks.com/topic/297211-please-assist-with-a-nusoap-issue/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.