dug
Members-
Posts
20 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
dug's Achievements
Newbie (1/5)
0
Reputation
-
Folks, someone here must know how to solve the above SOAP issue I'm facing. Please anyone?
-
Its your query thats the issue, look at Master....reply
-
does your query execute ok? do some error checking on your query.
-
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.
-
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>username@company.com</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();
-
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">name@domain.com</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>
-
thanks for the help. had it fixed already after trial and error, it was to do with the padding. cheers
-
Hi guys, got the following css code that works fine, but i just dont seem to able to have space betweeh each sub-menu title. i.e. Main-menu Ttitle: INFO Sub-menu Title: About us Job Oppertunites what i want is space between "About us" and "Job Oppertunities". [code=php:0] <style type="text/css"> #nav, #nav ul { /* all lists */ padding: 0; margin:0; list-style: none; line-height: 1; } #nav a { display: block;/*display sub below main menu*/ width: 8em; } #nav li { /* all list items */ float: right; width: 6em; } #nav li ul { /* second-level lists */ position: absolute; /*hide sub content, display whem mouse over*/ background: transparant; width: 7em; font-size:12px; list-style-type: none; left: -999em; } #nav li:hover ul, #nav li.sfhover ul { /* lists nested under hovered list items */ left: auto; } #content { clear: left; } [/code] thanks
-
thanks fenway. Would the syntax be the same for TO_Days () (i.e. WHERE TO_Days (c.start_date - c.emd_date)? cheers
-
fenway could you care for a demo how to use DATEDIF() with my query above plz? dug
-
[quote author=royax link=topic=106116.msg424128#msg424128 date=1156871450] Hi there! I'm new to php and mysql. I just downloaded and installed wamp server on my xp! now I want to create a personal website with registration form and log-in. How to create this database in phpmyadmin? and how to connect to the database? i'm kinda new with this stuff! Can somebody help me! If I'm in a wrong place pls help find one! [/quote] i am not sure how you create a database in phpmyadmin, but the general syntax is: create database database_name; use database_name; create table bla( your_column_titiles ..... .... ..); To connect to a database using php: <php? $mysql_connect = mysql_connect("$hostname", "$username", "$password") or die("Unable to connect to MySQL"); echo "Connected to MySQL<br>"; mysql_close($mysql_connect); ?>
-
Hi fenway, the TO_Days () function what exatly does it do? Tired looking it up on mysql.com with no success. Cheers Dug
-
thanks fenway. sorry for re-posting. while you here on the initial post for this question: Re-write the query to return all courses that are more than 1 day in length you said i should subtract start and end date, is this what you meant? SELECT c.ID AS 'Course ID', date_format(c.start_date,'%d/%m/%Y') AS 'Start Date', date_format(c.end_date,'%d/%m/%Y') AS 'End Date' , t.description AS 'Course Description', FROM media_courses AS c INNER JOIN media_courses_type AS t ON t.ID = c.media_courses_type_ID [b]WHERE c.start_date – c.end_date[/b] ORDER BY c.start_date ASC
-
Hi folks, is the below query correct? retrieve all courses in the past that have a name that starts with Cert SELECT c.ID AS 'Course ID', date_format(c.start_date,'%d/%m/%Y') AS 'Start Date', date_format(c.end_date,'%d/%m/%Y') AS 'End Date' , t.description AS 'Course Description', FROM media_courses AS c INNER JOIN media_courses_type AS t ON t.ID = c.media_courses_type_ID WHERE c.end_date < NOW() AND t.description LIKE 'Cert%' ORDER BY c.start_date ASC Thanks dug