Skip to content

Instantly share code, notes, and snippets.

PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't bind to service in /Users/edward/Sites/scratch/test.php on line 3
PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't bind to service in /Users/edward/Sites/scratch/test.php:3
Stack trace:
#0 /Users/edward/Sites/scratch/test.php(3): SoapClient->SoapClient('https://integce...', Array)
#1 {main}
thrown in /Users/edward/Sites/scratch/test.php on line 3
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't bind to service in /Users/edward/Sites/scratch/test.php:3
Stack trace:
#0 /Users/edward/Sites/scratch/test.php(3): SoapClient->SoapClient('https://integce...', Array)
mysql Ver 15.1 Distrib 5.5.33a-MariaDB, for Linux (i686) using readline 5.1
<?
function _compare_dates($utc_date_str, $date_obj){
$date1 = DateTime::createFromFormat(DateTime::ISO8601, $utc_date_str);
$date2 = clone($date_obj);
print "--------------------------------------------------------------------------------\n";
var_dump("Non-UTC Date1:");
var_dump($date1);
var_dump("Non-UTC Date2:");
var_dump($date2);
<?php
$taxonomies = array(
array(
'name' => 'people',
'members' => array(
array('name' => 'Bill Clinton', 'cheater' => true),
array('name' => 'Barrack Obama', 'cheater' => false),
array('name' => 'John F Kennedy', 'cheater' => true),
),
$.ajaxSetup({
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type) && sameOrigin(settings.url)) {
// Send the token to same-origin, relative URLs only.
// Send the token only if the method warrants CSRF protection
// Using the CSRFToken value acquired earlier
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});
// usage inside a vm:
var fooVM = function(){
var self = this;
var resource_uri = ko.observable('/api/v1/foo/');
var bar = ko.observable(1);
var baz = ko.observable(1);
ko.saveOnChange(self,['bar']);
}
var f = new fooVM();
f.bar(2); // causes a PUT to /api/v1/foo/
class UserSpecificResourcesAuthorization(Authorization):
def read_list(self, object_list, bundle):
# This assumes a ``QuerySet`` from ``ModelResource``.
return object_list.filter(user=bundle.request.user)
def read_detail(self, object_list, bundle):
# Is the requested object owned by the user?
return bundle.obj.user == bundle.request.user
def create_list(self, object_list, bundle):
var $root = $('html, body');
$('a.smoothscroll').click(function() {
var href = $.attr(this, 'href');
$root.animate({
scrollTop: $(href).offset().top
}, 500, function () {
window.location.hash = href;
});
return false;
});
class ApiAccessTest(ResourceTestCase):
def setUp(self):
super(ApiAccessTest, self).setUp()
pw = 'secret'
self.edward_user = User.objects.create_user(username='edward@example.com', password=pw)
self.edward_user.save()
self.alan_user = User.objects.create_user(username='alan@example.com', password=pw)
self.alan_user.save()