Giter Club home page Giter Club logo

besimplesoapclient's People

Contributors

aschamberger avatar christiankerl avatar francisbesset avatar lsmith77 avatar mremi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

besimplesoapclient's Issues

How use it without service key for encryption?

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?

Exception when connecting to .Net WSE Enabled Webservice using Password Digest Mechanism

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.

Warning: curl_setopt(): 293 is not a valid cURL handle resource

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

Empty parameterOrder attribute for operation tag

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.

Circular references in WSDL cause infinite looping in WsdlDownloader

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

  • Circular References in WSDL and type XMLs is a anti pattern and I should contact the customer about it
  • Is it a known issue that the WsdlDownloader does not support it?
  • Would people be interested in a patch of me where I prevent redownloading WSDLs that are already resolved?

Thanks in advance,
Joost Pastoor

SoapClient example

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

How to add BeSimpleSoapClient to AppKernel in symfony2

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",.....

Ignores 301/302 status codes

Is there a rationale to ignore those HTTP status codes?
Some services provide their own wsdl url but with a 301 redirection…

Mtom issue, bad property

2015-04-24 11-33-55
Hi,

This is normal that your option property is named "$this->options" for "withMtomAttachments()" (and withSwaAttachments and withBase64Attachments) ?

Other methods your option property is named "$this->soapOptions" (this is correct and functional).

But withMtomAttachments is wrong I think...

Warning: DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1

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.

  1. 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.

  2. 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();

Browser output:

Warning: DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1
  1. in vendor/besimple/soap-client/BeSimple/SoapClient/WsdlDownloader.php at line 159 -
    private function resolveRemoteIncludes($xml, $cacheFilePath, $parentFilePath = null)
    {
    $doc = new \DOMDocument();
    $doc->loadXML($xml);
    $xpath = new \DOMXPath($doc);
    $xpath->registerNamespace(Helper::PFX_XML_SCHEMA, Helper::NS_XML_SCHEMA);
  2. at ErrorHandler ->handleError ('2', 'DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1', 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\vendor\besimple\soap-client\BeSimple\SoapClient\WsdlDownloader.php', '159', array('xml' => ' <title>404 Not Found</title>

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80 ', 'cacheFilePath' => 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\app\cache\dev/besimple/soap/cache\wsdl_11edfe41ecb929117fc92d0eb4f1e0de.cache', 'parentFilePath' => 'http://localhost/soap/web/app_dev.php/ws/DemoApi?wsdl', 'doc' => object(DOMDocument)))
    at DOMDocument ->loadXML (' <title>404 Not Found</title>

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80 ')
    in vendor/besimple/soap-client/BeSimple/SoapClient/WsdlDownloader.php at line 159 +
  3. at ErrorHandler ->handleError ('2', 'DOMDocument::loadXML(): Space required after the Public Identifier in Entity, line: 1', 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\vendor\besimple\soap-client\BeSimple\SoapClient\WsdlDownloader.php', '159', array('xml' => ' <title>404 Not Found</title>

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80 ', 'cacheFilePath' => 'C:\EasyPHP\data\localweb\projects\symfony-projects\soap-server-app\app\cache\dev/besimple/soap/cache\wsdl_11edfe41ecb929117fc92d0eb4f1e0de.cache', 'parentFilePath' => 'http://localhost/soap/web/app_dev.php/ws/DemoApi?wsdl', 'doc' => object(DOMDocument)))
    at DOMDocument ->loadXML (' <title>404 Not Found</title>

    Not Found

    The requested URL /soap/web/app_dev.php/ws/DemoApi was not found on this server.


    Apache/2.2.22 (Debian) Server at localhost Port 80 ')
    in vendor/besimple/soap-client/BeSimple/SoapClient/WsdlDownloader.php at line 159 +

[Feature request] logging

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.

Why do I get error "General security error (No certificates were found for decryption (KeyId))"?

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?

BeSimpleSoapClient does not add ns1-Namespace to Envelope and Parameters

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?

Documentation with WSSE Filter

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

Add CURLOPT_SSL_VERIFYHOST as option

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.

PHP 8.1 - Deprecation issues

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

Clien timeout option

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.

Maybe missing : in Curl Class - Proxy

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.