WPS interaction tests


In [1]:
# WPS endpoints:

wps_emu = "http://localhost:8094/wps"
wps_hummingbird = "http://localhost:8092/wps"
wps_phoenix = "http://localhost:8091/wps"
phoenix_csw = "http://localhost:8082/csw"

First a simple "hello world" execute request for the emu wps


In [2]:
req_url = "{wps_url}?" +\
    "&request=Execute" +\
    "&service=WPS" +\
    "&version=1.0.0" +\
    "&identifier={identifier}" +\
    "&DataInputs={inputs}"

In [3]:
url=req_url.format(wps_url=wps_emu,identifier="helloworld", inputs="user=jupyter-frontend")

In [4]:
print url


http://localhost:8094/wps?&request=Execute&service=WPS&version=1.0.0&identifier=helloworld&DataInputs=user=jupyter-frontend

GetCapabilities Request


In [5]:
req_url = "{wps_url}?" +\
          "&request=GetCapabilities" +\
          "&service=WPS" +\
          "&version=1.0.0"

In [6]:
url = req_url.format(wps_url=wps_hummingbird)
print url


http://localhost:8092/wps?&request=GetCapabilities&service=WPS&version=1.0.0

Describe Process Request


In [29]:
req_url = "{wps_url}?" +\
          "&request=DescribeProcess" +\
          "&service=WPS" +\
          "&version=1.0.0" +\
          "&identifier={identifier}"

In [30]:
url = req_url.format(wps_url=wps_hummingbird, identifier="qa_cfchecker")
print url


http://localhost:8092/wps?&request=DescribeProcess&service=WPS&version=1.0.0&identifier=qa_cfchecker

In [31]:
url = req_url.format(wps_url=wps_hummingbird, identifier="cdo_sinfo")
print url


http://localhost:8092/wps?&request=DescribeProcess&service=WPS&version=1.0.0&identifier=cdo_sinfo

Execute Request


In [32]:
req_url = "{wps_url}?" +\
          "&request=Execute" +\
          "&service=WPS" +\
          "&version=1.0.0" +\
          "&identifier={identifier}" +\
          "&DataInputs={inputs}"

In [38]:
url = req_url.format(wps_url=wps_hummingbird, identifier="cdo_sinfo",
                     inputs="""netcdf_file='http://data.nodc.noaa.gov/thredds/fileServer/woa/heat_content/seasonal_ocean_heat_content.nc'""")

print url


http://localhost:8092/wps?&request=Execute&service=WPS&version=1.0.0&identifier=cdo_sinfo&DataInputs=netcdf_file='http://data.nodc.noaa.gov/thredds/fileServer/woa/heat_content/seasonal_ocean_heat_content.nc'

In [ ]: