Loadrunner WebServices Ошибка подключения к сокету прервана
Я использую службу WCF на основе nettcp, используя LR VuGen 12.02 и протокол веб-служб, импортируя WSDL службы.
После составления запроса и попытки его отправки я получаю следующую ошибку. который на самом деле работает нормально из клиента WPF, но не работает из сценария LR VuGen
Action.c(16): Error:The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:59:59.9949990'.
Error: An existing connection was forcibly closed by the remote host
Server stack trace:
at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at HP.WcfRouter.IUniversalContract.Send(Message message)
at HP.WcfRouter.WcfRouter.DoRequestInternal(Boolean isOneWay, Dictionary`2 context)
Action.c(16): Error:InvokeMethod failure: External component has thrown an exception..
Action.c(16): Error:ExtractResultArg failure: Object reference not set to an instance of an object..
Action.c(16): Error:Web service call "GetTopicsByUserID" execution failed
Я опробовал много предложений, которые были актуальны, но безуспешно. Для справки: Увеличение тайм-аутов и maxItemsInObjectGraph, а также множество других сообщений в Stackru, таких как сообщение Socket Connection Aborted-Stackru
Любая помощь высоко ценится.
1 ответ
Веб-службы будут работать только для HTTP-привязки, а не для NetTCP. Для связывания NetTCP необходимо использовать виртуального пользователя в Visual Studio. Используйте исходный код своего клиента для создания оболочки для передачи вашего запроса. Вы по-прежнему будете иметь доступ к механизму параметризации и настройкам времени выполнения изнутри Visual Studio