/** * @return a XML representation. */ @Override public String toXML(){ String res = "<RequestMethod type=\"HTTP_GET\"\">"; if(getOnlineResource() != null) res += getOnlineResource().toXML(); if(getConstraints() != null){ StringBuilder sb = new StringBuilder(res); for (final String c : getConstraints()) { sb.append("<Constraint>") .append(c) .append("<Constraint>"); } res = sb.toString(); } res += "</RequestMethod>"; return res; } }
/** * convenience constructor. Creates an Operation with the specified name and sets one DCP with the * specified httpGetHref and httpPostHref. The constraints and parameters attributes will stay * <code>null</code>. * * @param name name of the operation * @param httpGetHref the URL to be used for HTTP GET * @param httpPostHref the URL to be used for HTTP POST */ public Operation(final String name, final String httpGetHref, final String httpPostHref) { setName(name); final DCP[] dcp = new DCP[1]; dcp[0] = new DCP(new GetRequestMethod(new OnlineResource(httpGetHref)), new PostRequestMethod(new OnlineResource(httpPostHref))); setDcps(dcp); }
@Override public OperationResult doOperation(Operation operation, ParameterContainer parameters) throws ExceptionReport, OXFException { // set sos url to used it for an extra GetObs if (operation.getDcps()[0].getHTTPPostRequestMethods().size() > 0) { ISOSRequestBuilder requestBuilder = this.getRequestBuilder(); if (requestBuilder instanceof SoapSOSRequestBuilder_200_Kisters) { SoapSOSRequestBuilder_200_Kisters tempBuilder = (SoapSOSRequestBuilder_200_Kisters) requestBuilder; tempBuilder.setUrl(operation.getDcps()[0].getHTTPPostRequestMethods().get(0).getOnlineResource().getHref()); } } return super.doOperation(operation, parameters); }
for (final Constraint constraint : postMethod.getOwsConstraints()) { if (isContraintForThisBinding(binding, constraint)) { uri = postMethod.getOnlineResource().getHref(); break uriFind; uri = operation.getDcps()[0].getHTTPPostRequestMethods().get(0).getOnlineResource().getHref();
for (final RequestMethodType xbPostRequestMethod : xbPostRequestMethods) { final OnlineResource ocOnlineRessource = new OnlineResource(xbPostRequestMethod.getHref()); final RequestMethod ocRequestMethod = new PostRequestMethod(ocOnlineRessource); ocRequestMethods.add(ocRequestMethod);
String uri = dcp.getHTTPPostRequestMethods().get(0).getOnlineResource().getHref();
net.opengis.ows.x11.RequestMethodType xb_postRequestMethod = xb_postRequestMethods[k]; OnlineResource oc_onlineRessource = new OnlineResource(xb_postRequestMethod.getHref()); RequestMethod oc_requestMethod = new PostRequestMethod(oc_onlineRessource); oc_requestMethods.add(oc_requestMethod);
for (final RequestMethodType xbPostRequestMethod : xbPostRequestMethods) { final OnlineResource ocOnlineRessource = new OnlineResource(xbPostRequestMethod.getHref()); final RequestMethod ocRequestMethod = new PostRequestMethod(ocOnlineRessource); addConstraints(xbPostRequestMethod, ocRequestMethod); ocRequestMethods.add(ocRequestMethod);