示例#1
0
  private boolean generateWsdl(AxisService axisService) {
    Iterator operatins = axisService.getOperations();
    if (operatins.hasNext()) {
      while (operatins.hasNext()) {
        AxisOperation axisOperation = (AxisOperation) operatins.next();

        if (axisOperation.isControlOperation()) {
          continue;
        }

        if (axisOperation.getMessageReceiver() == null) {
          continue;
        }
        String messageReceiverClass = axisOperation.getMessageReceiver().getClass().getName();
        if (!("org.apache.axis2.rpc.receivers.RPCMessageReceiver".equals(messageReceiverClass)
            || "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"
                .equals(messageReceiverClass)
            || "org.apache.axis2.rpc.receivers.RPCInOutAsyncMessageReceiver"
                .equals(messageReceiverClass)
            || "org.apache.axis2.jaxws.server.JAXWSMessageReceiver".equals(messageReceiverClass))) {
          return false;
        }
      }
    }
    return true;
  }
示例#2
0
 /**
  * To get the methods which do not use RPC* MessageReceivers
  *
  * @param axisService the AxisService to search
  * @return an ArrayList of the LOCAL PARTS of the QNames of any non-RPC operations TODO: Why not
  *     just return the AxisOperations themselves??
  */
 private ArrayList<String> getNonRPCMethods(AxisService axisService) {
   ArrayList<String> excludeOperations = new ArrayList<String>();
   Iterator<AxisOperation> operatins = axisService.getOperations();
   if (operatins.hasNext()) {
     while (operatins.hasNext()) {
       AxisOperation axisOperation = operatins.next();
       if (axisOperation.getMessageReceiver() == null) {
         continue;
       }
       String messageReceiverClass = axisOperation.getMessageReceiver().getClass().getName();
       if (!("org.apache.axis2.rpc.receivers.RPCMessageReceiver".equals(messageReceiverClass)
           || "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"
               .equals(messageReceiverClass)
           || "org.apache.axis2.rpc.receivers.RPCInOutAsyncMessageReceiver"
               .equals(messageReceiverClass)
           || "org.apache.axis2.jaxws.server.JAXWSMessageReceiver".equals(messageReceiverClass))) {
         excludeOperations.add(axisOperation.getName().getLocalPart());
       }
     }
   }
   return excludeOperations;
 }