Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 62169 Details for
Bug 117034
Web Services Explorer should support SOAP Headers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Update patch after wsdl emf models were regenerated
patch.txt (text/plain), 91.26 KB, created by
Andrew Mak
on 2007-03-27 20:57:08 EDT
(
hide
)
Description:
Update patch after wsdl emf models were regenerated
Filename:
MIME Type:
Creator:
Andrew Mak
Created:
2007-03-27 20:57:08 EDT
Size:
91.26 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.ws.explorer >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationSourceAction.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationSourceAction.java,v >retrieving revision 1.3 >diff -u -r1.3 InvokeWSDLSOAPOperationSourceAction.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationSourceAction.java 11 Oct 2005 15:51:01 -0000 1.3 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationSourceAction.java 27 Mar 2007 22:43:50 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.actions; > >@@ -34,6 +37,7 @@ > { > private boolean newFileSelected_; > private boolean saveAsSelected_; >+ private boolean isHeader_; > private static final String DUMMY_WRAPPER_START_TAG = "<dummyWrapper>"; > private static final String DUMMY_WRAPPER_END_TAG = "</dummyWrapper>"; > >@@ -42,6 +46,7 @@ > super(controller); > newFileSelected_ = false; > saveAsSelected_ = false; >+ isHeader_ = false; > } > > protected boolean processParsedResults(MultipartFormDataParser parser) throws MultipartFormDataException >@@ -50,37 +55,49 @@ > WSDLOperationElement operElement = (WSDLOperationElement)getSelectedNavigatorNode().getTreeElement(); > newFileSelected_ = false; > saveAsSelected_ = false; >+ isHeader_ = false; > /* try and catch is needed if we are doing fragmentization. > try > { > */ > String submissionAction = parser.getParameter(WSDLActionInputs.SUBMISSION_ACTION); >- String sourceContents = parser.getParameter(FragmentConstants.SOURCE_CONTENT); >+ String sourceContents = parser.getParameter(FragmentConstants.SOURCE_CONTENT_HEADER); >+ if (sourceContents != null) >+ operElement.setPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER,sourceContents); >+ sourceContents = parser.getParameter(FragmentConstants.SOURCE_CONTENT); > if (sourceContents != null) > operElement.setPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT,sourceContents); >- if (WSDLActionInputs.SUBMISSION_ACTION_BROWSE_FILE.equals(submissionAction)) >+ if (WSDLActionInputs.SUBMISSION_ACTION_BROWSE_FILE_HEADER.equals(submissionAction)) >+ { >+ newFileSelected_ = true; >+ String fileContents = parser.getParameter(WSDLActionInputs.SELECTED_FILE_HEADER); >+ if (fileContents != null) >+ operElement.setPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER,fileContents); >+ } >+ else if (WSDLActionInputs.SUBMISSION_ACTION_BROWSE_FILE.equals(submissionAction)) > { > newFileSelected_ = true; > String fileContents = parser.getParameter(WSDLActionInputs.SELECTED_FILE); > if (fileContents != null) > operElement.setPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT,fileContents); > } >- else >+ else if (WSDLActionInputs.SUBMISSION_ACTION_SAVE_AS_HEADER.equals(submissionAction)) > { >- if (WSDLActionInputs.SUBMISSION_ACTION_SAVE_AS.equals(submissionAction)) >- { >- // Save As... action >- saveAsSelected_ = true; >- } >- else >- { >- // Fragmentize on Go action. >- // fragmentize(new StringBuffer(sourceContents)); >- String[] nsDeclarations = parser.getParameterValues(FragmentConstants.SOURCE_CONTENT_NAMESPACE); >- if (nsDeclarations != null) >- operElement.setPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT_NAMESPACE,nsDeclarations); >- } >+ saveAsSelected_ = true; >+ isHeader_ = true; >+ return true; > } >+ else if (WSDLActionInputs.SUBMISSION_ACTION_SAVE_AS.equals(submissionAction)) >+ { >+ // Save As... action >+ saveAsSelected_ = true; >+ return true; >+ } >+ >+ String[] nsDeclarations = parser.getParameterValues(FragmentConstants.SOURCE_CONTENT_NAMESPACE); >+ if (nsDeclarations != null) >+ operElement.setPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT_NAMESPACE,nsDeclarations); >+ > return true; > /* > } >@@ -104,6 +121,29 @@ > */ > } > >+ protected Vector getHeaderEntries(Hashtable soapEnvelopeNamespaceTable, WSDLOperationElement operElement) throws ParserConfigurationException, Exception { >+ >+ Vector headerEntries = new Vector(); >+ String[] nsDeclarations = (String[])operElement.getPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT_NAMESPACE); >+ for (int i = 0; i < nsDeclarations.length; i++) >+ { >+ String[] prefix_ns = SoapHelper.decodeNamespaceDeclaration(nsDeclarations[i]); >+ if (!soapEnvelopeNamespaceTable.contains(prefix_ns[1])) >+ soapEnvelopeNamespaceTable.put(prefix_ns[1], prefix_ns[0]); >+ } >+ StringBuffer sourceContent = new StringBuffer(operElement.getPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER)); >+ sourceContent.insert(0,DUMMY_WRAPPER_START_TAG).append(DUMMY_WRAPPER_END_TAG); >+ Element dummyWrapperElement = XMLUtils.stringToElement(sourceContent.toString()); >+ NodeList nl = dummyWrapperElement.getChildNodes(); >+ for (int i = 0; i < nl.getLength(); i++) >+ { >+ if (nl.item(i) instanceof Element) >+ headerEntries.add(nl.item(i)); >+ } >+ >+ return headerEntries; >+ } >+ > /** > * Generate a Vector of the elements inside the Soap Body. > * @param soapEnvelopeNamespaceTable - Hashtable containing a map of the namespace URIs to prefixes. >@@ -161,8 +201,11 @@ > public final void writeSourceContent(OutputStream os) > { > WSDLOperationElement operElement = (WSDLOperationElement)(getSelectedNavigatorNode().getTreeElement()); >- PrintWriter pw = new PrintWriter(os); >- pw.println(operElement.getPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT)); >+ PrintWriter pw = new PrintWriter(os); >+ if (isHeader_) >+ pw.println(operElement.getPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER)); >+ else >+ pw.println(operElement.getPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT)); > pw.close(); > } > } >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationAction.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationAction.java,v >retrieving revision 1.3 >diff -u -r1.3 InvokeWSDLSOAPOperationAction.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationAction.java 11 Oct 2005 15:51:01 -0000 1.3 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationAction.java 27 Mar 2007 22:43:50 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.actions; > >@@ -46,6 +49,7 @@ > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.transport.HTTPTransport; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.util.SoapHelper; > import org.eclipse.wst.ws.internal.parser.discovery.NetUtils; >+import org.eclipse.wst.wsdl.binding.soap.SOAPHeader; > import org.w3c.dom.Document; > import org.w3c.dom.Element; > >@@ -116,6 +120,49 @@ > } > > /** >+ * Generate a Vector of the elements inside the Soap Header. >+ * @param soapEnvelopeNamespaceTable - Hashtable containing a map of the namespace URIs to prefixes. >+ * @param operElement - WSDLOperationElement encapsulating the WSDL operation. >+ */ >+ protected Vector getHeaderEntries(Hashtable soapEnvelopeNamespaceTable,WSDLOperationElement operElement) throws ParserConfigurationException,Exception >+ { >+ Vector headerEntries = new Vector(); >+ >+ Iterator it = operElement.getSOAPHeaders().iterator(); >+ while (it.hasNext()) >+ { >+ SOAPHeader soapHeader = (SOAPHeader) it.next(); >+ >+ StringBuffer encodingStyle = null; >+ boolean isUseLiteral = "literal".equals(soapHeader.getUse()); >+ >+ if (!isUseLiteral) { >+ Iterator encodingStyles = soapHeader.getEncodingStyles().iterator(); >+ encodingStyle = new StringBuffer(); >+ while (encodingStyles.hasNext()) { >+ Object next = encodingStyles.next(); >+ if (Constants.URI_SOAP11_ENC.equals(next)) >+ continue; >+ encodingStyle.append(" ").append(next); >+ } >+ } >+ >+ IXSDFragment frag = (IXSDFragment)operElement.getHeaderFragment(soapHeader); >+ Element[] instanceDocuments = frag.genInstanceDocumentsFromParameterValues(!isUseLiteral,soapEnvelopeNamespaceTable, XMLUtils.createNewDocument(null)); >+ for (int j=0;j<instanceDocuments.length;j++) >+ { >+ if (instanceDocuments[j] == null) >+ continue; >+ if (encodingStyle != null && encodingStyle.length() > 0) >+ instanceDocuments[j].setAttribute("soapenv:encodingStyle",encodingStyle.substring(1)); >+ headerEntries.addElement(instanceDocuments[j]); >+ } >+ } >+ >+ return headerEntries; >+ } >+ >+ /** > * Generate a Vector of the elements inside the Soap Body. > * @param soapEnvelopeNamespaceTable - Hashtable containing a map of the namespace URIs to prefixes. > * @param operElement - WSDLOperationElement encapsulating the WSDL operation. >@@ -158,9 +205,22 @@ > > protected Element getSOAPEnvelope(Hashtable soapEnvelopeNamespaceTable, Vector bodyEntries) throws ParserConfigurationException > { >+ return getSOAPEnvelope(soapEnvelopeNamespaceTable, null, bodyEntries); >+ } >+ >+ protected Element getSOAPEnvelope(Hashtable soapEnvelopeNamespaceTable, Vector headerEntries, Vector bodyEntries) throws ParserConfigurationException >+ { > DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); > Document doc = XMLUtils.createNewDocument(docBuilder); > Element soapEnvelopeElement = SoapHelper.createSoapEnvelopeElement(doc,soapEnvelopeNamespaceTable); >+ >+ if (headerEntries != null && !headerEntries.isEmpty()) { >+ Element soapHeaderElement = SoapHelper.createSoapHeaderElement(doc); >+ for (int i=0;i<headerEntries.size();i++) >+ soapHeaderElement.appendChild(doc.importNode((Element)headerEntries.elementAt(i),true)); >+ soapEnvelopeElement.appendChild(soapHeaderElement); >+ } >+ > Element soapBodyElement = SoapHelper.createSoapBodyElement(doc); > for (int i=0;i<bodyEntries.size();i++) > soapBodyElement.appendChild(doc.importNode((Element)bodyEntries.elementAt(i),true)); >@@ -205,8 +265,9 @@ > // ... > Hashtable soapEnvelopeNamespaceTable = new Hashtable(); > SoapHelper.addDefaultSoapEnvelopeNamespaces(soapEnvelopeNamespaceTable); >+ Vector headerEntries = getHeaderEntries(soapEnvelopeNamespaceTable, operElement); > Vector bodyEntries = getBodyEntries(soapEnvelopeNamespaceTable,operElement,bindingElement,serviceElement); >- Element soapEnvelope = getSOAPEnvelope(soapEnvelopeNamespaceTable, bodyEntries); >+ Element soapEnvelope = getSOAPEnvelope(soapEnvelopeNamespaceTable, headerEntries, bodyEntries); > recordSoapRequest(wsdlPerspective.getSOAPRequestQueue(),soapEnvelopeNamespaceTable,soapEnvelope); > > // Execute the SOAP operation. >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationFormAction.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationFormAction.java,v >retrieving revision 1.2 >diff -u -r1.2 InvokeWSDLSOAPOperationFormAction.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationFormAction.java 11 Oct 2005 15:51:01 -0000 1.2 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/InvokeWSDLSOAPOperationFormAction.java 27 Mar 2007 22:43:50 -0000 >@@ -1,16 +1,20 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.actions; > > import java.util.Iterator; >+import javax.wsdl.Message; > import javax.wsdl.Part; > import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.ITransformer; > import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller; >@@ -22,6 +26,7 @@ > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.IFragment; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.WSDLPerspective; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.transformer.FragmentTransformer; >+import org.eclipse.wst.wsdl.binding.soap.SOAPHeader; > > public class InvokeWSDLSOAPOperationFormAction extends InvokeWSDLSOAPOperationAction > { >@@ -40,7 +45,24 @@ > WSDLPerspective wsdlPerspective = controller_.getWSDLPerspective(); > MessageQueue messageQueue = wsdlPerspective.getMessageQueue(); > WSDLOperationElement operElement = (WSDLOperationElement) getSelectedNavigatorNode().getTreeElement(); >- Iterator it = operElement.getOrderedBodyParts().iterator(); >+ >+ // validate headers >+ Iterator it = operElement.getSOAPHeaders().iterator(); >+ while (it.hasNext()) >+ { >+ SOAPHeader soapHeader = (SOAPHeader) it.next(); >+ IFragment frag = operElement.getHeaderFragment(soapHeader); >+ if (!frag.processParameterValues(parser)) >+ { >+ Message message = soapHeader.getEMessage(); >+ Part part = soapHeader.getEPart(); >+ messageQueue.addMessage(wsdlPerspective.getMessage("MSG_ERROR_VALIDATING_PARAMETER", message.getQName() + " " + part.getName())); >+ resultsValid = false; >+ } >+ } >+ >+ // validate body >+ it = operElement.getOrderedBodyParts().iterator(); > while (it.hasNext()) > { > Part part = (Part) it.next(); >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/SynchronizeFragmentViewsAction.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/SynchronizeFragmentViewsAction.java,v >retrieving revision 1.2 >diff -u -r1.2 SynchronizeFragmentViewsAction.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/SynchronizeFragmentViewsAction.java 11 Oct 2005 15:51:01 -0000 1.2 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/actions/SynchronizeFragmentViewsAction.java 27 Mar 2007 22:43:51 -0000 >@@ -1,15 +1,19 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.actions; > >+import java.util.Hashtable; > import java.util.Iterator; > import java.util.Vector; > import javax.wsdl.Part; >@@ -22,7 +26,10 @@ > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.constants.WSDLModelConstants; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.datamodel.WSDLOperationElement; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.IXSDFragment; >+import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.SOAPHeaderWrapperFragment; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.InvokeWSDLOperationTool; >+import org.eclipse.wst.ws.internal.explorer.platform.wsdl.util.SoapHelper; >+import org.eclipse.wst.wsdl.binding.soap.SOAPHeader; > import org.w3c.dom.Element; > import org.w3c.dom.NodeList; > >@@ -38,27 +45,49 @@ > super.processParsedResults(parser); > Node selectedNode = getSelectedNavigatorNode(); > WSDLOperationElement operElement = (WSDLOperationElement)selectedNode.getTreeElement(); >- Iterator it = operElement.getOrderedBodyParts().iterator(); >+ > InvokeWSDLOperationTool invokeWSDLOperationTool = (InvokeWSDLOperationTool)(selectedNode.getCurrentToolManager().getSelectedTool()); > String viewID = parser.getParameter(FragmentConstants.FRAGMENT_VIEW_ID); > propertyTable_.put(FragmentConstants.FRAGMENT_VIEW_ID, viewID); > if (viewID.equals(FragmentConstants.FRAGMENT_VIEW_SWITCH_FORM_TO_SOURCE)) > { > invokeWSDLOperationTool.setFragmentViewID(FragmentConstants.FRAGMENT_VIEW_SWITCH_FORM_TO_SOURCE); >- return processFormViewParsedResults(parser, operElement, it); >+ return processFormViewParsedResultsHeader(parser, operElement) & // need to process both header and body >+ processFormViewParsedResults(parser, operElement); > } > else > { > invokeWSDLOperationTool.setFragmentViewID(FragmentConstants.FRAGMENT_VIEW_SWITCH_SOURCE_TO_FORM); >- return processSourceViewParsedResults(parser, operElement, it); >+ return processSourceViewParsedResultsHeader(parser, operElement) & // need to process both header and body >+ processSourceViewParsedResults(parser, operElement); > } > } > >- private boolean processFormViewParsedResults(MultipartFormDataParser parser, WSDLOperationElement operElement, Iterator it) throws MultipartFormDataException >+ private boolean processFormViewParsedResultsHeader(MultipartFormDataParser parser, WSDLOperationElement operElement) throws MultipartFormDataException >+ { >+ operElement.setPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER, null); >+ boolean resultsValid = true; >+ >+ Iterator it = operElement.getSOAPHeaders().iterator(); >+ while (it.hasNext()) >+ { >+ SOAPHeader soapHeader = (SOAPHeader) it.next(); >+ IXSDFragment frag = operElement.getHeaderFragment(soapHeader); >+ if (!frag.processParameterValues(parser)) >+ resultsValid = false; >+ } >+ if (resultsValid) >+ operElement.setPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER,null); >+ return resultsValid; >+ } >+ >+ private boolean processFormViewParsedResults(MultipartFormDataParser parser, WSDLOperationElement operElement) throws MultipartFormDataException > { > operElement.setPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT, null); > operElement.setPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT_NAMESPACE, null); > boolean resultsValid = true; >+ >+ Iterator it = operElement.getOrderedBodyParts().iterator(); > while (it.hasNext()) > { > Part part = (Part)it.next(); >@@ -71,14 +100,70 @@ > return resultsValid; > } > >- private boolean processSourceViewParsedResults(MultipartFormDataParser parser, WSDLOperationElement operElement, Iterator it) throws MultipartFormDataException >+ private boolean processSourceViewParsedResultsHeader(MultipartFormDataParser parser, WSDLOperationElement operElement) throws MultipartFormDataException >+ { >+ String sourceContent = parser.getParameter(FragmentConstants.SOURCE_CONTENT_HEADER); >+ if (sourceContent != null) >+ operElement.setPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER, sourceContent); >+ String[] nsDeclarations = parser.getParameterValues(FragmentConstants.SOURCE_CONTENT_NAMESPACE); >+ if (nsDeclarations != null) >+ operElement.setPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT_NAMESPACE,nsDeclarations); >+ >+ Iterator it = operElement.getSOAPHeaders().iterator(); >+ if (!it.hasNext()) >+ return true; >+ >+ Hashtable namespaceTable = new Hashtable(); >+ >+ if (nsDeclarations != null) { >+ for (int i = 0; i < nsDeclarations.length; i++) >+ { >+ String[] prefix_ns = SoapHelper.decodeNamespaceDeclaration(nsDeclarations[i]); >+ if (!namespaceTable.contains(prefix_ns[1])) >+ namespaceTable.put(prefix_ns[1], prefix_ns[0]); >+ } >+ } >+ >+ sourceContent = addRootElement(sourceContent); >+ try >+ { >+ Element sourceElements = XMLUtils.stringToElement(sourceContent); >+ NodeList nl = sourceElements.getChildNodes(); >+ >+ Hashtable elements = new Hashtable(); >+ >+ // work backwards so that if there are multiple nodes with the same name >+ // the topmost one takes precedence >+ for (int i = nl.getLength() - 1; i >= 0; i--) { >+ org.w3c.dom.Node node = nl.item(i); >+ if (node != null && node instanceof Element) >+ elements.put(node.getNodeName(), node); >+ } >+ >+ boolean sourceElementsValid = true; >+ while (it.hasNext()) >+ { >+ SOAPHeader soapHeader = (SOAPHeader)it.next(); >+ SOAPHeaderWrapperFragment frag = (SOAPHeaderWrapperFragment) operElement.getHeaderFragment(soapHeader); >+ if (!frag.setParameterValuesFromInstanceDocuments(elements, namespaceTable)) >+ sourceElementsValid = false; >+ } >+ return sourceElementsValid; >+ } >+ catch (Throwable t) >+ { >+ return false; >+ } >+ } >+ >+ private boolean processSourceViewParsedResults(MultipartFormDataParser parser, WSDLOperationElement operElement) throws MultipartFormDataException > { > String sourceContent = parser.getParameter(FragmentConstants.SOURCE_CONTENT); > if (sourceContent != null) > operElement.setPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT, sourceContent); >- String[] nsDeclarations = parser.getParameterValues(FragmentConstants.SOURCE_CONTENT_NAMESPACE); >- if (nsDeclarations != null) >- operElement.setPropertyAsObject(WSDLModelConstants.PROP_SOURCE_CONTENT_NAMESPACE,nsDeclarations); >+ >+ Iterator it = operElement.getOrderedBodyParts().iterator(); >+ > sourceContent = addRootElement(sourceContent); > try > { >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLActionInputs.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLActionInputs.java,v >retrieving revision 1.1 >diff -u -r1.1 WSDLActionInputs.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLActionInputs.java 19 Apr 2005 17:35:02 -0000 1.1 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLActionInputs.java 27 Mar 2007 22:43:51 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.constants; > >@@ -25,8 +28,11 @@ > > public static final String SUBMISSION_ACTION = "submissionAction"; > public static final String SUBMISSION_ACTION_FORM = "submissionActionForm"; >+ public static final String SUBMISSION_ACTION_BROWSE_FILE_HEADER = "submissionActionBrowseFileHeader"; > public static final String SUBMISSION_ACTION_BROWSE_FILE = "submissionActionBrowseFile"; >+ public static final String SUBMISSION_ACTION_SAVE_AS_HEADER = "submissionActionSaveAsHeader"; > public static final String SUBMISSION_ACTION_SAVE_AS = "submissionActionSaveAs"; >+ public static final String SELECTED_FILE_HEADER = "selectedFileHeader"; > public static final String SELECTED_FILE = "selectedFile"; > public static final String OPERATION_ELEMENT = "operationElement"; > >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/FragmentConstants.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/FragmentConstants.java,v >retrieving revision 1.1 >diff -u -r1.1 FragmentConstants.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/FragmentConstants.java 19 Apr 2005 17:35:02 -0000 1.1 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/FragmentConstants.java 27 Mar 2007 22:43:51 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2004 IBM Corporation and others. >+ * Copyright (c) 2004, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.constants; > >@@ -36,10 +39,12 @@ > public static final String FRAGMENT_VIEW_ID = "::fragmentViewID"; > public static final String XSD_ATOMIC_ENUM_ID = "::xsdAtomicEnumID"; > public static final String XSD_ALL_GROUP_ID = "::xsdAllGroupID"; >+ public static final String PART_TOKEN = "^"; > > // Fragment view IDs > public static final String FRAGMENT_VIEW_SWITCH_FORM_TO_SOURCE = "::fragmentViewSwitchFormToSource"; > public static final String FRAGMENT_VIEW_SWITCH_SOURCE_TO_FORM = "::fragmentViewSwitchSourceToForm"; >+ public static final String SOURCE_CONTENT_HEADER = "::sourceContentHeader"; > public static final String SOURCE_CONTENT = "::sourceContent"; > public static final String SOURCE_CONTENT_NAMESPACE = "::sourceContentNS"; > >@@ -58,6 +63,7 @@ > public static final String QNAME_LOCAL_NAME_ARRAY_TYPE = "arrayType"; > public static final String QNAME_LOCAL_NAME_ARRAY = "Array"; > public static final String COLON = ":"; >+ public static final String QNAME_LOCAL_NAME_HEADER = "Header"; > public static final String QNAME_LOCAL_NAME_BODY = "Body"; > public static final String QNAME_LOCAL_NAME_FAULT = "Fault"; > >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLModelConstants.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLModelConstants.java,v >retrieving revision 1.1 >diff -u -r1.1 WSDLModelConstants.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLModelConstants.java 19 Apr 2005 17:35:02 -0000 1.1 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/constants/WSDLModelConstants.java 27 Mar 2007 22:43:51 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2001, 2004 IBM Corporation and others. >+ * 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.constants; >@@ -23,6 +26,7 @@ > public final static String PROP_DOCUMENTATION = "propDocumentation"; > > // Source Content >+ public final static String PROP_SOURCE_CONTENT_HEADER = "propSourceContentHeader"; > public final static String PROP_SOURCE_CONTENT = "propSourceContent"; > public final static String PROP_SOURCE_CONTENT_NAMESPACE = "propSourceContentNS"; > } >Index: wsexplorer/wsdl/fragment/XSDElementWFragmentJSP.jsp >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/fragment/XSDElementWFragmentJSP.jsp,v >retrieving revision 1.1 >diff -u -r1.1 XSDElementWFragmentJSP.jsp >--- wsexplorer/wsdl/fragment/XSDElementWFragmentJSP.jsp 5 Apr 2006 18:34:09 -0000 1.1 >+++ wsexplorer/wsdl/fragment/XSDElementWFragmentJSP.jsp 27 Mar 2007 22:43:51 -0000 >@@ -1,18 +1,18 @@ > <% >-/** >-* <copyright> >-* >-* Licensed Material - Property of IBM >-* (C) Copyright IBM Corp. 2002 - All Rights Reserved. >-* US Government Users Restricted Rights - Use, duplication or disclosure >-* restricted by GSA ADP Schedule Contract with IBM Corp. >-* >-* </copyright> >-* >-* File plugins/com.ibm.etools.webservice.explorer/wsexplorer/wsdl/fragment/XSDDelegationWFragmentJSP.jsp, wsa.etools.ws.explorer, lunar-5.1.2, 20031231a 1 >-* Version 1.1 03/02/28 15:34:04 >-*/ >-%> >+/******************************************************************************* >+ * Copyright (c) 2002, 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers >+ *******************************************************************************/ >+ %> > <%@ 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.fragment.*, >@@ -38,7 +38,7 @@ > > > >-<table cellpadding=0 cellspacing=0 class="<%=("innerfixfragtable")%>"> >+<table cellpadding=0 cellspacing=0 class="<%=(xsdConfig.getIsWSDLPart() ? "fixfragtable" : "innerfixfragtable")%>"> > <tr> > <td> > <jsp:include page="<%=delegationFragment.getWriteFragment()%>" flush="true"/> >Index: wsexplorer/wsdl/forms/FragmentsFormView.jsp >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/forms/FragmentsFormView.jsp,v >retrieving revision 1.1 >diff -u -r1.1 FragmentsFormView.jsp >--- wsexplorer/wsdl/forms/FragmentsFormView.jsp 19 Apr 2005 17:35:00 -0000 1.1 >+++ wsexplorer/wsdl/forms/FragmentsFormView.jsp 27 Mar 2007 22:43:51 -0000 >@@ -1,13 +1,16 @@ > <% > /******************************************************************************* >- * Copyright (c) 2001, 2004 IBM Corporation and others. >+ * 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > %> > <%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.*, >@@ -16,6 +19,7 @@ > 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.*, >+ org.eclipse.wst.wsdl.binding.soap.SOAPHeader, > javax.wsdl.*, > java.util.*" %> > >@@ -30,7 +34,67 @@ > nodeID.append(selectedNode.getNodeId()); > InvokeWSDLOperationTool invokeWSDLOperationTool = (InvokeWSDLOperationTool)(selectedNode.getCurrentToolManager().getSelectedTool()); > WSDLOperationElement operElement = (WSDLOperationElement)selectedNode.getTreeElement(); >-Iterator it = operElement.getOrderedBodyParts().iterator(); >+ >+Iterator it = operElement.getSOAPHeaders().iterator(); >+ >+if (it.hasNext()) { >+ String headerDivId = "Header"; >+ String headerImgId = "xHeader"; >+ %> >+ <table border=0 cellpadding=6 cellspacing=0> >+ <tr> >+ <td height=20 valign="bottom" align="left" nowrap width=11><a href="javascript:twist('<%=headerDivId%>','<%=headerImgId%>')"><img name="<%=headerImgId%>" src="<%=response.encodeURL(controller.getPathWithContext("images/twistopened.gif"))%>" alt="<%=controller.getMessage("ALT_TWIST_OPENED")%>" class="twist"></a></td> >+ <td height=20 valign="bottom" align="left" nowrap class="labels"><strong><%=wsdlPerspective.getMessage("FORM_LABEL_HEADER")%></strong></td> >+ </tr> >+ </table> >+ >+ <table width="95%" border=0 cellpadding=0 cellspacing=0> >+ <tr> >+ <td valign="top" height=10><img src="<%=response.encodeURL(controller.getPathWithContext("images/keyline.gif"))%>" height=2 width="100%"></td> >+ </tr> >+ </table> >+ >+ <div id="<%=headerDivId%>"> >+ <% >+ while (it.hasNext()) { >+ SOAPHeader soapHeader = (SOAPHeader) it.next(); >+ IXSDFragment frag = operElement.getHeaderFragment(soapHeader); >+ fragID.delete(0, fragID.length()); >+ fragID.append(frag.getID()); >+ %> >+ <jsp:include page="<%=frag.getWriteFragment()%>" flush="true"/> >+ <% >+ } >+ %> >+ </div> >+ <% >+} >+ >+boolean hasInput = Boolean.parseBoolean(request.getParameter("hasInput")); >+String bodyDivId = "Body"; >+ >+if (hasInput) { >+ String bodyImgId = "xBody"; >+ %> >+ <table border=0 cellpadding=6 cellspacing=0> >+ <tr> >+ <td height=20 valign="bottom" align="left" nowrap width=11><a href="javascript:twist('<%=bodyDivId%>','<%=bodyImgId%>')"><img name="<%=bodyImgId%>" src="<%=response.encodeURL(controller.getPathWithContext("images/twistopened.gif"))%>" alt="<%=controller.getMessage("ALT_TWIST_OPENED")%>" class="twist"></a></td> >+ <td height=20 valign="bottom" align="left" nowrap class="labels"><strong><%=wsdlPerspective.getMessage("FORM_LABEL_BODY")%></strong></td> >+ </tr> >+ </table> >+ >+ <table width="95%" border=0 cellpadding=0 cellspacing=0> >+ <tr> >+ <td valign="top" height=10><img src="<%=response.encodeURL(controller.getPathWithContext("images/keyline.gif"))%>" height=2 width="100%"></td> >+ </tr> >+ </table> >+ <% >+} >+%> >+ >+<div id="<%=bodyDivId%>" class="fragarea"> >+<% >+it = operElement.getOrderedBodyParts().iterator(); > while (it.hasNext()) { > Part part = (Part)it.next(); > IXSDFragment frag = operElement.getFragment(part); >@@ -41,3 +105,4 @@ > <% > } > %> >+</div> >\ No newline at end of file >Index: wsexplorer/wsdl/forms/FragmentsSoapView.jsp >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/forms/FragmentsSoapView.jsp,v >retrieving revision 1.4 >diff -u -r1.4 FragmentsSoapView.jsp >--- wsexplorer/wsdl/forms/FragmentsSoapView.jsp 26 Jul 2006 20:56:07 -0000 1.4 >+++ wsexplorer/wsdl/forms/FragmentsSoapView.jsp 27 Mar 2007 22:43:51 -0000 >@@ -1,6 +1,6 @@ > <% > /******************************************************************************* >- * Copyright (c) 2001, 2004 IBM Corporation and others. >+ * 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 >@@ -12,6 +12,7 @@ > * -------- -------- ----------------------------------------------------------- > * 20060222 127443 jesper@selskabet.org - Jesper S Moller > * 20060726 144824 mahutch@ca.ibm.com - Mark Hutchinson >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > %> > <%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.*, >@@ -21,6 +22,7 @@ > org.eclipse.wst.ws.internal.explorer.platform.wsdl.util.*, > org.eclipse.wst.ws.internal.explorer.platform.constants.*, > org.eclipse.wst.ws.internal.explorer.platform.util.*, >+ org.eclipse.wst.wsdl.binding.soap.SOAPHeader, > org.w3c.dom.*, > javax.wsdl.*, > javax.wsdl.extensions.ExtensibilityElement, >@@ -33,11 +35,44 @@ > WSDLPerspective wsdlPerspective = controller.getWSDLPerspective(); > WSDLOperationElement operElement = (WSDLOperationElement)(wsdlPerspective.getNodeManager().getSelectedNode().getTreeElement()); > Operation oper = operElement.getOperation(); >- Iterator it = operElement.getOrderedBodyParts().iterator(); >- StringBuffer sourceContent = new StringBuffer(); >- String cachedSourceContent = operElement.getPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT); > Hashtable soapEnvelopeNamespaceTable = new Hashtable(); > SoapHelper.addDefaultSoapEnvelopeNamespaces(soapEnvelopeNamespaceTable); >+ >+ Iterator it = operElement.getSOAPHeaders().iterator(); >+ StringBuffer sourceContentHeader = new StringBuffer(); >+ String cachedSourceContent = operElement.getPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT_HEADER); >+ if (cachedSourceContent != null) >+ sourceContentHeader.append(cachedSourceContent); >+ else >+ { >+ while (it.hasNext()) >+ { >+ SOAPHeader soapHeader = (SOAPHeader)it.next(); >+ IXSDFragment frag = operElement.getHeaderFragment(soapHeader); >+ Element[] instanceDocuments = frag.genInstanceDocumentsFromParameterValues(!operElement.isUseLiteral(), soapEnvelopeNamespaceTable, XMLUtils.createNewDocument(null)); >+ for (int i = 0; i < instanceDocuments.length; i++) >+ { >+ String serializedFragment = XMLUtils.serialize(instanceDocuments[i], true); >+ if (serializedFragment == null) >+ { >+ // On Some JRE's (Sun java 5) elements with an attribute with the xsi >+ // prefix do not serialize properly because the namespace can not >+ // be found so the string returned comes back as null. To workaround >+ // this problem try adding in the namespace declaration attribute >+ // and retry the serialization (bug 144824) >+ instanceDocuments[i].setAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"); >+ serializedFragment = XMLUtils.serialize(instanceDocuments[i], true); >+ } >+ >+ sourceContentHeader.append(serializedFragment); >+ sourceContentHeader.append(HTMLUtils.LINE_SEPARATOR); >+ } >+ } >+ } >+ >+ it = operElement.getOrderedBodyParts().iterator(); >+ StringBuffer sourceContent = new StringBuffer(); >+ cachedSourceContent = operElement.getPropertyAsString(WSDLModelConstants.PROP_SOURCE_CONTENT); > if (cachedSourceContent != null) > { > sourceContent.append(cachedSourceContent); >@@ -129,6 +164,87 @@ > <% > } > >+ Element soapHeaderElement = SoapHelper.createSoapHeaderElement(doc); >+ header.setLength(0); >+ header.append('<').append(soapHeaderElement.getTagName()); >+ attributes = soapHeaderElement.getAttributes(); >+ numberOfAttributes = attributes.getLength(); >+ if (numberOfAttributes == 0) >+ header.append('>'); >+%> >+<table width="95%" border=0 cellpadding=0 cellspacing=0> >+ <tr> >+ <td width=8> >+ <img width=8 height=16 src="<%=response.encodeURL(controller.getPathWithContext("images/space.gif"))%>"> >+ </td> >+ <td valign="bottom" class="labels"> >+ <%=HTMLUtils.charactersToHTMLEntities(header.toString())%> >+ </td> >+ </tr> >+</table> >+<% >+ for (int i=0;i<numberOfAttributes;i++) >+ { >+ header.setLength(0); >+ Node attrNode = attributes.item(i); >+ header.append(attrNode.getNodeName()).append("=\"").append(attrNode.getNodeValue()).append('\"'); >+ if (i == numberOfAttributes-1) >+ header.append('>'); >+%> >+<table width="95%" border=0 cellpadding=0 cellspacing=0> >+ <tr> >+ <td width=16> >+ <img width=16 height=16 src="<%=response.encodeURL(controller.getPathWithContext("images/space.gif"))%>"> >+ </td> >+ <td valign="bottom" class="labels"> >+ <%=HTMLUtils.charactersToHTMLEntities(header.toString())%> >+ </td> >+ </tr> >+</table> >+<% >+ } >+%> >+<table border=0 cellpadding=3 cellspacing=3> >+ <tr> >+ <td width="16"> >+ <img width="16" height=16 src="<%=response.encodeURL(controller.getPathWithContext("images/space.gif"))%>"> >+ </td> >+ <td valign="center" align="left" nowrap> >+ <input type="file" name="<%=WSDLActionInputs.SELECTED_FILE_HEADER%>" title="<%=wsdlPerspective.getMessage("FORM_CONTROL_TITLE_SOAP_FILE")%>"> >+ </td> >+ <td valign="center" align="left" class="labels" nowrap> >+ <a href="javascript:doAction('<%=WSDLActionInputs.SUBMISSION_ACTION_BROWSE_FILE_HEADER%>')"><%=wsdlPerspective.getMessage("BUTTON_LABEL_LOAD")%></a> >+ </td> >+ <td valign="center" align="left" class="labels" nowrap> >+ <a href="javascript:doAction('<%=WSDLActionInputs.SUBMISSION_ACTION_SAVE_AS_HEADER%>')"><%=wsdlPerspective.getMessage("BUTTON_LABEL_SAVE_AS")%></a> >+ </td> >+ </tr> >+</table> >+<table width="95%" border=0 cellpadding=3 cellspacing=3> >+ <tr> >+ <td width="16"> >+ <img width="16" height="16" src="<%=response.encodeURL(controller.getPathWithContext("images/space.gif"))%>"> >+ </td> >+ <td width="100%"> >+ <textarea id="soap_header_content" name="<%=FragmentConstants.SOURCE_CONTENT_HEADER%>" class="textareaenter"><%=HTMLUtils.charactersToHTMLEntitiesStrict(sourceContentHeader.toString())%></textarea> >+ </td> >+ </tr> >+</table> >+<% >+ header.setLength(0); >+ header.append("</").append(soapHeaderElement.getTagName()).append('>'); >+%> >+<table width="95%" cellpadding=1 cellspacing=0> >+ <tr> >+ <td width=8> >+ <img width=8 height=16 src="<%=response.encodeURL(controller.getPathWithContext("images/space.gif"))%>"> >+ </td> >+ <td valign="bottom" class="labels"> >+ <%=HTMLUtils.charactersToHTMLEntities(header.toString())%> >+ </td> >+ </tr> >+</table> >+<% > Element soapBodyElement = SoapHelper.createSoapBodyElement(doc); > header.setLength(0); > header.append('<').append(soapBodyElement.getTagName()); >@@ -166,7 +282,6 @@ > </td> > </tr> > </table> >-<table> > <% > } > >@@ -270,10 +385,10 @@ > <input type="file" name="<%=WSDLActionInputs.SELECTED_FILE%>" title="<%=wsdlPerspective.getMessage("FORM_CONTROL_TITLE_SOAP_FILE")%>"> > </td> > <td valign="center" align="left" class="labels" nowrap> >- <a href="javascript:showNewFileContents()"><%=wsdlPerspective.getMessage("BUTTON_LABEL_LOAD")%></a> >+ <a href="javascript:doAction('<%=WSDLActionInputs.SUBMISSION_ACTION_BROWSE_FILE%>')"><%=wsdlPerspective.getMessage("BUTTON_LABEL_LOAD")%></a> > </td> > <td valign="center" align="left" class="labels" nowrap> >- <a href="javascript:saveSourceContent()"><%=wsdlPerspective.getMessage("BUTTON_LABEL_SAVE_AS")%></a> >+ <a href="javascript:doAction('<%=WSDLActionInputs.SUBMISSION_ACTION_SAVE_AS%>')"><%=wsdlPerspective.getMessage("BUTTON_LABEL_SAVE_AS")%></a> > </td> > </tr> > </table> >Index: wsexplorer/wsdl/forms/InvokeWSDLOperationForm.jsp >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/forms/InvokeWSDLOperationForm.jsp,v >retrieving revision 1.3 >diff -u -r1.3 InvokeWSDLOperationForm.jsp >--- wsexplorer/wsdl/forms/InvokeWSDLOperationForm.jsp 12 May 2006 19:39:57 -0000 1.3 >+++ wsexplorer/wsdl/forms/InvokeWSDLOperationForm.jsp 27 Mar 2007 22:43:51 -0000 >@@ -1,6 +1,6 @@ > <% > /******************************************************************************* >- * Copyright (c) 2001, 2006 IBM Corporation and others. >+ * 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 >@@ -11,6 +11,7 @@ > * 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 > *******************************************************************************/ > %> > <%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.*, >@@ -43,24 +44,12 @@ > <jsp:include page="/wsdl/scripts/fragmenttables.jsp" flush="true"/> > <jsp:include page="/wsdl/scripts/wsdlpanes.jsp" flush="true"/> > <script language="javascript"> >- function showNewFileContents() >+ function doAction(action) > { > var form = document.forms[0]; > if (handleSubmit(form)) > { >- form.<%=WSDLActionInputs.SUBMISSION_ACTION%>.value = "<%=WSDLActionInputs.SUBMISSION_ACTION_BROWSE_FILE%>"; >- form.submit(); >- form.<%=WSDLActionInputs.SUBMISSION_ACTION%>.value = "<%=invokeWSDLOperationURL%>"; >- resetSubmission(); >- } >- } >- >- function saveSourceContent() >- { >- var form = document.forms[0]; >- if (handleSubmit(form)) >- { >- form.<%=WSDLActionInputs.SUBMISSION_ACTION%>.value = "<%=WSDLActionInputs.SUBMISSION_ACTION_SAVE_AS%>"; >+ form.<%=WSDLActionInputs.SUBMISSION_ACTION%>.value = action; > form.submit(); > form.<%=WSDLActionInputs.SUBMISSION_ACTION%>.value = "<%=invokeWSDLOperationURL%>"; > resetSubmission(); >@@ -153,7 +142,7 @@ > } > } > } >- if (hasInput) >+ if (hasInput || !operElement.getSOAPHeaders().isEmpty()) > { > out.print(wsdlPerspective.getMessage("FORM_LABEL_INVOKE_WSDL_OPERATION_DESC")); > } >@@ -206,7 +195,9 @@ > else > { > %> >-<jsp:include page="/wsdl/forms/FragmentsFormView.jsp" flush="true"/> >+<jsp:include page="/wsdl/forms/FragmentsFormView.jsp" flush="true"> >+ <jsp:param name="hasInput" value="<%=hasInput%>"/> >+</jsp:include> > <% > } > %> >Index: wsexplorer/wsdl/forms/ReadOnlyFragmentsFormView.jsp >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer/wsdl/forms/ReadOnlyFragmentsFormView.jsp,v >retrieving revision 1.1 >diff -u -r1.1 ReadOnlyFragmentsFormView.jsp >--- wsexplorer/wsdl/forms/ReadOnlyFragmentsFormView.jsp 19 Apr 2005 17:35:00 -0000 1.1 >+++ wsexplorer/wsdl/forms/ReadOnlyFragmentsFormView.jsp 27 Mar 2007 22:43:51 -0000 >@@ -1,13 +1,16 @@ > <% > /******************************************************************************* >- * Copyright (c) 2001, 2004 IBM Corporation and others. >+ * 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > %> > <%@ page contentType="text/html; charset=UTF-8" import="org.eclipse.wst.ws.internal.explorer.platform.wsdl.perspective.*, >@@ -20,6 +23,7 @@ > org.eclipse.wst.ws.internal.explorer.platform.perspective.Node, > org.eclipse.wst.ws.internal.explorer.platform.perspective.*, > org.eclipse.wst.ws.internal.explorer.platform.util.*, >+ org.eclipse.wst.wsdl.binding.soap.SOAPHeader, > org.w3c.dom.*, > javax.wsdl.*, > javax.xml.parsers.*, >@@ -31,6 +35,24 @@ > > <%! > private Element soapResponse_ = null; >+private boolean hasSOAPHeaders = false; >+ >+private void checkSOAPHeaders() { >+ >+ NodeList nl = soapResponse_.getElementsByTagNameNS(FragmentConstants.URI_SOAP_ENV, FragmentConstants.QNAME_LOCAL_NAME_HEADER); >+ if (nl.getLength() == 0) >+ return; >+ >+ Element soapHeader = (Element) nl.item(0); >+ NodeList nodes = soapHeader.getChildNodes(); >+ >+ for (int i = 0; i < nodes.getLength(); i++) { >+ if (nodes.item(i) instanceof Element) { >+ hasSOAPHeaders = true; >+ return; >+ } >+ } >+} > > private Element[] parseSOAPResponse(SOAPMessageQueue soapMessageQueue, WSDLOperationElement operElement) > { >@@ -38,6 +60,7 @@ > try > { > soapResponse_ = XMLUtils.stringToElement(messages, true); >+ checkSOAPHeaders(); > NodeList nl = soapResponse_.getElementsByTagNameNS(FragmentConstants.URI_SOAP_ENV, FragmentConstants.QNAME_LOCAL_NAME_BODY); > if (nl.getLength() > 0) > { >@@ -168,7 +191,7 @@ > SOAPMessageQueue soapMessageQueue = wsdlPerspective.getSOAPResponseQueue(); > instanceDocuments = parseSOAPResponse(soapMessageQueue, operElement); > } >- if (!cached && instanceDocuments == null) >+ if (!cached && !hasSOAPHeaders && instanceDocuments == null) > { > %> > <table width="95%" border=0 cellpadding=6 cellspacing=0> >@@ -180,7 +203,7 @@ > </table> > <% > } >- else if (!cached && instanceDocuments.length <= 0) >+ else if (!cached && !hasSOAPHeaders && instanceDocuments.length <= 0) > { > %> > <table width="95%" border=0 cellpadding=6 cellspacing=0> >@@ -194,29 +217,123 @@ > } > else > { >- Map partsMap = oper.getOutput().getMessage().getParts(); >- Iterator it = partsMap.values().iterator(); >- Hashtable uriReferences = null; >- while (it.hasNext()) >- { >- IXSDFragment fragment = operElement.getFragment((Part)it.next(), false); >- if (!cached) >- { >- if (!operElement.isUseLiteral() && (fragment instanceof ISOAPEncodingWrapperFragment)) >- { >- if (uriReferences == null) >- uriReferences = SOAPEncodingWrapperFragment.parseURIReferences(soapResponse_, true); >- ((ISOAPEncodingWrapperFragment)fragment).setURIReferences(uriReferences); >- } >- fragment.setParameterValuesFromInstanceDocuments(instanceDocuments); >- } >- fragID.delete(0, fragID.length()); >- fragID.append(fragment.getID()); >- %> >- <jsp:include page="<%=fragment.getReadFragment()%>" flush="true"/> >- <% >- } >- operElement.setPropertyAsObject(WSDLActionInputs.SOAP_RESPONSE_CACHED, new Boolean(true)); >+ String headerDivId = "Header"; >+ String headerImgId = "xHeader"; >+ String bodyDivId = "Body"; >+ String bodyImgId = "xBody"; >+ %> >+ <table border=0 cellpadding=6 cellspacing=0> >+ <tr> >+ <td height=20 valign="bottom" align="left" nowrap width=11><a href="javascript:twist('<%=headerDivId%>','<%=headerImgId%>')"><img name="<%=headerImgId%>" src="<%=response.encodeURL(controller.getPathWithContext("images/twistopened.gif"))%>" alt="<%=controller.getMessage("ALT_TWIST_OPENED")%>" class="twist"></a></td> >+ <td height=20 valign="bottom" align="left" nowrap class="labels"><strong><%=wsdlPerspective.getMessage("FORM_LABEL_HEADER")%></strong></td> >+ </tr> >+ </table> >+ >+ <table width="95%" border=0 cellpadding=0 cellspacing=0> >+ <tr> >+ <td valign="top" height=10><img src="<%=response.encodeURL(controller.getPathWithContext("images/keyline.gif"))%>" height=2 width="100%"></td> >+ </tr> >+ </table> >+ >+ <div id="<%=headerDivId%>" class="fragarea"> >+ <% >+ if (cached || hasSOAPHeaders) { >+ hasSOAPHeaders = false; >+ Iterator it = operElement.getSOAPHeaders(false).iterator(); >+ while (it.hasNext()) { >+ SOAPHeader soapHeader = (SOAPHeader) it.next(); >+ String ns = soapHeader.getEPart().getElementDeclaration().getTargetNamespace(); >+ IXSDFragment frag = operElement.getHeaderFragment(soapHeader, false); >+ >+ if (!cached) { >+ NodeList nl = soapResponse_.getElementsByTagNameNS(ns, frag.getName()); >+ if (nl.getLength() == 0) >+ continue; >+ >+ Element element = (Element) nl.item(0); >+ if (!frag.setParameterValuesFromInstanceDocuments(new Element[] { element })) >+ continue; >+ } >+ else if (!frag.validateAllParameterValues()) >+ continue; >+ >+ hasSOAPHeaders = true; >+ fragID.delete(0, fragID.length()); >+ fragID.append(frag.getID()); >+ %> >+ <jsp:include page="<%=frag.getReadFragment()%>" flush="true"/> >+ <% >+ } >+ } >+ if (!hasSOAPHeaders) { >+ %> >+ <table width="95%" border=0 cellpadding=6 cellspacing=0> >+ <tr> >+ <td height=20 valign="bottom" align="left" class="labels"> >+ <%=wsdlPerspective.getMessage("FORM_LABEL_NOTHING_TO_DISPLAY_IN_FORM_VIEW")%> >+ </td> >+ </tr> >+ </table> >+ <% >+ } >+ %> >+ </div> >+ >+ <table border=0 cellpadding=6 cellspacing=0> >+ <tr> >+ <td height=20 valign="bottom" align="left" nowrap width=11><a href="javascript:twist('<%=bodyDivId%>','<%=bodyImgId%>')"><img name="<%=bodyImgId%>" src="<%=response.encodeURL(controller.getPathWithContext("images/twistopened.gif"))%>" alt="<%=controller.getMessage("ALT_TWIST_OPENED")%>" class="twist"></a></td> >+ <td height=20 valign="bottom" align="left" nowrap class="labels"><strong><%=wsdlPerspective.getMessage("FORM_LABEL_BODY")%></strong></td> >+ </tr> >+ </table> >+ >+ <table width="95%" border=0 cellpadding=0 cellspacing=0> >+ <tr> >+ <td valign="top" height=10><img src="<%=response.encodeURL(controller.getPathWithContext("images/keyline.gif"))%>" height=2 width="100%"></td> >+ </tr> >+ </table> >+ >+ <div id="<%=bodyDivId%>" class="fragarea"> >+ <% >+ if (cached || (instanceDocuments != null && instanceDocuments.length > 0)) { >+ >+ Map partsMap = oper.getOutput().getMessage().getParts(); >+ Iterator it = partsMap.values().iterator(); >+ Hashtable uriReferences = null; >+ while (it.hasNext()) >+ { >+ IXSDFragment fragment = operElement.getFragment((Part)it.next(), false); >+ if (!cached) >+ { >+ if (!operElement.isUseLiteral() && (fragment instanceof ISOAPEncodingWrapperFragment)) >+ { >+ if (uriReferences == null) >+ uriReferences = SOAPEncodingWrapperFragment.parseURIReferences(soapResponse_, true); >+ ((ISOAPEncodingWrapperFragment)fragment).setURIReferences(uriReferences); >+ } >+ fragment.setParameterValuesFromInstanceDocuments(instanceDocuments); >+ } >+ fragID.delete(0, fragID.length()); >+ fragID.append(fragment.getID()); >+ %> >+ <jsp:include page="<%=fragment.getReadFragment()%>" flush="true"/> >+ <% >+ } >+ operElement.setPropertyAsObject(WSDLActionInputs.SOAP_RESPONSE_CACHED, new Boolean(true)); >+ } >+ else { >+ %> >+ <table width="95%" border=0 cellpadding=6 cellspacing=0> >+ <tr> >+ <td height=20 valign="bottom" align="left" class="labels"> >+ <%=wsdlPerspective.getMessage("FORM_LABEL_NOTHING_TO_DISPLAY_IN_FORM_VIEW")%> >+ </td> >+ </tr> >+ </table> >+ <% >+ } >+ %> >+ </div> >+ <% > } > } > %> >Index: wsexplorer-properties/wsdl.properties >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-properties/wsdl.properties,v >retrieving revision 1.3 >diff -u -r1.3 wsdl.properties >--- wsexplorer-properties/wsdl.properties 12 May 2006 19:39:17 -0000 1.3 >+++ wsexplorer-properties/wsdl.properties 27 Mar 2007 22:43:50 -0000 >@@ -129,6 +129,10 @@ > FORM_LABEL_NOTHING_TO_DISPLAY_IN_FORM_VIEW=There is nothing to be displayed in the form view. Please switch to the source view for the SOAP request and response. > FORM_LABEL_SOAP_RESPONSE_FAILED_VALIDATION_IN_FORM_VIEW=The SOAP response failed schema validation. Please switch to the source view for the SOAP response in XML format. > FORM_LABEL_END_POINTS=Endpoints >+FORM_LABEL_HEADER=Header >+FORM_LABEL_BODY=Body >+FORM_LABEL_MUSTUNDERSTAND=mustUnderstand >+FORM_LABEL_ACTOR=actor > > # Source/Form views > FORM_LINK_FORM=Form >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java,v >retrieving revision 1.3 >diff -u -r1.3 WSDLOperationElement.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java 11 Oct 2005 15:51:08 -0000 1.3 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/datamodel/WSDLOperationElement.java 27 Mar 2007 22:43:51 -0000 >@@ -1,17 +1,22 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2004 IBM Corporation and others. >+ * Copyright (c) 2002, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.datamodel; > >+import java.util.Hashtable; > import java.util.Iterator; > import java.util.List; >+import java.util.Map; > import java.util.Vector; > import javax.wsdl.Binding; > import javax.wsdl.BindingInput; >@@ -29,7 +34,9 @@ > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.IXSDFragment; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.XSDToFragmentConfiguration; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.XSDToFragmentController; >+import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.SOAPHeaderWrapperFragment; > import org.eclipse.wst.ws.internal.explorer.platform.wsdl.xsd.WSDLPartsToXSDTypeMapper; >+import org.eclipse.wst.wsdl.binding.soap.SOAPHeader; > import org.eclipse.xsd.XSDNamedComponent; > > public class WSDLOperationElement extends WSDLCommonElement >@@ -48,6 +55,8 @@ > private String encodingStyle_; > private String encodingNamespace_; > >+ private Map headerCache = new Hashtable(); >+ > private final void gatherSoapInformation(WSDLBindingElement bindingElement,SOAPBinding soapBinding) > { > // Initialize defaults. >@@ -151,6 +160,40 @@ > return bindingOperation; > } > >+ /** >+ * Return a list of input headers. >+ * >+ * @return A List >+ */ >+ public List getSOAPHeaders() { >+ return getSOAPHeaders(true); >+ } >+ >+ /** >+ * Return a list of headers. >+ * >+ * @param isInput If true, returns the input headers. If false, returns the output headers. >+ * @return A List >+ */ >+ public List getSOAPHeaders(boolean isInput) { >+ List headers = new Vector(); >+ >+ BindingOperation bindingOperation = getBindingOperation(); >+ List extensibilityElements = isInput ? >+ bindingOperation.getBindingInput().getExtensibilityElements() : >+ bindingOperation.getBindingOutput().getExtensibilityElements(); >+ >+ for (Iterator it = extensibilityElements.iterator(); it.hasNext();) { >+ >+ ExtensibilityElement e = (ExtensibilityElement) it.next(); >+ >+ if (e instanceof SOAPHeader && !headers.contains(e)) >+ headers.add(e); >+ } >+ >+ return headers; >+ } >+ > public List getOrderedBodyParts() > { > List parts = new Vector(operation_.getInput().getMessage().getOrderedParts(operation_.getParameterOrdering())); >@@ -200,6 +243,21 @@ > return wsdlPartsToXsdTypeMapper_.getXSDType(part, id); > } > >+ public IXSDFragment getHeaderFragment(SOAPHeader soapHeader) { >+ return getHeaderFragment(soapHeader, true); >+ } >+ >+ public IXSDFragment getHeaderFragment(SOAPHeader soapHeader, boolean isInput) { >+ StringBuffer id = new StringBuffer(); >+ Part part = soapHeader.getEPart(); >+ if (isInput) >+ id.append(FragmentConstants.INPUT_ID).append(soapHeader.getMessage()).append(FragmentConstants.PART_TOKEN); >+ else >+ id.append(FragmentConstants.OUTPUT_ID).append(soapHeader.getMessage()).append(FragmentConstants.PART_TOKEN); >+ >+ return getFragment(part, id, isInput); // only wrap input header fragments >+ } >+ > public IXSDFragment getFragment(Part part) { > return getFragment(part, true); > } >@@ -210,6 +268,11 @@ > id.append(FragmentConstants.INPUT_ID); > else > id.append(FragmentConstants.OUTPUT_ID); >+ >+ return getFragment(part, id, false); >+ } >+ >+ private IXSDFragment getFragment(Part part, StringBuffer id, boolean useSOAPHeaderWrapper) { > String partName = part.getName(); > id.append(partName); > XSDToFragmentConfiguration config = new XSDToFragmentConfiguration(); >@@ -228,6 +291,23 @@ > else > config.setPartEncoding(FragmentConstants.ENCODING_URL); > IXSDFragment fragment = getXSDToFragmentController().getFragment(config, id.toString(), part.getName()); >+ >+ // let's see if there's a corresponding wrapper for this fragment >+ if (useSOAPHeaderWrapper && !(fragment instanceof SOAPHeaderWrapperFragment)) { >+ SOAPHeaderWrapperFragment wrapper = (SOAPHeaderWrapperFragment) headerCache.get(fragment.getID()); >+ >+ // no wrapper, let's wrap it >+ if (wrapper == null) { >+ wrapper = new SOAPHeaderWrapperFragment(fragment); >+ headerCache.put(fragment.getID(), wrapper); >+ >+ // also put this wrapper fragment in the master cache >+ getXSDToFragmentController().addToCache(wrapper.getID(), wrapper); >+ } >+ >+ return wrapper; >+ } >+ > return fragment; > } > >Index: wsexplorer/css/windows.css >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer/css/windows.css,v >retrieving revision 1.3 >diff -u -r1.3 windows.css >--- wsexplorer/css/windows.css 9 May 2006 12:59:16 -0000 1.3 >+++ wsexplorer/css/windows.css 27 Mar 2007 22:43:51 -0000 >@@ -9,6 +9,7 @@ > > /* fieldset+legend Styles */ > .keylinefieldset { border-color:#8080FF; border-width:1px; border-style:solid; } >+.headerfieldset { -moz-border-radius: 7pt; padding: 3px; border:1px solid #C0C0C0; } > > /* table Styles */ > .tableborder {border-left:0px solid #B8B4A3; border-right:1px solid #B8B4A3; border-top:1px solid #B8B4A3; border-bottom:0px solid #B8B4A3; } >@@ -43,5 +44,6 @@ > .innerrangefragtable {width:100%; border-left:0px solid #B8B4A3; border-right:1px solid #B8B4A3; border-top:1px solid #B8B4A3; border-bottom:0px solid #B8B4A3;} > .textareaenter {font: icon; font-size: 14px; color: Black; border-style:solid; border-width : 1px; border-color: #C7C5B2; width:100%; height:150px; } > .bigtextareaenter {font: icon; font-size: 14px; color: Black; border-style:solid; border-width : 1px; border-color: #C7C5B2; width:100%; height:300px; } >+.fragarea { padding-left: 3px; padding-bottom: 5px; } > > iframe {border-width: 2px; border-style: inset; } >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/util/SoapHelper.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/util/SoapHelper.java,v >retrieving revision 1.2 >diff -u -r1.2 SoapHelper.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/util/SoapHelper.java 11 Oct 2005 15:51:12 -0000 1.2 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/util/SoapHelper.java 27 Mar 2007 22:43:51 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2004 IBM Corporation and others. >+ * Copyright (c) 2002, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.util; >@@ -65,6 +68,11 @@ > return soapEnvelopeElement; > } > >+ public static final Element createSoapHeaderElement(Document doc) >+ { >+ return doc.createElement("soapenv:Header"); >+ } >+ > public static final Element createSoapBodyElement(Document doc) > { > return doc.createElement("soapenv:Body"); >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/XSDComplexFragment.java >=================================================================== >RCS file: /cvsroot/webtools/wst/components/ws/plugins/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/XSDComplexFragment.java,v >retrieving revision 1.5 >diff -u -r1.5 XSDComplexFragment.java >--- wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/XSDComplexFragment.java 20 Apr 2006 22:02:02 -0000 1.5 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/XSDComplexFragment.java 27 Mar 2007 22:43:51 -0000 >@@ -1,12 +1,15 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2004 IBM Corporation and others. >+ * Copyright (c) 2002, 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 >+ * IBM Corporation - initial API and implementation >+ * yyyymmdd bug Email and other contact information >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers > *******************************************************************************/ > package org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl; > >@@ -310,7 +313,7 @@ > xsdConfig.setPartEncoding(thisConfig.getPartEncoding()); > xsdConfig.setWSDLPartName(thisConfig.getWSDLPartName()); > String newID = genID(); >- addFragment(newID, getXSDToFragmentController().getFragment(xsdConfig, newID, newID)); >+ addFragment(newID, getXSDToFragmentController().getFragment(xsdConfig, newID, getName())); > createAttributeFragments(newID); > return newID; > } >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/util/BrowserDetect.java >=================================================================== >RCS file: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/util/BrowserDetect.java >diff -N wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/util/BrowserDetect.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/util/BrowserDetect.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,38 @@ >+/******************************************************************************* >+ * Copyright (c) 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers >+ *******************************************************************************/ >+ >+package org.eclipse.wst.ws.internal.explorer.platform.util; >+ >+import javax.servlet.http.HttpServletRequest; >+ >+/** >+ * Helper class used to detect the type of browser used. >+ */ >+public class BrowserDetect { >+ >+ /** >+ * Determine if Microsoft Internet Explorer is used. >+ * >+ * @param request The HTTP request. >+ * @return True if the client is a Microsoft Internet Explorer web browser, false otherwise. >+ */ >+ public static final boolean isMicrosoftInternetExplorer(HttpServletRequest request) { >+ String userAgent = request.getHeader("User-Agent"); >+ >+ if (userAgent != null && userAgent.toLowerCase().indexOf("msie") != -1) >+ return true; >+ >+ return false; >+ } >+} >Index: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/SOAPHeaderWrapperFragment.java >=================================================================== >RCS file: wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/SOAPHeaderWrapperFragment.java >diff -N wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/SOAPHeaderWrapperFragment.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsdl/fragment/impl/SOAPHeaderWrapperFragment.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,290 @@ >+/******************************************************************************* >+ * Copyright (c) 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers >+ *******************************************************************************/ >+ >+package org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl; >+ >+import java.net.URI; >+import java.net.URISyntaxException; >+import java.util.Hashtable; >+import java.util.Vector; >+ >+import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataException; >+import org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser; >+import org.eclipse.wst.ws.internal.explorer.platform.wsdl.constants.FragmentConstants; >+import org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.IXSDFragment; >+import org.w3c.dom.Document; >+import org.w3c.dom.Element; >+ >+/** >+ * A SOAP header fragment, which is a wrapper around the fragment that represents the SOAP header content. >+ */ >+public class SOAPHeaderWrapperFragment extends XSDDelegationFragment { >+ >+ private static final String MUST_UNDERSTAND = "mustUnderstand"; >+ private static final String ACTOR = "actor"; >+ >+ private boolean mustUnderstand = false; >+ private String actor = ""; >+ private boolean validActor = true; >+ >+ /** >+ * Constructor. >+ * >+ * @param fragment The fragment that this SOAP header fragment wraps around. >+ */ >+ public SOAPHeaderWrapperFragment(IXSDFragment fragment) { >+ super(fragment.genID(), fragment.getName(), null); >+ setXSDDelegationFragment(fragment); >+ } >+ >+ /* >+ * Retrieves the first element from a string array. >+ */ >+ private String getFirstElement(String[] stringArray) { >+ if (stringArray == null || stringArray.length == 0) >+ return null; >+ return stringArray[0]; >+ } >+ >+ /* >+ * Retrieves the first element from a vector. >+ */ >+ private String getFirstElement(Vector vector) { >+ if (vector == null || vector.isEmpty()) >+ return null; >+ >+ Object obj = vector.firstElement(); >+ if (!(obj instanceof String)) >+ return null; >+ >+ return (String) obj; >+ } >+ >+ /* >+ * Sets the mustUnderstand value. Any non-empty string (except "0") >+ * translates to a mustUnderstand value of true. >+ */ >+ private void setMustUnderstand(String param) { >+ mustUnderstand = (param != null && !param.equals("0")); >+ } >+ >+ /* >+ * Sets the actor value. Also sets the flag for validActor. >+ */ >+ private void setActor(String param) { >+ if (param == null || param.length() == 0) >+ actor = ""; >+ else { >+ actor = param; >+ try { >+ new URI(actor); >+ } >+ catch (URISyntaxException e) { >+ validActor = false; >+ return; >+ } >+ } >+ >+ validActor = true; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#processParameterValues(org.eclipse.wst.ws.internal.explorer.platform.util.MultipartFormDataParser) >+ */ >+ public boolean processParameterValues(MultipartFormDataParser parser) throws MultipartFormDataException { >+ >+ setMustUnderstand(parser.getParameter(getMustUnderstandID())); >+ setActor(parser.getParameter(getActorID())); >+ >+ // mustUnderstand is either set or unset, no further validation necessary >+ // only need to validate actor URI >+ return super.processParameterValues(parser) && validateActor(); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#setParameterValues(java.lang.String, java.lang.String[]) >+ */ >+ public void setParameterValues(String paramKey, String[] params) { >+ if (getMustUnderstandID().equals(paramKey)) >+ setMustUnderstand(getFirstElement(params)); >+ else if (getActorID().equals(paramKey)) >+ setActor(getFirstElement(params)); >+ else >+ super.setParameterValues(paramKey, params); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#setParameterValues(java.lang.String, java.util.Vector) >+ */ >+ public void setParameterValues(String paramKey, Vector params) { >+ if (getMustUnderstandID().equals(paramKey)) >+ setMustUnderstand(getFirstElement(params)); >+ else if (getActorID().equals(paramKey)) >+ setActor(getFirstElement(params)); >+ else >+ super.setParameterValues(paramKey, params); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#getParameterValues(java.lang.String) >+ */ >+ public String[] getParameterValues(String paramKey) { >+ if (getMustUnderstandID().equals(paramKey)) >+ return new String[] { mustUnderstand ? "1" : "0" }; >+ else if (getActorID().equals(paramKey)) >+ return new String[] { actor }; >+ else >+ return super.getParameterValues(paramKey); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#getParameterValue(java.lang.String, int) >+ */ >+ public String getParameterValue(String paramKey, int paramIndex) { >+ return getParameterValues(paramKey)[paramIndex]; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#validateAllParameterValues() >+ */ >+ public boolean validateAllParameterValues() { >+ return super.validateAllParameterValues() && validateActor(); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#validateParameterValues(java.lang.String) >+ */ >+ public boolean validateParameterValues(String paramKey) { >+ if (getMustUnderstandID().equals(paramKey)) >+ return true; >+ else if (getActorID().equals(paramKey)) >+ return validateActor(); >+ else >+ return super.validateParameterValues(paramKey); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#validateParameterValue(java.lang.String, int) >+ */ >+ public boolean validateParameterValue(String paramKey, int paramIndex) { >+ if (getMustUnderstandID().equals(paramKey)) >+ return true; >+ else if (getActorID().equals(paramKey)) >+ return validateActor(); >+ else >+ return super.validateParameterValue(paramKey, paramIndex); >+ } >+ >+ /** >+ * Sets the values for this SOAP header given a hashtable of instance documents and a namespace table. >+ * >+ * @param instanceDocuments The hashtable of instance documents. The key is the document's name with namespace prefix. >+ * @param namespaceTable The namespace table. >+ * >+ * @return True if all values extracted from the instance document are valid. >+ */ >+ public boolean setParameterValuesFromInstanceDocuments(Hashtable instanceDocuments, Hashtable namespaceTable) { >+ String tagName = ((XSDFragment) getXSDDelegationFragment()).getInstanceDocumentTagName(namespaceTable); >+ Element instanceDocument = (Element) instanceDocuments.get(tagName); >+ >+ if (instanceDocument == null) >+ return false; >+ >+ boolean valid = setParameterValuesFromInstanceDocuments(new Element[] { instanceDocument }); >+ >+ String prefix = getPrefixFromNamespaceURI(FragmentConstants.NS_URI_SOAP_ENV, namespaceTable) + FragmentConstants.COLON; >+ >+ String mustUnderstandValue = instanceDocument.getAttribute(prefix + MUST_UNDERSTAND); >+ if ("".equals(mustUnderstandValue)) >+ mustUnderstand = false; >+ else if ("0".equals(mustUnderstandValue) || "1".equals(mustUnderstandValue)) >+ setMustUnderstand(mustUnderstandValue); >+ else >+ valid = false; >+ >+ setActor(instanceDocument.getAttribute(prefix + ACTOR)); >+ >+ return valid && validateActor(); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#genInstanceDocumentsFromParameterValues(boolean, java.util.Hashtable, org.w3c.dom.Document) >+ */ >+ public Element[] genInstanceDocumentsFromParameterValues(boolean genXSIType, Hashtable namespaceTable, Document doc) { >+ Element[] elements = super.genInstanceDocumentsFromParameterValues(genXSIType, namespaceTable, doc); >+ >+ if (elements.length == 0) >+ return elements; >+ >+ String prefix = getPrefixFromNamespaceURI(FragmentConstants.NS_URI_SOAP_ENV, namespaceTable) + FragmentConstants.COLON; >+ >+ for (int i = 0; i < elements.length; i++) { >+ >+ if (mustUnderstand) >+ elements[i].setAttribute(prefix + MUST_UNDERSTAND, "1"); >+ >+ if (actor.length() > 0) >+ elements[i].setAttribute(prefix + ACTOR, actor); >+ } >+ >+ return elements; >+ } >+ >+ /** >+ * Convenience method for getting for the mustUnderstand value >+ * @return The mustUnderstand value, true if mustUnderstand="1", false otherwise. >+ */ >+ public boolean isMustUnderstand() { >+ return mustUnderstand; >+ } >+ >+ /** >+ * Convenience method for getting the actor value >+ * @return The actor value >+ */ >+ public String getActor() { >+ return actor; >+ } >+ >+ /** >+ * Determines if the actor value is a valid URI. >+ * @return True if the actor value is valid, false otherwise. >+ */ >+ public boolean validateActor() { >+ return validActor; >+ } >+ >+ /** >+ * Returns the ID of the mustUnderstand input element >+ * @return The ID of the mustUnderstand input element >+ */ >+ public String getMustUnderstandID() { >+ return getID() + FragmentConstants.ID_SEPERATOR + MUST_UNDERSTAND; >+ } >+ >+ /** >+ * Returns the ID of the actor input element >+ * @return The ID of the actor input element >+ */ >+ public String getActorID() { >+ return getID() + FragmentConstants.ID_SEPERATOR + ACTOR; >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.XSDDelegationFragment#getWriteFragment() >+ */ >+ public String getWriteFragment() { >+ return "/wsdl/fragment/SOAPHeaderWrapperWFragmentJSP.jsp"; >+ } >+} >Index: wsexplorer/wsdl/fragment/SOAPHeaderWrapperWFragmentJSP.jsp >=================================================================== >RCS file: wsexplorer/wsdl/fragment/SOAPHeaderWrapperWFragmentJSP.jsp >diff -N wsexplorer/wsdl/fragment/SOAPHeaderWrapperWFragmentJSP.jsp >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ wsexplorer/wsdl/fragment/SOAPHeaderWrapperWFragmentJSP.jsp 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,86 @@ >+<% >+/******************************************************************************* >+ * Copyright (c) 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 >+ * -------- -------- ----------------------------------------------------------- >+ * 20070305 117034 makandre@ca.ibm.com - Andrew Mak, Web Services Explorer should support SOAP Headers >+ *******************************************************************************/ >+%> >+<%@ 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.fragment.*, >+ org.eclipse.wst.ws.internal.explorer.platform.wsdl.fragment.impl.SOAPHeaderWrapperFragment, >+ org.eclipse.wst.ws.internal.explorer.platform.perspective.*, >+ org.eclipse.wst.ws.internal.explorer.platform.util.*" %> >+ >+<jsp:useBean id="controller" class="org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller" scope="session"/> >+<jsp:useBean id="fragID" class="java.lang.StringBuffer" scope="request"/> >+<jsp:useBean id="nodeID" class="java.lang.StringBuffer" scope="request"/> >+ >+<% >+WSDLPerspective wsdlPerspective = controller.getWSDLPerspective(); >+Node selectedNode = wsdlPerspective.getNodeManager().getNode(Integer.parseInt(nodeID.toString())); >+WSDLOperationElement operElement = (WSDLOperationElement)selectedNode.getTreeElement(); >+SOAPHeaderWrapperFragment wrapperFragment = (SOAPHeaderWrapperFragment)operElement.getFragmentByID(fragID.toString()); >+IXSDFragment delegationFragment = wrapperFragment.getXSDDelegationFragment(); >+fragID.delete(0, fragID.length()); >+fragID.append(delegationFragment.getID()); >+ >+String mustUnderstandID = wrapperFragment.getMustUnderstandID(); >+String actorID = wrapperFragment.getActorID(); >+ >+String fieldsetClass = BrowserDetect.isMicrosoftInternetExplorer(request) ? "" : "headerfieldset"; >+%> >+<table cellpadding="0" cellspacing="0" class="fixfragtable"> >+ <tr> >+ <td> >+ <fieldset class="<%=fieldsetClass%>"> >+ <jsp:include page="<%=delegationFragment.getWriteFragment()%>" flush="true"/> >+ <table cellpadding="3" cellspacing="0" class="fixfragtable"> >+ <tr> >+ <td height="3"><!-- spacer --></td> >+ </tr> >+ <tr> >+ <td> >+ <% if (wrapperFragment.isMustUnderstand()) { %> >+ <input type="checkbox" id="<%=mustUnderstandID%>" name="<%=mustUnderstandID%>" checked/> >+ <% } else { %> >+ <input type="checkbox" id="<%=mustUnderstandID%>" name="<%=mustUnderstandID%>"/> >+ <% } %> >+ </td> >+ <td class="label"> >+ <label for="<%=mustUnderstandID%>"><%=wsdlPerspective.getMessage("FORM_LABEL_MUSTUNDERSTAND")%></label> >+ </td> >+ <td>|</td> >+ <td class="label"> >+ <label for="<%=actorID%>"><%=wsdlPerspective.getMessage("FORM_LABEL_ACTOR")%></label> >+ </td> >+ <td> >+ <div style="width: 5px"> >+ <% if (!wrapperFragment.validateActor()) { %> >+ <%=HTMLUtils.redAsterisk()%> >+ <% } %> >+ </div> >+ </td> >+ <td width="100%"> >+ <input type="text" id="<%=actorID%>" name="<%=actorID%>" value="<%=wrapperFragment.getActor()%>" class="tabletextenter"/> >+ </td> >+ </tr> >+ <tr> >+ <td height="3"><!-- spacer --></td> >+ </tr> >+ </table> >+ </fieldset> >+ </td> >+ </tr> >+ <tr> >+ <td height="5"><!-- spacer --></td> >+ </tr> >+</table>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 117034
:
60271
|
60272
|
60273
| 62169