Issue Type: Improvement Created: 2008-08-29T07:38:08.000+0000 Last Updated: 2008-11-13T14:10:08.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)
Reporter: Thomas Gelf (tgelf) Assignee: Benjamin Eberlei (beberlei) Tags: - Zend_Soap_Server
Related issues: - ZF-4172
Attachments: - AutoDiscoverSetUri.php.patch
Zend_Soap_AutoDiscover is using Zend_Uri::factory('http://' ... to create a services uri - it should at least be able to correctly discover https.
Kind regards, Thomas Gelf
Posted by Thomas Gelf (tgelf) on 2008-08-29T07:41:59.000+0000
You can find a possible way to fix this issue in the attached patch file.
Posted by Marcus Welz (lucidix) on 2008-08-29T10:19:29.000+0000
Would it make sense to allow for more flexibility with setting the Uri? For cases of mod_rewrite, in context of MVC, etc. Patch attached.
Posted by Thomas Gelf (tgelf) on 2008-08-29T16:16:22.000+0000
Full ack, absolutely great!
Posted by Apaella (apaella) on 2008-09-03T03:30:10.000+0000
I ran in the same problem. Same solution :D
Posted by Marcus Welz (lucidix) on 2008-09-12T13:27:30.000+0000
Zend_Soap_AutoDiscover.targetNamespace.patch allows for setting the soap endpoint url separately from the target namespace.
Posted by Thomas Gelf (tgelf) on 2008-09-16T06:25:14.000+0000
Like for Ing. Jitka Darbujanova in ZF-4172 this issue is a showstopper for me, Zend_Soap_AutoDiscover disallows HTTPS and setting uri / location / whatever on a personal choice is impossible. The patches attached to this bug report are easy to understand and shouldn't break anything - it would be great if someone could take care of this ticket. Issue is still there in 1.6.1.
Best regards, Thomas Gelf
Posted by Thomas Gelf (tgelf) on 2008-09-16T12:27:32.000+0000
Oops! I somehow managed it to toggle assignment, sorry. I'll let it be reassigned automatically...
Posted by Benjamin Eberlei (beberlei) on 2008-10-07T00:47:12.000+0000
Sorry, all three patches are bogus..
The first one is just a hack to solve the HTTPS problem, the second and third ones ignore the setFunction alltogether. None provides unittests and documentation changes.
Also the one with setUri (Zend_Soap_Autodiscover.uri.php) has the problem that when setClass is called BEFORE setUri, the uri setting is ignored. This is not desired behaviour since its common expectation that the setter functions of webservice objects (like SOAPServer) only begin to act on calling $server->handle();
I have attached a patch that allows changing the default wsdl location uri only by constructor, to handle the problem described in the above paragraph. I have added a unittest to check for the changed webservice url and a proposed change to the documentation.
To allow for a setUri function to be accessible for the public scope, underlying changes to the WSDL component have to be done. Therefore my setUri function is just private for the time being, hoping that the WSDL component will be refactored someday to be more flexible.
Posted by Benjamin Eberlei (beberlei) on 2008-10-07T00:48:50.000+0000
Posted by Benjamin Eberlei (beberlei) on 2008-10-07T00:50:05.000+0000
The corresponding file to this comments are AutoDiscoverTestSetUri.php.patch and AutoDiscoverSetUri.php.patch
Posted by Benjamin Eberlei (beberlei) on 2008-10-26T11:14:29.000+0000
Fixed in Trunk via second constructor parameter $uri or function setUri($uri).
Posted by Thomas Gelf (tgelf) on 2008-10-27T05:58:04.000+0000
Thank you for fixing this, setUri() is a great addition. However my initial bug report regarded hardcoded http schema and autodetection. My proposed patch is not a hack, schema detection is done the same way in other parts of the Zend Framework (Controller, OpenID...). And it requires no new documentation as it fixes existing behaviour conforming to what a developer would expect from an "autodiscover" component.
Not using HTTPS is not an option for most webservices today, and if there is an autodetection component it should also detect wheter I'm running HTTPS or not. I do NOT want to have to either do schema detection in my controllers and I do NOT want to hardcode / configure URIs in my application. Schema detection should work out of the box - and adding port detection for non-standard ports would also be a nice-to-have feature.
Adding schema detection from my very first patch to your setUri() function would solve this, adding port detection (like Zend_OpenId::selfUrl()) would be a nice addition.
Best regards, Thomas Gelf
NB: Sorry for impudently reopening this issue ;-)
Posted by Benjamin Eberlei (beberlei) on 2008-10-27T08:51:07.000+0000
i am sorry, misunderstood the issue (overstepped it). I'll fix the HTTPS issue right away.
Posted by Benjamin Eberlei (beberlei) on 2008-10-27T09:05:14.000+0000
Fixed detection of HTTPS schema in trunk
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:08.000+0000
Changing issues in preparation for the 1.7.0 release.
Have you found an issue?
See the Overview section for more details.