Test Whether SOAP Is Running Properly?

Mar 17, 2011

Programatically, I want to test whether SOAP is working fine on my clients machine.The machine can be windows/linux.I want to get the SOAP version as well.I'm using PHP.Similarly, I want to do it for WS02/WSF.

View 1 Replies


PHPUnit - Running A Particular Test Suite Via The Command Line Test Runner

Is it possible to specify which test suite to run from a configuration file via the command line test runner? For example, if I have the following xml configuration:

<phpunit ...>
<testsuite name="My Test Suite 1">
<testsuite name="My Test Suite 2">

Can I have it run only "My Test Suite 1"?

View 2 Replies

Properly Encode HTML Within XML For SOAP?

I'm attempting to communicate with Exchange 2007, and there are known bugs/problems with doing UpdateItem() so I'm manually communicating over cURL, building my own XML instead of letting the SOAP client do it. It all works fine, but I need to be able to properly encode HTML to fit within the elements of XML.

I know about html_encode() and htmlspecialchars() but I am unsure whether or not these are proper to use and whether or not in the future it may not encode correctly, and screw up the SOAP communication.

As a side note, if it matters, the communication will be in both English and Russian, so it needs to be Unicode safe.

View 1 Replies

Setup Test Such That $_SERVER And $_GET Are Properly Set?

I am writing some PHP code to parse incoming URLs. It relies heavily on PHP globals such as $_SERVER and $_GET. I am thinking of manually setting these up in PHPUnit unit test setUp() function. Is there a better way of doing this?

View 1 Replies

Function Not Running Properly?

Could someone please explain why there is a difference between

function foo($a){$blah = $a}.......


function foo() { $blah = $CONSTANT}.......

The top method is working for me, the other is not. Specifically the below finds the if statement false:

$this->setsession($user->id,$user->email, ($user->activated == 1) ? STATUS_ACTIVATED : STATUS_NOT_ACTIVATED);

if ($user->activated == 0) { // fail - not activated
$this->error = array('not_activated' => '');

While this one finds it true:


if ($user->activated == 0) { // fail - not activated
$this->error = array('not_activated' => '');

View 1 Replies

Write A Simple File To Test Whether This Controller Class Is Working Properly?

followed by my previous website development,we have built several controller classs corresponding to entities that will appear in our website development.and our website is very simple:just a shopping website for customers to book bus for travel.

Now I am assigned a challenging task that need to be done,that is ,for a single controller class,I need to write a test case to test whether it is working properly.For example,we have a controller class called "JobsController",like:

require_once 'php/controllers/Controller.php';

require_once 'php/models/Jobs.php';

class JobsController extends Controller[code]....

and all other Controller class are almost the same,just with name changes. how on to write a simple php file to test whether this Controller Class is working properly.After studying your code,I could get my hands on it to work with the rest controllers myself.

View 1 Replies

Code Does Not Running Properly (not To Mention The Other Stuff I Added)?

I tried editing one of my PHP scripts myself and I messed it up.

Specifically, lines 13/14:
"$query = "UPDATE bbuild set Status='0' WHERE OrderID='$id'";
mysql_query($query); "

Does not run properly any more when they use to. (not to mention the other stuff I added) All of the new code is after that line. Below is the script before/after my modifications.



$dbname = "melennet_bbuild";
mysql_select_db($dbname) or die("MySQL Error: " . mysql_error());[code]....

View 1 Replies

Test Whether Running From Cake Console?

I have a CakePHP Console Shell that works fine until a Model->afterFind() tries to add some data to the results which includes adding links, which doesn't seem to work while being called from the Console.Is there a way to test in the Model->afterFind() callback function whether it's being called from a Console Shell, so that I can skip the troublesome section that I don't need anyway?

View 2 Replies

Getting Error While Running Phpunit Test?

I made one file in ryapi folder connection.php in this file i putted this code :

require_once 'PHPUnit/Framework.php';
class DataTest extends PHPUnit_Framework_TestCase
* @dataProvider provider


View 1 Replies

Load Test A Web Application Running On An IIS 6 Server?

I am wanting to load test a web based application that we are hosting on an IIS server (Windows 2003, IIS 6, PHP 5.2.0, MySQL 5.0.22). What are the best tools for :

a) load testing
b) catching bottlenecks
c) catching memory leaks

update: I found that MS Web App Stress tool was the best in my case as I could record header information and therefore the data that my Flash components were sending to some PHP pages that connect to the database. Selenium didn't record this for me. BrowserMob looks like a good service but again Selenium was not able to capture Flash in the same way as MSWAS.

View 3 Replies

Mysqli Statement Parameter Not Found Running PHPunit Test Under Eclipse?

