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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
- XQuery Help and Discussion (2017)
-> + Issue with Processing Instruct... (2)
-> + problem converting json to XML... (2)
-> + Problem base64 decoding string... (3)
-> + Problems posting multipart for... (5)
-> + trouble with download of price... (2)
-> + Problem with http-post not bei... (3)
-> + path problem, xps_file:writeAl... (9)
-> + Xquery update support? (2)
-> + problem with Stylus studio try... (5)
-> + adding dtd reference to xml ou... (4)
-> + xquery escaping ambarsand when... (3)
-> + Whitespace problem when return... (5)
-> + Problem with namespace prefix ... (5)
-> - Sending via SFTP returns unexp... (1)
-> + Query and Sftp clent (4)
-> + xquery and try - catch (3)
-> - Query + ddtek:http-post optio... (5)
-> ->Query + ddtek:http-post ...
-> ->Query + ddtek:http-post ...
-> ->Query + ddtek:http-post ...
-> ->Query + ddtek:http-post ...
-> + Example files referenced in do... (3)
-> + Automatic Error Detection and ... (3)
-> + Working with result of ddtek:h... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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.

   
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.