コード例 #1
0
  /*
   * This method deserializes the body of the deprecateObjects operation.
   */
  private void deserialize_deprecateObjects(
      XMLReader bodyReader,
      SOAPDeserializationContext deserializationContext,
      StreamingHandlerState state)
      throws Exception {
    Object mySOAPElementObj =
        ns1_ns1_AdhocQueryRequest_TYPE_QNAME_Serializer.deserialize(
            ns3_deprecateObjects_DeprecateObjectsRequest_QNAME, bodyReader, deserializationContext);

    SOAPBlockInfo bodyBlock = new SOAPBlockInfo(ns3_deprecateObjects_DeprecateObjectsRequest_QNAME);
    bodyBlock.setValue(mySOAPElementObj);
    state.getRequest().setBody(bodyBlock);
  }
コード例 #2
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);
    }
  }