小编M4x*_*ell的帖子

Symfony 2 SOAP CLIENT

请告诉我为什么我必须放在"\"前面\SoapClient.当我删除"\",然后我有一个错误.

public function indexAction($name)
{

    try {
            $client = new \SoapClient('some WSDL', array('trace' => 1));
            $a = array('Login'=>'1', 'Password'=>'1', 'LetterNo'=>'1');
            $response = $client->__soapCall('GetTracking', array($a));
            ladybug_dump($response->GetTrackingResult->Status);
        } catch (\SoapFault $e) {
            var_dump($e->getMessage(), $client->__getLastResponse()); die();
    }
    return array('response' => $response);
}
Run Code Online (Sandbox Code Playgroud)

感谢帮助

php client soap symfony

2
推荐指数
1
解决办法
1万
查看次数

在新窗口中返回响应

如何在新窗口中返回响应对象?我的意思是,我需要响应html页面,但在新窗口中像目标空白一样.

    $response = new Response($html);
    $response->setStatusCode(200); 
    return $response; 
Run Code Online (Sandbox Code Playgroud)

上面的代码返回html页面,但在同一个选项卡中.

response target symfony

1
推荐指数
1
解决办法
4299
查看次数

标签 统计

symfony ×2

client ×1

php ×1

response ×1

soap ×1

target ×1