Package org.apache.woden.wsdl20.extensions.http

Examples of org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions


            axisBindingOperation.setAxisOperation(axisOperation);
            axisBindingOperation.setParent(axisBinding);
            axisBindingOperation.setName(axisOperation.getName());

            addDocumentation(axisBindingOperation, bindingOperation.toElement());
            HTTPBindingOperationExtensions httpBindingOperationExtensions;
            try {
                httpBindingOperationExtensions = ((HTTPBindingOperationExtensions)
                        bindingOperation.getComponentExtensionContext(
                                new URI(WSDL2Constants.URI_WSDL2_HTTP)));
            } catch (URISyntaxException e) {
                throw new AxisFault("HTTP Binding Extention not found");
            }

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpFaultSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpInputSerialization());
            String httpMethod = httpBindingOperationExtensions.
                    getHttpMethod();
            if (httpMethod == null) {
                if (httpMethodDefault != null) {
                    httpMethod = httpMethodDefault;
                } else {
                    Boolean safeParameter =
                            (Boolean) axisOperation.getParameterValue(WSDL2Constants.ATTR_WSDLX_SAFE);
                    if (safeParameter != null && safeParameter.booleanValue()){
                        httpMethod = HTTPConstants.HEADER_GET;
                    } else {
                        httpMethod = HTTPConstants.HEADER_POST;
                    }
                }
            }
            axisBindingOperation
                    .setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpMethod);
            HTTPLocation httpLocation = httpBindingOperationExtensions.getHttpLocation();

            // If httpLocation is not null we should extract a constant part from it and add its value and the
            // corresponding AxisOperation to a map in order to dispatch rest messages. If httpLocation is null we add
            // the operation name into this map.
            String httpLocationString = "";
            if (httpLocation != null) {
                String httpLocationTemplete = httpLocation.getOriginalLocation();
                axisBindingOperation
                        .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocationTemplete);
                httpLocationString = WSDLUtil.getConstantFromHTTPLocation(httpLocationTemplete, httpMethod);

            }

            httpLocationTable.put(httpLocationString, axisOperation);

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED,
                                             httpBindingOperationExtensions.
                                                     isHttpLocationIgnoreUncited());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpOutputSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
                                             httpBindingOperationExtensions.getHttpQueryParameterSeparator());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING,
                                             httpBindingOperationExtensions.getHttpContentEncodingDefault());

            BindingMessageReference[] bindingMessageReferences =
                    bindingOperation.getBindingMessageReferences();
            for (int j = 0; j < bindingMessageReferences.length; j++) {
                BindingMessageReference bindingMessageReference = bindingMessageReferences[j];
View Full Code Here


            axisBindingOperation.setAxisOperation(axisOperation);
            axisBindingOperation.setParent(axisBinding);
            axisBindingOperation.setName(axisOperation.getName());

            addDocumentation(axisBindingOperation, bindingOperation.toElement());
            HTTPBindingOperationExtensions httpBindingOperationExtensions;
            try {
                httpBindingOperationExtensions = ((HTTPBindingOperationExtensions)
                        bindingOperation.getComponentExtensionContext(
                                new URI(WSDL2Constants.URI_WSDL2_HTTP)));
            } catch (URISyntaxException e) {
                throw new AxisFault("HTTP Binding Extention not found");
            }

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpFaultSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpInputSerialization());
            String httpMethod = httpBindingOperationExtensions.
                    getHttpMethod();
            if (httpMethod == null) {
                if (httpMethodDefault != null) {
                    httpMethod = httpMethodDefault;
                } else {
                    Boolean safeParameter =
                            (Boolean) axisOperation.getParameterValue(WSDL2Constants.ATTR_WSDLX_SAFE);
                    if (safeParameter != null && safeParameter.booleanValue()){
                        httpMethod = HTTPConstants.HEADER_GET;
                    } else {
                        httpMethod = HTTPConstants.HEADER_POST;
                    }
                }
            }
            axisBindingOperation
                    .setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpMethod);
            HTTPLocation httpLocation = httpBindingOperationExtensions.getHttpLocation();

            // If httpLocation is not null we should extract a constant part from it and add its value and the
            // corresponding AxisOperation to a map in order to dispatch rest messages. If httpLocation is null we add
            // the operation name into this map.
            String httpLocationString = "";
            if (httpLocation != null) {
                String httpLocationTemplete = httpLocation.getOriginalLocation();
                axisBindingOperation
                        .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocationTemplete);
                httpLocationString = WSDLUtil.getConstantFromHTTPLocation(httpLocationTemplete, httpMethod);

            }

            httpLocationTable.put(httpLocationString, axisOperation);

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED,
                                             httpBindingOperationExtensions.
                                                     isHttpLocationIgnoreUncited());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpOutputSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
                                             httpBindingOperationExtensions.getHttpQueryParameterSeparator());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING,
                                             httpBindingOperationExtensions.getHttpContentEncodingDefault());

            BindingMessageReference[] bindingMessageReferences =
                    bindingOperation.getBindingMessageReferences();
            for (int j = 0; j < bindingMessageReferences.length; j++) {
                BindingMessageReference bindingMessageReference = bindingMessageReferences[j];
View Full Code Here

            axisBindingOperation.setAxisOperation(axisOperation);
            axisBindingOperation.setParent(axisBinding);
            axisBindingOperation.setName(axisOperation.getName());

            addDocumentation(axisBindingOperation, bindingOperation.toElement());
            HTTPBindingOperationExtensions httpBindingOperationExtensions;
            try {
                httpBindingOperationExtensions = ((HTTPBindingOperationExtensions)
                        bindingOperation.getComponentExtensionContext(
                                new URI(WSDL2Constants.URI_WSDL2_HTTP)));
            } catch (URISyntaxException e) {
                throw new AxisFault("HTTP Binding Extention not found");
            }

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpFaultSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpInputSerialization());
            String httpMethod = httpBindingOperationExtensions.
                    getHttpMethod();
            if (httpMethod == null) {
                if (httpMethodDefault != null) {
                    httpMethod = httpMethodDefault;
                } else {
                    Boolean safeParameter =
                            (Boolean) axisOperation.getParameterValue(WSDL2Constants.ATTR_WSDLX_SAFE);
                    if (safeParameter != null && safeParameter.booleanValue()){
                        httpMethod = HTTPConstants.HEADER_GET;
                    } else {
                        httpMethod = HTTPConstants.HEADER_POST;
                    }
                }
            }
            axisBindingOperation
                    .setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpMethod);
            HTTPLocation httpLocation = httpBindingOperationExtensions.getHttpLocation();

            // If httpLocation is not null we should extract a constant part from it and add its value and the
            // corresponding AxisOperation to a map in order to dispatch rest messages. If httpLocation is null we add
            // the operation name into this map.
            String httpLocationString = "";
            if (httpLocation != null) {
                String httpLocationTemplete = httpLocation.getOriginalLocation();
                axisBindingOperation
                        .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocationTemplete);
                httpLocationString = WSDLUtil.getConstantFromHTTPLocation(httpLocationTemplete, httpMethod);

            }

            httpLocationTable.put(httpLocationString, axisOperation);

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED,
                                             httpBindingOperationExtensions.
                                                     isHttpLocationIgnoreUncited());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpOutputSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
                                             httpBindingOperationExtensions.getHttpQueryParameterSeparator());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING,
                                             httpBindingOperationExtensions.getHttpContentEncodingDefault());

            BindingMessageReference[] bindingMessageReferences =
                    bindingOperation.getBindingMessageReferences();
            for (int j = 0; j < bindingMessageReferences.length; j++) {
                BindingMessageReference bindingMessageReference = bindingMessageReferences[j];
View Full Code Here

            axisBindingOperation.setAxisOperation(axisOperation);
            axisBindingOperation.setParent(axisBinding);
            axisBindingOperation.setName(axisOperation.getName());

            addDocumentation(axisBindingOperation, bindingOperation.toElement());
            HTTPBindingOperationExtensions httpBindingOperationExtensions;
            try {
                httpBindingOperationExtensions = ((HTTPBindingOperationExtensions)
                        bindingOperation.getComponentExtensionContext(
                                new URI(WSDL2Constants.URI_WSDL2_HTTP)));
            } catch (URISyntaxException e) {
                throw new AxisFault("HTTP Binding Extention not found");
            }

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpFaultSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpInputSerialization());
            String httpMethod = httpBindingOperationExtensions.
                    getHttpMethod();
            if (httpMethod == null) {
                if (httpMethodDefault != null) {
                    httpMethod = httpMethodDefault;
                } else {
                    Boolean safeParameter =
                            (Boolean) axisOperation.getParameterValue(WSDL2Constants.ATTR_WSDLX_SAFE);
                    if (safeParameter != null && safeParameter.booleanValue()){
                        httpMethod = HTTPConstants.HEADER_GET;
                    } else {
                        httpMethod = HTTPConstants.HEADER_POST;
                    }
                }
            }
            axisBindingOperation
                    .setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpMethod);
            HTTPLocation httpLocation = httpBindingOperationExtensions.getHttpLocation();

            // If httpLocation is not null we should extract a constant part from it and add its value and the
            // corresponding AxisOperation to a map in order to dispatch rest messages. If httpLocation is null we add
            // the operation name into this map.
            String httpLocationString = "";
            if (httpLocation != null) {
                String httpLocationTemplete = httpLocation.getOriginalLocation();
                axisBindingOperation
                        .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocationTemplete);
                httpLocationString = RESTUtil.getConstantFromHTTPLocation(httpLocationTemplete, httpMethod);

            }

            httpLocationTable.put(httpLocationString, axisOperation);

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED,
                                             httpBindingOperationExtensions.
                                                     isHttpLocationIgnoreUncited());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpOutputSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
                                             httpBindingOperationExtensions.getHttpQueryParameterSeparator());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING,
                                             httpBindingOperationExtensions.getHttpContentEncodingDefault());

            BindingMessageReference[] bindingMessageReferences =
                    bindingOperation.getBindingMessageReferences();
            for (int j = 0; j < bindingMessageReferences.length; j++) {
                BindingMessageReference bindingMessageReference = bindingMessageReferences[j];
View Full Code Here

            axisBindingOperation.setAxisOperation(axisOperation);
            axisBindingOperation.setParent(axisBinding);
            axisBindingOperation.setName(axisOperation.getName());

            HTTPBindingOperationExtensions httpBindingOperationExtensions = null;
            try {
                httpBindingOperationExtensions = ((HTTPBindingOperationExtensions)
                        bindingOperation.getComponentExtensionsForNamespace(
                                new URI(WSDL2Constants.URI_WSDL2_HTTP)));
            } catch (URISyntaxException e) {
                throw new AxisFault("HTTP Binding Extention not found");
            }

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_FAULT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpFaultSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpInputSerialization());
            HTTPLocation httpLocation = httpBindingOperationExtensions.getHttpLocation();

            // If httpLocation is not null we should extract a constant part from it and add its value and the
            // corresponding AxisOperation to a map in order to dispatch rest messages. If httpLocation is null we add
            // the operation name into this map.
            String httpLocationString = "";
            if (httpLocation != null) {
                String httpLocationTemplete = httpLocation.getOriginalLocation();
                axisBindingOperation
                        .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocationTemplete);
                httpLocationString = RESTUtil.getConstantFromHTTPLocation(httpLocationTemplete);

            }

            httpLocationTable.put(httpLocationString, axisOperation);

            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED,
                                             httpBindingOperationExtensions.
                                                     isHttpLocationIgnoreUncited());
            axisBindingOperation
                    .setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpBindingOperationExtensions.
                            getHttpMethod());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
                                             httpBindingOperationExtensions.getHttpOutputSerialization());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
                                             httpBindingOperationExtensions.getHttpQueryParameterSeparator());
            axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING,
                                             httpBindingOperationExtensions.getHttpContentEncodingDefault());

            BindingMessageReference[] bindingMessageReferences =
                    bindingOperation.getBindingMessageReferences();
            for (int j = 0; j < bindingMessageReferences.length; j++) {
                BindingMessageReference bindingMessageReference = bindingMessageReferences[j];
View Full Code Here

                                     soapEndpointExtensions.getHttpAuthenticationRealm());
        }
    }

    private void processHTTPBindingEndpointExtensions(Endpoint endpoint, AxisEndpoint axisEndpoint) throws AxisFault {
        HTTPEndpointExtensions httpEndpointExtensions;
        try {
            httpEndpointExtensions = (HTTPEndpointExtensions) endpoint
                    .getComponentExtensionContext(new URI(WSDL2Constants.URI_WSDL2_HTTP));
        } catch (URISyntaxException e) {
            throw new AxisFault("HTTP Binding Endpoint Extension not found");
        }

        if (httpEndpointExtensions != null) {
            axisEndpoint.setProperty(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_TYPE,
                                     httpEndpointExtensions.getHttpAuthenticationScheme());
            axisEndpoint.setProperty(WSDL2Constants.ATTR_WHTTP_AUTHENTICATION_REALM,
                                     httpEndpointExtensions.getHttpAuthenticationRealm());
        }
    }
