FileDocCategorySizeDatePackage
JavaServiceWriter.javaAPI DocApache Axis 1.43571Sat Apr 22 18:57:28 BST 2006org.apache.axis.wsdl.toJava

JavaServiceWriter

public class JavaServiceWriter extends Object implements org.apache.axis.wsdl.gen.Generator
This is Wsdl2java's Service Writer. It writes the following files, as appropriate: .java, TestCase.java.

Fields Summary
protected org.apache.axis.wsdl.gen.Generator
serviceIfaceWriter
Field serviceIfaceWriter
protected org.apache.axis.wsdl.gen.Generator
serviceImplWriter
Field serviceImplWriter
protected org.apache.axis.wsdl.gen.Generator
testCaseWriter
Field testCaseWriter
public static final String
PORT_NAME
Field PORT_NAME
protected Emitter
emitter
Field emitter
protected javax.wsdl.Service
service
Field WSDL service
protected org.apache.axis.wsdl.symbolTable.SymbolTable
symbolTable
Field symbolTable
Constructors Summary
public JavaServiceWriter(Emitter emitter, javax.wsdl.Service service, org.apache.axis.wsdl.symbolTable.SymbolTable symbolTable)
Constructor.

param
emitter
param
service
param
symbolTable


                            
        
                               
        this.emitter = emitter;
        this.service = service;
        this.symbolTable = symbolTable;
    
Methods Summary
public voidgenerate()
Write all the service bindnigs: service and testcase.

throws
IOException

        setGenerators();
        postSetGenerators();

        if (serviceIfaceWriter != null) {
            serviceIfaceWriter.generate();
        }

        if (serviceImplWriter != null) {
            serviceImplWriter.generate();
        }

        if (testCaseWriter != null) {
            testCaseWriter.generate();
        }
    
protected voidpostSetGenerators()
Set the writer based on the other condition after generate() is called.

	
        if (emitter.isDeploy()) {
            serviceIfaceWriter = null;
            serviceImplWriter = null;
        }
    
protected voidsetGenerators()
setGenerators Logic to set the generators that are based on the Service. This logic was moved from the constructor so extended interfaces can more effectively use the hooks.

        ServiceEntry sEntry = symbolTable.getServiceEntry(service.getQName());

        if (sEntry.isReferenced()) {
            serviceIfaceWriter = new JavaServiceIfaceWriter(emitter, sEntry,
                    symbolTable);
            serviceImplWriter = new JavaServiceImplWriter(emitter, sEntry,
                    symbolTable);

            if (emitter.isTestCaseWanted()) {
                testCaseWriter = new JavaTestCaseWriter(emitter, sEntry,
                        symbolTable);
            }
        }