WPSClientSession connect issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

WPSClientSession connect issue

Edi Karadumi
Hi,

I'm having problems to connect to a WPS. While connecting, the WPSClientSession executes describeProcess for all processes, which in turn gets the metadata and calls

retrieveDescriptionViaGET(processIDs, url);

whith the url from the metadata. Some WPS haven't updated their metadata, hence the retrieveDescriptionViaGET(processIDs, url); is called with an url that doesn't exist and throws an exception.

In addition, I think that if the identifier is set to "all" then there is no need to concatenate all process ids.


        public ProcessDescriptionsDocument describeProcess(String[] processIDs, String serverID) throws WPSClientException {
                CapabilitiesDocument caps = this.loggedServices.get(serverID);
                Operation[] operations = caps.getCapabilities().getOperationsMetadata().getOperationArray();
                String url = null;
                for(Operation operation : operations){
                        if(operation.getName().equals("DescribeProcess")) {
                                url = operation.getDCPArray()[0].getHTTP().getGetArray()[0].getHref();
                        }
                }
                if(url == null) {
                        throw new WPSClientException("Missing DescribeOperation in Capabilities");
                }
                return retrieveDescriptionViaGET(processIDs, url);
        }
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WPSClientSession connect issue

BenjaminPross
Hello Edi,

As for your first point, I don't really see an issue here. The URLs in the operations metadata should point to the right WPS endpoint. As it is not always in your power to correct this, some kind of override mechanism would be thinkable to strictly use the URL used in the connect-method. Feel free to make a feature-request for this.

As for the second point, you are probably right, the "all" identifier could be used here. It would be great, if you could create an issue with a possible solution attached.

Cheers,

Benjamin
Loading...