php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51944 One-way SOAP requests are not sent, and no error is reported
Submitted: 2010-05-28 18:38 UTC Modified: 2013-02-18 00:34 UTC
From: scottij at arbor dot net Assigned: dmitry (profile)
Status: No Feedback Package: SOAP related
PHP Version: 5.3.2 OS: Mac OS X 10.5.8
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scottij at arbor dot net
New email:
PHP Version: OS:

 

 [2010-05-28 18:38 UTC] scottij at arbor dot net
Description:
------------
One-way soap requests appear to fail silently.  A one-way soap request is a request which only defines an input message, and has no output message.  When making such a soap request, the request is never sent but no errors are generated.  The call just returns.

My php configure line was:

./configure --with-curl --enable-exif --enable-soap --with-snmp --with-openssl

Here is a sample WSDL entry that fails:

<definitions name="TestSoap"
             targetNamespace="urn:TestSoap"
             xmlns:tns="urn:TestSoap"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
             xmlns="http://schemas.xmlsoap.org/wsdl/">

<message name="OneWayRequest">
    <part name="oneArg" type="xsd:string"/>
</message>

<portType name="TestSoapPort">
    <operation name="OneWay">
        <input message="OneWayRequest"/>
    </operation>
</portType>

<binding name="TestSoapBinding" type="tns:TestSoapPort">
    <operation name="OneWay">
      <soap:operation soapAction="urn:TestSoapAction"/>
      <input>
        <soap:body use="encoded"
                   namespace="urn:TestSoap"
                   encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
    </operation>
</binding>

<service name="TestSoapService">
    <port name="TestSoapPort" binding="tns:TestSoapBinding">
      <soap:address location="https://127.0.0.1/soap"/>
    </port>
</service>

</definitions>


Test script:
---------------
/* Using the above WSDL */

$user = 'someuser';
$password = 'password';
$client = new
     SoapClient($wsdl, array(
        "location" => "https://127.0.0.1/soap",
        "login" => "$user",
        "password" => "$password",
        "trace" => 1,
        "exceptions" => 0,
        "authentication" => SOAP_AUTHENTICATION_DIGEST
        )
     );

$result = $client->OneWay('foo');
if(is_soap_fault($result)) {
    print "SOAP Fault: (faultcode: ($result->faultcode), " .
            "faultstring: ($result->faultstring))\n";
} else {
    print_r($result);
}

exit;

Expected result:
----------------
The script should open a connection to the specified soap server and send a request to call the OneWay function.  This does not happen.

Actual result:
--------------
Fails silently -- no error, no backtrace, and no output.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-08 11:50 UTC] tony2001@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2010-06-15 11:52 UTC] dmitry@php.net
-Status: Assigned +Status: Feedback
 [2010-06-15 11:52 UTC] dmitry@php.net
I can't reproduce it on Linux.

I changed the location URL in WSDL file and got the request as expected.

May be the issue related to your server configuration. Please try to switch from https:// to http://, try to remove authentication.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC