Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

samples.integrationGuide.example1
Class MyListPortsWriter  view MyListPortsWriter download MyListPortsWriter.java

java.lang.Object
  extended byorg.apache.axis.wsdl.toJava.JavaWriter
      extended bysamples.integrationGuide.example1.MyListPortsWriter
All Implemented Interfaces:
org.apache.axis.wsdl.gen.Generator

public class MyListPortsWriter
extends org.apache.axis.wsdl.toJava.JavaWriter

This is my example of a class that writes a list of a service's ports to a file named Lst.lst. Note: because of a name clash problem, I add the suffix "Lst". I hope to remove this in a future version of this example. Details of the JavaWriter bug: JavaWriter looks to make sure a class doesn't already exist before creating a file, but not all files that we generate are .class files! This works with deploy.wsdd and undeploy.wsdd because these files just happen to begin with lowercase letters, where Java classes begin with uppercase letters. But this example shows the problem quite well. I would LIKE to call the file .lst, but JavaWriter sees that we already have a class called and won't let me proceed.


Field Summary
private  java.lang.String fileName
           
private  Service service
           
 
Fields inherited from class org.apache.axis.wsdl.toJava.JavaWriter
emitter, LINE_LENGTH, type
 
Constructor Summary
MyListPortsWriter(org.apache.axis.wsdl.toJava.Emitter emitter, org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry, org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
          Constructor.
 
Method Summary
protected  java.lang.String getFileName()
          This method must be implemented by a subclass.
protected  void writeFileBody(java.io.PrintWriter pw)
          Write the service list file.
protected  void writeFileHeader(java.io.PrintWriter pw)
          Override the common JavaWriter header to a no-op.
 
Methods inherited from class org.apache.axis.wsdl.toJava.JavaWriter
closePrintWriter, generate, getJavadocDescriptionPart, getPrintWriter, isFileGenerated, registerFile, verboseMessage, writeComment, writeComment, writeFileFooter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

service

private Service service

fileName

private java.lang.String fileName
Constructor Detail

MyListPortsWriter

public MyListPortsWriter(org.apache.axis.wsdl.toJava.Emitter emitter,
                         org.apache.axis.wsdl.symbolTable.ServiceEntry sEntry,
                         org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Constructor.

Method Detail

getFileName

protected java.lang.String getFileName()
Description copied from class: org.apache.axis.wsdl.toJava.JavaWriter
This method must be implemented by a subclass. It returns the fully-qualified name of the file to be generated.


writeFileHeader

protected void writeFileHeader(java.io.PrintWriter pw)
                        throws java.io.IOException
Override the common JavaWriter header to a no-op.


writeFileBody

protected void writeFileBody(java.io.PrintWriter pw)
                      throws java.io.IOException
Write the service list file.