php-soapclient

SoapClient save request to file instead of sending it

Is there a way to save the soap request SoapClient sends when calling __soapCall to a file instead of sending it to the actual server? I'm trying to save the soap requests to a queue and then send them over a period of time (the requests will be very different). I'm using Zend_Soap. ...

Workaround for PHP SOAP request failure when wsdl defines service port binding as https and port 80?

I am consuming a SOAP web service using php5's soap extension. The service' wsdl was generated using Axis java2wsdl, and whatever options are used during generation result in the port binding url being listed as https://xxx.xxx.xxx.xxx**:80** If I download the wsdl to my server, remove the port 80 specification from the port binding lo...

Inspect XML created by PHP SoapClient call before/without sending the request

The question: Is there a way to view the XML that would be created with a PHP SoapClient function call BEFORE you actually send the request? background: I am new to WSDL communication, and I have a client who wants me to develop in PHP, a way to communicate with a WSDL service written in ASP.NET. I have gotten pretty far, but am runni...

How to generate a PHP soap client code?

Is there a way to generate a PHP soap client from a wsdl file? I mean something like wsdl.exe or svcutil.exe in .net, that generates code for a class that can be the client of a service, not something like: $WSDL = new SOAP_WSDL($wsdl_url); $client = $WSDL->getProxy(); My problem is that I want the php client to be able the wor...

SOAP error encoding external reference in PHP

I am trying to use a function from SOAP, which will fetch details about a specific news item. The problem is that I don't get the expected results, just a a strange error. I am using the built-in SOAP client in PHP5. My error is: Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: External reference 'ht...

How do I consume a webservice returning complexTypes in PHP?

I am using PHP 5.2.10 and I am trying to consume a webservice which returns complex data types using the standard SOAP extension. The problem is that SoapClient does not populate objects which are nested into other objects / array of objects. A simplified example of what I get when I call the getUtente method, specifying "my_unique_id" ...

PHP - how to create this SOAP XML request?

Hi! I'm trying to figure out how to structure data properly in PHP in order to make a SOAP XML request like this: <typ:saveRequest locationName="example.com"> <typ:datatype owner="ME" class="OPEN"> <typ:order>1</typ:order> <typ:datavalue>[email protected]</typ:datavalue> </typ:datatype> </typ:saveRequest> Th...

How to create php Soap Client from wsdl with array of complex types

Hi I am looking for help with phpSoap Client call. Server is exepecting message in the following format. <upd:Profile> <satsystem>sys1</satsystem> <Id>10029</Id> <email>[email protected]</email> <msgId>987asdfghbv5633</msgId> <timestamp>2009-11-22T11:04:30.000Z</timestamp> ...

How can I pass in an array as a value into a PHP soapclient request?

How can I pass in an array as a value into a PHP soapclient request? I have a soapclient instantiated and connected already. I then try to make a call to a webservice method that expects 3 parameters (string, string, hashmap). Here is what I expected to work below. But when viewing the xml output, the params node is empty. soapclient-...

PHP SoapClient() function returning a single XML string

I am having difficulty with the PHP SoapClient() function. The SOAP request is successful, but the response is returned as an object containing a single XML string with the key "any". For example: <?php $params = array('strUsername' => 'Test', 'strPassword' => 'Test'); $client=new SoapClient('http://www.example.com/webs...

I don't know where to start with WSDL and SOAP in PHP 5.2+

Hello, I'm a web services newbie and I've tried to learn it looking for tutorials in google... but I didn't found anything really helpfull... Do you know any tutorial / web page / documentation for web services using PHP 5 native SOAP client? I need to implement a SOAP client for fetch/send data from a IIS server (for hotels reservation...

Access Products/Category/Attribute Info from php with Magento API

Need to be able to pull Magento products into an external template. Need to be able to get all products data (description, title, attributes, categories, image, etc). And need to be able to filter by category, attribute and also search on name. These calls will be made from the same server that the Magento install is on. What's the b...

SoapClient Fault in Zend

I'm trying to debug this funky soapClient fault: looks like we got no XML document This is my request: $client = new Zend_Soap_Client('wsdlUrl', array('trace' => 1, 'exceptions' => 0)); echo $client->incomingRequest('user','pass','stuff'); var_dump($client->getLastResponse()); But I can't view the response to know why it's...

Custom header using PHP soap functions

Hi, I am having a problem getting a custom soap header to work with PHP5. Can anybody guide me please. What I require is something like this <SOAP-ENV:Header> <USER>myusername</USER> <PASSWORD>mypassword</PASSWORD> </SOAP-ENV:Header> What I get is : <SOAP-ENV:Header> <ns2:null> <USER>myusername</USER> <PASSWORD>myp...

Speeding up a soap powered website

Hi all, We're currently looking into doing some performance tweaking on a website which relies heavily on a Soap webservice. But ... our servers are located in Belgium and the webservice we connect to is locate in San Francisco so it's a long distance connection to say the least. Our website is PHP powered, using PHP's built in SoapCli...

WSDL using soapclient

Hi, Need to access a webservice using soapclient.I have the following settings. ini_set('default_socket_timeout', 120); $client = new SoapClient( "http://example.com/OnlineOrderProcessingWS.asmx?WSDL", array('proxy_host' => "proxy url", 'proxy_port' => proxy port ) ); $param=array("varname1"=>'value1',"varname2"=>'va...

PHP SOAP Transfering Files

Hey, I am new to SOAP and I am trying to learn how to transfer files (.zip files) between a client and server using PHP and SOAP. Currently I have a set up that looks something like this: enter code here require('libraries/nusoap/nusoap.php'); $server = new nusoap_server; $server->configureWSDL('server', 'urn:server'); $server->ws...

error to connect soap server in php

hai all, i am working on shopping cart project, i need globalpay integration . i got the sample code and run in my localhost it shows me error this. Warning: SoapClient::__construct() [function.SoapClient---construct]: SSL: fatal protocol error in C:\wamp\www\exampls\PHP Web Service Sample (Credit Card) 4.0.0\PHP Web Service Sample ...

Best practices for class-mapping with SoapClient

Using SoapClient's class mapping feature and it's pretty sweet. Unfortunately the SOAP service we're using has a bunch of read-only properties on some of the objects and will throw faults if the properties are passed back as anything but null. Need to filter out the properties before they're used in the SOAP call and am looking for adv...

paypal SoapClient not working

I am using PHP's SoapClient class to connect to paypal. I have a number of problems: The paramaters I pass to the soap call are array('ReturnAllCurrencies'=>0, 'Version'=>'63.0') but as you can see in the request below, 63.0 is put in <param1> whatever that is. I don't even see ReturnAllCurrencies in the request. In this request I ...