I run PHPunit tests via Apache, ou directly in Eclipse (ZendStudio in fact). All run well via Apache, but under Eclipse i have this error :

zend mysqli statement execute error no data supplied parameters prepared statement

The php version is the same (5.2.10), ZendFramework is 1.9 and here is the code

function isValidProject($sName)
$db = Zend_Db_Table::getDefaultAdapter();
$req = $db->prepare('SELECT id_project FROM sys_projects WHERE url_alias=?');


I have tried with this way too, with the same result

$req = $db->query('SELECT id_project FROM sys_projects WHERE url_alias=?', array($sName));

View 1 Replies

Running Symfony Unit Test Returns "There Is No Open Connection"?

Symfony seems to have a problem opening a database connection while running unit test. I have my test env specified in config/databases.yml:

class: sfDoctrineDatabase


View 1 Replies

SOAP Server Doesn't Correctly Process UTF8 Strings From C# SOAP Client?

I have a PHP SOAP server (using nuSOAP) that I consume with a C#-based application. When the C# application submits a request, the strings are UTF-8 encoded. I verified using a network sniffer that the byte sequences are valid UTF-8. However, when PHP gets then and I post them to the database or send them by email, it appears to be printed like standard ASCII, the UTF encoding bytes are treated as characters.I have the same issue with the C# app receiving UTF-8 from the SOAP server.NET interprets each byte as a CHAR instead of a BYTE. I had to write a small function that converts each CHAR to a BYTE and then converts that to a UTF-8 string and that's working perfectly. The question is, what do I need to do on the PHP server side to correctly process the incoming SOAP requests as UTF-8 for MySQL and the mail() function? I've tried utf8_encode() and utf8_decode() but those mangle the string even worse.

View 2 Replies

SOAP Returning SOAP Fault - Server Was Unable To Process Request With .asmx Web Service

I am having difficulty in getting a SOAP request working properly , which requires XML string as input. It's throwing "SOAP Fault: Server was unable to process request. ---> Value cannot be null. Parameter name: s" no matter what input i send , i have used nusoap but to no avail , PHP soap library. The code i am using is:

