public void setInterface(Interface interfaceComp) { if (interfaceComp != null) { fInterfaceName = interfaceComp.getName(); } }
private void getAllInterfaceOperations(Interface interfac, List allInterfaces, List allOpers) { //check for circular Interface references to avoid infinite loop if(containsComponent(interfac, allInterfaces)) { return; } else { allInterfaces.add(interfac); } //get the declared operations for the specified Interface InterfaceOperation[] declaredOpers = interfac.getInterfaceOperations(); for(int i=0; i<declaredOpers.length; i++) { InterfaceOperation oper = declaredOpers[i]; if(!containsComponent(oper, allOpers)) { allOpers.add(oper); } } //get the derived operations from each extended interface Interface[] extInts = interfac.getExtendedInterfaces(); for(int j=0; j<extInts.length; j++) { getAllInterfaceOperations(extInts[j], allInterfaces, allOpers); } }
public InterfaceFault getInterfaceFault() { InterfaceOperation oper = (InterfaceOperation)getParent(); Interface interfac = (Interface)oper.getParent(); InterfaceFault intFault = interfac.getFromAllInterfaceFaults(fRef); return intFault; }
/** * Check whether the specified interface is in the list of extended interfaces. * * @param interfac The interface that should be checked to see if it is in the list of exteneded interfaces. * @param extendedInterfaces An array of interfaces representing the list of extended interfaces. * @return true if the interface is in the list of extended interfaces, false otherwise. */ private boolean containsInterface(Interface interfac, Interface[] extendedInterfaces) { boolean foundInterface = false; int numExtInterfaces = extendedInterfaces.length; for(int i = 0; i < numExtInterfaces && !foundInterface; i++) { if(interfac.isEquivalentTo(extendedInterfaces[i])) foundInterface = true; else if(containsInterface(interfac, extendedInterfaces[i].getExtendedInterfaces())) foundInterface = true; } return foundInterface; }
private void getAllInterfaceFaults(Interface interfac, List allInterfaces, List allFaults) { //check for circular Interface references to avoid infinite loop if(containsComponent(interfac, allInterfaces)) { return; } else { allInterfaces.add(interfac); } //get the declared faults for the specified Interface InterfaceFault[] declaredFaults = interfac.getInterfaceFaults(); for(int i=0; i<declaredFaults.length; i++) { InterfaceFault fault = declaredFaults[i]; if(!containsComponent(fault, allFaults)) { allFaults.add(fault); } } //get the derived faults from each extended interface Interface[] extInts = interfac.getExtendedInterfaces(); for(int j=0; j<extInts.length; j++) { getAllInterfaceFaults(extInts[j], allInterfaces, allFaults); } }
binding.setLocation(wsdlEndpoint.getAddress().toString()); Interface wsdlInterface = wsdlEndpoint.getBinding().getInterface(); binding.setInterfaceName(wsdlInterface.getName()); InterfaceOperation[] wsdlOperations = wsdlInterface.getInterfaceOperations(); for (int i = 0; i < wsdlOperations.length; i++) { InterfaceFault[] faults = wsdlInterface.getInterfaceFaults(); for (int i = 0; i < faults.length; i++) {
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. } } }
for (int i = 0; i < bindingFaults.length; i++) { BindingFault bindingFault = bindingFaults[i]; InterfaceFault interfaceFault = serviceInterface.getFromAllInterfaceFaults(((BindingFaultElement)bindingFault).getRef()); AxisBindingMessage axisBindingFault = new AxisBindingMessage(); axisBindingFault.setFault(true); InterfaceOperation interfaceOperation = serviceInterface.getFromAllInterfaceOperations(((BindingOperationElement)bindingOperation).getRef()); AxisOperation axisOperation = axisService.getOperation(interfaceOperation.getName());
/** * Validate the interfaces in the WSDL component model. * * @param interfaces The interfaces in the WSDL component model. * @param errorReporter An error reporter to be used for reporting errors. * @throws WSDLException A WSDLException is thrown if a problem occurs while validating the interface components. */ protected void validateInterfaces(Interface[] interfaces, ErrorReporter errorReporter) throws WSDLException { testAssertionInterface1010(interfaces, errorReporter); int numInterfaces = interfaces.length; for(int i = 0; i < numInterfaces; i++) { Interface interfac = interfaces[i]; testAssertionInterface1009(interfac, errorReporter); validateInterfaceOperations(interfac, interfac.getInterfaceOperations(), errorReporter); } }
public InterfaceOperation getInterfaceOperation() { InterfaceOperation oper = null; Binding binding = (Binding)getParent(); Interface interfac = binding.getInterface(); if(interfac != null) { oper = interfac.getFromAllInterfaceOperations(fRef); } return oper; }
allInterfaceOperationsHaveBinding = false; Interface[] extendedInterfaces = interfac.getExtendedInterfaces(); if(extendedInterfaces != null)
if(serviceInterface != null && bindingInterface != null && !serviceInterface.isEquivalentTo(bindingInterface))
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. } } }
for (int i = 0; i < bindingFaults.length; i++) { BindingFault bindingFault = bindingFaults[i]; InterfaceFault interfaceFault = serviceInterface.getFromAllInterfaceFaults(((BindingFaultElement)bindingFault).getRef()); AxisBindingMessage axisBindingFault = new AxisBindingMessage(); axisBindingFault.setFault(true); InterfaceOperation interfaceOperation = serviceInterface.getFromAllInterfaceOperations(((BindingOperationElement)bindingOperation).getRef()); AxisOperation axisOperation = axisService.getOperation(interfaceOperation.getName());
/** * Check whether the specified interface is in the list of extended interfaces. * * @param interfac The interface that should be checked to see if it is in the list of exteneded interfaces. * @param extendedInterfaces An array of interfaces representing the list of extended interfaces. * @return true if the interface is in the list of extended interfaces, false otherwise. */ private boolean containsInterface(Interface interfac, Interface[] extendedInterfaces) { boolean foundInterface = false; int numExtInterfaces = extendedInterfaces.length; for(int i = 0; i < numExtInterfaces && !foundInterface; i++) { if(interfac.isEquivalentTo(extendedInterfaces[i])) foundInterface = true; else if(containsInterface(interfac, extendedInterfaces[i].getExtendedInterfaces())) foundInterface = true; } return foundInterface; }
private void getAllInterfaceFaults(Interface interfac, List allInterfaces, List allFaults) { //check for circular Interface references to avoid infinite loop if(containsComponent(interfac, allInterfaces)) { return; } else { allInterfaces.add(interfac); } //get the declared faults for the specified Interface InterfaceFault[] declaredFaults = interfac.getInterfaceFaults(); for(int i=0; i<declaredFaults.length; i++) { InterfaceFault fault = declaredFaults[i]; if(!containsComponent(fault, allFaults)) { allFaults.add(fault); } } //get the derived faults from each extended interface Interface[] extInts = interfac.getExtendedInterfaces(); for(int j=0; j<extInts.length; j++) { getAllInterfaceFaults(extInts[j], allInterfaces, allFaults); } }
/** * Validate the interfaces in the WSDL component model. * * @param interfaces The interfaces in the WSDL component model. * @param errorReporter An error reporter to be used for reporting errors. * @throws WSDLException A WSDLException is thrown if a problem occurs while validating the interface components. */ protected void validateInterfaces(Interface[] interfaces, ErrorReporter errorReporter) throws WSDLException { testAssertionInterface1010(interfaces, errorReporter); int numInterfaces = interfaces.length; for(int i = 0; i < numInterfaces; i++) { Interface interfac = interfaces[i]; testAssertionInterface1009(interfac, errorReporter); validateInterfaceOperations(interfac, interfac.getInterfaceOperations(), errorReporter); } }
public InterfaceOperation getInterfaceOperation() { InterfaceOperation oper = null; Binding binding = (Binding)getParent(); Interface interfac = binding.getInterface(); if(interfac != null) { oper = interfac.getFromAllInterfaceOperations(fRef); } return oper; }
allInterfaceOperationsHaveBinding = false; Interface[] extendedInterfaces = interfac.getExtendedInterfaces(); if(extendedInterfaces != null)
if(serviceInterface != null && bindingInterface != null && !serviceInterface.isEquivalentTo(bindingInterface))