dug
Members-
Posts
20 -
Joined
-
Last visited
Never
Everything posted by dug
-
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
-
[quote author=fenway link=topic=106082.msg424019#msg424019 date=1156862276] Currently, it's returning all future courses... though I don't see the need for a GROUP BY, since it's an INNER JOIN, and will only return one record per media_course record anyway. You should be able to change the where clause easily to check the "past" and examine the course title; for duration, simply subtract the start & end dates. [/quote] Hi fanway, thanks for the help. as for the second question is this what you had in mind: 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 and as for substracting the the dates how do i do that? Can you plz care for a reply? thanks dug
-
Hi all, Can someone care to please help me answer the questions below for this query? 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.start_date > NOW() GROUP BY c.ID ORDER BY c.start_date ASC what does the query above would return? how do i Re-write the query to retrieve all courses in the past that a name that starts with Cert how do i Re-write the query to return all courses that are more than 1 day in length Cheers Dug
-
Thanks for your reply....No thats not an error....i figuerd that i could not display the output of all rows because i did not store them in a temp array. Got the problem solved though now. Cheers jones
-
Hi Hi I have the folloing php code that is not outputing all rows: <?php // create short variable names $username="root"; $password=""; $database="pool"; //connect to server $mysql_connect=mysql_connect("localhost",$username,$password); //select database $mysql_select=mysql_select_db($database) or die( "Unable to select database"); //query database $query = "SELECT SUM(price) AS TOTAL, tabletype FROM ptable WHERE timestamp1>=curdate() GROUP BY tabletype;"; //execute query $result=mysql_query($query); if (!$result){ echo mysql_error();; exit; } //retrieve the query result $num=mysql_numrows($result); if (!$num){ echo 'No match try a another search'; exit; } //display output of rows if($num){ mysql_close(); //loop through result right upto last row for ($i=0; $i < $num; $i++) { $lname=mysql_result($result,$i,"tabletype"); $amountowned=mysql_result($result,$i,"TOTAL"); } } ?> <?php echo $lname;?> <?php echo $amountowned;?> When i run the queryoutside php it produces the right output, 3 rows. Here is the output: +-------+----------------------+ | TOTAL | tabletype | +-------+----------------------+ | 4.00 | Snooker Championship | | 3.50 | Standard Pool | | 6.00 | Standard Snooker | +-------+----------------------+ But running it on php only outputs the last row. Can anyone help Dug