$aOptions = array(
'location' => 'http://webserviceurl.asmx',
'uri' => 'http://tempuri.org/',
"style" => SOAP_RPC,


I am banging my head against a wall from last two days, searched google for this problem but got no answer that solves or guide me through.

View 1 Replies

SOAP - Fatal Error: Uncaught SoapFault Exception: [soap:Server] Schema Validation Processing Failed

Fatal error: Uncaught SoapFault exception: [soap:Server] Schema Validation processing failed in C:wwwEngagesoapconsumeWSAPI.php:11 Stack trace: #0 C:wwwEngagesoapconsumeWSAPI.php(11): SoapClient->__soapCall('Login', Array) #1 C:wwwEngagesoapconsumeWSAPI.php(24): comsumewsdl->dorequest() #2 {main} thrown in C:wwwEngagesoapconsumeWSAPI.php on line 11

I belive I'm missing out on Schema Validation, but not sure how to do that. I'd really really appriciate any input in here. So here is the WSDL: Code: [URL] and this is my php login request

PHP Code:
class comsumewsdl {
public $username="xxxxxx";
public $password="xxxxx";
public function dorequest(){
$client = new SoapClient("http://api5.silverpop.com/SoapApi/?wsdl");
$response = $client->__soapCall("Login", array("USERNAME"=>$this->username, "PASSWORD"=>$this->password));
try {

View 10 Replies

Empty Object While Using SOAP To Consume WCF SOAP Service?

Problem is: I need to consume a SOAP service that is provided by some MS WCF server (3rd party server, no access, no debug, no logs, transport secured via https).

WSSE Authentication works like a charme - but every time I send an XML to the server, all data structures are empty. The XML is generated using

new SoapVar( $xml, XSD_ANYXML)

[...]Envelope, Header, Body etc.[...]


c_id is perfectly parsed on WCF server side while everything below newAccount is just empty. I've sniffed the network traffic but I don't see any errors on transport level.

If the XML is directly sent to the server without using PHP SOAP, it works like expected.

View 1 Replies

.net - Sending A Soap Header With A WSDL Soap Request ?

I'm extremely new to SOAP and I'm trying to implement a quick test client in PHP that consumes a ASP.NET web service. The web service relies on a Soap Header that contains authorization parameters.Is it possible to send the auth header along with a soap request when using WSDL?

My code:


$service = new SoapClient("http://localhost:16840/CTI.ConfigStack.WS/ATeamService.asmx?WSDL");
$service->AddPendingUsers($users, 3); // Example[code]...

How would the auth header be passed in this context? Or will I need to do a low lever __soapCall() to pass in the header? Also, am I invoking the correct soap call within PHP?

View 3 Replies

PHP5 Soap And XML Custom Soap Header

I am having a problem getting a custom soap header to work with PHP5.

What I require is something like this:


What I get is :


I would like to remove the namespace tags.

The code I use to get this is: ....

View 4 Replies

Enable SOAP On A Web-hosting That Don't Support SOAP?

In my php5 web-application i use zend mailMerge for constructing doc/pdf files from user data. Unfortunately, when i write a code, browser throws me an error: "Uncaught exception 'Zend_Soap_Client_Exception' with message 'SOAP extension is not loaded." I contacted with my hosting provider and asked about installation soap. He told me that my hosting doesn't support soap. Also i found a "nusoap" library. As written there, this library can if server don't support soap. But after enabling this library in my web-application, nothing changes.

View 1 Replies

Consume A SOAP Response Using The SOAP Extension?

I am trying to consume a SOAP response using the PHP-SOAP extension - I have got everything to work except the actual element values returned - below is an excerpt from the xml returned:


View 2 Replies

Setting Test Items In CodeIgniter Unit Test Not Effecting Report Output?

I'm running CodeIgniter 2.0 and I have a test controller setup with this code in the index function. It seems like no matter what I put in the "set_test_items" variable, the report never changes. It always show all of the possible information regarding the test. I feel like I must be missing something blatantly obvious here. What am I missing?

$this->unit->set_test_items(array('test_name', 'result'));
echo $this->unit->report();

Also, I just tried to var_dump() on the visible items when the report is generated and the array only contains the two things I passed in, so it is being set correctly.

View 1 Replies

Unit Testing - Are There Any Open Source SimpleTest Test Cases That Test It's SPL Interfaces

I have quite a few objects in my system that implement the PHP SPL Iterator interface. As I write them I also write tests. I know that writing tests is generally NOT a cut 'n paste job.

But, when it comes to testing classes that implement Standard PHP Library interfaces, surely it makes sense to have a few script snippets that can be borrowed and dropped in to a Test class - purely to test that particular interface. It seems sensible to have these publicly available. So, I was wondering if you knew of any?

View 1 Replies

Updating An Existing Site - Setting Up Test Space - Set The Base Test URL?

I'm just logging into a products based site which has been developed by someone else (third party), but now we need to take it over. I have currently copied all live files into a "test" directory so that the test version of the website can be accessed via [URL]. The problem with this is that I need to modify a few central scripts, including .htaccess, to refer to URLs and php included files using the /test/ rather than trying to access the live files. For example, .htaccess live code:

RewriteRule ^brands/([a-z0-9_-]+)/([a-z0-9_-]+)/?$ /scripts/brand_list.html?brand=$1žion=$2&%{QUERY_STRING}

has been modified by me, to:

RewriteRule ^brands/([a-z0-9_-]+)/([a-z0-9_-]+)/?$ /test/scripts/brand_list.html?brand=$1žion=$2&%{QUERY_STRING}

(notice the test directory in there) However, I am finding that I need to continue to update certain files - for example, now I need to update the template files so that their URLs, which are currently structured as follows:


need to be changed to:


I am just wondering if there is a better way to do this. Rather than updating the template files, is there a way in PHP (or .htaccess) to tell the entire site in my test directory to refer to all directories WITHIN the test directory? Maybe something like < base href > in HTML?

View 1 Replies

Create A Separate Seed For Some Test Inside One Test Class?

How do I create a separate seed for some test inside one test class? PHPUnit documentation includes this example

require_once 'PHPUnit/Extensions/Database/TestCase.php';
class DatabaseTest extends PHPUnit_Extensions_Database_TestCase


But in this example I have one seed for all the tests inside my class.

View 1 Replies

Write Unit Test To Test The Stack Functionality?

I want to write a unit test for a class handling a stack of positive integers. There are 4 methods in such class: push($x), pop(), getSize(), purge().

class Stack {
private $stack = array();
public function __construct() {
public function push($data) {
array_push($this->stack, $data);
public function pop() {
return array_pop($this->stack);

View 1 Replies

Linux - SOAP Local Server Error Soap-Error: Parsing WSDL: Couldn't Load?

I'm struggling to get SOAP working on server locally. It's running on server and from my local PC I can use it, but when I'm using ssh to the server (both PC on linux) php gives me the error:

Error occurred: SOAP-ERROR: Parsing WSDL: Couldn't load from 'url ?WSDL' : failed to load external entity "url"

I tried Lynx locally from server and it's working fine. So problem is somewhere in PHP, SOAP...

View 2 Replies

Copyrights 2005-15 www.BigResource.com, All rights reserved