Hi All,
I am pretty new to using the Post Call method to post data. While I tried to use the httpClient function to post a request on the Boomi server, I got the following error saying the existing connection is forcibly closed by the remote host. Can anyone point me in the direction of why this error occurred? Here is my script:
user = "user"
password = "password"
info = {"ProductPartNumber" : " **** ", "FacilityPrefix" : "***", "SqlWhere": "*****"}
url = "https://****.com/ws/rest/Ignition?messageType=GET_PRODUCT_SPEC"
# Create the JythonHttpClient.
client = system.net.httpClient(username=user, password=password, bypass_cert_validation = True)
response = client.post(url, info)
Error:
... 38 common frames omitted
Caused by: com.inductiveautomation.ignition.common.GenericTransferrableException: Unable to POST https://bil-boomi01dv.entegris.com/ws/rest/Ignition?messageType=GET_PRODUCT_SPEC?ProductPartNumber=+AEC010M1G3000T+&FacilityPrefix=LSP&SqlWhere=and+PRODUCT_SPEC.SPEC_TYPE+in+%28%27IC%27%2C%27TOC%27%2C%27LPC%27%29
at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send(JythonHttpClient.java:103)
at com.inductiveautomation.ignition.common.script.builtin.http.InsecureJythonHttpClient.send(InsecureJythonHttpClient.java:37)
at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.post(JythonHttpClient.java:318)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
... 35 common frames omitted
Caused by: com.inductiveautomation.ignition.common.GenericTransferrableException: An existing connection was forcibly closed by the remote host
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(Unknown Source)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(Unknown Source)
at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send(JythonHttpClient.java:101)
... 42 common frames omitted
Caused by: com.inductiveautomation.ignition.common.GenericTransferrableException: An existing connection was forcibly closed by the remote host
at java.base/sun.nio.ch.SocketDispatcher.read0(Native Method)
at java.base/sun.nio.ch.SocketDispatcher.read(Unknown Source)
at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at java.net.http/jdk.internal.net.http.SocketTube.readAvailable(Unknown Source)
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(Unknown Source)
at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowTask.run(Unknown Source)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(Unknown Source)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(Unknown Source)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(Unknown Source)
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.signalReadable(Unknown Source)
at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$ReadEvent.signalEvent(Unknown Source)
at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowEvent.handle(Unknown Source)
at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.handleEvent(Unknown Source)
at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.lambda$run$3(Unknown Source)
at java.base/java.util.ArrayList.forEach(Unknown Source)
at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(Unknown Source)