Ticket #157 (closed task: fixed)

Opened 7 years ago

Last modified 7 years ago

Working with chaining of services

Reported by: surf9 Owned by:
Priority: minor Milestone:
Component: Development platform Version:
Keywords: Cc:

Description

Hi there

If I want to chain services together where the result of one service will be input into another service then the result of the second service is the output of the main/parent service call how would I implement this?

E.g.

geovalidationChainJS service gets called.

Inside that service I have two services:

coordinateConversionJS then after that the results becomes input into another service called geoValidationPy.

The WPS XML response of geoValidationPy is what gets returned to the user when they execute geovalidationChainJS instead of the results being embedded instead the LiteralData? element.

Currently I get a normal WPS XML response when I execute coordinateConversionJS. I'm not sure how to parse the XML so I get the actual results of LiteralData? so I can manipulate that value and use as input into geoValidationPy. DOMParser and jQuery doesn't seem to work.

Thanks for your help.

Change History

Changed 7 years ago by djay

Hi, sorry for late reply.

First of all you don't have any javascript libraries available on the server side except the ZOO-API. It expose some functions that were present in OpenLayer? 2.X and also some specific classes such as ZOO.Request to handle HTTPRequest.

The easiest way to embed the call to another service from a service, is to use Execute request as reference for the datainputs. You will need to ask for the RawDataOutput? to make sure there is no parsing needed.

In case you do prefer to use the ZOO-API to chain your calls, then you can use the ZOO.format.WPS that give you the capability to extract whatever you want from a ResponseDocument?. So in such a case, you can call your first service, parse the result and use it as the input for the other service.

I hope my answer is of help.

Changed 7 years ago by surf09

Thank you for your help! It works great!

Changed 7 years ago by djay

  • status changed from new to closed
  • resolution set to fixed

Thank you for the positive feedbacks. I can close this ticket.

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png