Package javax.wsdl.extensions.soap

Examples of javax.wsdl.extensions.soap.SOAPOperation


    bop.setName(serviceInfo.getOperationName());
   
    Operation op = (Operation) portType.getOperations().get(0);
    bop.setOperation(op);
    SOAPOperation soapOperation = new SOAPOperationImpl() ;
    soapOperation.setSoapActionURI(serviceInfo.getResponseAction()) ;
    bop.addExtensibilityElement(soapOperation) ;
   
    if (op.getInput() != null) {
      BindingInput binput = def.createBindingInput();
      bop.setBindingInput(binput);
View Full Code Here


        BindingInput bindingInput = def.createBindingInput();
        bindingInput.addExtensibilityElement(soapBody);
        bindingOperation.setBindingInput(bindingInput);

        SOAPOperation soapOperation = new SOAPOperationImpl();
        // soapAction should be set to the location of the SOAP URI, or Visual Studio won't construct the correct SOAP message
        soapOperation.setSoapActionURI(locationURI);
        // this is the RPC/literal style.  See http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/
        // this parameter is necessary or Apache Synapse won't recognize the WSDL
        soapOperation.setStyle("rpc");
        bindingOperation.addExtensibilityElement(soapOperation);

        binding.addBindingOperation(bindingOperation);
        def.addBinding(binding);
View Full Code Here

                    else
                        throw new WSIFException("jms:propertyValue found in non-jms address");
                }

                // get soapActionURI and style from soap:operation
                SOAPOperation soapOperation =
                    (SOAPOperation) getExtElem(bop,
                        SOAPOperation.class,
                        bop.getExtensibilityElements());
                if (soapOperation == null) {
                    throw new WSIFException(
                        "soapAction must be specified in "
                            + " required by WSDL 1.1 soap:operation binding for "
                            + bop.getName());
                }
                String soapActionURI = soapOperation.getSoapActionURI();
                operation.setSoapActionURI(soapActionURI);

                Trc.event(
                    this,
                    "setting actionURI ",
                    soapActionURI,
                    " for op ",
                    operation.getName());
                String opStyle = soapOperation.getStyle();

                // try to get soap:body for input message
                BindingInput binpt = bop.getBindingInput();
                SOAPBody soapInputBody =
                    (SOAPBody) getExtElem(binpt,
View Full Code Here

   * @throws WSIFException  if there is no soap:operation element in the binding operation element.
   */
  public SOAPOperation getSOAPOperation(BindingOperation bindingOp)
    throws WSIFException {
    Trc.entry(this, bindingOp);
    SOAPOperation soapOperation =
      (SOAPOperation) getExtElem(bindingOp,
        javax.wsdl.extensions.soap.SOAPOperation.class,
        bindingOp.getExtensibilityElements());
    if (soapOperation == null)
      throw new WSIFException(
View Full Code Here

                throw new WSIFException(
                    "mising required in WSDL 1.1 binding operation for " + name);
            }

            // get soapActionURI and style from soap:operation
            SOAPOperation soapOperation =
                (SOAPOperation) getExtElem(bop,
                    SOAPOperation.class,
                    bop.getExtensibilityElements());
            if (soapOperation == null) {
                throw new WSIFException(
                    "soapAction must be specified in "
                        + " required by WSDL 1.1 soap:operation binding for "
                        + bop);
            }
            String soapActionURI = soapOperation.getSoapActionURI();
            opInst.setSoapActionURI(soapActionURI);

            if (Trc.ON)
                Trc.event(
                    this,
                    "setting actionURI "
                        + soapActionURI
                        + " for op "
                        + opInst.getName());
            String opStyle = soapOperation.getStyle();
            if (opStyle != null && !"rpc".equals(opStyle)) {
                throw new WSIFException(
                    "unsupported style " + style + " for operation " + name);
            } else if (!"rpc".equals(style)) {
                throw new WSIFException(
View Full Code Here

    private BindingOperation addBindingOperation(Definition def,OperationImpl operation,DOMImplementation dImpl)
    {
        BindingOperation bindingOperation = def.createBindingOperation();
        bindingOperation.setName(operation.getName());
        SOAPOperation soapOperation = new SOAPOperationImpl();
        bindingOperation.addExtensibilityElement(soapOperation);
        bindingOperation.setOperation(operation);
       
        Document doc = dImpl.createDocument(WSP_NAMESPACE, "Misc", null);
       
View Full Code Here

                    @SuppressWarnings("unchecked")
                    List<ExtensibilityElement> extensibilityElements = bindingOperation.getExtensibilityElements();
                    for (int j = 0; j < extensibilityElements.size(); j++) {
                        ExtensibilityElement extensibilityElement = extensibilityElements.get(j);
                        if (extensibilityElement instanceof SOAPOperation) {
                            SOAPOperation soapOperation = (SOAPOperation) extensibilityElement;
                            String soapActionUri = soapOperation.getSoapActionURI();
                            operationPolicy.setOperationAction(soapActionUri);
                            operationPolicy.setSoapMessageVersionNamespace(WSSConstants.NS_SOAP11);
                        } else if (extensibilityElement instanceof SOAP12Operation) {
                            SOAP12Operation soap12Operation = (SOAP12Operation) extensibilityElement;
                            String soapActionUri = soap12Operation.getSoapActionURI();
View Full Code Here

   * @return if style of soap binding of binding is rpc and use of soap body of binding output of binding operation is literal then it returns true.
  */
  private boolean checkRpcLiteral(BindingOperation oper, Binding binding)
  {
    List list = oper.getExtensibilityElements();
    SOAPOperation sop = getSOAPOperation(list);
    if (sop == null)
      return false;
    String style =
      (sop.getStyle() == null
        ? getSOAPBindingStyle(binding)
        : sop.getStyle());
    if (!style.equals(WSIConstants.ATTRVAL_SOAP_BIND_STYLE_RPC))
      return false;
    list = oper.getBindingOutput().getExtensibilityElements();
    SOAPBody body = getSOAPBody(list);
    if (body == null)
View Full Code Here

    else
    {
      // check that they all have the same style element value
      String style = null;
      String checkStyle;
      SOAPOperation soapOperation;
      Iterator iterator = soapOperationList.keySet().iterator();
      while (iterator.hasNext())
      {
        soapOperation = (SOAPOperation) iterator.next();
        checkStyle = soapOperation.getStyle();
        if (checkStyle == null)
          checkStyle = styleB;
        if (checkStyle != null
          && !checkStyle.equals(WSIConstants.ATTRVAL_SOAP_BIND_STYLE_DOC)
          && !checkStyle.equals(WSIConstants.ATTRVAL_SOAP_BIND_STYLE_RPC))
        {
          result = AssertionResult.RESULT_FAILED;
          failureDetailList.add(
            this.validator.createFailureDetail(
              "Operation Name: "
                + soapOperationList.get(soapOperation)
                + "\nSOAP Operation: "
                + soapOperation.toString(),
              entryContext,
              soapOperation));
          // REMOVE: Need to process all operations
          //break;
        }

        if (style == null)
        {
          style = checkStyle;
        }
        else if (!style.equals(checkStyle) || !style.equals(styleB))
        {
          result = AssertionResult.RESULT_FAILED;
          failureDetailList.add(
            this.validator.createFailureDetail(
              "Operation Name: "
                + soapOperationList.get(soapOperation)
                + "\nSOAP Operation: "
                + soapOperation.toString(),
              entryContext,
              soapOperation));
          // REMOVE: Need to process all operations
          //break;
        }
View Full Code Here

        // for each binding operation:
        while (bindingOps.hasNext())
        {
          BindingOperation bindingOp = (BindingOperation) bindingOps.next();

          SOAPOperation soapOp = getSoapOperation(bindingOp);

          if ((soapOp == null && defaultStyle.equals(soapBindingStyle))
            || (soapOp != null
              && soapOp.getStyle() == null
              && defaultStyle.equals(soapBindingStyle))
            || (soapOp != null
              && soapOp.getStyle() != null
              && soapOp.getStyle().equals(soapBindingStyle)))
          {
            // check binding input & output
            BindingInput bInput = bindingOp.getBindingInput();
            if (bInput != null)
            {
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap.SOAPOperation

Copyright © 2018 www.massapicom. 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.