View Full Code Here

            URI soapMep = soapBindingOperationExtensions.getSoapMep();
            if (soapMep != null) {
                axisBindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_MEP,
                                                 soapMep.toString());
            }
            HTTPLocation httpLocation = soapBindingOperationExtensions.getHttpLocation();
            // If httpLocation is not null we should extract a constant part from it and add its value and the
            // corresponding AxisOperation to a map in order to dispatch rest messages. If httpLocation is null we add
            // the operation name into this map.
            String httpLocationString = "";
            if (httpLocation != null) {
                String httpLocationTemplete = httpLocation.getOriginalLocation();
                axisBindingOperation
                        .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocationTemplete);
                httpLocationString = RESTUtil.getConstantFromHTTPLocation(httpLocationTemplete, HTTPConstants.HEADER_POST);

            }
View Full Code Here

                    }
                }
            }
            axisBindingOperation
                    .setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpMethod);
            HTTPLocation httpLocation = httpBindingOperationExtensions.getHttpLocation();

            // If httpLocation is not null we should extract a constant part from it and add its value and the
            // corresponding AxisOperation to a map in order to dispatch rest messages. If httpLocation is null we add
            // the operation name into this map.
            String httpLocationString = "";
            if (httpLocation != null) {
                String httpLocationTemplete = httpLocation.getOriginalLocation();
                axisBindingOperation
                        .setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocationTemplete);
                httpLocationString = RESTUtil.getConstantFromHTTPLocation(httpLocationTemplete, httpMethod);

            }
