Operation operation = (Operation) artifact; if (mostRecentPortType != null) { String key = mostRecentPortType.toString() + ":" + operation.getNCName(); //$NON-NLS-1$ operationIndex.put(key, operation);
Operation operation = (Operation) artifact; if (mostRecentPortType != null) { String key = mostRecentPortType.toString() + ":" + operation.getNCName(); operationIndex.put(key, operation);
/** * Asserts that the port type contains a valid reference to an operation with * the given name. Returns the operation or throws if any assertions fail. * @param portType * @param operationName * @throws Exception */ private Operation assertHasOperation(PortType portType, String operationName) throws Exception { List<OperationTarget> operation = portType.getOperation(); for (OperationTarget t : operation) { Operation op = (Operation) getArtifactByTarget(t); if (op.getNCName().equals(operationName)) { return op; } } Assert.fail("Failed to find operation with name: " + operationName); //$NON-NLS-1$ return null; }
Assert.assertEquals("find", artifact.getName()); //$NON-NLS-1$ Operation operation = (Operation) artifact; Assert.assertEquals("find", operation.getNCName()); //$NON-NLS-1$ Assert.assertEquals("http://ewittman.redhat.com/sample/2012/09/wsdl/sample.wsdl", operation.getNamespace()); //$NON-NLS-1$ Assert.assertNotNull(operation.getInput());