besimple / besimplesoapclient Goto Github PK
View Code? Open in Web Editor NEWNOT MAINTAINED - [READ-ONLY] Subtree split of the BeSimpleSoap -- clone into BeSimple/SoapClient/ (master at BeSimple/BeSimpleSoap)
Home Page: http://besim.pl/
NOT MAINTAINED - [READ-ONLY] Subtree split of the BeSimpleSoap -- clone into BeSimple/SoapClient/ (master at BeSimple/BeSimpleSoap)
Home Page: http://besim.pl/
I'm experimenting with Wsdl2PhpGenerator + BeSimple to generate classes and execute SOAP calls based on the WSDLs I'm provided with by the customer.
Some of those WSDL files have circular references in their imports causing the WsdlDonwnloader to loop in the download() and resolveRemoteIncludes methods.
Since I'm quite new to this stuff I wonder if
Thanks in advance,
Joost Pastoor
Currently communicating via SSL with a SelfSigned certificatie is troublesome. By adding the CURLOPT_SSL_VERIFYHOST option (set to False), it works as expected.
Should be able to set that option as part of the options in the constructor.
Thank you so much for this library!
When using the library I get an error "General security error (No certificates were found for decryption (KeyId))". When I don't set up service security object, the request goes through, and I see in the logs how the third party service respond to me. But the library throws an error "Call to a member function getPublicKey() on null".
How can I solve this problem?
The following errors seems to occur when issuing multiple requests to a SOAP web service.
PHP Fatal error: Uncaught exception 'ErrorException' with message 'Warning: curl_setopt(): 293 is not a valid cURL handle resource in XYZ/vendor/besimple/soap-client/src/BeSimple/SoapClient/Curl.php line 121' in XYZ/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php:65
Stack trace:
#0 [internal function]: Symfony\Component\HttpKernel\Debug\ErrorHandler->handle(2, 'curl_setopt(): ...', 'XYZ...', 121, Array)
#1 XYZ/vendor/besimple/soap-client/src/BeSimple/SoapClient/Curl.php(121): curl_setopt(Resource id #293, 10002, 'https://eu1-api...')
#2 XYZ/vendor/besimple/soap-client/src/BeSimple/SoapClient/SoapClient.php(137): BeSimple\SoapClient\Curl->exec('https://eu1-api...', '<?xml version="...', Array)
#3 XYZ/vendor/besimple/soap-client/src/BeSimple/SoapClient/SoapClient.php(204): BeSimple\SoapClient\SoapClient->__doHttpRequest(Object(BeSimple\SoapClient\SoapRequest))
#4 XYZ/vendor/besimple/soap-cli in XYZ/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php on line 65
Is there a rationale to ignore those HTTP status codes?
Some services provide their own wsdl url but with a 301 redirection…
Deprecated function: Return type of BeSimple\SoapClient\SoapClient::__getLastRequest() should either be compatible with SoapClient::__getLastRequest(): ?string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 571
I created a pull request to fix the depraction issues #34
CURLOPT_FOLLOWLOCATION => true
Hi, Is it possible to have a simple example of a SwA? I'm not able to see any example for this case.
This is the code I use for connecting with basic auth:
`$options = array(
'login' => $this->container->getParameter('ws_username'),
'password' => $this->container->getParameter('ws_password')
);
$client = new SoapClient($this->container->getParameter('wsdl_documents'), $options);
$params = array (
"number" => $number,
"fullClassName" => $fullClassName
);
$response = $client->Download($params);`
The exception I've got is:
Cannot find dispatch method for {}parameters
Thanks a lot
Hi,
I only installed BeSimpleSoapClient, trying to follow http://besim.pl/SoapBundle/soapclient/configuration.html#client-configuration, I couldn't find any information about adding it to the Kernel. If I don't, I have an error when I try to use my console commands, saying:
[Symfony\Component\Config\Exception\FileLoaderLoadException]
Cannot import resource "....). Looked for namespace "be_simple_soap", found "framework", "securit
y", "twig", "monolog", "swiftmailer",.....
It could be very interresting to be able to auto generate the classmap files by just accessing to the wsdl exposed.
Like this library ?
https://github.com/walle/wsdl2phpgenerator/wiki
Thanks for all !
I'm following the tuts in:
http://besim.pl/SoapBundle/soapclient/configuration.html
When I need to call wsdl function in Symfony2 the errors comes immediatly.
So I validated it in this site:
https://www.wsdl-analyzer.com
and suposely everything is fine. I think is something inside the client library that fails in parsing the wsdl xml.
Also I've tried using this and works fine:
$client= new \SoapClient($wsdl);
$result = $client->__call('hello', array('name' => 'Scott'));
from Symfony2 page example: http://symfony.com/doc/current/cookbook/web_services/php_soap_extension.html
But I find nice your approach to services container use. So I would like this works for me.
Debugging never get passed this line:
$client = $this->container->get('besimple.soap.client.demoapi');
The url supplied for 'wsdl' parameter in 'config.yml' works fine, because I test it separatelly in the browser.
Apache Alias: /soap is for: http://localhost/soap
Directory: C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app
Is there any issue with corporative proxy server, do I need to add the exclusions for loopback (127.0.0.1/localhost). It seems like the url arrives corrupted or incomplete.
When I debugged the class: WsdlDownloader, inside the function: download(...,..,..,)
I gets 404 Page because something went wrong in this line.
In line 102 is where the reponseBody isn't inaccurate.
102: if ($responseSuccessfull) {
$response = $this->curl->getResponseBody();
Warning: DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1
The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.
The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.
The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.
The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.
It would be great to have the possibility to plug a psr logger to a client, and have requests and responses logged, for debugging purposes.
Hello,
When I have a soap method without any parameters, the WSDL operation tag it's generated with the attribute parameterOrder empty. When trying to load the file with .NET wsdl.exe
I get This web service does not conform to WS-I Basic Profile v1.1.
Looking at WS-I Basic Profile v1.1 specification, I found this phase:
R2305 A wsdl:operation element child of a wsdl:portType element in a DESCRIPTION MUST be constructed so that the parameterOrder attribute, if present, omits at most 1 wsdl:part from the output message.
I think it refers that the attribute parameterOrder it mustn't be present if empty.
Curl.php Line 87:
$proxyHost = $options['proxy_host'].(isset($options['proxy_port']) ? $options['proxy_port'] : 8080);
Is there a missing ":" between Proxy Host:Port?
PS:
Thank you for the BeSimpleSoapClient
When BeSimple Soap client uses Ws:Security filter and connects to .Net WSE enabled webservices with Password Digest mechanism, the following Exception is thrown
The security token could not be authenticated or authorized ---> System.InvalidOperationException:
WSE563: The computed password digest doesn't match that of the incoming username token.
There is a issue in the Way the BeSimple Soap client calculates the Digest.
Hello,
Would be great to have the timeout option in the client. [PHP: SoapClient]((http://php.net/manual/en/soapclient.soapclient.php)
//
// setting a connection timeout (fifteen seconds on the example)
//
$client = new SoapClient($wsdl, array("connection_timeout" => 15));
I would create the PR for this feature if I had enough knowledge.
SoapClientBuilder has methods for the creation of the client with options.
public function withTrace($trace = true)
But again don't know how to use them.
Any guidance?
Thanks for your work.
Hi, I would like to know how to use the WSSE Filter class. I don't really know how to integrate with your great SOAP client.
Do you think you can help me, or at least point me in the right direction?
Thanks!!
-Ricardo
The service with which I integrate does not support encryption of the body. Therefore, when I send requests, an error "General security error (No certificates were found for decryption (KeyId))" comes up. How to use this library without service key for encryption?
Hi,
I have a problem with the BeSimpleSoapClient:
It does not add the ns1-Namespace to Envelope and Parameters.
When I do the request with php's \SoapClient, it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://my/namespace"><SOAP-ENV:Body><ns1:getPlacesByPart><ns1:part>ha</ns1:part></ns1:getPlacesByPart></SOAP-ENV:Body></SOAP-ENV:Envelope>
when I do the same Request with BeSimpleSoapClient, I get this request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><parameters><item><key>part</key><value>ha</value></item></parameters></SOAP-ENV:Body></SOAP-ENV:Envelope>
and my Web service quits with "OperationFormatter encountered an invalid Message body"
I am initializing the SOAPClient using the Symfony2 Bundle, so I haven't been able to play with the parameters too much (as I have yet to find a way to pass parameters to the constructor), so I'm sorry if I missed a simple point.
Is this a bug or am I just missing a feature?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.