View Full Code Here

        if (rpcInterfaceOperationExtensions != null) {
            String rpcsig = "";
            Argument[] signatures = rpcInterfaceOperationExtensions.getRPCSignature();
            for (int i = 0; i < signatures.length; i++) {
                Argument sigArgument = signatures[i];
                rpcsig = rpcsig + sigArgument.getName().getLocalPart() + " " + sigArgument.getDirection() + " ";
            }
            Parameter parameter = new Parameter(WSDL2Constants.ATTR_WRPC_SIGNATURE, rpcsig);
            axisOperation.addParameter(parameter);
        }
View Full Code Here

            Parameter parameter = new Parameter(WSDL2Constants.ATTR_WSDLX_SAFE, Boolean.valueOf(
                    interfaceOperationExtensions.isSafe()));
            axisOperation.addParameter(parameter);
        }

        RPCInterfaceOperationExtensions rpcInterfaceOperationExtensions;
        try {
            rpcInterfaceOperationExtensions = (RPCInterfaceOperationExtensions) operation
                    .getComponentExtensionContext(
                            new URI(WSDL2Constants.URI_WSDL2_RPC));
        } catch (URISyntaxException e) {
            throw new AxisFault("WSDL2 extensions not defined for this operation");
        }

        if (rpcInterfaceOperationExtensions != null) {
            String rpcsig = "";
            Argument[] signatures = rpcInterfaceOperationExtensions.getRPCSignature();
            for (int i = 0; i < signatures.length; i++) {
                Argument sigArgument = signatures[i];
                rpcsig = rpcsig + sigArgument.getName().getLocalPart() + " " + sigArgument.getDirection() + " ";
            }
            Parameter parameter = new Parameter(WSDL2Constants.ATTR_WRPC_SIGNATURE, rpcsig);
View Full Code Here

TOP

Related Classes of org.apache.woden.wsdl20.extensions.http.HTTPBindingOperationExtensions

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.