Package org.apache.woden.wsdl20

Examples of org.apache.woden.wsdl20.Binding


    private AxisEndpoint processEndpoint(Endpoint endpoint, Interface serviceInterface) throws AxisFault {
        AxisEndpoint axisEndpoint = new AxisEndpoint();
        axisEndpoint.setParent(axisService);
        axisEndpoint.setName(endpoint.getName().toString());
        setEndpointURL(axisEndpoint, endpoint.getAddress().toString());
        Binding binding = endpoint.getBinding();
        AxisBinding axisBinding;
        if (processedBindings.containsKey(binding.getName())) {
            axisBinding = (AxisBinding) processedBindings.get(binding.getName());
        } else {
            axisBinding = processBinding(binding, serviceInterface);
        }
        axisEndpoint.setBinding(axisBinding);
       
        String bindingType = binding.getType().toString();
        if (bindingType.equals(WSDL2Constants.URI_WSDL2_SOAP)) {
            processSOAPBindingEndpointExtensions(endpoint, axisEndpoint);
        } else if (bindingType.equals(WSDL2Constants.URI_WSDL2_HTTP)) {
            processHTTPBindingEndpointExtensions(endpoint, axisEndpoint);
        }
View Full Code Here


  /**
     * Test that the value for the {bar} property returned by the <code>getFooBar</code>
     * method matches the expected value parsed from the WSDL.
   */
  public void testGetFooBar() {
        Binding binding = null;
        FooBindingExtensions exts = null;
        binding = fBindings[0];
        exts = (FooBindingExtensions)binding
        .getComponentExtensionContext(FooConstants.NS_URI_FOO);
        assertNotNull("The Binding '" + binding.getName() + "' does not contain an FooBindingExtensions object.",
            exts);
        Integer actual = exts.getFooBar();
        assertEquals("Unexpected number of errors", 1, testErrorHandler.numErrors);
        assertEquals("Unexpected error key", "Errors: FOO-001 \n", testErrorHandler.getSummaryOfMessageKeys());

      binding = fBindings[1];
        exts = (FooBindingExtensions)binding
          .getComponentExtensionContext(FooConstants.NS_URI_FOO);
        assertNotNull("The Binding '" + binding.getName() + "' does not contain an FooBindingExtensions object.",
                exts);
       
        actual = exts.getFooBar();
        assertNotNull("The value for bar was null", actual);
        assertEquals("Unexpected value for bar.", 3, actual.intValue());
View Full Code Here

  /**
     * Test that the value for the {baz} property returned by the <code>getFooBaz</code>
     * method matches the expected value parsed from the WSDL.
   */
  public void testGetFooBaz() {
        Binding binding1 = fBindings[1];
        FooBindingExtensions exts = (FooBindingExtensions)binding1
          .getComponentExtensionContext(FooConstants.NS_URI_FOO);
        assertNotNull("The Binding '" + binding1.getName() + "' does not contain an FooBindingExtensions object.",
                exts);
       
        String actual = exts.getFooBaz();
        assertNotNull("The value for bar was null", actual);
        assertEquals("Unexpected value for baz.", "john", actual);
View Full Code Here

            logger.info("Interface[" + j + "] : name = "
                    + interfaces[j].getName());
        }

        Binding bindings[] = descComp.getBindings();
        logger.info("There are " + bindings.length
                + " Binding components.");

        for (int j = 0; j < bindings.length; j++) {
View Full Code Here

     * @see org.apache.woden.wsdl20.BindingOperation#getInterfaceOperation()
     */
    public InterfaceOperation getInterfaceOperation()
    {
        InterfaceOperation oper = null;
        Binding binding = (Binding)getParent();
        Interface interfac = binding.getInterface();
        if(interfac != null) {
            oper = interfac.getFromAllInterfaceOperations(fRef);
        }
        return oper;
    }
View Full Code Here

     * (non-Javadoc)
     * @see org.apache.woden.wsdl20.WSDLComponent#getFragmentIdentifier()
     */
    public FragmentIdentifier getFragmentIdentifier() {
        //Find parent component and get needed properties.
        Binding bindingComp = (Binding)getParent();
        NCName binding = new NCName(bindingComp.getName().getLocalPart());
       
        //Return a new FragmentIdentifier.
        return new FragmentIdentifier(new BindingOperationPart (binding , fRef));
    }
View Full Code Here

    testAssertionBinding1049(bindings, errorReporter);
   
    int numBindings = bindings.length;
    for(int i = 0; i < numBindings; i++)
    {
      Binding binding = bindings[i];
      testAssertionBinding1044(binding, errorReporter);
      testAssertionBinding1045(binding, errorReporter);
      testAssertionBinding1048(binding, errorReporter);
     
      validateBindingOperations(binding.getBindingOperations(), desc, errorReporter);
     
      validateBindingFaults(binding.getBindingFaults(), desc, errorReporter);
    }
  }
View Full Code Here

   * @return True if the binding specified the interface specified by the service or no interface, false otherwise.
   * @throws WSDLException
   */
  protected boolean testAssertionEndpoint1062(Endpoint endpoint, ErrorReporter errorReporter) throws WSDLException
  {
  Binding binding = endpoint.getBinding();
  // If no binding has been specified this assertion does not apply.
  if(binding == null)
    return true;
 
  Interface bindingInterface = binding.getInterface();
  WSDLComponent parent = endpoint.getParent();
  if(parent != null)
  {
    Service service = (Service)parent;
    Interface serviceInterface = service.getInterface();
View Full Code Here

        List allBindings = new Vector();
       
        //declared bindings
        for(Iterator i=fBindingElements.iterator(); i.hasNext(); )
        {
            Binding binding = (Binding)i.next();
            if(!containsComponent(binding, allBindings)) {
                ((BindingImpl)binding).setDescriptionComponent(this);
                allBindings.add(binding);
            }
        }
       
        //nested bindings
        List nestedDescs = new Vector(getNestedDescriptions());
        for(Iterator i=nestedDescs.iterator(); i.hasNext(); )
        {
            DescriptionElement desc = (DescriptionElement)i.next();
            BindingElement[] bindings = desc.getBindingElements();
            for(int j=0; j<bindings.length; j++)
            {
                Binding binding = (Binding)bindings[j];
                if(!containsComponent(binding, allBindings)) {
                    ((BindingImpl)binding).setDescriptionComponent(this);
                    allBindings.add(binding);
                }
            }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.Description#getBinding(javax.xml.namespace.QName)
     */
    public Binding getBinding(QName name)
    {
        Binding binding = null;
       
        if(name != null)
        {
            Binding[] bindings = getBindings();
           
View Full Code Here

TOP

Related Classes of org.apache.woden.wsdl20.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.