executeDocument = ExecuteDocument.Factory.parse(executeDocumentAsXml);
+ version, ExceptionReport.VERSION_NEGOTIATION_FAILED); this.execDom = ExecuteDocument.Factory.newInstance(); Execute execute = execDom.addNewExecute(); String processID = getMapValue("Identifier", true);
/** * Creates an ExecuteRequest based on a Document (HTTP_POST) * * @param doc * The clients submission * @throws ExceptionReport */ public ExecuteRequest(Document doc) throws ExceptionReport { super(doc); try { XmlOptions option = new XmlOptions(); option.setLoadTrimTextBuffer(); this.execDom = ExecuteDocument.Factory.parse(doc, option); if (this.execDom == null) { LOGGER.error("ExecuteDocument is null"); throw new ExceptionReport("Error while parsing post data", ExceptionReport.MISSING_PARAMETER_VALUE); } } catch (XmlException e) { throw new ExceptionReport("Error while parsing post data", ExceptionReport.MISSING_PARAMETER_VALUE, e); } // validate the client input validate(); // create an initial response execRespType = new ExecuteResponseBuilder(this); storeRequest(execDom); }
private synchronized void readObject(java.io.ObjectInputStream oos) throws IOException, ClassNotFoundException { try { System.out.println("Read processDescription"); String processDescriptionAsXml = (String) oos.readObject(); processDescription = ProcessDescriptionType.Factory.parse(processDescriptionAsXml); System.out.println("Read executeDocument"); String executeDocumentAsXml = (String) oos.readObject(); executeDocument = ExecuteDocument.Factory.parse(executeDocumentAsXml); System.out.println("Read applicationFiles"); applicationFiles = (List<String>) oos.readObject(); System.out.println("Read config"); config = (WPSConfig) oos.readObject(); System.out.println("Read serializedInputData"); Map<String, List<String>> serializedInputData = (Map<String, List<String>>) oos.readObject(); Map<String, List<IData>> deserializedInputData = new HashMap<String, List<IData>>(); System.out.println("createDeserialized "); createDeserialized(processDescription, executeDocument, serializedInputData, deserializedInputData); input = new WebProcessingServiceInput(deserializedInputData); } catch (Exception e) { e.printStackTrace(); throw new IOException(e.getMessage()); } }
public ExecuteRequestBuilder(ProcessDescriptionType processDesc) { this.processDesc = processDesc; execute = ExecuteDocument.Factory.newInstance(); Execute ex = execute.addNewExecute(); ex.setService("WPS"); ex.setVersion(SUPPORTED_VERSION); ex.addNewIdentifier().setStringValue(processDesc.getIdentifier().getStringValue()); ex.addNewDataInputs(); }