Package org.apache.axis2.description

Examples of org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder


    public void testUsingAddressing() {
        wsdlLocation = System.getProperty("basedir", ".") + "/"
                + "test-resources/wsdl/UsingAddressing.wsdl";
        File testResourceFile = new File(wsdlLocation);
        try {
            WSDL11ToAllAxisServicesBuilder builder = new WSDL11ToAllAxisServicesBuilder(
                    new FileInputStream(testResourceFile));
            AxisService axisService = builder.populateService();
            String addressingRequired = AddressingHelper
                    .getAddressingRequirementParemeterValue(axisService);
            assertEquals("Unexpected addressingRequirementParameter value: "
                    + addressingRequired,
                    AddressingConstants.ADDRESSING_OPTIONAL, addressingRequired);
View Full Code Here


    public void testUsingAddressingOptional() {
        wsdlLocation = System.getProperty("basedir", ".") + "/"
                + "test-resources/wsdl/UsingAddressingOptional.wsdl";
        File testResourceFile = new File(wsdlLocation);
        try {
            WSDL11ToAllAxisServicesBuilder builder = new WSDL11ToAllAxisServicesBuilder(
                    new FileInputStream(testResourceFile));
            AxisService axisService = builder.populateService();
            String addressingRequired = AddressingHelper
                    .getAddressingRequirementParemeterValue(axisService);
            assertEquals("Unexpected addressingRequirementParameter value: "
                    + addressingRequired,
                    AddressingConstants.ADDRESSING_OPTIONAL, addressingRequired);
View Full Code Here

    public void testUsingAddressingRequired() {
        wsdlLocation = System.getProperty("basedir", ".") + "/"
                + "test-resources/wsdl/UsingAddressingRequired.wsdl";
        File testResourceFile = new File(wsdlLocation);
        try {
            WSDL11ToAllAxisServicesBuilder builder = new WSDL11ToAllAxisServicesBuilder(
                    new FileInputStream(testResourceFile));
            AxisService axisService = builder.populateService();
            String addressingRequired = AddressingHelper
                    .getAddressingRequirementParemeterValue(axisService);
            assertEquals("Unexpected addressingRequirementParameter value: "
                    + addressingRequired,
                    AddressingConstants.ADDRESSING_REQUIRED, addressingRequired);
View Full Code Here

                                wsdlToAxisServiceBuilder = new WSDL20ToAllAxisServicesBuilder(
                                        new ByteArrayInputStream(out.toByteArray()));
                                wsdlToAxisServiceBuilder.setBaseUri(entryName);
                            } else if (Constants.NS_URI_WSDL11.
                                    equals(documentElementNS.getNamespaceURI())) {
                                wsdlToAxisServiceBuilder = new WSDL11ToAllAxisServicesBuilder(
                                        new ByteArrayInputStream(out.toByteArray()));
                                ((WSDL11ToAxisServiceBuilder) wsdlToAxisServiceBuilder).setDocumentBaseUri(entryName);
                            } else {
                                throw new DeploymentException(Messages.getMessage("invalidWSDLFound"));
                            }
View Full Code Here

            WSDLToAxisServiceBuilder wsdlToAxisServiceBuilder;
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            element.serialize(out);
            if (Constants.NS_URI_WSDL11.
                    equals(documentElementNS.getNamespaceURI())) {
                wsdlToAxisServiceBuilder = new WSDL11ToAllAxisServicesBuilder(
                        new ByteArrayInputStream(out.toByteArray()));
                ((WSDL11ToAllAxisServicesBuilder)wsdlToAxisServiceBuilder).setCustomWSDLResolver(new WarBasedWSDLLocator(wsdlUrl,
                                                                                         loader,
                                                                                         new ByteArrayInputStream(
                                                                                                 out.toByteArray())));
View Full Code Here

                        in2 = new FileInputStream(file1);
                        wsdlToAxisServiceBuilder = new WSDL20ToAllAxisServicesBuilder(in2);
                    } else if (Constants.NS_URI_WSDL11.
                            equals(documentElementNS.getNamespaceURI())) {
                        in2 = new FileInputStream(file1);
                        wsdlToAxisServiceBuilder = new WSDL11ToAllAxisServicesBuilder(in2);
                        ((WSDL11ToAxisServiceBuilder) wsdlToAxisServiceBuilder).setDocumentBaseUri(file1.toURI()
                                                                                                        .toString());
                    } else {
                        throw new DeploymentException(Messages.getMessage("invalidWSDLFound"));
                    }
View Full Code Here

        File outLocation = new File("target/test-resources");
        outLocation.mkdirs();
        if (testResourceFile.exists()) {
            List axisServices = null;
            try {
                WSDL11ToAllAxisServicesBuilder builder = new WSDL11ToAllAxisServicesBuilder(
                        new FileInputStream(testResourceFile));
                axisServices = builder.populateAllServices();
                System.out.println("WSDL file: " + testResourceFile.getName());
            } catch (Exception e) {
                System.out.println("Error in WSDL : " + testResourceFile.getName());
                System.out.println("Exception: " + e.toString());
                throw e;
View Full Code Here

                            serviceQname,
                            configuration.getPortName());
                    builder.setCodegen(true);
                    configuration.addAxisService(builder.populateService());
                } else {
                    builder = new WSDL11ToAllAxisServicesBuilder(wsdl4jDef);
                    builder.setCodegen(true);
                    configuration.setAxisServices(
                            ((WSDL11ToAllAxisServicesBuilder)builder).populateAllServices());
                }
            }
View Full Code Here

        //  server and it is needed to call it from synapse using the main sequence
        //  2) request is to be injected into  the main sequence  .i.e. http://localhost:8280
        // This method does not cause any performance issue ...
        // Proper fix should be refractoring axis2 RestUtil in a proper way
        if (dispatching) {
            RequestURIBasedDispatcher requestDispatcher = new RequestURIBasedDispatcher();
            AxisService axisService = requestDispatcher.findService(msgContext);
            if (axisService == null) {
                String defaultSvcName = NHttpConfiguration.getInstance().getStringValue(
                        "nhttp.default.service", "__SynapseService");
                axisService = msgContext.getConfigurationContext()
                        .getAxisConfiguration().getService(defaultSvcName);
View Full Code Here

                String serverName = (String)
                        messageContext.getProperty(SynapseConstants.Axis2Param.SYNAPSE_SERVER_NAME);

                if(serverName != null && messageContext instanceof Axis2MessageContext) {

                    AxisConfiguration configuration = ((Axis2MessageContext)messageContext).
                            getAxis2MessageContext().
                            getConfigurationContext().getAxisConfiguration();

                    String myServerName = getAxis2ParameterValue(configuration,
                            SynapseConstants.Axis2Param.SYNAPSE_SERVER_NAME);
View Full Code Here

TOP

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

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.