2008年8月7日星期四

[fw-webservices] Publish a self-written WSDL

Hi,

 

I would like to know if there is a ‘best practices way’ of streaming the a self-written WSDL file to the client within the MVC architecture of the ZF.

 

Now I got it working like this:

 

      public function indexAction() {

                       

            $wsdlString = file_get_contents(“/location/of/wsdl/file”);

           

            $response = new Zend_Controller_Response_Http();

            $response->setHeader ( 'Content-Type', 'text/xml; charset=UTF-8', true);

            $response->setBody($wsdlString);

           

            $this->getFrontController()->setResponse($response);

      }

 

Somehow I feel there must be a better way to accomplish this…

 

Greetings,

Dieter Devlieghere

没有评论: