我想更改生成的wsdl文件中的URL,
我在JEE中开发了一个应用程序然后生成了wsdl文件,但是生成的文件中的URL没有得到证实,
当我将wsdl的url放在导航器中时,生成文件并显示contenu,但是当我在API PHP或Java中使用相同的URL时,我收到错误
<wsdl:service name="CleverSMSUser">
<wsdl:port binding="tns:CleverSMSUserSoapBinding" name="CleverSMSUserImplPort">
<soap:address location="http://services.*****:8080/******/ws/user"/>
</wsdl:port>
</wsdl:service>
所以我想改变肥皂地址如下(当然在ssl中)
<wsdl:service name="CleverSMSUser">
<wsdl:port binding="tns:CleverSMSUserSoapBinding" name="CleverSMSUserImplPort">
<soap:address location="https://services*****fr:8443/****/ws/user"/>
</wsdl:port>
当我在PHP API中运行代码时出现此错误
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://services.******/cleversms/ws/user?wsdl' : failed to load external entity "https://services.*******:8443/******/ws/user?wsdl"
</wsdl:service>
我在PHP中的代码如下
try{
//$ms = ServiceProvider::get('user');
$context = stream_context_create(array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
));
$ms=new SoapClient(
'https://*******/*****/ws/user?wsdl',
array(
// Stuff for development.
'trace' => 1,
'exceptions' => true,
'cache_wsdl' => WSDL_CACHE_NONE,
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
'verify_depth' => 0,
// Auth credentials for the SOAP request.
'login' => 'majdi',
'password' => 'majdi',
)
);
$credit = $ms->getCreditsLeft();
echo "credit: ".$credit;
}
通知比我使用HTTP网址(不是HTTPS)时,代码工作正常没有任何问题
我使用JBOSS 6.01
任何帮助请解决此问题