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)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> - Exposing xquery as webservice ... (6)
-> ->Exposing xquery as webser...
-> ->Exposing xquery as webser...
-> ->Exposing xquery as webser...
-> ->Exposing xquery as webser...
-> ->Exposing xquery as webser...
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Bruce CantorSubject: Exposing xquery as webservice issue
Author: Bruce Cantor
Date: 30 Mar 2022 11:31 AM
Hi

I am trying to create a webservice as described in chapter 9 of DataDirect XQuery® User’s Guide and Reference (ddxug.pdf)

I would like to create simple webservice that makes it possible to download a stockfile if you know the name of the file.

So, finding that the XQueryWebService Framework makes it possible to expose a xquery script as a rest service I have tried to create the above web project.

But I am having trouble getting it to work.

The webserver just returns 'This page cannot be displayed'

I am thinking that it might be related to this statement in the documentation:

"Let's take a look at emp.xquery, which we have saved to our
local XQuery directory (c:\MyQueryDir, as defined in web.xml)."

I cannot find any reference in the documentation how to define the path in the web.xml file. Currently the xquery file is just located in {tomcat_home}/webapps/project

IS the missing definition in the web.xml file the problem?
If so, how do I define the path in the web.xml file?

Attached is a zip of my very simple project that should return the filename param to the user when called.


UnknownPriceStockFiles.zip
web prj zipped path{tomcatHome\webapps}

Postnext
Ivan PedruzziSubject: Exposing xquery as webservice issue
Author: Ivan Pedruzzi
Date: 31 Mar 2022 05:54 PM
Bruce you are running XPS, look at the documentation for how to expose a pipeline as web service, the approach is far more powerful



Ivan Pedruzzi
Stylus Studio Team

Postnext
Bruce CantorSubject: Exposing xquery as webservice issue
Author: Bruce Cantor
Date: 19 Oct 2022 11:27 AM
Hi Ivan

In the XPS I end up with the same result.

I have defined a simple pipeline that does nothing but return the posted XML back to the client.

It is placed in C:\xps\pipelines\PipelinesIn and named TestWebService.IngoingFlow.pipeline
together with the binding file TestWebService.IngoingFlow.pipeline.binding

But when I try to call the endpoint I am unsure what the URL should be, nothing I try ends up triggering the pipeline, I get an 'Can’t reach this page' error, and when I use Postman to post to the URL I can see an error like this one in the consol: 'Error: connect ECONNREFUSED 127.0.0.1:80'.

The guide says
http://localhost/rest/pipelineRun?pipelineId=prj\mypipeline.pipeline

and I have tried to guess the correct url from the path that my pipeline has, without luck.

If my pipeline is placed as stated above, how should the URL be?

Kind regards Bruce


UnknownTestwebserviceendpoint.zip
zip file with pipeline

Postnext
Ivan PedruzziSubject: Exposing xquery as webservice issue
Author: Ivan Pedruzzi
Date: 20 Oct 2022 02:03 AM
Originally Posted: 20 Oct 2022 01:26 AM
which URL did you try?

Set pipelineId to <pipeline project folder>/<pipeline file>

in your example
pipelineId=PipelinesIn/TestWebService.IngoingFlow.pipeline


Assuming that your XPS instance is running on your local machine on port 80, the following URL can be executed from your browser and works.


http://localhost/rest/pipelineRun?pipelineId=PipelinesIn/TestWebService.IngoingFlow.pipeline


I attached a screenshot of your pipeline running on my XPS which is on port 81

you can also using HTTP POST to pass a payload to the pipeline

Postnext
Bruce CantorSubject: Exposing xquery as webservice issue
Author: Bruce Cantor
Date: 20 Oct 2022 10:01 AM
Thanks Ivan

I needed to post to port 81.

http://localhost:81/rest/pipelineRun?pipelineId=PipelinesIn/TestWebService.IngoingFlow.pipeline

And change the '\' to '/' in the parameter. (Documentation says backslash, but this does not work for me)

Now, if I could use https instead of http I would be even more happy.
Is it possible to setup an endpoint on https?

Posttop
Ivan PedruzziSubject: Exposing xquery as webservice issue
Author: Ivan Pedruzzi
Date: 20 Oct 2022 04:35 PM
XML Pipeline Server bundles the most the deployed web server in the world: Apache Tomcat (xps\tomcat).

There is extensive documentation on how to configure HTTPS on Apache
Tomcat
https://tomcat.apache.org/tomcat-10.0-doc/ssl-howto.html


Ivan Pedruzzi
Stylus Studio Team

   
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.