Package org.apache.axis2.description

Examples of org.apache.axis2.description.AxisBindingOperation


                    res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                } else {
                    res.setStatus(Integer.parseInt(status));
                }

                AxisBindingOperation axisBindingOperation =
                        (AxisBindingOperation) msgContext
                                .getProperty(Constants.AXIS_BINDING_OPERATION);
                if (axisBindingOperation != null) {
                    AxisBindingMessage fault = axisBindingOperation
                            .getFault((String) msgContext.getProperty(Constants.FAULT_NAME));
                    if (fault != null) {
                        Integer code = (Integer) fault.getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
                        if (code != null) {
                            res.setStatus(code.intValue());
View Full Code Here


     
       MessageContext msgctx= MessageContext.getCurrentMessageContext();
       AxisService axisServce= msgctx.getAxisService();
       AxisEndpoint axisEndpoint= axisServce.getEndpoint("AnnotationServiceHttpEndpoint");
       AxisBinding axisBinding=axisEndpoint.getBinding();
       AxisBindingOperation axisBindingOperation;
       Iterator<AxisBindingOperation> iterator=axisBinding.getChildren();


         while(iterator.hasNext()){
           axisBindingOperation=iterator.next();
             if(axisBindingOperation.getName().equals(new QName("addDataFromURLandBody"))){
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION).equals("testroot/getFromBody/{data1}")){
                 System.out.println("wrong http location : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION)+" expected : testroot/getFromBody/{data1}" );
                  return false;
                }
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_METHOD).equals("POST")){
                  System.out.println("wrong http method : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_METHOD)+" expected : POST" );
                  return false;
                }

                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION).equals("application/xml")){
                     System.out.println("INPUT SERIALIZATION TESTS");
                  System.out.println("wrong input serialization : found : "+ axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION) +" expected : application/xml" );
                  return false;
                }

                if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION).equals("text/xml")){
                     System.out.println("OUTPUT SERIALIZATION TEST");
                  System.out.println("wrong output serialization : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION)+" expected : text/xml" );
                  return false;
                }
                 System.out.println("Type publishing test \"addDataFromURLandBody\" OK.........");
             }  

             if(axisBindingOperation.getName().equals(new QName("updateDataFromURL"))){
             
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION).equals("testroot/update/{data1}")){
                 System.out.println("wrong http location : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION)+" expected : testroot/update/{data1}" );
                  return false;
                }
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_METHOD).equals("PUT")){
                  System.out.println("wrong http method : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_METHOD)+" expected : PUT" );
                  return false;
                }
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION).equals("text/xml")){
                  System.out.println("wrong input serialization : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION)+" expected : text/xml" );
                  return false;
                }
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION).equals("application/xml")) {
                  System.out.println("wrong output serialization : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION)+" expected : application/xml" );
                  return false;
                }
                 System.out.println("Type publishing test \"updateDataFromURL\" OK.........");
             }

             if(axisBindingOperation.getName().equals(new QName("checkServicesXMLoverriding"))){
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION).equals("serviceroot/check")){
                 System.out.println("wrong http location : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_LOCATION)+" expected : serviceroot/check" );
                  return false;
                }
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_METHOD).equals("POST")){
                  System.out.println("wrong http method : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_METHOD)+" expected : POST" );
                  return false;
                }
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION).equals("application/xml")){
                  System.out.println("wrong input serialization : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION)+" expected : application/xml" );
                  return false;
                }
                 if(!axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION).equals("application/xml")) {
                  System.out.println("wrong output serialization : found : "+axisBindingOperation.getProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION)+" expected : application/xml" );
                  return false;
                }
                 System.out.println("Type publishing test \"checkServicesXMLoverriding\" OK.........");
             }
         }
