Skip to main content
summaryrefslogtreecommitdiffstats
blob: ba851901091d1bbdfdad457d04c4921cd27e0dad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*******************************************************************************
 * Copyright (c) 2004 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
 *******************************************************************************/

package org.eclipse.jst.ws.util;

/**
 * @author gilberta
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class SoapElementHelper {
/*
 * This class is being gutted for the moment,
 * until a means for including saaj.jar or an
 * equivalent keeper of the javax.xml.soap package
 * can be determined. The disabling of this class
 * will only cause problems if Sample JSPs are
 * generated for Web Service proxies that have
 * SOAPElements on their interfaces.
 * 
  public static javax.xml.soap.SOAPElement createSOAPElementFromXMLString(String xmlString) throws SoapElementRuntimeException
  {
    throw new SoapElementRuntimeException("SoapElement is not supported by the sample on the current runtime. Please use WebSphere v5.1 or higher.");    
  }

  public static java.lang.String soapElementWriter(javax.xml.soap.SOAPElement node,java.lang.StringBuffer buffer)
  {
    if (node == null ) {
      return "";
    }
    
      buffer.append(JspUtils.markup("<" + node.getElementName().getLocalName()));
      java.util.Iterator attrs = node.getAllAttributes();
      while(attrs.hasNext()) {
        javax.xml.soap.Name attr = (javax.xml.soap.Name)attrs.next();
        buffer.append(" " + attr.getQualifiedName() + "=\"" + JspUtils.markup(node.getAttributeValue(attr)) + "\"");
      }
      buffer.append(JspUtils.markup(">"));
      java.util.Iterator children = node.getChildElements();
      if ( children != null ) {
        while(children.hasNext()){
          javax.xml.soap.Node childNode = (javax.xml.soap.Node)children.next();
          if(childNode instanceof javax.xml.soap.SOAPElement){
            buffer.append("<br>");
            soapElementWriter((javax.xml.soap.SOAPElement)childNode,buffer);
          }
          else
            buffer.append(JspUtils.markup(((javax.xml.soap.Text)childNode).getValue())); 
        }
        buffer.append(JspUtils.markup("</" + node.getElementName().getLocalName() + ">"));
	  }
      return buffer.toString();
	}
*/
}

Back to the top