Jump to content

SOAP ERROR


dug

Recommended Posts

Folks,

 

I'm making a soap call to: http://api5.silverpop.com/SoapApi?wsdl

 

The xml soap request I'm trying to invoke is this:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sil="SilverpopApi:EngageService.SessionMgmt.Login">
   <soapenv:Header/>
   <soapenv:Body>
      <sil:Login>
         <sil:USERNAME>?</sil:USERNAME>
         <sil:PASSWORD>?</sil:PASSWORD>
      </sil:Login>
   </soapenv:Body>
</soapenv:Envelope>

 

My php code:

 

public function loginRequest(){

$client = new SoapClient('https://api5.silverpop.com/SoapApi?wsdl', array("trace"=> 1));

$error = 0;
    
try {
           $login = $client->__call('Login', array('USERNAME'=>'xxx', 'PASSWORD'=>'xxx!'));
	       
} catch (SoapFault $fault) {
         
		$error = 1;
		print('<pre>');

		echo htmlentities($client->__getLastRequest());
		echo htmlentities($client->__getLastResponse());
		print('</pre>');
	}
        
        if ($error == 0) {       
        
		$res = $client->RESULT;
            
		var_dump($res);
	}

}

 

But I keep getting this error:

 

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="SilverpopApi:EngageService.SessionMgmt.Login"><SOAP-ENV:Body><ns1:Login/><param1>Ma201dqdq!</param1></SOAP-ENV:Body></SOAP-ENV:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
     <soap:Body>
         <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>Schema Validation processing failed </faultstring>
            <faultactor></faultactor>
            <detail>
                  <source>
                    <errorcode>324002</errorcode>
                    <trace>
                        Fault Name: SchemaValidationError
                        Error Type: SchemaValidationFailure
                        Description: Schema Validation processing failed 
                        Root Cause Code: -19719
                        Root Cause : XMLSchema Validation Error: Expecting a child element but found none
                        Root Cause Additional Info : [0] XML Parsing Error: XMLSchema Validation Error: Expecting a child element but found none (XMLSCHEMA_ErrChildElemMissing)
                        [1] Parser Error Trace: //SOAP-ENV:Envelope[0]/SOAP-ENV:Body[0]/ns1:Login[0]
                        [2] XMLSchema Validation Error: Expecting a child element but found none (XMLSCHEMA_ErrChildElemMissing)
                        Service: EngageApiService
                        Endpoint: EngageSoapApiClientService
                        Operation (Client):Login
                        FlowTransitionState : Client_Request_System_Error
                        Policy : SystemFirst
                        GenericSystemAssertion
                    </trace>
                </source> 
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

 

I've been scratching my head for days now without any joy.  any help much much appreciated.

 

Link to comment
https://forums.phpfreaks.com/topic/245670-soap-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.