public static DCPType dcp(String service, EObject request) { String baseUrl = (String) EMFUtils.get(request, "baseUrl"); if (baseUrl == null) { throw new IllegalArgumentException( "Request object" + request + " has no 'baseUrl' property."); } String href = ResponseUtils.buildURL( baseUrl, service, new HashMap<String, String>(), URLType.SERVICE); DCPType dcp = f.createDCPType(); dcp.setHTTP(f.createHTTPType()); RequestMethodType get = f.createRequestMethodType(); get.setHref(href); dcp.getHTTP().getGet().add(get); RequestMethodType post = f.createRequestMethodType(); post.setHref(href); dcp.getHTTP().getPost().add(post); return dcp; } }
RequestMethodType get = (RequestMethodType) gets.get(j); try { opt.setGet(new URL(get.getHref())); if (!get.getConstraint().isEmpty()) { for (Object con : get.getConstraint()) { DomainType dt = (DomainType) con; AllowedValuesType t = dt.getAllowedValues(); RequestMethodType post = (RequestMethodType) posts.get(j); try { opt.setPost(new URL(post.getHref())); if (!post.getConstraint().isEmpty()) { for (Object con : post.getConstraint()) { DomainType dt = (DomainType) con; AllowedValuesType t = dt.getAllowedValues();
String href = methods.get(0).getHref(); debug("Returning operation URI for ", operation, "/", method, ": ", href); return href;
RequestMethodType get = (RequestMethodType) gets.get(j); try { opt.setGet(new URL(get.getHref())); if (!get.getConstraint().isEmpty()) { for (Object con : get.getConstraint()) { DomainType dt = (DomainType) con; AllowedValuesType t = dt.getAllowedValues(); RequestMethodType post = (RequestMethodType) posts.get(j); try { opt.setPost(new URL(post.getHref())); if (!post.getConstraint().isEmpty()) { for (Object con : post.getConstraint()) { DomainType dt = (DomainType) con; AllowedValuesType t = dt.getAllowedValues();
String href = methods.get(0).getHref(); debug("Returning operation URI for ", operation, "/", method, ": ", href); return href;