Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * (c) Copyright IBM Corp 2001, 2005 
  */
 
 package com.ibm.wsdl.extensions.http;
 
 import java.io.*;
 import org.w3c.dom.*;
 import javax.wsdl.*;

Author(s):
Matthew J. Duftler (duftler@us.ibm.com)
public class HTTPUrlEncodedSerializer implements ExtensionSerializer,
                                                 ExtensionDeserializer,
                                                 Serializable
  public static final long serialVersionUID = 1;
  public void marshall(Class parentType,
                       QName elementType,
                       ExtensibilityElement extension,
                       PrintWriter pw,
                       Definition def,
                       ExtensionRegistry extReg)
                         throws WSDLException
  {
    HTTPUrlEncoded httpUrlEncoded = (HTTPUrlEncoded)extension;
    if (httpUrlEncoded != null)
    {
      String tagName =
                                   "urlEncoded",
                                   def);
      pw.print("        <" + tagName);
      Boolean required = httpUrlEncoded.getRequired();
      if (required != null)
      {
                                         required.toString(),
                                         def,
                                         pw);
      }
      pw.println("/>");
    }
  }
  public ExtensibilityElement unmarshall(Class parentType,
                                         QName elementType,
                                         Element el,
                                         Definition def,
                                         ExtensionRegistry extReg)
                                           throws WSDLException
	{
    HTTPUrlEncoded httpUrlEncoded =
      (HTTPUrlEncoded)extReg.createExtension(parentTypeelementType);
    String requiredStr = DOMUtils.getAttributeNS(el,
                                                 .,
                                                 .);
    if (requiredStr != null)
    {
      httpUrlEncoded.setRequired(new Boolean(requiredStr));
    }
    return httpUrlEncoded;
	}
New to GrepCode? Check out our FAQ X