XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Bruce CantorSubject: Query + ddtek:http-post options
Author: Bruce Cantor
Date: 02 Jun 2021 09:00 AM
Hi

I am experiencing a problem with timeout connecting to a webservice.

I can see that the ddtek:http-post times out after 10 000 miliseconds and would therefore like to set another timeout value.

But it does not look as if the value is getting picked up.

My code:

declare variable $url := "https://andsoon..";

declare variable $options :=
<request>
<request-header>
<header name="Authorization" value="Basic QjJCLUVFVrtIC1QUk9EOxxxkVNRlEwMHBISkx3NlRFGVVBBU3Nq"/>

<header name="connection-timeout" value="30000"/>
<header name="retries" value="3"/>

<header name="Content-Type" value="text/xml"/>
</request-header>
</request>;

declare variable $request := /;

declare option ddtek:serialize "indent=yes";


ddtek:http-post($url,$request, $options)

------------------------

The post still sometimes get a timeout and I can see that the timeout value is still the default 10000 milisecs.

java.io.IOException: Time-out (10000 milliseconds) elapsed waiting for Pipe data
at com.ivitechnologies.pipeline.server.BridgeOutputInputSource$PipedInputStreamFilter.read(BridgeOutputInputSource.java:60)
at

Can anybody tell me what I am doing wrong, how am I supposed to set the timeout value?

Thank you for any help.

Postnext
Ivan PedruzziSubject: Query + ddtek:http-post options
Author: Ivan Pedruzzi
Date: 03 Jun 2021 09:45 PM

There are several attribute you can use to configure the time-out

connection-timeout
socket-timeout
protocol-head-body-timeout

More details at
https://media.datadirect.com/download/docs/ddxquery/allddxq/wwhelp/wwhimpl/js/html/wwhelp.htm

Reference
-> 10 Building a Web Service Client
----> HTTP Function Request and Response XML Schemas


What error is reported by the API?


Ivan Pedruzzi
Stylus Studio Team

Postnext
Bruce CantorSubject: Query + ddtek:http-post options
Author: Bruce Cantor
Date: 04 Jun 2021 01:57 PM
Originally Posted: 04 Jun 2021 01:51 PM
I am getting this kind of error, the choose component is trying to validate the answer - we expect a response with a status code:


(host:172.16.0.74) Jun 03, 2021 2:25:35 PM com.ivitechnologies.pipeline.server.OperationRunner runInternal
SEVERE: Time-out (10000 milliseconds) elapsed waiting for Pipe data
operation null
operation properties:
Number of choices=1
annotation=false
rotate=270
Number of inputs=1
Name=Choose #2
h=100
Operation=CHOOSE
ID=32
XPath #0=/response/@status-code != '200'
y=243
x=1208
w=140
input URL file:///E:/Nav-PipelineServer-DataExchange/FilesFromNavision/XXX/8B88345C-B597-40E5-A34B-D27AE7B2CEA5.xml
java.io.IOException: Time-out (10000 milliseconds) elapsed waiting for Pipe data
at com.ivitechnologies.pipeline.server.BridgeOutputInputSource$PipedInputStreamFilter.read(BridgeOutputInputSource.java:60)
at com.ivitechnologies.pipeline.server.BridgeOutputInputSource$PipedInputStreamFilter.read(BridgeOutputInputSource.java:32)
at com.ivitechnologies.pipeline.server.StreamUtils.copy(StreamUtils.java:99)
at com.ivitechnologies.pipeline.server.StreamUtils.copyToTemFile(StreamUtils.java:108)
at com.ivitechnologies.pipeline.server.OperationChoose.runInternal(OperationChoose.java:85)
at com.ivitechnologies.pipeline.server.OperationRunner.runInternal(OperationRunner.java:79)
at com.ivitechnologies.pipeline.server.OperationRunner.run(OperationRunner.java:45)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)


UnknownSkrmbillede2021-06-04155728.png
Pipeline flow, sends email if code !=200

Postnext
Ivan PedruzziSubject: Query + ddtek:http-post options
Author: Ivan Pedruzzi
Date: 04 Jun 2021 05:25 PM
This is not the HTTP POST that times out, it's the next operation waiting for the data that times out.

You need to increase the operation time-out in server.xml, start with 30 seconds

<operation_runner timeOutInMilliseconds="30000"/>

Ivan Pedruzzi
Stylus Studio Team

Posttop
Bruce CantorSubject: Query + ddtek:http-post options
Author: Bruce Cantor
Date: 07 Jun 2021 06:21 AM
Right, that's why the component in question was CHOOSE.

I have updated the server.xml file to 30000.

If that is not enough I now know where to do the changes.
Thanks.

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.