Examples of BeehiveWsMethodMetadata


Examples of org.apache.beehive.wsm.model.BeehiveWsMethodMetadata

        for (BeehiveWsParameterMetadata cpm : paraMeta) {
          outParamMap.put(cpm.getWpName(), cpm);
        }
      }
    }
    BeehiveWsMethodMetadata wmm = new Jsr181MethodMetadataImpl(opName, returnType,
        returnXMLType);

    wmm.setWmOperationName(opName);
    // FIXME jcolwell@bea.com 2004-Nov-10 --
    // do something better with the action
    wmm.setWmAction(opName);
    if (Void.TYPE.equals(returnType)) {

      if (paraMeta.length == 0) {
        // FIXME jcolwell@bea.com 2004-Nov-22 --
        // also check for faults before setting as oneway.
        wmm.setOneWay(true);
      }
    } else {
      wmm.setWrName(paraMeta[0].getWpName());
      wmm.setWrTargetNamespace(paraMeta[0].getWpTargetNamespace());
    }

    methodMap.put(opName, wmm);

    List paramOrder = op.getParameterOrder(); // this is the one used by
    // rpc wsdls.
    TParam inputParam = op.getInput();
    if (inputParam != null) {

          TPart[] messageParts = messageMap.get(inputParam.getMessage()
              .getLocalPart());
       

        BeehiveWsParameterMetadata[] params = processParameters(opName, messageParts,  tBind, types,
          messageMap, wsm, false);

      if (paramOrder != null) {
        // Paramorder is only used for rpc.
        // if there is a paramoder then order the parameters, remove all the in/out parameters
        // from the out map
        for (Object ord : paramOrder) {
          for (BeehiveWsParameterMetadata wpm : params) {
            if (ord.equals(wpm.getWpName())) {
                if (outParamMap != null && outParamMap.containsKey(wpm.getWpName())) {
                    outParamMap.remove(wpm.getWpName()); // important...
                    // if this param is in.out it was in the out list
                    // also, so removeit.
                    wpm.setWpMode(WebParam.Mode.INOUT);
                  } else {
                    wpm.setWpMode(WebParam.Mode.IN);
                  }
              wmm.addParam(wpm);
              break;
            }
          }
        }
      } else if (params.length > 0) {
        for (BeehiveWsParameterMetadata wpm : params) {
          // FIXME jcolwell@bea.com 2005-Jan-04 --
          // Double check DOC/Lit rules
          if (outParamMap != null && outParamMap.containsKey(wpm.getWpName())) {
            outParamMap.remove(wpm.getWpName()); // important...
            // if
            // this param is
            // in.out it was
            // in the out list
            // also, so remove
            // it.
            wpm.setWpMode(WebParam.Mode.INOUT);
          } else {
            wpm.setWpMode(WebParam.Mode.IN);
          }
          wmm.addParam(wpm);
        }
      }
    }

    // do the pure out parameters.
    if (outParamMap != null && outParamMap.size() > 0) {
      if (outParamMap.size() == 1) {
        BeehiveWsParameterMetadata wpm = outParamMap.values().iterator().next();
        wmm.setXmlReturnType(wpm.getXmlType());
        wmm.setReturnType(wpm.getJavaType());
        wmm.setOneWay(false);
      } else {
        for (BeehiveWsParameterMetadata wpm : outParamMap.values()) {
          wpm.setWpMode(WebParam.Mode.OUT);
          wmm.addParam(wpm);
        }
      }
    }

   
View Full Code Here

Examples of org.apache.beehive.wsm.model.BeehiveWsMethodMetadata

            Map<String, BeehiveWsMethodMetadata> methodMap)
            throws IllegalAccessException, NoSuchFieldException {

        TBindingOperation[] tBops = tBind.getOperationArray();
        for (TBindingOperation tBop : tBops) {
            BeehiveWsMethodMetadata wmm = methodMap.get(tBop.getName());
            if (wmm == null)
                throw new RuntimeException("Invalid method name: "
                        + tBop.getName());
            org.xmlsoap.schemas.wsdl.soap.TOperation[] soapOperations = getSOAPOperations(tBop);
            if (soapOperations != null && soapOperations.length > 0) {
                wmm.setWmAction(soapOperations[0].getSoapAction());
            }
            TBindingOperationMessage tbMsg = tBop.getInput();
            if (tbMsg == null) {
                tbMsg = tBop.getOutput();
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.