All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.wsdl.extensions.schema.SchemaSerializer Maven / Gradle / Ivy

Go to download

Open and Free WSDL library: Web Services Description Language. Libre-wsdl4j is a fork of WSDL4J 1.6.3. WSL4j is a Java stub generator for WSDL. Many software projects still depends on WSL4j, so the idea is that libre-wsdl4j should be an actively maintained version of this software on GitHub. "WSDL, that's an anchronym i haven't heard in almost ten years." Still big in the enterprise world" - comments on the Internet.

The newest version!
/*
 * (c) Copyright IBM Corp 2004, 2006 
 */

package com.ibm.wsdl.extensions.schema;

import java.io.PrintWriter;
import java.io.Serializable;

import javax.wsdl.Definition;
import javax.wsdl.WSDLException;
import javax.wsdl.extensions.ExtensibilityElement;
import javax.wsdl.extensions.ExtensionRegistry;
import javax.wsdl.extensions.ExtensionSerializer;
import javax.wsdl.extensions.schema.Schema;
import javax.xml.namespace.QName;

import com.ibm.wsdl.util.xml.DOM2Writer;

/**
 * This class is used to serialize Schema instances
 * into the PrintWriter.
 *
 * @see SchemaImpl
 * @see SchemaDeserializer
 *
 * @author Jeremy Hughes 
 */
public class SchemaSerializer implements ExtensionSerializer, Serializable
{
  public static final long serialVersionUID = 1;

  public void marshall(Class parentType,
                       QName elementType,
                       ExtensibilityElement extension,
                       PrintWriter pw,
                       Definition def,
                       ExtensionRegistry extReg)
                         throws WSDLException
  {
    Schema schema = (Schema)extension;

    pw.print("    ");

    DOM2Writer.serializeAsXML(schema.getElement(), def.getNamespaces(), pw);

    pw.println();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy