コード例 #1
0
  /*
   * This method does the actual method invocation for operation: removeObjects
   */
  private void invoke_removeObjects(StreamingHandlerState state) throws Exception {

    javax.xml.soap.SOAPElement mySOAPElement = null;
    Object mySOAPElementObj = state.getRequest().getBody().getValue();

    if (mySOAPElementObj instanceof SOAPDeserializationState) {
      mySOAPElement =
          (javax.xml.soap.SOAPElement) ((SOAPDeserializationState) mySOAPElementObj).getInstance();
    } else {
      mySOAPElement = (javax.xml.soap.SOAPElement) mySOAPElementObj;
    }

    try {
      javax.xml.soap.SOAPElement partRegistryResponse =
          ((org.freebxml.omar.common.jaxrpc.registry.server.LifeCycleManagerPortType) getTarget())
              .removeObjects(mySOAPElement);

      SOAPHeaderBlockInfo headerInfo;

      javax.xml.soap.SOAPElement _response = partRegistryResponse;
      SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns2_removeObjects_RegistryResponse_QNAME);
      bodyBlock.setValue(_response);
      bodyBlock.setSerializer(ns2_ns2_RegistryResponseType_TYPE_QNAME_Serializer);
      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);
    }
  }
コード例 #2
0
  /*
   * This method does the actual method invocation for operation: runGMT_Script
   */
  private void invoke_runGMT_Script(StreamingHandlerState state) throws Exception {

    junk.webservices.GMT_WebServiceAPI_runGMT_Script_RequestStruct
        myGMT_WebServiceAPI_runGMT_Script_RequestStruct = null;
    Object myGMT_WebServiceAPI_runGMT_Script_RequestStructObj =
        state.getRequest().getBody().getValue();

    if (myGMT_WebServiceAPI_runGMT_Script_RequestStructObj instanceof SOAPDeserializationState) {
      myGMT_WebServiceAPI_runGMT_Script_RequestStruct =
          (junk.webservices.GMT_WebServiceAPI_runGMT_Script_RequestStruct)
              ((SOAPDeserializationState) myGMT_WebServiceAPI_runGMT_Script_RequestStructObj)
                  .getInstance();
    } else {
      myGMT_WebServiceAPI_runGMT_Script_RequestStruct =
          (junk.webservices.GMT_WebServiceAPI_runGMT_Script_RequestStruct)
              myGMT_WebServiceAPI_runGMT_Script_RequestStructObj;
    }

    try {
      java.lang.String result =
          ((junk.webservices.GMT_WebServiceAPI) getTarget())
              .runGMT_Script(
                  myGMT_WebServiceAPI_runGMT_Script_RequestStruct.getArrayOfString_1(),
                  myGMT_WebServiceAPI_runGMT_Script_RequestStruct.getArrayOfDataHandler_2());
      junk.webservices.GMT_WebServiceAPI_runGMT_Script_ResponseStruct
          myGMT_WebServiceAPI_runGMT_Script_ResponseStruct =
              new junk.webservices.GMT_WebServiceAPI_runGMT_Script_ResponseStruct();
      SOAPHeaderBlockInfo headerInfo;
      myGMT_WebServiceAPI_runGMT_Script_ResponseStruct.setResult(result);

      SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns1_runGMT_Script_runGMT_ScriptResponse_QNAME);
      bodyBlock.setValue(myGMT_WebServiceAPI_runGMT_Script_ResponseStruct);
      bodyBlock.setSerializer(ns1_myGMT_WebServiceAPI_runGMT_Script_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);
    }
  }