Skip to main content

I am trying to make a soap request but I am getting the below error. The K2 server is configured with https and tls 1.2 by default. What could be the issue? Anyone with the same experience with the SOAP API?

 

 

Details of error:

"283010081","2023-08-31 10:00:45","Error","SmartObjects","10702","Error","SourceCode.SmartObjects.ServiceBroker rExecuteSmartObject]","10702 An error occurred in the DSV CostEstimate Service Instance. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.NetworkStream.Read(ByteB] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.ConnectStream.Read(Bytee] buffer, Int32 offset, Int32 size)
   at System.Net.HttpWebRequest.MakeMemoryStream(Stream stream)
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at TMSPricingService.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Objectm] parameters)
   at TMSPricingService.pricingRequest(pricingType pricing)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Objecto] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objectn] parameters, Objectb] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Objecte] parameters, CultureInfo culture)
   at SourceCode.SmartObjects.Services.Endpoints.Common.EndpointServiceObject.Execute(IEndpointFormatter endpointFormatter, Method method, Object instance)
   at SourceCode.SmartObjects.Services.Endpoints.WebService.WebServiceBroker.Execute()","anonymous","0.0.0.0","CLVS110:D:\K2 blackpearl\Host Server\Bin","283010081","65f3d83a244f4c45a1826f8dc6941268",""

@Katz 

Are you able to make the same soap api request through another tool like postman, etc. from the K2 server or do you see the same error?

If successful from Postman, perhaps some of the configurations can be translated to matching Service Keys configurations for the service instance.


Hi @Katz 
Have you resolved this error?


@TinTex 

Yes, I am able to make the request via postman and soapUI.

The issue is when I make the request via a SMO. But we traced the traffic in fiddler when making the request, and saw that the request is in fact using a http protocol and pointing to an azure host. Perhaps thats where the issue is -  the http connection, hence the error message “underlying connection was closed...” Currently exploring configurations in azure app service to direct traffic to https by default.

I will update if I get a solution.

Regards,

Katleho  


Reply