Bug #73043 [Nab]: WSDL: import schema if WSDL uri does NOT end with a slash

From: Date: Fri, 09 Sep 2016 14:26:24 +0000
Subject: Bug #73043 [Nab]: WSDL: import schema if WSDL uri does NOT end with a slash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203923@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73043&edit=1

 ID:                 73043
 Updated by:         requinix@php.net
 Reported by:        filip dot rydlo at gmail dot com
 Summary:            WSDL: import schema if WSDL uri does NOT end with a
                     slash
 Status:             Not a bug
 Type:               Bug
 Package:            SOAP related
 Operating System:   Debian 8.5 Jessie x64
 PHP Version:        5.6.26RC1
 Block user comment: N
 Private report:     N

 New Comment:

The original URL has never worked for me, so I don't know.

An alternative is to download and use the WSDLs locally. Any relative schemaLocation should continue
to work without adjustment.


Previous Comments:
------------------------------------------------------------------------
[2016-09-09 14:22:36] filip dot rydlo at gmail dot com

Unfortunatelly: Yes, I am.

I have common sense. So, sadly, this simple fix was, of course, the *first* thing I have tried!

Try the fixed link in a web browser for yourself. The original link does.
It does NOT work as of today: 2016-09-09T16:20:00+0200 :

https://pg.eet.cz/eet/services/EETServiceSOAP/v3/?wsdl

------------------------------------------------------------------------
[2016-09-09 14:06:59] requinix@php.net

>> however PHP is behaving correctly.
>Are You *absolutely* sure about all this?
As I said, I welcome any evidence or documentation or such indicating the opposite, but I'm
quite sure I'm right.

Are *you* sure that you have the correct WSDL URL? Try using /v3/?wsdl in your code instead - I bet
it will work.

------------------------------------------------------------------------
[2016-09-09 13:20:16] filip dot rydlo at gmail dot com

I would like to apologize to my government.

"millions of dollars" was of course clearly an *overstatement* from me.

I believe it could have cost several tens of thousands dollars, maybe up to one houndred thousand
USD.  And mainly just because of the expensive infrastructure (a powerful dedicated server for the
EET webservice is definitely needed. It will need to consume lots of data daily).

------------------------------------------------------------------------
[2016-09-09 12:42:15] filip dot rydlo at gmail dot com

>> they are properly defined in the WSDL file
> I disagree.

Oh, NO! This cannot be. Can't be real! Sorry, that I am so shocked. But ... I just can't
believe this is happening!!

This WSDL is given to us, developers, by out government! It HAS TO BE correct and absolutely without
any error. :-(((

Considering how many millions of dollars it has *undoubtedly* cost us, the tax payers! It has to be
*perfect* , or we have NO chance ever implementing this webservice
(Which would/will, btw, help our country a lot, adding at least 0.5 billions of USD annually into
the state fund + probably even much more on taxes collected! )
---

Yes, I am pretty familiar with web development (13 years). Yet, I only was suspecting (feeling)
this, but NOT logically/consciously KNOW *this*.

And I would never suspect/expect an error in the WSDL given by the government in the first place!
---


> however PHP is behaving correctly.
Are You *absolutely* sure about all this?

Then please: Tell (explain) this to the government!

Thank You soooooooooooo much :-)

------------------------------------------------------------------------
[2016-09-08 04:10:00] requinix@php.net

> they are properly defined in the WSDL file
I disagree.

The XSD 1.1 Part 1 specification says [1]
> 4. When schema location values (i.e. schemaLocation attributes on ...<import>...)
> are... relative references, then the [base URI] of the [owner element] must be
> used to resolve the relative references.

In your example, the "owner" is the source WSDL document and the "base URI" is
https://pg.eet.cz/eet/services/EETServiceSOAP/v3?wsdl.

Unfortunately uncited in the XSD spec, RFC 3986 is what details [2] how to resolve relative
references, and if you're familiar with web development then you should already know that a
reference "a" relative to a base "b/c?d" resolves to "b/a", while
relative to "b/c/?d" resolves to "b/c/a". The trailing slash is very
significant.

Therefore "EETXMLSchema.xsd" relative to "https://pg.eet.cz/eet/services/EETServiceSOAP/v3?wsdl"
resolves to "https://pg.eet.cz/eet/services/EETServiceSOAP/EETXMLSchema.xsd".
Clearly this is not the intent of the WSDL's author, however PHP is behaving correctly. Can you
provide any references to suggest otherwise?

[1] https://www.w3.org/TR/xmlschema11-1/#schema-loc
[2] https://www.ietf.org/rfc/rfc3986.txt section
5.2

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=73043


--
Edit this bug report at https://bugs.php.net/bug.php?id=73043&edit=1


Thread (10 messages)

« previous php.bugs (#203923) next »