Description

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

Comments

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.

Cheers,
Thomas

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.

Thanks!

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.

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.