php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75325 SOAP-ERROR: Encoding: External reference ''
Submitted: 2017-10-06 04:40 UTC Modified: 2021-04-04 04:22 UTC
Votes:4
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:0 (0.0%)
From: peter_liang at vtech dot com Assigned: cmb (profile)
Status: No Feedback Package: SOAP related
PHP Version: 7.0.24 OS: CentOS 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 - 3 = ?
Subscribe to this entry?

 
 [2017-10-06 04:40 UTC] peter_liang at vtech dot com
Description:
------------
I have a webservice which was created by Java, when I use SoapClient to invoke it, it throws a SoapFault exception which says:
SOAP-ERROR: Encoding: External reference ''.

However, $soap->__getLastRequest() and $soap->__getLastResponse() return the correct XML - the same as I did using SoapUI.

Here is the request and response XMLs for references.

1) Request XML.
<ns1:checkEligibility><caller-id>XXXXX</caller-id><cust-key>1234456</cust-key><device-serial-num/><package id="12345-54321" productId="prod12345-54321"/><package id="54321-12345" productId="prod54321-12345"/></ns1:checkEligibility>

2) Response XML
<ns2:checkEligibilityResponse><package-eligibility>
<package status="1" href="" checksum="" name="" id="12345-54321"/><result description="This package is not defined in CRM" reason="checkout.undefined.package" status="block"/>
</package-eligibility>

<package-eligibility><package status="1" href="" checksum="" name="" id="54321-12345"/><result description="This package is not defined in CRM." reason="checkout.undefined.package" status="block"/></package-eligibility></ns2:checkEligibilityResponse>

Not sure why the SoapFault exception still throws even request and response are correct.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-06 06:38 UTC] peter_liang at vtech dot com
Seems the issue has existed since PHP 5.2.
https://stackoverflow.com/questions/2004860/soap-error-encoding-external-reference-in-php
 [2021-03-23 14:39 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-03-23 14:39 UTC] cmb@php.net
> Not sure why the SoapFault exception still throws even request
> and response are correct.

Are they?  The error message hints at an unescaped & (ampersand)
in the response.  Please double-check whether that is the case.
Also check the behavior with any of the actively supported PHP
versions[1]?

[1] <php.net/supported-versions.php>
 [2021-04-04 04:22 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 "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC