Package javax.wsdl

Examples of javax.wsdl.Binding


        port.getExtensibilityElements();
        EasyMock.expectLastCall().andReturn(portExts);
        Iterator portItr = control.createMock(Iterator.class);
        portExts.iterator();
        EasyMock.expectLastCall().andReturn(portItr);
        Binding binding = control.createMock(Binding.class);
        port.getBinding();
        EasyMock.expectLastCall().andReturn(binding);
        List bindingExts = control.createMock(List.class);
        binding.getExtensibilityElements();
        EasyMock.expectLastCall().andReturn(bindingExts);
        Iterator bindingItr = control.createMock(Iterator.class);
        bindingExts.iterator();
        EasyMock.expectLastCall().andReturn(bindingItr);
        portItr.hasNext();
View Full Code Here


            throws WSIFException
    {
        Trc.entry( this, def, service, port, typeMap );

        // check that Port binding has EJOE binding extensibility element
        Binding binding = port.getBinding();
        List exs = binding.getExtensibilityElements();
        for ( Iterator i = exs.iterator(); i.hasNext(); )
        {
            Object o = i.next();
            if ( o instanceof EJOEBinding )
            {
View Full Code Here

    public Binding[] getCorbaBindings() {
        List<Binding> result = new ArrayList<Binding>();
        Map bindings = definition.getBindings();
        Iterator it = bindings.values().iterator();
        while (it.hasNext()) {
            Binding binding = (Binding) it.next();
            List extElements = binding.getExtensibilityElements();
            for (int i = 0; i < extElements.size(); i++) {
                ExtensibilityElement el = (ExtensibilityElement) extElements.get(i);
                if (el.getElementType().equals(CorbaConstants.NE_CORBA_BINDING)) {
                    result.add(binding);
                    break;
View Full Code Here

//TODO  resolve this
//    this code support only the service with onebindings it will not care about the
//    second binding if exists.. if the NO binding specified it will failed
//    this should be resolved by let user specify which binding to use.

    Binding binding = null;
    if (ports.hasNext())
      binding = ((Port) ports.next()).getBinding();
    if (binding == null)
      throw new WrapperFault("No binding specified");
    this.bindingEntry = symbolTable.getBindingEntry(binding.getQName());
   
    this.portTypeEntry = symbolTable.getPortTypeEntry(binding.getPortType().getQName());
    if (portTypeEntry == null)
      throw new WrapperFault("Service not found");
    ports = this.serviceentry.getService().getPorts().values().iterator();
    this.targetEndpointURI = SymbolTableParsingUtils.getTargetEndPointURI(ports);     
    }
View Full Code Here

        WSDLFactory factory = WSDLFactory.newInstance();
        Definition definition = factory.newDefinition();
        definition.setDocumentBaseURI("META-INF/wsdl/fake.wsdl");
        ExtensionRegistry extensionRegistry = factory.newPopulatedExtensionRegistry();
        BindingOperation bindingOperation = buildBindingOperation(definition, extensionRegistry);
        Binding binding = definition.createBinding();
        binding.setQName(new QName(NAMESPACE, "MockPortBinding"));
        //add soap:binding
        SOAPBinding soapBinding = (SOAPBinding) extensionRegistry.createExtension(Binding.class, new QName("http://schemas.xmlsoap.org/wsdl/soap/", "binding"));
        soapBinding.setTransportURI("http://schemas.xmlsoap.org/soap/http");
        soapBinding.setStyle("rpc");
        binding.addExtensibilityElement(soapBinding);
        binding.addBindingOperation(bindingOperation);
        PortType portType = definition.createPortType();
        portType.setQName(new QName(NAMESPACE, "MockPort"));
        portType.addOperation(bindingOperation.getOperation());
        binding.setPortType(portType);
        Port port = definition.createPort();
        port.setName("MockPort");
        //add soap:address
        SOAPAddress soapAddress = (SOAPAddress) extensionRegistry.createExtension(Port.class, new QName("http://schemas.xmlsoap.org/wsdl/soap/", "address"));
        soapAddress.setLocationURI("http://127.0.0.1:8080/foo");
View Full Code Here

                if (location == null) {
                    continue;
                }
                String credentialsName = (gerPort == null) ? null : getCredentialsName(gerPort);
               
                Binding binding = port.getBinding();
                if (binding == null) {
                    throw new DeploymentException("No binding for port: " + portName);
                }
               
                PortType portType = binding.getPortType();
                if (portType == null) {
                    throw new DeploymentException("No portType for binding: " + binding.getQName());
                }

                boolean mtomEnabled = isMTOMEnabled(portType.getQName());
               
                EndpointInfo info = new EndpointInfo(location, credentialsName, mtomEnabled);
View Full Code Here

            extReg = def.getExtensionRegistry();
            addExtensions(extReg);
            typeProcessor.setExtensionRegistry(extReg);
        }      
       
        Binding binding = findBinding(def);
        if (binding == null) {
            String msgStr = "Binding " + bindingName + " doesn't exists in WSDL.";
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message(msgStr, LOG);
            throw new Exception(msg.toString());
View Full Code Here

       
        org.apache.schemas.yoko.bindings.corba.Object obj =
            (org.apache.schemas.yoko.bindings.corba.Object)ctype;
        QName bqname = obj.getBinding();       

        Binding binding = def.getBinding(bqname);
        if (binding != null) {
            IdlDefn defn = scope.lookup(local);

            if (defn != null && defn instanceof IdlInterface) {
                return (IdlInterface)defn;
View Full Code Here

        factory = new FileOutputStreamFactory(dir);
    }

    private Binding findBinding(Definition definition) {
        Binding binding = null;
        Map bindings = definition.getBindings();
        Iterator i = bindings.values().iterator();
       
        if (bindingName != null) {                   
            while (i.hasNext()) {
                binding = (Binding)i.next();
                if (binding.getQName().getLocalPart().equals(bindingName)) {
                    return binding;
                }
            }
        } else {
            if (bindings.size() >= 1) {
View Full Code Here

        String serviceName =  portInfo.getPortQName().toString();
        String location = getAddressLocation(port);
        serviceDesc.setName(serviceName);
        serviceDesc.setEndpointURL(location);
        serviceDesc.setWSDLFile(portInfo.getWsdlLocation());
        Binding binding = port.getBinding();

        serviceDesc.setStyle(getStyle(binding));


        BindingInput bindingInput = ((BindingOperation) binding.getBindingOperations().get(0)).getBindingInput();
        SOAPBody soapBody = (SOAPBody) SchemaInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());

        if (soapBody.getUse() != null) {
            Use use = Use.getUse(soapBody.getUse());
            serviceDesc.setUse(use);
View Full Code Here

TOP

Related Classes of javax.wsdl.Binding

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.