Jump to content

dug

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Everything posted by dug

  1. dug

    SOAP ERROR

    Folks, someone here must know how to solve the above SOAP issue I'm facing. Please anyone?
  2. Its your query thats the issue, look at Master....reply
  3. does your query execute ok? do some error checking on your query.
  4. dug

    SOAP ERROR

    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.
  5. dug

    SOAP

    anyone please?
  6. dug

    SOAP

    Guys, I've spen the whole day trying to get this SOAP to work to a point that I am all soaped out!! so any help much appriciated. i wrote a soap class that does not work for this specific request. the raw soap envelop looks like this: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:log="SilverpopApi:EngageService.SessionMgmt.Login"> <soapenv:Body> <log:Login> <log:USERNAME>[email protected]</log:USERNAME> <log:PASSWORD userpassword</log:PASSWORD> </log:Login> </soapenv:Body> </soapenv:Envelope> my current code returns exception->Wrong Version. Now i figured that I am not passing the header, I've been playing with soapVar and SoapHeader at no joy. so here is my php: class comsumewsdl { public $username="xxxx"; public $password="xxxx"; public $parameters; public function dorequest(){ //$client = new SoapClient("http://api5.silverpop.com/SoapApi?wsdl", array('trace' => 1)); $client = new SoapClient(null, array( "location" => "http://api5.silverpop.com/SoapApi?wsdl", "uri" => "http://schemas.xmlsoap.org/soap/envelope/", "uri" => "SilverpopApi:EngageService.SessionMgmt.Login", "trace" => 1 ) ); $this->parameters = array('USERNAME'=>$this->username, 'PASSWORD'=>$this->password); try { $response = $client->__soapCall("Login", $this->parameters); echo "<pre>\n"; echo htmlentities ($response); echo "\n"; } catch(Exception $exception){ //$call=$client->__getRequest($response); echo $client->__getLastRequest(); echo 'General Exception: ', $exception->getMessage(); exit; } } } $callclass = new comsumewsdl(); $callclass->dorequest();
  7. hello, i have the below js script that is supposed to connect to the wsapi service, but it always erros out with: Server unknown error. does anyone here please know what i am doing wrong? <html> <title>Test Connect to SilverPop</title> <head> <script type="text/javascript"> var serviceURL = "http://services.vtrenz.net/receiver.cfc?wsdl"; var username = "username"; var password = "password"; var XMLRequest = '\ <?xml version="1.0" encoding="UTF-8"?> \ <incoming-requests> \ <request description="insertContact"> \ <incoming-data> \ <contact databaseID="e1271218-1b41-4547-be35-da0476f5f3ff" iMarketingSyncID="" syncID=""> \ <field id="First Name">lolamain</field> \ <field id="Last Name">Jedi</field> \ <field id="Email">[email protected]</field> \ </contact> \ </incoming-data> \ </request> \ </incoming-requests>'; // Using webservice.htc var callID = 0; function getWSDL() { myWebService.useService(serviceURL,"service"); } function getResult() { output.innerText = event.result.value; } function handleResult(result) { if(result.error) { var xfaultcode = result.errorDetail.code; var xfaultstring = result.errorDetail.string; var xfaultsoap = result.errorDetail.raw; alert("All NOT OK: \n" + xfaultcode + '\n' + xfaultstring + '\n' + xfaultsoap); } else { alert("All OK"); } } function Lookup() { var co = myWebService.createCallOptions(); co.async = false; co.userName = username; co.password = password; co.funcName = "incomingRequest"; co.params = XMLRequest; callID = myWebService.service.callService(co); handleResult(callID); } </script> </head> <body onLoad="getWSDL()"> <h1>Consuming a webservice by HTML Page</h1> <div id="myWebService" style="behavior:url(webservice.htc)" onresult="getResult()"></div> <input Type="Button" Value="Go!" OnClick="Lookup()"> <div ID="output"></div> </body> </html>
×
×
  • 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.