发出php curl soap请求时接收错误
接收错误: a:InternalServiceFault未找到与给定消息匹配的MessageFilter。未找到与给定消息匹配的MessageFilter。在System.ServiceModel.Routing.MessageRpc.RouteToSingleEndpoint[TContract]RoutingConfiguration routingConfig 位于System.ServiceModel.Routing.ProcessRequestAsyncResult`1..TorRoutingService服务,消息消息,异步回调,对象状态 在System.ServiceModel.Routing.RoutingService.BeginProcessRequest[TContract]消息消息中,异步回调,对象状态 在System.ServiceModel.Routing.RoutingService.System.ServiceModel.Routing.IRequestReplyRouter.BeginProcessRequestMessage消息中,异步回调,对象状态 在AsyncInvokeBeginBeginProcessRequestObject,Object[],AsyncCallback,Object 在System.ServiceModel.Dispatcher.AsyncMethodInvoker.InvokeBeginObject实例中,对象[]输入,异步回调,对象状态 在System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBeinMessageRPC&rpc 位于System.ServiceModel.Dispatcher.ImmutableDispatcheRuntime.ProcessMessage5MessageRpc&rpc 位于System.ServiceModel.Dispatcher.ImmutableDispatcheRuntime.ProcessMessage31MessageRpc&rpc 位于System.ServiceModel.Dispatcher.MessageRpc.ProcessBoolean isOperationContextSetSystem.InvalidOperationException 尝试发出soap/xml curl请求的代码:发出php curl soap请求时接收错误,php,xml,web-services,curl,soap,Php,Xml,Web Services,Curl,Soap,接收错误: a:InternalServiceFault未找到与给定消息匹配的MessageFilter。未找到与给定消息匹配的MessageFilter。在System.ServiceModel.Routing.MessageRpc.RouteToSingleEndpoint[TContract]RoutingConfiguration routingConfig 位于System.ServiceModel.Routing.ProcessRequestAsyncResult`1..TorRou
$url = "https://domain.com/catalog";
$soap_do = curl_init();
curl_setopt($soap_do, CURLOPT_URL, $url );
curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_TIMEOUT, 10);
curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true );
curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($soap_do, CURLOPT_POST, true );
curl_setopt($soap_do, CURLOPT_POSTFIELDS, $xmlRequest);
curl_setopt($soap_do, CURLOPT_VERBOSE, TRUE);
curl_setopt($soap_do, CURLOPT_HTTPHEADER, array("Content-Type: text/xml", "SOAPAction: \"/soap/action/query\"", "Content-length: ".strlen($xmlRequest)));
$result = curl_exec($soap_do);
print_r($result);
这是我第一次尝试使用soap,我不确定我做错了什么。$xmlRequest变量中的xml直接来自我传递特定帐户详细信息所需的三部分文档,如下所示:
$xmlRequest = '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="https://domain.com/Gateway.svc/Catalog/2012/12" xmlns:ns1="https://domain.com/Gateway.svc/Catalog/2012/12">
<soapenv:Header/>
<soapenv:Body>
<ns:GetItemsBySourceCode>
<ns:catalogSourceCodeItemsRequest>
<ns1:Header>
<ns1:AccountAuth>
<!--Provide Service Credentials -->
<ns1:AccountId>accountid</ns1:AccountId>
<ns1:Password>password</ns1:Password>
</ns1:AccountAuth>
<ns1:Application>
<ns1:ApplicationIdentifier/>
<ns1:ClientIdentifier/>
<ns1:ProgramIdentifier/>
</ns1:Application>
<ns1:Parms>
<ns1:Parm>
<ns1:Name/>
<ns1:Value/>
</ns1:Parm>
</ns1:Parms>
<!--Not Required -->
<ns1:TransactionId/>
</ns1:Header>
<!--Optional End Date for Catalog Data Pull-->
<ns1:endDate/>
<ns1:sourceCode>SourceCodeHere</ns1:sourceCode>
<!--Optional Starting Date for Catalog Data Pull -->
<ns1:startDate/>
</ns:catalogSourceCodeItemsRequest>
</ns:GetItemsBySourceCode>
</soapenv:Body>
</soapenv:Envelope>';
您不使用soap库吗?请联系$url的服务提供商并讨论此问题。错误消息看起来像是在他们的末端。对于你这边的代码,你需要与你的问题分享你特别想问什么。