View Full Code Here

          res.setStatus( HttpServletResponse.SC_INTERNAL_SERVER_ERROR );
        } else {
          res.setStatus( Integer.parseInt( status ) );
        }

        AxisBindingOperation axisBindingOperation =
            (AxisBindingOperation) msgContext.getProperty( Constants.AXIS_BINDING_OPERATION );
        if ( axisBindingOperation != null ) {
          AxisBindingMessage fault =
              axisBindingOperation.getFault( (String) msgContext.getProperty( Constants.FAULT_NAME ) );
          if ( fault != null ) {
            Integer code = (Integer) fault.getProperty( WSDL2Constants.ATTR_WHTTP_CODE );
            if ( code != null ) {
              res.setStatus( code.intValue() );
            }
View Full Code Here

                    if (AddressingHelper.isFaultRedirected(msgContext)) {
                        response.setStatus(HttpServletResponse.SC_ACCEPTED);
                    } else {
                        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);

                        AxisBindingOperation axisBindingOperation =
                                (AxisBindingOperation) msgContext
                                        .getProperty(Constants.AXIS_BINDING_OPERATION);
                        if (axisBindingOperation != null) {
                            AxisBindingMessage axisBindingMessage = axisBindingOperation.getFault(
                                    (String) msgContext.getProperty(Constants.FAULT_NAME));
                            if(axisBindingMessage != null){
                                Integer code = (Integer) axisBindingMessage
                                        .getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
                                if (code != null) {
View Full Code Here

                    res.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                } else {
                    res.setStatus(Integer.parseInt(status));
                }

                AxisBindingOperation axisBindingOperation =
                        (AxisBindingOperation) msgContext
                                .getProperty(Constants.AXIS_BINDING_OPERATION);
                if (axisBindingOperation != null) {
                    AxisBindingMessage fault = axisBindingOperation
                            .getFault((String) msgContext.getProperty(Constants.FAULT_NAME));
                    if (fault != null) {
                        Integer code = (Integer) fault.getProperty(WSDL2Constants.ATTR_WHTTP_CODE);
                        if (code != null) {
                            res.setStatus(code.intValue());
View Full Code Here

      if (axisService.getEndpointName() != null) {
        AxisEndpoint axisEndpoint = axisService
            .getEndpoint(axisService.getEndpointName());
        if (axisEndpoint != null) {
          AxisBinding axisBinding = axisEndpoint.getBinding();
                    AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisBinding
              .getChild(axisOperation.getName());

                    //If Binding Operation is not found, just return null
                    if (axisBindingOperation == null) {
                       return null;
                    }

                    String direction = axisMessage.getDirection();
          AxisBindingMessage axisBindingMessage = null;
          if (WSDLConstants.WSDL_MESSAGE_DIRECTION_IN
              .equals(direction)
              && WSDLUtil
                  .isInputPresentForMEP(axisOperation
                      .getMessageExchangePattern())) {
            axisBindingMessage = (AxisBindingMessage) axisBindingOperation
                .getChild(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
            return axisBindingMessage;
           
          } else if (WSDLConstants.WSDL_MESSAGE_DIRECTION_OUT
              .equals(direction)
              && WSDLUtil
                  .isOutputPresentForMEP(axisOperation
                      .getMessageExchangePattern())) {
            axisBindingMessage = (AxisBindingMessage) axisBindingOperation
                .getChild(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
            return axisBindingMessage;
          }
        }
View Full Code Here

    }

    protected Object getBindingPropertyFromOperation(String name, QName qName) {

        // Get the correct AxisBindingOperation coresponding to the AxisOperation
        AxisBindingOperation axisBindingOperation = null;
        if (axisBinding != null) {
            axisBindingOperation = (AxisBindingOperation) axisBinding.getChild(qName);
        }

        Object property = null;

        if (axisBindingOperation != null) {
            property = axisBindingOperation.getProperty(name);
        }

        if ((property == null) && (axisBinding != null)) {
            property = axisBinding.getProperty(name);
        }
View Full Code Here

    protected Object getBindingPropertyFromMessage(String name, QName qName, String key) {

        Object property = null;
        // Get the correct AxisBindingOperation coresponding to the AxisOperation
        AxisBindingOperation axisBindingOperation = null;
        if (axisBinding != null) {
            axisBindingOperation = (AxisBindingOperation) axisBinding.getChild(qName);

        }

        AxisBindingMessage axisBindingMessage = null;
        if (axisBindingOperation != null) {
            axisBindingMessage = (AxisBindingMessage) axisBindingOperation.getChild(key);
            if (axisBindingMessage != null) {
                property = axisBindingMessage.getProperty(name);
            }

            if (property == null) {
                property = axisBindingOperation.getProperty(name);
            }
        }


        if ((property == null) && (axisBinding != null)) {
View Full Code Here

    protected Object getBindingPropertyFromMessageFault(String name, QName qName, String key) {

        Object property = null;
        // Get the correct AxisBindingOperation coresponding to the AxisOperation
        AxisBindingOperation axisBindingOperation =
                (AxisBindingOperation) axisBinding.getChild(qName);

        AxisBindingMessage axisBindingMessageFault = null;
        AxisBindingMessage axisBindingFault = null;
        if (axisBindingOperation != null) {
            axisBindingMessageFault = (AxisBindingMessage) axisBindingOperation.getFault(key);

            if (axisBindingMessageFault != null) {
                property = axisBindingMessageFault.getProperty(name);
            }
View Full Code Here

        // First Iterate through the operations and find the relevant fromOM and toOM methods to be generated
        ArrayList parameters = new ArrayList();

        AxisOperation axisOperation = null;
        AxisBindingOperation axisBindingOperation = null;
        for (Iterator bindingOperationsIter = this.axisBinding.getChildren();
             bindingOperationsIter.hasNext();) {
            axisBindingOperation = (AxisBindingOperation) bindingOperationsIter.next();
            axisOperation = axisBindingOperation.getAxisOperation();

            // Add the parameters to a map with their type as the key
            // this step is needed to remove repetitions

            // process the input parameters
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.AxisBindingOperation

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.