soap-client

How to send complex types from PHP SoapClient to ASP.NET SOAP server?

浪子不回头ぞ 提交于 2020-01-23 04:03:56
问题 Hello I'm having problems sending arrays, structs and arrays of structs from PHP to an ASP.NET SOAP server... Anyone have a sollution for this? I've googled for days and any sollution worked for me. Perphaps I'm forgetting something... There are examples of my code: $client = new SoapClient($options); $pCriteria = new stdClass(); $pCriteria->type=1; $pCriteria->capacity=4; //Test 1 (fail): $resp = $client->GetRooms(array("pCriteria"=>$pCriteria)); //Test 2 (fail): $resp = $client->GetRooms

PHP SoapClient - Returning attribute values in a response

别来无恙 提交于 2020-01-21 09:07:31
问题 I'm attempting to get values from a webservice. The responce is formated as.. <campaign Id="200"> <name> test </name> </campaign> PHP Code SoapClient( "WSDL"); $return = $client->GetCampaigns('Username', 'Password' ); Yet when I attempt to access the return, I get just a stdClass with the name attribute.. public 'Campaign' => array 0 => object(stdClass)[46] public 'Name' => string 'chris test' (length=10) 回答1: I find that I have to supply a "classmap" to SoapClient to get it to map the

SOAP::RPC::Driver formatting problems. How can I change it?

送分小仙女□ 提交于 2020-01-17 03:34:27
问题 I'm dealing with a SOAP webservice call from a server that is expecting to receive method calls with the paramaters in the format of: <urn:offeringId> 354 </urn:offeringId> But SOAP::RPC::Driver is generating messages in the form of: <offeringId xsi:type = "xsd:int">354</offeringId> The server keeps erroring when it gets these messages (especially since it's expecting offeringId to be a custom type internal to itself, not an int). Is there anyway to configure the driver to format things the

Disable native Soap class in PHP5 and use nuSoap?

南楼画角 提交于 2020-01-14 14:10:38
问题 I've spent the last week developing code to connect to a Web Service using the nuSoap library. I just deployed the code to production, but immediately started getting error's that I hadn't seen before. I traced the problem back to a line of code that is trying to instantiate a new soapclient object. It turns out that both libraries have a class named 'soapclient' and the one that's being created in production is from the native Soap library, not the nuSoap library that I'm including. How can

Disable native Soap class in PHP5 and use nuSoap?

守給你的承諾、 提交于 2020-01-14 14:10:26
问题 I've spent the last week developing code to connect to a Web Service using the nuSoap library. I just deployed the code to production, but immediately started getting error's that I hadn't seen before. I traced the problem back to a line of code that is trying to instantiate a new soapclient object. It turns out that both libraries have a class named 'soapclient' and the one that's being created in production is from the native Soap library, not the nuSoap library that I'm including. How can

Disable native Soap class in PHP5 and use nuSoap?

僤鯓⒐⒋嵵緔 提交于 2020-01-14 14:09:00
问题 I've spent the last week developing code to connect to a Web Service using the nuSoap library. I just deployed the code to production, but immediately started getting error's that I hadn't seen before. I traced the problem back to a line of code that is trying to instantiate a new soapclient object. It turns out that both libraries have a class named 'soapclient' and the one that's being created in production is from the native Soap library, not the nuSoap library that I'm including. How can

TLS v1.2 ciphers to use in PHP NUSOAP SoapClient

风格不统一 提交于 2020-01-13 08:51:19
问题 I want to connect to a server that only supports TLS 1.2. What possible ciphers can I specify to stream context in the PHP NUSOAP SoapClient creation? <?php $objSoapClient = new SoapClient( "https://example.com/?wsdl", array( "encoding"=>"ISO-8859-1", "stream_context"=>stream_context_create( array( "ssl"=>array("ciphers"=>"<????>") ) ) ) ); ?> 回答1: TLS v1.2 is described in RFC5246 , you can read it here. List of ciphers you can find in openssl wiki, use the second line without trailing 256 .

PHP SoapClient removing element with name

≯℡__Kan透↙ 提交于 2020-01-11 09:03:24
问题 I have a WSDL that has an element that requires an attribute: <xsd:complexType name="claim"> <xsd:annotation> <xsd:documentation>Claim Element</xsd:documentation> </xsd:annotation> <xsd:sequence> <!-- other elements removed --> </xsd:sequence> <xsd:attribute name="claimId" type="xsd:nonNegativeInteger" use="required" /> </xsd:complexType> In terms of generated xml, it should look like: <claims> <claim claimId="1"> <!-- elements removed --> </claim> <!-- more claims --> </claims> Within a

How to maintain sessions in SoapClient - PHP

隐身守侯 提交于 2020-01-07 04:42:45
问题 I'm trying to access a web service that requires a call to 2 methods, one for login and an other one for the real results. After doing tests in SoapUI I could get the results after checking "maintain HTTP session'. So I made a login request, then the result request and it worked. How can I handle "SOAP sessions" in PHP? 回答1: Looking at php's SoapClient class does not look like that it has code to automatically handle sessions persistence. Instead you could do something like getting the

how to capture outgoing soapclient request?

三世轮回 提交于 2020-01-06 09:56:29
问题 I've tried a couple of potential solutions (using ob_ for instance) I found, but not having any luck. I'd like to be able to display to screen the outgoing request in order to debug it. 回答1: I've debugging of SoapClient by extending the SoapClient and overriding methods like _soapcall() and _doRequest(). In my projects I have a logger that writes the XML/arguements to a file. My example includes both _ soapCall() and _doRequest() . I print out different stuff in both methods. Might suit your