Package javax.wsdl.extensions.soap12

Examples of javax.wsdl.extensions.soap12.SOAP12Fault


        }
        PortType wsdlPortType = wsdlBinding.getPortType();
        for (Iterator iter = wsdlPortType.getOperations().iterator(); iter.hasNext();) {
            Operation wsdlOperation = (Operation) iter.next();
            BindingOperation wsdlBindingOperation = wsdlBinding.getBindingOperation(wsdlOperation.getName(), null, null);
            SOAP12Operation wsdlSoapOperation = WSDLUtils.getExtension(wsdlBindingOperation, SOAP12Operation.class);
            Wsdl1SoapOperationImpl operation = new Wsdl1SoapOperationImpl();
            operation.setName(new QName(wsdlPortType.getQName().getNamespaceURI(), wsdlOperation.getName()));
            if (wsdlSoapOperation != null) {
                operation.setSoapAction(wsdlSoapOperation.getSoapActionURI());
                operation.setStyle(getStyle(wsdlSoapOperation.getStyle()));
            } else {
                operation.setSoapAction("");
            }
            if (operation.getStyle() == null) {
                operation.setStyle(binding.getStyle() != null ? binding.getStyle() : Style.DOCUMENT);
View Full Code Here


        if (soap11) {
            SOAPOperation op = new SOAPOperationImpl();
            op.setSoapActionURI("");
            bindingOp.addExtensibilityElement(op);
        } else {
            SOAP12Operation op = new SOAP12OperationImpl();
            op.setSoapActionURI("");
            bindingOp.addExtensibilityElement(op);
        }
        if (operation.getInput() != null) {
            BindingInput in = def.createBindingInput();
            in.setName(operation.getInput().getName());
View Full Code Here

        BindingOperation bindingOperation = binding.getBindingOperation("Operation", "Input", "Output");
        Assert.assertNotNull("No binding operation created", bindingOperation);
        Assert.assertEquals("Invalid amount of extensibility elements", 1,
                bindingOperation.getExtensibilityElements().size());

        SOAP12Operation soapOperation = (SOAP12Operation) bindingOperation.getExtensibilityElements().get(0);
        Assert.assertEquals("Invalid SOAPAction", namespace + "/Action", soapOperation.getSoapActionURI());

        BindingInput bindingInput = bindingOperation.getBindingInput();
        Assert.assertNotNull("No binding input", bindingInput);
        Assert.assertEquals("Invalid name", "Input", bindingInput.getName());
        Assert.assertEquals("Invalid amount of extensibility elements", 1,
View Full Code Here

              SOAPOperation soapOp = (SOAPOperation)extElement;
              soapaction = soapOp.getSoapActionURI();
            }
            else if (extElement instanceof SOAP12Operation)
            {
              SOAP12Operation soapOp = (SOAP12Operation)extElement;
              soapaction = soapOp.getSoapActionURI();
            }
          }
          if (soapaction != null)
          {
            if ( !soapaction.startsWith("\"") && !soapaction.endsWith("\"") )
View Full Code Here

                            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();
                            operationPolicy.setOperationAction(soapActionUri);
                            operationPolicy.setSoapMessageVersionNamespace(WSSConstants.NS_SOAP12);
                        }
                    }
View Full Code Here

        SOAPOperation.class );

    if( soapOperation != null && soapOperation.getStyle() != null )
      return soapOperation.getStyle().equalsIgnoreCase( "rpc" );

    SOAP12Operation soap12Operation = WsdlUtils.getExtensiblityElement( bindingOperation.getExtensibilityElements(),
        SOAP12Operation.class );

    if( soap12Operation != null && soap12Operation.getStyle() != null )
      return soap12Operation.getStyle().equalsIgnoreCase( "rpc" );

    Binding binding = findBindingForOperation( definition, bindingOperation );
    if( binding == null )
    {
      log.error( "Failed to find binding for operation [" + bindingOperation.getName() + "] in definition ["
View Full Code Here

                // ones
                axisService.addSchema(getXMLSchema(schema.getElement(), schema
                        .getDocumentBaseURI()));

            } else if (wsdl4jExtensibilityElement instanceof SOAP12Operation) {
                SOAP12Operation soapOperation = (SOAP12Operation) wsdl4jExtensibilityElement;
                AxisBindingOperation axisBindingOperation = (AxisBindingOperation) description;

                String style = soapOperation.getStyle();
                if (style != null) {
                    axisBindingOperation.setProperty(WSDLConstants.WSDL_1_1_STYLE, style);
                }

                String soapActionURI = soapOperation.getSoapActionURI();
               
                if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled())
                    log.debug("WSDL Binding Operation: " + axisBindingOperation.getName() +
                            ", SOAPAction: " + soapActionURI);
               
                if (soapActionURI != null && !soapActionURI.equals("")) {
                    axisBindingOperation
                            .setProperty(WSDL2Constants.ATTR_WSOAP_ACTION, soapActionURI);
                    axisBindingOperation.getAxisOperation().setSoapAction(soapActionURI);
                    if (!isServerSide) {
                        axisBindingOperation.getAxisOperation().setOutputAction(soapActionURI);
                    }

                    axisService.mapActionToOperation(soapActionURI,
                                                     axisBindingOperation.getAxisOperation());
                }

            } else if (wsdl4jExtensibilityElement instanceof SOAPOperation) {
                SOAPOperation soapOperation = (SOAPOperation) wsdl4jExtensibilityElement;
                AxisBindingOperation axisBindingOperation = (AxisBindingOperation) description;

                String style = soapOperation.getStyle();
                if (style != null) {
                    axisBindingOperation.setProperty(WSDLConstants.WSDL_1_1_STYLE, style);
                }

                String soapAction = soapOperation.getSoapActionURI();
               
                if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled())
                    log.debug("WSDL Binding Operation: " + axisBindingOperation.getName() +
                            ", SOAPAction: " + soapAction);
               
View Full Code Here

                            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();
                            operationPolicy.setOperationAction(soapActionUri);
                            operationPolicy.setSoapMessageVersionNamespace(WSSConstants.NS_SOAP12);
                        }
                    }
View Full Code Here

            SOAPOperation soapOp = (SOAPOperation)extElement;
            operationStyle = soapOp.getStyle();
         }
         else if (extElement instanceof SOAP12Operation)
         {
            SOAP12Operation soapOp = (SOAP12Operation)extElement;
            operationStyle = soapOp.getStyle();
         }
      }

      if (operationStyle == null)
      {
View Full Code Here

        boolean result = resolver.resolveException(context, null, new MySenderException());
        Assert.assertTrue("resolveException returns false", result);
        Assert.assertTrue("Context has no response", context.hasResponse());
        SoapMessage response = (SoapMessage) context.getResponse();
        Assert.assertTrue("Resonse has no fault", response.getSoapBody().hasFault());
        Soap12Fault fault = (Soap12Fault) response.getSoapBody().getFault();
        Assert.assertEquals("Invalid fault code on fault", SoapVersion.SOAP_12.getClientOrSenderFaultName(),
                fault.getFaultCode());
        Assert.assertEquals("Invalid fault string on fault", "Sender error", fault.getFaultReasonText(Locale.ENGLISH));
        Assert.assertNull("Detail on fault", fault.getFaultDetail());
    }
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.soap12.SOAP12Fault

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.