You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2008/08/13 18:54:12 UTC

svn commit: r685607 - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws: ./ c/ cpp/ info/

Author: nadiramra
Date: Wed Aug 13 09:54:10 2008
New Revision: 685607

URL: http://svn.apache.org/viewvc?rev=685607&view=rev
Log:
Refactor, simplify, add comments.

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SourceWriterFactory.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorFactory.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorImpl.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WrapperConstants.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WsddWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/CFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/HeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/CPPClassWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClassLoader.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/HeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ServiceInfo.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WebServiceContext.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WrapperInfo.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SourceWriterFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SourceWriterFactory.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SourceWriterFactory.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/SourceWriterFactory.java Wed Aug 13 09:54:10 2008
@@ -47,7 +47,7 @@
                 return new org.apache.axis.wsdl.wsdl2ws.c.AllParamWriter(wscontext);
         }
         
-        if ("rpc".equals(wscontext.getWrapInfo().getWrapperStyle()))
+        if ("rpc".equals(wscontext.getWrapperInfo().getBindingStyle()))
         {
             switch (generatorType)
             {
@@ -77,7 +77,7 @@
                     return new org.apache.axis.wsdl.wsdl2ws.c.ClientStubWriter(wscontext);
             }
         }
-        else if ("document".equals(wscontext.getWrapInfo().getWrapperStyle()))
+        else if ("document".equals(wscontext.getWrapperInfo().getBindingStyle()))
         {
             switch (generatorType)
             {

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java Wed Aug 13 09:54:10 2008
@@ -34,13 +34,13 @@
 import javax.wsdl.Part;
 import javax.wsdl.Port;
 import javax.wsdl.PortType;
+import javax.wsdl.Service;
 import javax.xml.namespace.QName;
 import javax.xml.rpc.holders.IntHolder;
 
 // hold off until we use 1.4 or newer axis.jar.
 //import org.apache.axis.constants.Style;
 
-import org.apache.axis.wsdl.gen.Parser;
 import org.apache.axis.wsdl.symbolTable.BaseType;
 import org.apache.axis.wsdl.symbolTable.BindingEntry;
 import org.apache.axis.wsdl.symbolTable.CElementDecl;
@@ -52,8 +52,6 @@
 import org.apache.axis.wsdl.symbolTable.DefinedType;
 import org.apache.axis.wsdl.symbolTable.Element;
 import org.apache.axis.wsdl.symbolTable.Parameters;
-import org.apache.axis.wsdl.symbolTable.ServiceEntry;
-import org.apache.axis.wsdl.symbolTable.SymTabEntry;
 import org.apache.axis.wsdl.symbolTable.SymbolTable;
 import org.apache.axis.wsdl.symbolTable.TypeEntry;
 import org.apache.axis.wsdl.wsdl2ws.info.FaultInfo;
@@ -62,6 +60,7 @@
 import org.apache.axis.wsdl.wsdl2ws.info.ServiceInfo;
 import org.apache.axis.wsdl.wsdl2ws.info.Type;
 import org.apache.axis.wsdl.wsdl2ws.info.TypeMap;
+import org.apache.axis.wsdl.wsdl2ws.info.WSDLInfo;
 import org.apache.axis.wsdl.wsdl2ws.info.WebServiceContext;
 import org.apache.axis.wsdl.wsdl2ws.info.WrapperInfo;
 import org.w3c.dom.Node;
@@ -83,29 +82,24 @@
 {
     public static boolean c_verbose = false;
 
-    private String c_language;
+    private String  c_language;
     private boolean c_wsdlWrappingStyle;
     private boolean c_userRequestedWSDLWrappingStyle = false;
-    private String c_targetoutputLocation = null;
-    private String c_targetEngine = null;
+    private String  c_targetoutputLocation = null;
+    private String  c_targetEngine = null;
+    
     private String c_targetEndpointURI = null;
-    private String c_transportURI = null;
-
-    private String c_serviceName;
-    private String c_serviceStyle = null;
     
-    private ServiceEntry c_serviceEntry;
     private BindingEntry c_bindingEntry;
-    private PortType     c_portType;
-    
-    // Array of MethodInfo objects representing service operations.
-    private ArrayList c_methods;
     
     // WSDL parser symbol table
     private SymbolTable c_symbolTable;
     
     // The types
     private TypeMap c_typeMap;
+    
+    // WSDL info.
+    private WSDLInfo c_wsdlInfo;
 
     public WSDL2Ws(CLArgParser cmdLineArgs) throws WrapperFault
     {
@@ -151,53 +145,34 @@
             // Parse the WSDL file
             // ==================================================
             
-            Parser wsdlParser = new Parser();
+            c_wsdlInfo = new WSDLInfo(cmdLineArgs.getArgument(0));
+            c_wsdlInfo.setVerbose(c_verbose);
+            c_wsdlInfo.setTimeout(cmdLineArgs.getOptionBykey("t")); 
+            c_wsdlInfo.setNoWrapperStyle(c_wsdlWrappingStyle == false);
+
+            c_symbolTable = c_wsdlInfo.parse();
             
-            // Set verbose in WSDL parser
-            wsdlParser.setVerbose(c_verbose);
+            // ==================================================
+            // Let us do some validation on the WSDL passed in.
+            // ==================================================
             
-            // Set timeout - if not set, we set to zero (i.e. no timeout).
-            // The setTimeout method expects the time in milliseconds.
-            String timeout = cmdLineArgs.getOptionBykey("t"); 
-            if (timeout == null)
-                timeout = "0"; 
-            wsdlParser.setTimeout(Long.parseLong(timeout) * 1000); 
-            
-            // Set unwrapped if requested
-            wsdlParser.setNowrap(c_wsdlWrappingStyle == false);
-
-            // Parse the WSDL document.
-            String wsdlfile = cmdLineArgs.getArgument(0);
-            wsdlParser.run(wsdlfile);
+            // Maximum of one <service> tag is supported in WSDL for the time being.
+            if (c_wsdlInfo.getServices().size() > 1)
+                throw new WrapperFault("Multiple service definitions not supported.");
+            
+            // TODO
+            // At this time we require a service definition to be defined, but in 
+            // future if not found that caller needs to specify a binding to use in 
+            // order for us to generate the stubs.  Not having service definition will
+            // only result in not knowing the Web service endpoint, so it is really not necessary.
+            if (c_wsdlInfo.getServices().size() == 0)
+                throw new WrapperFault("Service definition not found. A service definition must be specified.");
 
-            // Get the symbol table
-            c_symbolTable = wsdlParser.getSymbolTable();
-            if (c_verbose)
-                c_symbolTable.dump(System.out);
-            
             // ==================================================
             // Get service definition
             // ==================================================            
                         
-            // This code is taken from the org.apache.axis.wsdl.gen.Parser Class.
-            // WSDL file should have only one service, The first service found is utilized.
-            // TODO Service definition is WSDL is optional...
-            c_serviceEntry = null;
-            Iterator it = c_symbolTable.getHashMap().values().iterator();
-            while (it.hasNext())
-            {
-                Vector v = (Vector) it.next();
-                for (int i = 0; i < v.size(); ++i)
-                {
-                    SymTabEntry entry = (SymTabEntry) v.elementAt(i);
-
-                    if (entry instanceof ServiceEntry)
-                        c_serviceEntry = (ServiceEntry) entry;
-                }
-            }
-            
-            if (c_serviceEntry == null)
-                throw new WrapperFault("A service definition does not exist");
+            Service service = (Service)c_wsdlInfo.getServices().get(0);
 
             // ==================================================
             // Get binding information 
@@ -206,7 +181,7 @@
             //TODO  resolve this
             //        this code support only the service with one bindings it will not care about the
             //        second binding if exists..resolve by letting user specify which binding to use.
-            Iterator ports = c_serviceEntry.getService().getPorts().values().iterator();
+            Iterator ports = service.getPorts().values().iterator();
             Binding binding = null;
             if (ports.hasNext())
                 binding = ((Port) ports.next()).getBinding();
@@ -215,29 +190,12 @@
                 throw new WrapperFault("No binding specified");
             
             c_bindingEntry = c_symbolTable.getBindingEntry(binding.getQName());
-            
-            //the service style (rpc|doc|msg)
-            c_serviceStyle = c_bindingEntry.getBindingStyle().getName();
-            
-            //extract the transport type as a uri
-            c_transportURI = SymbolTableParsingUtils.getTransportType(c_bindingEntry.getBinding());    
-            
-            // ==================================================
-            // Get port type information associated with binding 
-            // ==================================================
-            
-            c_portType = binding.getPortType();
-            if (c_portType == null)
-                throw new WrapperFault("Port type entry not found");
-            
-            // Service name will be the portType name.
-            c_serviceName = WrapperUtils.getClassNameFromFullyQualifiedName(c_portType.getQName().getLocalPart());
-
+                        
             // ==================================================
             // Get target end point 
             // ==================================================                
             
-            ports = c_serviceEntry.getService().getPorts().values().iterator();
+            ports = service.getPorts().values().iterator();
             c_targetEndpointURI = SymbolTableParsingUtils.getTargetEndPointURI(ports);
         }
         catch (Exception e)
@@ -251,9 +209,9 @@
      * Process service operations
      */
 
-    private void processServiceMethods(PortType porttype) throws WrapperFault
+    private ArrayList processServiceMethods(PortType porttype, BindingEntry bindingEntry) throws WrapperFault
     {
-        c_methods = new ArrayList();
+        ArrayList serviceMethods = new ArrayList();
         
         //get operation list
         Iterator oplist = porttype.getOperations().iterator();
@@ -273,7 +231,7 @@
             Parameters opParams=null;
             try
             {
-                opParams = c_symbolTable.getOperationParameters(op, "", c_bindingEntry);
+                opParams = c_symbolTable.getOperationParameters(op, "", bindingEntry);
                 minfo.setOperationParameters(opParams);
                 minfo.setEligibleForWrapped(c_symbolTable.isWrapped());
                 
@@ -302,7 +260,7 @@
             addFaultInfo(op.getFaults(), minfo);
             
             //add each parameter to parameter list
-            if ("document".equals(c_bindingEntry.getBindingStyle().getName()))
+            if ("document".equals(bindingEntry.getBindingStyle().getName()))
             {
                 if (c_userRequestedWSDLWrappingStyle && !minfo.isEligibleForWrapped())
                     System.out.println("INFORMATIONAL: Operation '" + op.getName() + "' is not eligible for wrapper-style, using non-wrapper style.");
@@ -315,42 +273,44 @@
             if (op.getOutput() != null)
             {
                 Iterator returnlist = op.getOutput().getMessage().getParts().values().iterator();
-                if (returnlist.hasNext() && "document".equals(c_bindingEntry.getBindingStyle().getName()))
+                if (returnlist.hasNext() && "document".equals(bindingEntry.getBindingStyle().getName()))
                     addDocumentStyleOutputMessageToMethodInfo(minfo, (Part) returnlist.next());
                 else
                     addRPCStyleOutputMessageToMethodInfo(op, minfo);
             }
             
             //add operation to operation List
-            c_methods.add(minfo); 
+            serviceMethods.add(minfo); 
         }
         
-        List operations = c_bindingEntry.getBinding().getBindingOperations();
-        if (operations == null)
-            return;
-        
-        for (int i = 0; i < operations.size(); i++)
+        List operations = bindingEntry.getBinding().getBindingOperations();
+        if (operations != null)
         {
-            //for the each binding operation found
-            if (operations.get(i) instanceof javax.wsdl.BindingOperation)
+            for (int i = 0; i < operations.size(); i++)
             {
-                javax.wsdl.BindingOperation bindinop = (javax.wsdl.BindingOperation) operations.get(i);
-                
-                String name = bindinop.getName();
-                MethodInfo method = null;
-                
-                for (int ii = 0; ii < c_methods.size(); ii++)
-                    if (((MethodInfo) c_methods.get(ii)).getMethodname().equals(name))
-                        method = (MethodInfo) c_methods.get(ii);
-                
-                if (method == null)
-                    throw new WrapperFault("binding and the port type do not match");                    
-                
-                method.setSoapAction(SymbolTableParsingUtils.getSoapAction(bindinop));
-                SymbolTableParsingUtils.getInputInfo(bindinop.getBindingInput(), method);
-                SymbolTableParsingUtils.getOutputInfo(bindinop.getBindingOutput(), method);
+                //for the each binding operation found
+                if (operations.get(i) instanceof javax.wsdl.BindingOperation)
+                {
+                    javax.wsdl.BindingOperation bindinop = (javax.wsdl.BindingOperation) operations.get(i);
+                    
+                    String name = bindinop.getName();
+                    MethodInfo method = null;
+                    
+                    for (int ii = 0; ii < serviceMethods.size(); ii++)
+                        if (((MethodInfo) serviceMethods.get(ii)).getMethodname().equals(name))
+                            method = (MethodInfo) serviceMethods.get(ii);
+                    
+                    if (method == null)
+                        throw new WrapperFault("binding and the port type do not match");                    
+                    
+                    method.setSoapAction(SymbolTableParsingUtils.getSoapAction(bindinop));
+                    SymbolTableParsingUtils.getInputInfo(bindinop.getBindingInput(), method);
+                    SymbolTableParsingUtils.getOutputInfo(bindinop.getBindingOutput(), method);
+                }
             }
         }
+        
+        return serviceMethods;
     }
 
     /**
@@ -712,22 +672,25 @@
         }
         
         // ==================================================
-        // Process information about service operations
-        // ==================================================            
-        
-        processServiceMethods(c_portType);
-
-        // ==================================================
         // Generate the artifacts
         // ==================================================            
         
         // Wrapper info
-        String targetNameSpaceOfWSDL= c_symbolTable.getDefinition().getTargetNamespace();
-        WrapperInfo wrapperInfo = new WrapperInfo(c_serviceStyle, c_language, c_targetoutputLocation, c_targetEngine,
-                                                  c_transportURI, c_targetEndpointURI, targetNameSpaceOfWSDL);
+        String c_serviceStyle = c_bindingEntry.getBindingStyle().getName();
+
+        WrapperInfo wrapperInfo = 
+            new WrapperInfo(c_serviceStyle, c_language, 
+                            c_targetoutputLocation, c_targetEngine,
+                            c_wsdlInfo.getTargetNameSpaceOfWSDL());
         
         // Service info
-        ServiceInfo serviceInfo = new ServiceInfo(c_serviceName, c_methods);
+        PortType portType = c_bindingEntry.getBinding().getPortType();
+        if (portType == null)
+            throw new WrapperFault("Port type entry not found");
+        
+        String serviceName = WrapperUtils.getClassNameFromFullyQualifiedName(portType.getQName().getLocalPart());
+        ArrayList serviceMethods = processServiceMethods(portType, c_bindingEntry);
+        ServiceInfo serviceInfo = new ServiceInfo(serviceName, serviceMethods, c_targetEndpointURI);
         
         // Context
         WebServiceContext wsContext = new WebServiceContext(wrapperInfo, serviceInfo, c_typeMap); 
@@ -1163,7 +1126,7 @@
                     // this is an "inner" type that will not be exposed
                     // however, it needs to be if it is referenced in a message part.
                     // check all the messages
-                    ArrayList methods = wsContext.getSerInfo().getMethods();
+                    ArrayList methods = wsContext.getServiceInfo().getMethods();
                     for(int i=0; i<methods.size(); i++)
                     {
                           MethodInfo method = (MethodInfo)methods.get(i);

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorFactory.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorFactory.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorFactory.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorFactory.java Wed Aug 13 09:54:10 2008
@@ -27,9 +27,9 @@
 {
     public static WebServiceGenerator createWebServiceGenerator(WebServiceContext wscontext)
     {
-        if (wscontext.getWrapInfo().getWrapperStyle() == WrapperConstants.STYLE_RPC)
+        if (wscontext.getWrapperInfo().getBindingStyle() == WrapperConstants.STYLE_RPC)
             return new WebServiceGeneratorImpl(wscontext);
-        else if (wscontext.getWrapInfo().getWrapperStyle() == WrapperConstants.STYLE_DOCUMENT)
+        else if (wscontext.getWrapperInfo().getBindingStyle() == WrapperConstants.STYLE_DOCUMENT)
             return new WebServiceGeneratorImpl(wscontext);
         else
             return null;

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorImpl.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorImpl.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WebServiceGeneratorImpl.java Wed Aug 13 09:54:10 2008
@@ -38,11 +38,11 @@
      */
     public void generate() throws WrapperFault
     {
-        String language = wscontext.getWrapInfo().getWrapperLanguage();
+        String language = wscontext.getWrapperInfo().getWrapperLanguage();
 
         if (WrapperConstants.LANGUAGE_CPP.equalsIgnoreCase(language))
         {
-            if (WrapperConstants.SERVER.equals(wscontext.getWrapInfo().getTargetEngine()))
+            if (WrapperConstants.SERVER.equals(wscontext.getWrapperInfo().getTargetEngine()))
             {
                 // Generate Server objects
                 (new Generator(WrapperConstants.GENERATOR_WRAPPER_CPP,wscontext)).generate();
@@ -66,7 +66,7 @@
         }
         else if (WrapperConstants.LANGUAGE_C.equalsIgnoreCase(language))
         {
-            if (WrapperConstants.SERVER.equals(wscontext.getWrapInfo().getTargetEngine()))
+            if (WrapperConstants.SERVER.equals(wscontext.getWrapperInfo().getTargetEngine()))
             {
                 // Generate Server objects
                 (new Generator(WrapperConstants.GENERATOR_WRAPPER_C,wscontext)).generate();

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WrapperConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WrapperConstants.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WrapperConstants.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WrapperConstants.java Wed Aug 13 09:54:10 2008
@@ -21,33 +21,16 @@
 package org.apache.axis.wsdl.wsdl2ws;
 
 public interface WrapperConstants {
-    public static final String DEFAULT_SIMPLETYPE_PACKAGE = "lk.opensource.axis2.wrappers.simpleType.";
     public static final String SCHEMA_NAMESPACE = "http://www.w3.org/2001/XMLSchema";
 	public static final String SOAPENC_NAMESPACE = "http://schemas.xmlsoap.org/soap/encoding/";
 	public static final String APACHE_XMLSOAP_NAMESPACE = "http://xml.apache.org/xml-soap";
-    //wsdl constants
-    public static final String ELEMENT_COMPLEX_TYPE = "ComplexType";
-    public static final String ELEMENT_SEQUENCE = "sequence";
-    public static final String ELEMENT_ALL ="all";
-    public static final String ELEMENT_ELEMENT ="element";
 
-    public static final String ATTRIBUTE_NAME = "name";
-    public static final String ATTRIBUTE_TYPE = "type";
-    //parameter type
-	public static final int INPUT_PARM = 0;
-	public static final int RETURN_PARM = 1;
-	public static final int COMMAN_PARM = 2;
 	//language
 	public static final String LANGUAGE_CPP = "c++";
 	public static final String LANGUAGE_C = "c";
 	//service style 
-    public static final String STYLE_RPC = "rpc";
-    public static final String STYLE_DOCUMENT= "document";
-    public static final String STYLE_WRAPPED = "wrapped";
-    public static final String STYLE_MESSAGE = "message";
-
-	
-	public static final String ENCODING_STYLE_SOAP = "http://schemas.xmlsoap.org/soap/encoding/";
+    public static final String STYLE_RPC      = "rpc";
+    public static final String STYLE_DOCUMENT = "document";
 	
 	public static final String TRANSPORT_HTTP = "http://schemas.xmlsoap.org/soap/http";
 	
@@ -76,7 +59,6 @@
 	//common constants
 	public static final int GENERATOR_DEPLOYMENT = 40;
 	public static final int GENERATOR_UNDEPLOYMENT = 41;
-	public static final int GENERATOR_BUILDSCRIPT = 42;
 	
 
     //target engine

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WsddWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WsddWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WsddWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WsddWriter.java Wed Aug 13 09:54:10 2008
@@ -43,10 +43,10 @@
     public WsddWriter(WebServiceContext wscontext) throws WrapperFault
     {
         this.wscontext = wscontext;
-        servicename = wscontext.getSerInfo().getServicename();
-        String language = wscontext.getWrapInfo().getWrapperLanguage();
+        servicename = wscontext.getServiceInfo().getServicename();
+        String language = wscontext.getWrapperInfo().getWrapperLanguage();
 
-        if ("rpc".equals(wscontext.getWrapInfo().getWrapperStyle()))
+        if ("rpc".equals(wscontext.getWrapperInfo().getBindingStyle()))
         {
             providerStyle = "RPC";
         }
@@ -64,7 +64,7 @@
             providerLang = "CPP";
         }
         description = "Axis C++ web service";
-        ArrayList methods = wscontext.getSerInfo().getMethods();
+        ArrayList methods = wscontext.getServiceInfo().getMethods();
         MethodInfo minfo;
         for (int i = 0; i < methods.size(); i++)
         {
@@ -80,7 +80,7 @@
         throws WrapperFault
     {
         String targetOutputLocation =
-            wscontext.getWrapInfo().getTargetOutputLocation();
+            wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
         {
             targetOutputLocation =

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java Wed Aug 13 09:54:10 2008
@@ -97,7 +97,7 @@
 
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 
@@ -108,7 +108,7 @@
         if (useServiceName)
         {
             fileName =  targetOutputLocation + "/"
-                    + this.wscontext.getSerInfo().getServicename()
+                    + this.wscontext.getServiceInfo().getServicename()
                     + "_" + classname + CUtils.C_HEADER_SUFFIX;
         }
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java Wed Aug 13 09:54:10 2008
@@ -220,7 +220,7 @@
      */
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 
@@ -231,7 +231,7 @@
         if (useServiceName)
         {
             fileName = targetOutputLocation + "/"
-                    + this.wscontext.getSerInfo().getServicename()
+                    + this.wscontext.getServiceInfo().getServicename()
                     + "_" + classname + CUtils.C_HEADER_SUFFIX;
         }
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java Wed Aug 13 09:54:10 2008
@@ -140,7 +140,7 @@
         // doc/literal objects
         //=============================================================================        
         
-        if (wscontext.getWrapInfo().getWrapperStyle().equals("rpc"))
+        if (wscontext.getWrapperInfo().getBindingStyle().equals("rpc"))
             writeRPCArrayPortionOfSerializeGlobalMethod();
         else
             writeDOCArrayPortionOfSerializeGlobalMethod();
@@ -198,7 +198,7 @@
             writer.write(", NULL);\n\t}\n");
         }               
         
-        if (wscontext.getWrapInfo().getWrapperStyle().equals("document"))
+        if (wscontext.getWrapperInfo().getBindingStyle().equals("document"))
             writer.write("\taxiscSoapSerializerSerialize(pSZ, \">\", 0);\n");
         
         //=============================================================================
@@ -365,7 +365,7 @@
         // End of attribute and element serialization
         //=============================================================================                
                 
-        if (wscontext.getWrapInfo().getWrapperStyle().equals("rpc"))
+        if (wscontext.getWrapperInfo().getBindingStyle().equals("rpc"))
         {
             writer.write("\n\taxiscSoapSerializerSerialize(pSZ, \"</\", Axis_TypeName_" + classname
                     + ", \">\", NULL);\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/CFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/CFileWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/CFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/CFileWriter.java Wed Aug 13 09:54:10 2008
@@ -91,7 +91,7 @@
      */
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 
@@ -100,7 +100,7 @@
 
         if (useServiceName)
         {
-            String serviceName = this.wscontext.getSerInfo().getServicename();
+            String serviceName = this.wscontext.getServiceInfo().getServicename();
             fileName = targetOutputLocation + "/" + serviceName + "_" + classname + CUtils.C_FILE_SUFFIX;
             this.wscontext.addGeneratedFile(serviceName + "_" + classname + CUtils.C_FILE_SUFFIX);
         }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubHeaderWriter.java Wed Aug 13 09:54:10 2008
@@ -46,9 +46,9 @@
     public ClientStubHeaderWriter(WebServiceContext wscontext)
         throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename());
+        super(wscontext.getServiceInfo().getServicename());
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
     }
     
     /* (non-Javadoc)

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java Wed Aug 13 09:54:10 2008
@@ -48,9 +48,9 @@
      */
     public ClientStubWriter(WebServiceContext wscontext) throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename());
+        super(wscontext.getServiceInfo().getServicename());
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
     }
 
     /* (non-Javadoc)
@@ -86,7 +86,7 @@
             writer.write("\t\treturn axiscStubCreate(pchEndPointUri, AXISC_APTHTTP1_1);\n");
             writer.write("\telse\n");
             writer.write("\t\treturn axiscStubCreate(\"" 
-                    + wscontext.getWrapInfo().getTargetEndpointURI() 
+                    + wscontext.getServiceInfo().getTargetEndpointURI() 
                     + "\", AXISC_APTHTTP1_1);\n");
             writer.write("}\n\n");
             
@@ -328,7 +328,7 @@
         writer.write("\taxiscCallSetSOAPVersion(call, SOAP_VER_1_1);\n");
         //TODO check which version is it really.
         writer.write("\taxiscCallSetOperation(call, \"" + minfo.getMethodname()
-                + "\", \"" + wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()
+                + "\", \"" + wscontext.getWrapperInfo().getTargetNameSpaceOfWSDL()
                 + "\");\n");
         writer.write ("\taxiscStubApplyUserPreferences(stub);\n");        
         
@@ -416,7 +416,7 @@
         writer.write("\n\tif( AXISC_SUCCESS == axiscCallSendAndReceive(call))\n\t{\n");
         writer.write("\t\tif( AXISC_SUCCESS == axiscCallCheckMessage(call, \""
                 + minfo.getOutputMessage().getLocalPart() + "\",\""
-                + wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()
+                + wscontext.getWrapperInfo().getTargetNameSpaceOfWSDL()
                 + "\"))\n\t\t{\n");
       
         String paramTagName = "";
@@ -659,7 +659,7 @@
     protected void writeFaultHandlingCode(MethodInfo minfo) throws WrapperFault, IOException
     {  
         writer.write ("\taxiscCallSetSoapFaultNamespace(call, \"" 
-                + wscontext.getWrapInfo ().getTargetEndpointURI () + "\");\n");
+                + wscontext.getServiceInfo().getTargetEndpointURI () + "\");\n");
         
         //to get fault info             
         Iterator paramsFault = minfo.getFaultType ().iterator ();

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/HeaderFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/HeaderFileWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/HeaderFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/HeaderFileWriter.java Wed Aug 13 09:54:10 2008
@@ -101,7 +101,7 @@
      */
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 
@@ -116,6 +116,6 @@
     }
     protected String getServiceName() throws WrapperFault
     {
-        return wscontext.getSerInfo().getServicename();
+        return wscontext.getServiceInfo().getServicename();
     }
 }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParamCFileWriter.java Wed Aug 13 09:54:10 2008
@@ -99,7 +99,7 @@
      */
     protected File getFilePath() throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java Wed Aug 13 09:54:10 2008
@@ -335,7 +335,7 @@
      */
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
         new File(targetOutputLocation).mkdirs();
@@ -345,7 +345,7 @@
         if (useServiceName)
         {
             fileName = targetOutputLocation + "/"
-                    + this.wscontext.getSerInfo().getServicename() + "_"
+                    + this.wscontext.getServiceInfo().getServicename() + "_"
                     + classname + CUtils.C_HEADER_SUFFIX;
         }
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamHeaderWriter.java Wed Aug 13 09:54:10 2008
@@ -102,7 +102,7 @@
 
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 
@@ -113,7 +113,7 @@
         if (useServiceName)
         {
             fileName =  targetOutputLocation + "/"
-                    + this.wscontext.getSerInfo().getServicename()
+                    + this.wscontext.getServiceInfo().getServicename()
                     + "_" + classname + CUtils.CPP_HEADER_SUFFIX;
         }
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ArrayParamWriter.java Wed Aug 13 09:54:10 2008
@@ -272,7 +272,7 @@
      */
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 
@@ -283,7 +283,7 @@
         if (useServiceName)
         {
             fileName = targetOutputLocation + "/"
-                    + this.wscontext.getSerInfo().getServicename()
+                    + this.wscontext.getServiceInfo().getServicename()
                     + "_" + classname + CUtils.CPP_HEADER_SUFFIX;
         }
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java Wed Aug 13 09:54:10 2008
@@ -354,7 +354,7 @@
         // doc/literal objects
         //=============================================================================        
         
-        if (wscontext.getWrapInfo().getWrapperStyle().equals("rpc"))
+        if (wscontext.getWrapperInfo().getBindingStyle().equals("rpc"))
             writeRPCArrayPortionOfSerializeGlobalMethod();
         else
             writeDOCArrayPortionOfSerializeGlobalMethod();
@@ -414,7 +414,7 @@
             writer.write(", NULL);\n\t}\n");
         }               
         
-        if (wscontext.getWrapInfo().getWrapperStyle().equals("document"))
+        if (wscontext.getWrapperInfo().getBindingStyle().equals("document"))
             writer.write("\tpSZ->serialize( \">\", 0);\n");
         
         //=============================================================================
@@ -580,7 +580,7 @@
         // End of attribute and element serialization
         //=============================================================================                
                 
-        if (wscontext.getWrapInfo().getWrapperStyle().equals("rpc"))
+        if (wscontext.getWrapperInfo().getBindingStyle().equals("rpc"))
         {
             writer.write("\n\tpSZ->serialize(\"</\", Axis_TypeName_" + classname
                     + ", \">\", NULL);\n");
@@ -1145,7 +1145,7 @@
                 if (attribs[i].isArray())
                 {    
                     writer.write("\tif (original." + attribs[i].getParamNameAsMember() + " != NULL)\n");
-                    writer.write("\t" + attribs[i].getParamNameAsMember() + " = new " 
+                    writer.write("\t\t" + attribs[i].getParamNameAsMember() + " = new " 
                             + attribs[i].getTypeName() + "_Array(*original." 
                             + attribs[i].getParamNameAsMember() + ");\n");
                 }
@@ -1218,14 +1218,11 @@
                 else
                     isPointerType = CUtils.isPointerType(typename);
                 
-                if (i != 0)
-                    writer.write("\n");
-                
                 if(attribs[i].isArray())
                 {
                     if (!forConstructor)
                         writer.write("\tdelete " + name + ";\n");
-                    writer.write("\t"+ name + " = NULL;\n");
+                    writer.write("\t"+ name + " = NULL;\n\n");
                 }
                 else if (attribs[i].isAnyType())
                 {
@@ -1240,13 +1237,13 @@
                         writer.write("\t\tdelete "+name+";\n");
                         writer.write("\t}\n");
                     }
-                    writer.write("\t" + name + "= NULL;\n");
+                    writer.write("\t" + name + "= NULL;\n\n");
                 }
                 else if (!(attribs[i].isSimpleType() || attribs[i].getType().isSimpleType()))
                 {
                     if (!forConstructor)
                         writer.write("\tdelete " + name + ";\n");
-                    writer.write("\t" + name + "= NULL;\n");
+                    writer.write("\t" + name + "= NULL;\n\n");
                 }
                 else if (isPointerType || isElementNillable(i) || isElementOptional(i) 
                         || attribs[i].getChoiceElement() || attribs[i].getAllElement())
@@ -1261,7 +1258,7 @@
                     }
                     
                     writer.write("\t" + name + " = NULL;\n");
-                    writer.write("\t__axis_deepcopy_" + name + " = false;\n");
+                    writer.write("\t__axis_deepcopy_" + name + " = false;\n\n");
                 }
             }
             

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/CPPClassWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/CPPClassWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/CPPClassWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/CPPClassWriter.java Wed Aug 13 09:54:10 2008
@@ -86,7 +86,7 @@
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
         String targetOutputLocation =
-            this.wscontext.getWrapInfo().getTargetOutputLocation();
+            this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation =
                 targetOutputLocation.substring(
@@ -98,7 +98,7 @@
     
         if (useServiceName)
         {
-            String serviceName = this.wscontext.getSerInfo().getServicename();
+            String serviceName = this.wscontext.getServiceInfo().getServicename();
             fileName =
                 targetOutputLocation
                     + "/"

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClassLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClassLoader.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClassLoader.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClassLoader.java Wed Aug 13 09:54:10 2008
@@ -43,7 +43,7 @@
     public ClassLoader(WebServiceContext wscontext) throws WrapperFault
     {
         this.wscontext = wscontext;
-        this.classname = wscontext.getSerInfo().getServicename();
+        this.classname = wscontext.getServiceInfo().getServicename();
     }
 
     public void writeSource() throws WrapperFault
@@ -123,7 +123,7 @@
     protected File getFilePath() throws WrapperFault
     {
         String targetOutputLocation =
-            this.wscontext.getWrapInfo().getTargetOutputLocation();
+            this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
         {
             targetOutputLocation =

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java Wed Aug 13 09:54:10 2008
@@ -41,9 +41,9 @@
     protected ArrayList methods;
     public ClientStubHeaderWriter(WebServiceContext wscontext) throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename());
+        super(wscontext.getServiceInfo().getServicename());
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
     }
 
     /* (non-Javadoc)

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java Wed Aug 13 09:54:10 2008
@@ -54,14 +54,14 @@
 
     public ClientStubWriter(WebServiceContext wscontext) throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename());
+        super(wscontext.getServiceInfo().getServicename());
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
     }
 
     protected String getServiceName() throws WrapperFault
     {
-        return wscontext.getSerInfo().getServicename();
+        return wscontext.getServiceInfo().getServicename();
     }
 
     protected void writeClassComment() throws WrapperFault
@@ -99,7 +99,7 @@
             writer.write(classname + "::\n" + classname + "()\n:Stub(\" \", APTHTTP1_1)\n{\n");
             //TODO get TransportURI from WrapInfo and check what the transport is and do the following line accordingly
             writer.write("\tm_pCall->setEndpointURI(\""
-                            + wscontext.getWrapInfo().getTargetEndpointURI() + "\");\n");
+                            + wscontext.getServiceInfo().getTargetEndpointURI() + "\");\n");
             writer.write("}\n");
         } 
         catch (IOException e)
@@ -360,7 +360,7 @@
         // the target namespace.  
         String namespaceURI = minfo.getInputNamespaceURI();
         if (namespaceURI == null)
-            namespaceURI = wscontext.getWrapInfo().getTargetNameSpaceOfWSDL();
+            namespaceURI = wscontext.getWrapperInfo().getTargetNameSpaceOfWSDL();
         
         writer.write("\t\tm_pCall->setOperation( \"" 
                 + minfo.getMethodname() + "\", \"" 
@@ -731,7 +731,7 @@
         writer.write ("\t\t}\n\n");
         writer.write ("\t\tISoapFault* pSoapFault = (ISoapFault*)\n");
         writer.write ("\t\t\tm_pCall->checkFault(\"Fault\",\""
-                  + wscontext.getWrapInfo ().getTargetEndpointURI () + "\" );\n\n");
+                  + wscontext.getServiceInfo().getTargetEndpointURI () + "\" );\n\n");
         writer.write ("\t\tif(pSoapFault)\n");
         writer.write ("\t\t{\n");
     

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionHeaderWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionHeaderWriter.java Wed Aug 13 09:54:10 2008
@@ -58,7 +58,7 @@
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
         String targetOutputLocation =
-            this.wscontext.getWrapInfo().getTargetOutputLocation();
+            this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
         {
             targetOutputLocation =
@@ -79,7 +79,7 @@
             fileName =
                 targetOutputLocation
                     + "/"
-                    + this.wscontext.getSerInfo().getServicename()
+                    + this.wscontext.getServiceInfo().getServicename()
                     + "_"
                     + faultInfoName
                     + CUtils.CPP_HEADER_SUFFIX;
@@ -210,7 +210,7 @@
     public void getLangName() throws WrapperFault
     {
         ArrayList methods;
-        methods = wscontext.getSerInfo().getMethods();
+        methods = wscontext.getServiceInfo().getMethods();
         MethodInfo minfo;
 
         try

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ExceptionWriter.java Wed Aug 13 09:54:10 2008
@@ -44,7 +44,7 @@
     public ExceptionWriter(WebServiceContext wscontext, String faultInfoName)
         throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename());
+        super(wscontext.getServiceInfo().getServicename());
         this.wscontext = wscontext;
         this.faultInfoName = "Axis" + faultInfoName + "Exception";
     }
@@ -63,7 +63,7 @@
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
         String targetOutputLocation =
-            this.wscontext.getWrapInfo().getTargetOutputLocation();
+            this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
         {
             targetOutputLocation =
@@ -105,7 +105,7 @@
 
     private String getServiceName() throws WrapperFault
     {
-        return wscontext.getSerInfo().getServicename();
+        return wscontext.getServiceInfo().getServicename();
     }
 
     /* (non-Javadoc)

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/HeaderFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/HeaderFileWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/HeaderFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/HeaderFileWriter.java Wed Aug 13 09:54:10 2008
@@ -122,7 +122,7 @@
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
         String targetOutputLocation =
-            this.wscontext.getWrapInfo().getTargetOutputLocation();
+            this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
         {
             targetOutputLocation =
@@ -150,6 +150,6 @@
     }
     protected String getServiceName() throws WrapperFault
     {
-        return wscontext.getSerInfo().getServicename();
+        return wscontext.getServiceInfo().getServicename();
     }
 }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParamCPPFileWriter.java Wed Aug 13 09:54:10 2008
@@ -88,7 +88,7 @@
     {
         classname = CUtils.sanitizeString( classname);
 
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
         new File(targetOutputLocation).mkdirs();

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java Wed Aug 13 09:54:10 2008
@@ -478,7 +478,7 @@
 
     protected File getFilePath(boolean useServiceName) throws WrapperFault
     {
-        String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
+        String targetOutputLocation = this.wscontext.getWrapperInfo().getTargetOutputLocation();
         if (targetOutputLocation.endsWith("/"))
             targetOutputLocation = targetOutputLocation.substring(0,targetOutputLocation.length() - 1);
 
@@ -489,7 +489,7 @@
         if (useServiceName)
         {
             fileName = targetOutputLocation + "/"
-                    + this.wscontext.getSerInfo().getServicename() + "_"
+                    + this.wscontext.getServiceInfo().getServicename() + "_"
                     + classname + CUtils.CPP_HEADER_SUFFIX;
         }
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java Wed Aug 13 09:54:10 2008
@@ -41,9 +41,9 @@
     protected ArrayList methods;
     public ServiceHeaderWriter(WebServiceContext wscontext) throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename());
+        super(wscontext.getServiceInfo().getServicename());
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
     }
 
     /* (non-Javadoc)

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java Wed Aug 13 09:54:10 2008
@@ -38,9 +38,9 @@
     private ArrayList methods;
     public ServiceWriter(WebServiceContext wscontext) throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename());
+        super(wscontext.getServiceInfo().getServicename());
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
     }
 
     public void writeSource() throws WrapperFault

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapHeaderWriter.java Wed Aug 13 09:54:10 2008
@@ -38,9 +38,9 @@
     protected ArrayList methods;
     public WrapHeaderWriter(WebServiceContext wscontext) throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename() + CUtils.WRAPPER_NAME_APPENDER);
+        super(wscontext.getServiceInfo().getServicename() + CUtils.WRAPPER_NAME_APPENDER);
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
         this.bindingStyle = "RPC_ENCODED";
     }
 

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java Wed Aug 13 09:54:10 2008
@@ -43,9 +43,9 @@
     private ArrayList methods;
     public WrapWriter(WebServiceContext wscontext) throws WrapperFault
     {
-        super(wscontext.getSerInfo().getServicename() + CUtils.WRAPPER_NAME_APPENDER);
+        super(wscontext.getServiceInfo().getServicename() + CUtils.WRAPPER_NAME_APPENDER);
         this.wscontext = wscontext;
-        this.methods = wscontext.getSerInfo().getMethods();
+        this.methods = wscontext.getServiceInfo().getMethods();
     }
     protected void writeClassComment() throws WrapperFault
     {
@@ -285,7 +285,7 @@
             "\tif (AXIS_SUCCESS != pIWSDZ->checkMessageBody(\""
                 + minfo.getMethodname()
                 + "\", \""
-                + wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()
+                + wscontext.getWrapperInfo().getTargetNameSpaceOfWSDL()
                 + "\"))\n");
         writer.write("\t{\n");
         writer.write("\t\treturn AXIS_FAIL;\n");
@@ -298,7 +298,7 @@
         		+ minfo.getOutputMessage().getLocalPart()
 				+ "\", \""
 				//15/06/2005................................
-                + wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()
+                + wscontext.getWrapperInfo().getTargetNameSpaceOfWSDL()
                 + "\");\n");
         //create and populate variables for each parameter
         String paraTypeName;
@@ -823,7 +823,7 @@
                 "\t\tpIWSSZ->createSoapFault(\""
                     + langName
                     + "\", \""
-                    + wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()
+                    + wscontext.getWrapperInfo().getTargetNameSpaceOfWSDL()
                     + "\",\"AxisC++ Faultcode\", \"Custom Out of bound exception\");\n");
             //  writer.write("\t\t"+faulttype+" pObjFault = new "+langName+"();\n");                                                                       
             writer.write(

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ServiceInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ServiceInfo.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ServiceInfo.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ServiceInfo.java Wed Aug 13 09:54:10 2008
@@ -24,27 +24,34 @@
 
 import java.util.ArrayList;
 
+import org.apache.axis.wsdl.wsdl2ws.WrapperConstants;
 import org.apache.axis.wsdl.wsdl2ws.WrapperFault;
 
 public class ServiceInfo
 {
-    private String servicename;
-    private ArrayList methods;
-
-    public ServiceInfo(
-        String servicename,
-        ArrayList methods)
+    private String c_servicename;
+    private ArrayList c_methods;
+    private String c_targetEndpointURI;
+
+    public ServiceInfo(String servicename, 
+                       ArrayList methods,
+                       String targetEndpointURI)
         throws WrapperFault
     {
-        this.methods = methods;
-        this.servicename = servicename;
+        c_methods = methods;
+        c_servicename = servicename;
 
         //validate the information
         if (servicename == null)
             throw new WrapperFault("Service name can't be null.");
 
-        if (this.methods == null || this.methods.size() == 0)
+        if (c_methods == null || c_methods.size() == 0)
             throw new WrapperFault("Service with no methods.");
+        
+        if (targetEndpointURI == null)
+            c_targetEndpointURI = WrapperConstants.DEFAULT_TARGET_ENDPOINT_URI;
+        else
+            c_targetEndpointURI = targetEndpointURI;
     }
 
     /**
@@ -52,7 +59,7 @@
      */
     public ArrayList getMethods()
     {
-        return methods;
+        return c_methods;
     }
 
     /**
@@ -60,6 +67,14 @@
      */
     public String getServicename()
     {
-        return servicename;
+        return c_servicename;
+    }
+    
+    /**
+     * @return String
+     */
+    public String getTargetEndpointURI()
+    {
+        return c_targetEndpointURI;
     }
 }
\ No newline at end of file

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WebServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WebServiceContext.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WebServiceContext.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WebServiceContext.java Wed Aug 13 09:54:10 2008
@@ -15,23 +15,19 @@
  *   limitations under the License.
  */
 
-/**
- * This class has all the information about the Webservice. It pass through 
- * all the classes in genaration of wrapper giving them the info they are 
- * required. This is the Mediator that make sure all the classes interact with 
- * this for information but with this. It will keep the system loosley coupled
- * So easier to handle.  
- *  
- * @author Srinath Perera (hemapani@opensource.lk)
- * @author Dimuthu Leelarathne (muthulee@opensource.lk)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.info;
 
 import java.util.HashSet;
 
 import org.apache.axis.wsdl.wsdl2ws.WrapperFault;
 
+/**
+ * This class has all the information needed to generate the stubs representing 
+ * Web services.   
+ *  
+ * @author Srinath Perera (hemapani@opensource.lk)
+ * @author Dimuthu Leelarathne (muthulee@opensource.lk)
+ */
 public class WebServiceContext
 {
     private WrapperInfo wrapInfo;
@@ -40,11 +36,17 @@
 
     private HashSet generatedFileList = new HashSet();
 
-    public WebServiceContext(
-        WrapperInfo wrapInfo,
-        ServiceInfo serInfo,
-        TypeMap typemap)
-        throws WrapperFault
+    /**
+     * Constructor. 
+     * 
+     * @param wrapInfo
+     * @param serInfo
+     * @param typemap
+     * @throws WrapperFault
+     */
+    public WebServiceContext(WrapperInfo wrapInfo, 
+                             ServiceInfo serInfo,
+                             TypeMap typemap) throws WrapperFault
     {
         this.wrapInfo = wrapInfo;
         this.serInfo = serInfo;
@@ -57,15 +59,18 @@
     }
 
     /**
+     * Returns ServiceInfo object. 
+     * 
      * @return ServiceInfo
      */
-    public ServiceInfo getSerInfo()
+    public ServiceInfo getServiceInfo()
     {
         return serInfo;
     }
 
     /**
      * Adds a name of the generated file 
+     * 
      * @param filename
      */
     public void addGeneratedFile(String filename)
@@ -73,11 +78,19 @@
         generatedFileList.add(filename);
     }
 
+    /**
+     * Returns set of all files that have been generated.
+     * 
+     * @return Set of strings representing file names.
+     */
     public HashSet getGeneratedFileList()
     {
         return generatedFileList;
     }
+    
     /**
+     * Returns the map the contains the types to be generated.
+     * 
      * @return TypeMap
      */
     public TypeMap getTypemap()
@@ -86,9 +99,11 @@
     }
 
     /**
+     * Returns the WrapperInfo object. 
+     * 
      * @return WrapperInfo
      */
-    public WrapperInfo getWrapInfo()
+    public WrapperInfo getWrapperInfo()
     {
         return wrapInfo;
     }

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WrapperInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WrapperInfo.java?rev=685607&r1=685606&r2=685607&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WrapperInfo.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WrapperInfo.java Wed Aug 13 09:54:10 2008
@@ -15,161 +15,124 @@
  *   limitations under the License.
  */
 
-/**
- * This Class have the misc infomation about the Wrapper to genatrated
- * @author Srinath Perera (hemapani@opensource.lk)
- * @author Dimuthu Leelarathne (muthulee@opensource.lk)
- */
-
 package org.apache.axis.wsdl.wsdl2ws.info;
 
 import org.apache.axis.wsdl.wsdl2ws.WrapperConstants;
 
+/**
+ * Contains information of a global nature regarding how to generate
+ * the stubs.
+ * 
+ * @author Srinath Perera (hemapani@opensource.lk)
+ * @author Dimuthu Leelarathne (muthulee@opensource.lk)
+ */
 public class WrapperInfo
 {
-    //service style
-    private String wrapperStyle;
+    // binding style
+    private String c_bindingStyle;
     
     // programming language
-    private String wrapperLanguage;
+    private String c_wrapperLanguage;
 
-    //server side or client side
-    private String targetEngine;
-    
-    //output location
-    private String targetOutputLocation;
-    
-    //transport method specified in the binding
-    private String transportUri;
+    // server side or client side
+    private String c_targetEngine;
     
-    //target endpoint (the URI the service is deployed in)
-    private String targetEndpointURI;
+    // output location
+    private String c_targetOutputLocation;
     
-    //private target name space of the wsdl file 
-    private String targetNameSpaceOfWSDL;
+    // private target name space of the wsdl file 
+    private String c_targetNameSpaceOfWSDL;
 
-    public WrapperInfo(String wrapperStyle, 
+    /**
+     * Constructor 
+     * 
+     * @param style                 binding style (e.g. "rpc", "document").
+     * @param wrapperLanguage       what language to generate (e.g. "c", "c++").
+     * @param targetOutputLocation  where stubs will be generated.
+     * @param targetEngine          generate "client" or "server" stubs?
+     * @param targetNameSpaceOfWSDL target name space of WSDL.
+     */
+    public WrapperInfo(String style, 
                        String wrapperLanguage,
                        String targetOutputLocation,
                        String targetEngine,
-                       String transportUri,
-                       String targetEndpointURI,
                        String targetNameSpaceOfWSDL)
     {
-        this.wrapperStyle = wrapperStyle;
-        this.wrapperLanguage = wrapperLanguage;
-        this.targetOutputLocation = targetOutputLocation;
-
-        //validate the data
-        if (this.wrapperLanguage == null)
-            this.wrapperLanguage = WrapperConstants.LANGUAGE_CPP;
+        c_bindingStyle = style;
+        c_wrapperLanguage = wrapperLanguage;
+        c_targetOutputLocation = targetOutputLocation;
+
+        // validate the data
+        if (c_wrapperLanguage == null)
+            c_wrapperLanguage = WrapperConstants.LANGUAGE_CPP;
         else
-            this.wrapperLanguage = wrapperLanguage.toLowerCase();
+            c_wrapperLanguage = wrapperLanguage.toLowerCase();
         
-        if (this.wrapperStyle == null
-                || this.wrapperStyle.toLowerCase().equals(WrapperConstants.STYLE_RPC))
-            this.wrapperStyle = WrapperConstants.STYLE_RPC;
+        if (c_bindingStyle == null
+                || c_bindingStyle.toLowerCase().equals(WrapperConstants.STYLE_RPC))
+            c_bindingStyle = WrapperConstants.STYLE_RPC;
         else
-            this.wrapperStyle = this.wrapperStyle.toLowerCase();
+            c_bindingStyle = c_bindingStyle.toLowerCase();
 
         if (targetOutputLocation == null)
             targetOutputLocation = ".";
 
         if (targetEngine == null
                 || !WrapperConstants.CLIENT.equalsIgnoreCase(targetEngine))
-            this.targetEngine = WrapperConstants.SERVER;
-        else
-            this.targetEngine = WrapperConstants.CLIENT;
-
-        if (transportUri == null)
-            this.transportUri = WrapperConstants.TRANSPORT_HTTP;
-        else
-            this.transportUri = transportUri;
-
-        if (targetEndpointURI == null)
-            this.targetEndpointURI = WrapperConstants.DEFAULT_TARGET_ENDPOINT_URI;
+            c_targetEngine = WrapperConstants.SERVER;
         else
-            this.targetEndpointURI = targetEndpointURI;
+            c_targetEngine = WrapperConstants.CLIENT;
 
-        this.targetNameSpaceOfWSDL = (targetNameSpaceOfWSDL == null) ? "" : targetNameSpaceOfWSDL;
+        c_targetNameSpaceOfWSDL = (targetNameSpaceOfWSDL == null) ? "" : targetNameSpaceOfWSDL;
     }
 
     /**
-     * @return int
+     * Returns the programming language to use when generating stubs.
+     * 
+     * @return String representing programming language (e.g. "c", "c++").  
      */
     public String getWrapperLanguage()
     {
-        return wrapperLanguage;
-    }
-
-    /**
-     * @return int
-     */
-    public String getWrapperStyle()
-    {
-        return wrapperStyle;
-    }
-
-    /**
-     * Sets the wrapperLanguage.
-     * @param wrapperLanguage The wrapperLanguage to set
-     */
-    public void setWrapperLanguage(String wrapperLanguage)
-    {
-        this.wrapperLanguage = wrapperLanguage;
+        return c_wrapperLanguage;
     }
 
     /**
-     * Sets the wrapperStyle.
-     * @param wrapperStyle The wrapperStyle to set
+     * Returns the binding style that will be used when generated the stubs.
+     * 
+     * @return String representing the binding style (e.g. "rpc", "document").
      */
-    public void setWrapperStyle(String wrapperStyle)
+    public String getBindingStyle()
     {
-        this.wrapperStyle = wrapperStyle;
+        return c_bindingStyle;
     }
 
     /**
+     * Returns the location in which the stub code will be located.
+     * 
      * @return String
      */
     public String getTargetOutputLocation()
     {
-        return targetOutputLocation;
+        return c_targetOutputLocation;
     }
 
     /**
+     * Returns whether server or client artifacts are to be produced.
+     * 
      * @return String
      */
-
     public String getTargetEngine()
     {
-        return targetEngine;
+        return c_targetEngine;
     }
 
-    public void setTargetEngine(String targetEngine)
-    {
-        this.targetEngine = targetEngine;
-    }
-    /**
-     * @return String
-     */
-    public String getTargetEndpointURI()
-    {
-        return targetEndpointURI;
-    }
     /**
+     * Returns the target name space of WSDL.
+     * 
      * @return String
      */
     public String getTargetNameSpaceOfWSDL()
     {
-        return targetNameSpaceOfWSDL;
-    }
-
-    /**
-     * @return String
-     */
-    public String getTransportUri()
-    {
-        return transportUri;
+        return c_targetNameSpaceOfWSDL;
     }
-
 }