Category : soap

I have seen some examples of how to express the policies of a web service with WS-Policy but I don’t understand how to apply those examples with PHP. I have taken these examples from the w3c documentation.. Example 1: (01) <wsp:Policy xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" > (02) <wsp:ExactlyOne> (03) <sp:Basic256Rsa15 /> (04) <sp:TripleDesRsa15 /> (05) </wsp:ExactlyOne> (06) ..

Read more

I’m trying to get a SoapCLient request correctly formed. This is what I have so far, but I keep getting errors about no Username $client = new SoapClient(‘wsdl/Schemas/ServiceManagement.wsdl’, array( ‘trace’ => 1, ‘exception’ => true )); $response = $client->Get(array( "AccessKey" => "ABCDEFGHIJKLMNOP", "ProductID" => "ADSL", "PlanID" => "HOSTED-STANDARD-40GB", "Scope" => "SEARCH", "Parameters" => array(‘Param’ => ..

Read more

I ran into a very interesting problem today. PHP 7.2 SoapClient version 1.2 (just with Cache mode disabled) was unable to load up a remote WSDL but was able to use the Soap listener service at the same base URL (even in the same directory). Any ideas at all? I just copied the WSDL locally ..

Read more

i have a class that set in $obj->setClass() to handle requests in SoapServer . but now i need to set some soapHeader inside that class. How i can set SoapHeader inside that class or access the SoapServer Object ? server.php $svr = new SoapServer(‘http://localhost?wsdl’); $svr->setClass("SampleClass"); $svr->handle(); SampleClass class sample { public function test() { // ..

Read more

I am trying to make a SOAP call using POSTMAN that will duplicate a call I’m making with a PHP code for testing purposes, but I am getting a "Bad request" error message, so I assume my conversion is incorrect. The PHP code is: //Create xml string $xml=new DomDocument(); $xml->createCDATASection(‘![CDATA[]]’); $xml->encoding = ‘utf-8’; $xml->xmlVersion = ..

Read more

I am trying to extract, for example, ServiceType from this SOAP call. In the below example, it is showing FTTN if (VocusDevController::login()) { $client = new SoapClient(‘wsdl/VocusSchemas/WholesaleServiceManagement.wsdl’, array( ‘trace’ => 1, ‘exception’ => true )); try { $response = $client->Get(array( "AccessKey" => "SOMEKEY", "ProductID" => "FIBRE", "Scope" => "QUALIFY", "Parameters" => array(‘Param’ => array(‘_’ => ..

Read more

I am struggling in adding an attribute to a SoapVar-Element. This is the structure i want to creat: <ns:ServiceRequest> <ns:Method>PING</ns:Method> <ns:Property Name="name1">foo</ns:Property> <ns:Property Name="name2">bar</ns:Property> </ns:ServiceRequest> but this is all i get: <ns1:ServiceRequest> <ns1:Method>PING</ns1:Method> <ns1:Property>foo</ns1:Property> <ns1:Property>bar</ns1:Property> </ns1:ServiceRequest> This is my code to create one of the "Property"-nodes: $node = new SoapVar( ‘foo’, XSD_STRING, null, null, ‘Property’, ..

Read more

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <BalanceResponse xmlns="http://gogogo.com/v1"> <UserBalance xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Currency>IDR</Currency> <Real>0.0000</Real> </UserBalance> </BalanceResponse> </s:Body> </s:Envelope> How do I parse these into array? I’ve tried (array) simplexml_load_string($xmlString) , but it always return empty. Sourc..

Read more