<% /******************************************************************************* * Copyright (c) 2001, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * yyyymmdd bug Email and other contact information * -------- -------- ----------------------------------------------------------- * 20060512 121210 mahutch@ca.ibm.com - Mark Hutchinson * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers * 20080825 158366 mahutch@ca.ibm.com - Mark Hutchinson *******************************************************************************/ %> <%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.*, org.eclipse.wst.ws.internal.explorer.platform.wsdl.datamodel.*, org.eclipse.wst.ws.internal.explorer.platform.wsdl.constants.*, org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.*, org.eclipse.wst.ws.internal.explorer.platform.constants.*, org.eclipse.wst.ws.internal.explorer.platform.perspective.*, javax.wsdl.*, java.util.*" %> <% WSDLPerspective wsdlPerspective = controller.getWSDLPerspective(); Node selectedNode = wsdlPerspective.getNodeManager().getSelectedNode(); InvokeWSDLOperationTool invokeWSDLOperationTool = (InvokeWSDLOperationTool)(selectedNode.getCurrentToolManager().getSelectedTool()); WSDLOperationElement operElement = (WSDLOperationElement)selectedNode.getTreeElement(); String fragmentViewID = invokeWSDLOperationTool.getFragmentViewID(); int operationType = operElement.getOperationType(); String invokeWSDLOperationURL = response.encodeURL(controller.getPathWithContext(invokeWSDLOperationTool.getFormActionLink(operationType,fragmentViewID))); %> <%=wsdlPerspective.getMessage("FORM_TITLE_INVOKE_WSDL_OPERATION")%> ">
<% String titleImagePath = "wsdl/images/invoke_wsdl_operation_highlighted.gif"; String title = wsdlPerspective.getMessage("ALT_INVOKE_WSDL_OPERATION"); if (operationType == WSDLOperationElement.OPERATION_TYPE_SOAP) { %>
<%=title%>   <% if (fragmentViewID.equals(FragmentConstants.FRAGMENT_VIEW_SWITCH_FORM_TO_SOURCE)) { %> "><%=wsdlPerspective.getMessage("FORM_LINK_FORM")%> <% } else { %> "><%=wsdlPerspective.getMessage("FORM_LINK_SOURCE")%> <% } %>
" alt="">
<% } else { %> <%@ include file = "/forms/formheader.inc" %> <% } %>
<% //here we determine if there are any input parameters for this operation boolean hasInput = true; selectedNode = wsdlPerspective.getNodeManager().getSelectedNode(); Iterator iter = operElement.getOrderedBodyParts().iterator(); String operationName = operElement.getName(); while (iter.hasNext()) { javax.wsdl.Part part = (javax.wsdl.Part)iter.next(); IXSDFragment frag = operElement.getFragment(part); org.eclipse.xsd.XSDTypeDefinition def = frag.getXSDTypeDefinition(); //we check the type of the operation's input message if (def == null) { //this is the pattern hasInput = false; } else { org.w3c.dom.Element element = def.getElement(); if (element.getLocalName().equals("complexType") && !element.hasChildNodes()) { //this is the pattern //there could be other patterns with no input but they are uncommon hasInput = false; } } } if (hasInput || !operElement.getSOAPHeaders().isEmpty()) { out.print(wsdlPerspective.getMessage("FORM_LABEL_INVOKE_WSDL_OPERATION_DESC", operationName)); } else { out.print(wsdlPerspective.getMessage("FORM_LABEL_INVOKE_WSDL_OPERATION_DESC_NO_INPUT", operationName )); } %>
<% if (fragmentViewID.equals(FragmentConstants.FRAGMENT_VIEW_SWITCH_FORM_TO_SOURCE)) { %> <% } else { %> <% } %>