Package org.jbehave.jmock

Examples of org.jbehave.jmock.UsingJMockBehaviour$Interface


  {
  boolean allInterfaceOperationsHaveBinding = true;
    QName bindingQN = binding.getName();
  String bindingName = bindingQN != null ? bindingQN.getLocalPart() : null;
 
  Interface interfac = binding.getInterface();
  if(interfac == null)
    return true;
 
  BindingOperation[] bindingOperations = binding.getBindingOperations();
  int numBindingOperations = bindingOperations.length;
  List usedInterfaceOperationList = new ArrayList();
  for(int i = 0; i < numBindingOperations; i++)
  {
    InterfaceOperation io = bindingOperations[i].getInterfaceOperation();
    if(io != null)
    usedInterfaceOperationList.add(io);
  }
    // Check the interface operations.
  if(!checkAllInterfaceOperationsHaveBinding(bindingName, interfac, usedInterfaceOperationList, errorReporter))
    allInterfaceOperationsHaveBinding = false;
 
  Interface[] extendedInterfaces = interfac.getExtendedInterfaces();
  if(extendedInterfaces != null)
  {
    int numExtendedInterfaces = extendedInterfaces.length;
    for(int i = 0; i < numExtendedInterfaces; i++)
      {
View Full Code Here


  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();
   
    // If an interface hasn't been specified on the service this assertion doesn't apply.
    // If the binding interface is null this assertion passes.
    if(serviceInterface != null && bindingInterface != null && !serviceInterface.isEquivalentTo(bindingInterface))
    {
    errorReporter.reportError(new ErrorLocatorImpl(), "Endpoint-1062", new Object[]{binding, bindingInterface, serviceInterface}, ErrorReporter.SEVERITY_ERROR);
    return false
    }
  }
View Full Code Here

     * @see org.apache.woden.wsdl20.Service#getInterface()
     */
    public Interface getInterface()
    {
        Description desc = fDescriptionComponent;
        Interface interfac = desc.getInterface(fInterfaceName);
        return interfac;
    }
View Full Code Here

  /* (non-Javadoc)
   * @see org.apache.woden.wsdl20.validation.Assertion#validate(java.lang.Object, org.apache.woden.wsdl20.validation.WodenContext)
   */
  public void validate(Object target, WodenContext wodenCtx) throws WSDLException {
    Interface interfac = (Interface)target;
    Interface[] extendedInterfaces = interfac.getExtendedInterfaces();
    if(containsInterface(interfac, extendedInterfaces)) {
      try {
        wodenCtx.getErrorReporter().reportError(new ErrorLocatorImpl(), ID , new Object[]{interfac.getName()}, ErrorReporter.SEVERITY_ERROR);
      }catch(WSDLException e) {
        //TODO: Log problem reporting error.
      }
    }
  }
View Full Code Here

        List allInterfaces = new Vector();
       
        //declared interfaces
        for(Iterator i=fInterfaceElements.iterator(); i.hasNext(); )
        {
            Interface intface = (Interface)i.next();
            if(!containsComponent(intface, allInterfaces)) {
                ((InterfaceImpl)intface).setDescriptionComponent(this);
                allInterfaces.add(intface);
            }
        }
       
        //nested interfaces
        List nestedDescs = new Vector(getNestedDescriptions());
        for(Iterator i=nestedDescs.iterator(); i.hasNext(); )
        {
            DescriptionElement desc = (DescriptionElement)i.next();
            InterfaceElement[] interfaces = desc.getInterfaceElements();
            for(int j=0; j<interfaces.length; j++)
            {
                Interface intface = (Interface)interfaces[j];
                if(!containsComponent(intface, allInterfaces)) {
                    ((InterfaceImpl)intface).setDescriptionComponent(this);
                    allInterfaces.add(intface);
                }
            }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.Description#getInterface(javax.xml.namespace.QName)
     */
    public Interface getInterface(QName name)
    {
        Interface intface = null;
       
        if(name != null)
        {
            Interface[] interfaces = getInterfaces();
           
View Full Code Here

    public ElementDeclaration getElementDeclaration()
    {
        ElementDeclaration elemDecl = null;
       
        if(fElement != null && fElement.isQName()) {
            Interface interfac = (Interface)getParent();
            Description desc = ((InterfaceImpl)interfac).getDescriptionComponent();
            elemDecl = desc.getElementDeclaration(fElement.getQName());
        }
        return elemDecl;
    }
View Full Code Here

    /*
     * (non-Javadoc)
     * @see org.apache.woden.wsdl20.WSDLComponent#getFragmentIdentifier()
     */
    public FragmentIdentifier getFragmentIdentifier() {
        Interface interfaceComp = (Interface)getParent();
       
        NCName interfaceName = new NCName(interfaceComp.getName().getLocalPart());
       
        return new FragmentIdentifier(new InterfaceFaultPart(interfaceName, fName));
    }
View Full Code Here

        } else {
           wsdlService = services[0];
        }

        axisService.setName(wsdlService.getName().getLocalPart().toString());
        Interface serviceInterface = wsdlService.getInterface();
        axisService.addParameter(new Parameter(WSDL2Constants.INTERFACE_LOCAL_NAME, serviceInterface.getName().getLocalPart()));
        processInterface(serviceInterface);
        if (isCodegen) {
            axisService.setOperationsNameList(operationNames);
        }
        processEndpoints();
View Full Code Here

            operationNames.add(interfaceOperations[i].getName());
        }

        Interface[] extendedInterfaces = serviceInterface.getExtendedInterfaces();
        for (int i = 0; i < extendedInterfaces.length; i++) {
            Interface extendedInterface = extendedInterfaces[i];
            processInterface(extendedInterface);
        }

    }
View Full Code Here

TOP

Related Classes of org.jbehave.jmock.UsingJMockBehaviour$Interface

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.