⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jobhostwssei_tie.java

📁 这是一个基于计算网格的web service。它用java编写。一旦安装完成
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
        }                try {            long result =                 ((jwsgrid.jobhost.ws.JobHostWSSEI) getTarget()).ping();            jwsgrid.jobhost.ws.JobHostWSSEI_ping_ResponseStruct myJobHostWSSEI_ping_ResponseStruct =                new jwsgrid.jobhost.ws.JobHostWSSEI_ping_ResponseStruct();            SOAPHeaderBlockInfo headerInfo;            myJobHostWSSEI_ping_ResponseStruct.setResult(result);                        SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_ping_pingResponse_QNAME);            bodyBlock.setValue(myJobHostWSSEI_ping_ResponseStruct);            bodyBlock.setSerializer(ns2_myJobHostWSSEI_ping_ResponseStruct_SOAPSerializer);            state.getResponse().setBody(bodyBlock);        } catch (javax.xml.rpc.soap.SOAPFaultException e) {            SOAPFaultInfo fault = new SOAPFaultInfo(e.getFaultCode(),                e.getFaultString(), e.getFaultActor(), e.getDetail());            SOAPBlockInfo faultBlock = new SOAPBlockInfo(com.sun.xml.rpc.encoding.soap.SOAPConstants.QNAME_SOAP_FAULT);            faultBlock.setValue(fault);            faultBlock.setSerializer(new SOAPFaultInfoSerializer(false, e.getDetail()==null));            state.getResponse().setBody(faultBlock);            state.getResponse().setFailure(true);        }    }        /*     * This method does the actual method invocation for operation: getJobOutputFiles     */    private void invoke_getJobOutputFiles(StreamingHandlerState state) throws Exception {                jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFiles_RequestStruct myJobHostWSSEI_getJobOutputFiles_RequestStruct = null;        Object myJobHostWSSEI_getJobOutputFiles_RequestStructObj =            state.getRequest().getBody().getValue();                if (myJobHostWSSEI_getJobOutputFiles_RequestStructObj instanceof SOAPDeserializationState) {            myJobHostWSSEI_getJobOutputFiles_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFiles_RequestStruct)((SOAPDeserializationState)myJobHostWSSEI_getJobOutputFiles_RequestStructObj).getInstance();        } else {            myJobHostWSSEI_getJobOutputFiles_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFiles_RequestStruct)myJobHostWSSEI_getJobOutputFiles_RequestStructObj;        }                try {            javax.activation.DataHandler result =                 ((jwsgrid.jobhost.ws.JobHostWSSEI) getTarget()).getJobOutputFiles(myJobHostWSSEI_getJobOutputFiles_RequestStruct.getString_1(), myJobHostWSSEI_getJobOutputFiles_RequestStruct.getString_2());            jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFiles_ResponseStruct myJobHostWSSEI_getJobOutputFiles_ResponseStruct =                new jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFiles_ResponseStruct();            SOAPHeaderBlockInfo headerInfo;            myJobHostWSSEI_getJobOutputFiles_ResponseStruct.setResult(result);                        SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_getJobOutputFiles_getJobOutputFilesResponse_QNAME);            bodyBlock.setValue(myJobHostWSSEI_getJobOutputFiles_ResponseStruct);            bodyBlock.setSerializer(ns2_myJobHostWSSEI_getJobOutputFiles_ResponseStruct_SOAPSerializer);            state.getResponse().setBody(bodyBlock);        } catch (javax.xml.rpc.soap.SOAPFaultException e) {            SOAPFaultInfo fault = new SOAPFaultInfo(e.getFaultCode(),                e.getFaultString(), e.getFaultActor(), e.getDetail());            SOAPBlockInfo faultBlock = new SOAPBlockInfo(com.sun.xml.rpc.encoding.soap.SOAPConstants.QNAME_SOAP_FAULT);            faultBlock.setValue(fault);            faultBlock.setSerializer(new SOAPFaultInfoSerializer(false, e.getDetail()==null));            state.getResponse().setBody(faultBlock);            state.getResponse().setFailure(true);        }    }        /*     * This method does the actual method invocation for operation: getJobStatus     */    private void invoke_getJobStatus(StreamingHandlerState state) throws Exception {                jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus_RequestStruct myJobHostWSSEI_getJobStatus_RequestStruct = null;        Object myJobHostWSSEI_getJobStatus_RequestStructObj =            state.getRequest().getBody().getValue();                if (myJobHostWSSEI_getJobStatus_RequestStructObj instanceof SOAPDeserializationState) {            myJobHostWSSEI_getJobStatus_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus_RequestStruct)((SOAPDeserializationState)myJobHostWSSEI_getJobStatus_RequestStructObj).getInstance();        } else {            myJobHostWSSEI_getJobStatus_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus_RequestStruct)myJobHostWSSEI_getJobStatus_RequestStructObj;        }                try {            java.lang.String result =                 ((jwsgrid.jobhost.ws.JobHostWSSEI) getTarget()).getJobStatus(myJobHostWSSEI_getJobStatus_RequestStruct.getString_1());            jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus_ResponseStruct myJobHostWSSEI_getJobStatus_ResponseStruct =                new jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus_ResponseStruct();            SOAPHeaderBlockInfo headerInfo;            myJobHostWSSEI_getJobStatus_ResponseStruct.setResult(result);                        SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_getJobStatus_getJobStatusResponse_QNAME);            bodyBlock.setValue(myJobHostWSSEI_getJobStatus_ResponseStruct);            bodyBlock.setSerializer(ns2_myJobHostWSSEI_getJobStatus_ResponseStruct_SOAPSerializer);            state.getResponse().setBody(bodyBlock);        } catch (javax.xml.rpc.soap.SOAPFaultException e) {            SOAPFaultInfo fault = new SOAPFaultInfo(e.getFaultCode(),                e.getFaultString(), e.getFaultActor(), e.getDetail());            SOAPBlockInfo faultBlock = new SOAPBlockInfo(com.sun.xml.rpc.encoding.soap.SOAPConstants.QNAME_SOAP_FAULT);            faultBlock.setValue(fault);            faultBlock.setSerializer(new SOAPFaultInfoSerializer(false, e.getDetail()==null));            state.getResponse().setBody(faultBlock);            state.getResponse().setFailure(true);        }    }        /*     * This method does the actual method invocation for operation: getJobOutputFile     */    private void invoke_getJobOutputFile(StreamingHandlerState state) throws Exception {                jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFile_RequestStruct myJobHostWSSEI_getJobOutputFile_RequestStruct = null;        Object myJobHostWSSEI_getJobOutputFile_RequestStructObj =            state.getRequest().getBody().getValue();                if (myJobHostWSSEI_getJobOutputFile_RequestStructObj instanceof SOAPDeserializationState) {            myJobHostWSSEI_getJobOutputFile_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFile_RequestStruct)((SOAPDeserializationState)myJobHostWSSEI_getJobOutputFile_RequestStructObj).getInstance();        } else {            myJobHostWSSEI_getJobOutputFile_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFile_RequestStruct)myJobHostWSSEI_getJobOutputFile_RequestStructObj;        }                try {            javax.activation.DataHandler result =                 ((jwsgrid.jobhost.ws.JobHostWSSEI) getTarget()).getJobOutputFile(myJobHostWSSEI_getJobOutputFile_RequestStruct.getString_1(), myJobHostWSSEI_getJobOutputFile_RequestStruct.getString_2(), myJobHostWSSEI_getJobOutputFile_RequestStruct.getString_3());            jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFile_ResponseStruct myJobHostWSSEI_getJobOutputFile_ResponseStruct =                new jwsgrid.jobhost.ws.JobHostWSSEI_getJobOutputFile_ResponseStruct();            SOAPHeaderBlockInfo headerInfo;            myJobHostWSSEI_getJobOutputFile_ResponseStruct.setResult(result);                        SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_getJobOutputFile_getJobOutputFileResponse_QNAME);            bodyBlock.setValue(myJobHostWSSEI_getJobOutputFile_ResponseStruct);            bodyBlock.setSerializer(ns2_myJobHostWSSEI_getJobOutputFile_ResponseStruct_SOAPSerializer);            state.getResponse().setBody(bodyBlock);        } catch (javax.xml.rpc.soap.SOAPFaultException e) {            SOAPFaultInfo fault = new SOAPFaultInfo(e.getFaultCode(),                e.getFaultString(), e.getFaultActor(), e.getDetail());            SOAPBlockInfo faultBlock = new SOAPBlockInfo(com.sun.xml.rpc.encoding.soap.SOAPConstants.QNAME_SOAP_FAULT);            faultBlock.setValue(fault);            faultBlock.setSerializer(new SOAPFaultInfoSerializer(false, e.getDetail()==null));            state.getResponse().setBody(faultBlock);            state.getResponse().setFailure(true);        }    }        /*     * This method does the actual method invocation for operation: getJobStatus2     */    private void invoke_getJobStatus2(StreamingHandlerState state) throws Exception {                jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus2_RequestStruct myJobHostWSSEI_getJobStatus2_RequestStruct = null;        Object myJobHostWSSEI_getJobStatus2_RequestStructObj =            state.getRequest().getBody().getValue();                if (myJobHostWSSEI_getJobStatus2_RequestStructObj instanceof SOAPDeserializationState) {            myJobHostWSSEI_getJobStatus2_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus2_RequestStruct)((SOAPDeserializationState)myJobHostWSSEI_getJobStatus2_RequestStructObj).getInstance();        } else {            myJobHostWSSEI_getJobStatus2_RequestStruct = (jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus2_RequestStruct)myJobHostWSSEI_getJobStatus2_RequestStructObj;        }                try {            java.lang.String result =                 ((jwsgrid.jobhost.ws.JobHostWSSEI) getTarget()).getJobStatus(myJobHostWSSEI_getJobStatus2_RequestStruct.getString_1(), myJobHostWSSEI_getJobStatus2_RequestStruct.getString_2());            jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus_ResponseStruct1 myJobHostWSSEI_getJobStatus_ResponseStruct1 =                new jwsgrid.jobhost.ws.JobHostWSSEI_getJobStatus_ResponseStruct1();            SOAPHeaderBlockInfo headerInfo;            myJobHostWSSEI_getJobStatus_ResponseStruct1.setResult(result);                        SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_getJobStatus2_getJobStatus2Response_QNAME);            bodyBlock.setValue(myJobHostWSSEI_getJobStatus_ResponseStruct1);            bodyBlock.setSerializer(ns2_myJobHostWSSEI_getJobStatus_ResponseStruct1_SOAPSerializer);            state.getResponse().setBody(bodyBlock);        } catch (javax.xml.rpc.soap.SOAPFaultException e) {            SOAPFaultInfo fault = new SOAPFaultInfo(e.getFaultCode(),                e.getFaultString(), e.getFaultActor(), e.getDetail());            SOAPBlockInfo faultBlock = new SOAPBlockInfo(com.sun.xml.rpc.encoding.soap.SOAPConstants.QNAME_SOAP_FAULT);            faultBlock.setValue(fault);            faultBlock.setSerializer(new SOAPFaultInfoSerializer(false, e.getDetail()==null));            state.getResponse().setBody(faultBlock);            state.getResponse().setFailure(true);        }    }        /*     * This method must determine the opcode of the operation that has been invoked.     */    protected void peekFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingHandlerState state) throws Exception {        if (bodyReader.getName().equals(ns1_stopJob_stopJob_QNAME)) {            state.getRequest().setOperationCode(stopJob_OPCODE);        }        else if (bodyReader.getName().equals(ns1_getDynamicInfo_getDynamicInfo_QNAME)) {            state.getRequest().setOperationCode(getDynamicInfo_OPCODE);        }        else if (bodyReader.getName().equals(ns1_startJob_startJob_QNAME)) {            state.getRequest().setOperationCode(startJob_OPCODE);        }        else if (bodyReader.getName().equals(ns1_submitJob_submitJob_QNAME)) {            state.getRequest().setOperationCode(submitJob_OPCODE);        }        else if (bodyReader.getName().equals(ns1_destroyJob_destroyJob_QNAME)) {            state.getRequest().setOperationCode(destroyJob_OPCODE);        }        else if (bodyReader.getName().equals(ns1_ping_ping_QNAME)) {            state.getRequest().setOperationCode(ping_OPCODE);        }        else if (bodyReader.getName().equals(ns1_getJobOutputFiles_getJobOutputFiles_QNAME)) {            state.getRequest().setOperationCode(getJobOutputFiles_OPCODE);        }        else if (bodyReader.getName().equals(ns1_getJobStatus_getJobStatus_QNAME)) {            state.getRequest().setOperationCode(getJobStatus_OPCODE);        }        else if (bodyReader.getName().equals(ns1_getJobOutputFile_getJobOutputFile_QNAME)) {            state.getRequest().setOperationCode(getJobOutputFile_OPCODE);        }        else if (bodyReader.getName().equals(ns1_getJobStatus2_getJobStatus2_QNAME)) {            state.getRequest().setOperationCode(getJobStatus2_OPCODE);        }        else {            throw new SOAPProtocolViolationException("soap.operation.unrecognized", bodyReader.getName().toString());        }    }        /*     *  this method deserializes the request/response structure in the body     */    protected void readFirstBodyElement(XMLReader bodyReader, SOAPDeserializationContext deserializationContext, StreamingHandlerState  state) throws Exception {        int opcode = state.getRequest().getOperationCode();        switch (opcode) {            case stopJob_OPCODE:                deserialize_stopJob(bodyReader, deserializationContext, state);                break;            case getDynamicInfo_OPCODE:                deserialize_getDynamicInfo(bodyReader, deserializationContext, state);                break;            case startJob_OPCODE:                deserialize_startJob(bodyReader, deserializationContext, state);                break;            case submitJob_OPCODE:                deserialize_submitJob(bodyReader, deserializationContext, state);                break;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -