Code Monkey home page Code Monkey logo

Comments (7)

meng-tian avatar meng-tian commented on June 7, 2024
SoapFault: looks like we got no XML document in SoapClient->__soapCall() (line 60 of vendor/meng-tian/php-soap-interpreter/src/Soap.php).

This error means the response from the SOAP server is not an XML. I recommend you debug the content of the response body.

from async-soap-guzzle.

Alluuu avatar Alluuu commented on June 7, 2024

Hi, thanks for the reply!

The response body seems to be fine, as the PHP's own SoapClient returns an array, which it interprets from an XML response it gets.

But there's also the delay, that when default PHP SoapClient returns the response within a second if not sooner, the other one loads for a long time, which could be taken for waiting a timeout.

Best,

Alari

from async-soap-guzzle.

meng-tian avatar meng-tian commented on June 7, 2024

Hi @Alluuu , I am confused. Why SoapClient is involved? Could you please give me a full example so I can reproduce the issue? Thank you.

from async-soap-guzzle.

Alluuu avatar Alluuu commented on June 7, 2024

Hi, SoapClient is only involved in my texts because the same request with SoapClient gives a response, so I assume the request is fine and also the respone. However I'm unable to figure out what might be the issue with using Your Guzzle async SOAP client.

It could easily be me doing something wrong implementing it, because I'm very new to dealing with SOAP and hence I've provided all the code displaying how I implement and use the library.

However the server I do the request with is not mine, and they've only whitelisted my servers IP on their firewall.

I could however show you all of my code and responses off github, but I'm afraid there's not much more than what I've written here already.

I am using PHP7 if that may raise an issue?

from async-soap-guzzle.

meng-tian avatar meng-tian commented on June 7, 2024

Hi @Alluuu Unfortunately I couldn't be able to reproduce as the SOAP server only whitelists your IP. Could you please show me the debug information of following code:

$arguments = [
  'login' => self::$user,
  'password' => self::$pass,
  'location' => self::$endpointUrl,
  'uri' => 'urn:sap-com:document:sap:rfc:functions',
  'trace' => 1,
  'use' => SOAP_LITERAL,
  'style' => SOAP_SINGLE_ELEMENT_ARRAYS,
  'soap_version' => SOAP_1_1,
];

$request_options = array(
  'auth' => [self::$user, self::$pass],
  'verify' => FALSE,
  'debug' => true // An option added here for the purpose of debugging the response
);

$soapVar = new \SoapVar('<FIRST>1234</FIRST><SECOND>ABC</SECOND>', XSD_ANYXML);

$factory = new Factory();
$client = $factory->create(new Client($request_options), NULL, $arguments);

$promise = $client->callAsync(self::$getAllValuesService, [$soapVar]);
return $promise->wait();

from async-soap-guzzle.

Alluuu avatar Alluuu commented on June 7, 2024

Hi,

The debug information as requested:

  • Trying 111.111.111.111...
  • Connected to test.server.ee (111.111.111.111) port 80 (#0) > POST /sap/bc/soap/rfc HTTP/1.1 Host: test.server.ee User-Agent: GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.22-0ubuntu0.16.04.1 Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ= SOAPAction: urn:sap-com:document:sap:rfc:functions#GET_VALUES Content-Type: text/xml; charset="utf-8" Content-Length: 318
  • upload completely sent off: 318 out of 318 bytes < HTTP/1.1 302 Found < Date: Tue, 03 Oct 2017 08:50:24 GMT < Server: Apache < Location: https://test.server.ee/sap/bc/soap/rfc < Content-Length: 221 < Content-Type: text/html; charset=iso-8859-1 <
  • Connection #0 to host test.server.ee left intact
  • Found bundle for host test.server.ee: 0xbc1d5a4a50 [can pipeline]
  • Trying 111.111.111.111...
  • Connected to test.server.ee (111.111.111.111) port 443 (#1)
  • ALPN, offering http/1.1
  • Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@strength
  • successfully set certificate verify locations:
  • CAfile: /etc/ssl/certs/cacert.pem CApath: /etc/ssl/certs
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
  • ALPN, server did not agree to a protocol
  • Server certificate:
  • subject: C=EE; ST=Harjumaa; L=Tallinn; O=Company; CN=test.server.ee
  • start date: Sep 25 12:14:13 2016 GMT
  • expire date: Sep 26 12:14:13 2018 GMT
  • issuer: C=Estonia; L=Tallinn; O=Company; CN=Company CA
  • SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. > GET /sap/bc/soap/rfc HTTP/1.1 Host: test.server.ee User-Agent: GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.22-0ubuntu0.16.04.1 Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ= Content-Length: 318 SOAPAction: urn:sap-com:document:sap:rfc:functions#GET_VALUES Content-Type: text/xml; charset="utf-8" < HTTP/1.1 400 Bad Request < Date: Tue, 03 Oct 2017 08:50:24 GMT < Server: Apache < X-Frame-Options: SAMEORIGIN < Content-Length: 226 < Connection: close < Content-Type: text/html; charset=iso-8859-1 <
  • Closing connection 1 The website encountered an unexpected error. Please try again later.

SoapFault: looks like we got no XML document in SoapClient->__soapCall() (line 60 of vendor/meng-tian/php-soap-interpreter/src/Soap.php).

I've omitted the real IP addresses and url's because of public posting, but kept everything intact.

Best regards,

Alari

from async-soap-guzzle.

Alluuu avatar Alluuu commented on June 7, 2024

I found the issue, if interested.

Apparently my $endpointUrl for the location was an http address and returned bad request. apparently PHP SoapClient checks for this automatically and changes it to https.

I built a SOAP request on my own with curl POST and got a 400 bad request error.

Thank you very much for your time and attention! :)

from async-soap-guzzle.

Related Issues (20)

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.