public void transferEndpoints(Port port) { if (port != null) { String endpoint = WsdlUtils.getSoapEndpoint(port); if (endpoint != null) { StringList list = new StringList(getEndpoints()); // expand properties.. for (int c = 0; c < list.size(); c++) list.set(c, PropertyExpander.expandProperties(this, list.get(c))); if (!list.contains(endpoint)) { if (UISupport.confirm( "Update existing requests with new endpoint\n[" + endpoint + "]", "Update Definition")) { for (int c = 0; c < getOperationCount(); c++) { Operation operation = getOperationAt(c); for (int ix = 0; ix < operation.getRequestCount(); ix++) { operation.getRequestAt(ix).setEndpoint(endpoint); } } } addEndpoint(endpoint); } } } }
public void filterRequest(SubmitContext context, Request wsdlRequest) { Operation operation = wsdlRequest.getOperation(); if (operation != null) { EndpointStrategy endpointStrategy = operation.getInterface().getProject().getEndpointStrategy(); if (endpointStrategy != null) { endpointStrategy.filterRequest(context, wsdlRequest); } } }
protected void setupConfig(BaseMockOperationConfigType config) { Operation operation = getOperation(); if (!config.isSetName()) config.setName(operation == null ? "<missing operation>" : operation.getName()); if (!config.isSetDefaultResponse() && getMockResponseCount() > 0) setDefaultResponse(getMockResponseAt(0).getName()); if (!config.isSetDispatchStyle()) { config.setDispatchStyle(MockOperationDispatchStyleConfig.SEQUENCE); setExampleScript(); } dispatcher = MockOperationDispatchRegistry.buildDispatcher( getConfig().getDispatchStyle().toString(), this); }
public Map<String, Operation> getOperations() { Map<String, Operation> result = new HashMap<String, Operation>(); for (Operation operation : operations) result.put(operation.getName(), operation); return result; }