Soap.php help

Soap.php on Magento error.

I am trying to get from this path:

http://www.abctest.com/index.php/api/v2_soap/index/?wsdl=1

to this:

http://www.abctest.com/api/v2_soap/index/?wsdl

Basically I am trying to get rid of “index.php” in the middle

I do not know the function that could bring me “http://www.abctest.com/” instead of “http://www.abctest.com/index.php

What should I change? ???

The part of the code that is building this url is this:

protected function getWsdlUrl($params = null, $withAuth = true)
{
$urlModel = Mage::getModel(‘core/url’)
->setUseSession(false);

   $wsdlUrl = $params !== null
       ? $urlModel->getUrl('*/*/*', array('_current' => true, 

‘_query’ => $params))
: $urlModel->getUrl(’//*’);

   if ( $withAuth ) {
       $phpAuthUser = 

rawurlencode($this->getController()->getRequest()->getServer(‘PHP_AUTH_USER’,
false));
$phpAuthPw =
rawurlencode($this->getController()->getRequest()->getServer(‘PHP_AUTH_PW’,
false));
$scheme =
rawurlencode($this->getController()->getRequest()->getScheme());

       if ($phpAuthUser && $phpAuthPw) {
           $wsdlUrl = sprintf("%s://%s:%s@%s", $scheme, 

$phpAuthUser, $phpAuthPw,
str_replace($scheme . ‘://’, ‘’, $wsdlUrl));
}
}

   return $wsdlUrl;

:slight_smile:

Normally you’d set up your web server to rewrite the URL to get what you want.

Similar to how URLs like yoursite.com/blog/2016/05/05.html could be rewritten into yoursite.com/blog.php?year=2016&month=05&day=05

Sponsor our Newsletter | Privacy Policy | Terms of Service