Page 1 of 1

SOAP Error cannot find parameter

Posted: Sat Jan 09, 2010 7:16 pm
by kendall
Hey guys....

building a Webservices using PHP 5.3. and SOAP/ WSDL

And i'm getting the topic error

I've checked both my client and server and the wsdl file is the same


my client is

Code: Select all

try { var_dump($client->__soapCall("loginBroadcasterByChannelToken", array('x12345y','x7778x','xyz12345abc')));  }
catch (SoapFault $exception)
{
echo 'EXCEPTION='.$exception;
My server is

Code: Select all

public function loginBroadcasterByChannelToken($brand_id,$channel_code,$token){
        if(empty($brand_id) || empty($channel_code) || empty($token))
            return new SoapFault('Server', '', '1 or more service parameters was not specified');
            
        if(($brand_id == __BRAND_ID__) && ($channel_code == __CHANNEL_CODE__) && ($token == __TOKEN_KEY__))
            return uniqid('utvts',true);
        else 'Failed to authenticate '.date('r');
    }
the wsdl involved is

Code: Select all

<xsd:element name="loginBroadcasterByChannelToken">
                <xsd:complexType>
                    <xsd:sequence>
 
                        <xsd:element name="brandId" type="tns:BrandId">
                        </xsd:element>
 
                        <xsd:element name="channelCode" type="tns:ChannelCode">
                        </xsd:element>
                        <xsd:element name="channelToken" type="xsd:string">
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="loginBroadcasterByChannelTokenResponse">
                <xsd:complexType>
 
                    <xsd:sequence>
 
                        <xsd:element name="sessionId" type="tns:SessionId">
                        </xsd:element>
                        <xsd:element name="authMessage" type="xsd:string"
                            minOccurs="0" maxOccurs="1">
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>

Any insight as to what is the "parameter that they cannot find?" as from layman's eye it looks correct to me