【发布时间】:2016-12-23 09:47:42
【问题描述】:
我目前正在尝试从我的 Azure 函数调用 SOAP 服务,这给了我以下错误:
但是,我能够成功处理来自 .NET 应用程序的请求。
HTTP 状态 500 - 请求处理失败;嵌套异常是 org.springframework.ws.soap.saaj.SaajSoapEnvelopeException:不能 访问信封:无法从给定来源创建信封:;嵌套的 例外是 com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: 无法从给定来源创建信封:
这是一个第三方服务,它是用 Java 编写的。我不知道它是如何部署的,但是是的,因为它在控制台应用程序中运行,我觉得该服务没有任何问题:
string soapEndPoint = "https://<<url>>/endpoints";
string serviceOperationName = "SendLotListService";
SendLotListRequest sendLotListRequest = new SendLotListRequest();
SendLotListResponse sendLotListResponse = null;
sendLotListRequest.LotList = lotRecords.ToArray();
System.ServiceModel.BasicHttpsBinding binding = new BasicHttpsBinding(BasicHttpsSecurityMode.Transport);
binding.BypassProxyOnLocal = true;
EndpointAddress address = new EndpointAddress(soapEndPoint);
using (SendLotListServiceClient sendLotListServiceClient = new SendLotListServiceClient(binding, address))
{
OperationDescription sendLotListOperation = new OperationDescription(serviceOperationName, new ContractDescription(serviceOperationName));
sendLotListOperation.Messages.Add(new MessageDescription(serviceOperationName, MessageDirection.Input));
sendLotListServiceClient.Endpoint.Contract.Operations.Add(sendLotListOperation);
sendLotListServiceClient.Open();
sendLotListResponse = sendLotListServiceClient.SendLotList(sendLotListRequest);
}
谁能建议这里有什么问题?
提前感谢您的帮助
【问题讨论】:
-
好像spring框架版本有问题。这适用于 Http 吗?查看相关问题:stackoverflow.com/questions/12467186/…
-
这也不适用于 http - 它给出了一个错误,说只支持 https。如果他们可以升级 spring 框架,我会尝试与第三方公司核实。跨度>
标签: java c# azure soap azure-functions