You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Paul Fremantle (JIRA)" <ji...@apache.org> on 2007/06/20 17:50:25 UTC

[jira] Created: (AXIS2-2831) Codegen creating too many stubs most of the time

Codegen creating too many stubs most of the time
------------------------------------------------

                 Key: AXIS2-2831
                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
             Project: Axis 2.0 (Axis2)
          Issue Type: Improvement
          Components: codegen
    Affects Versions: 1.2
            Reporter: Paul Fremantle
            Assignee: Amila Chinthaka Suriarachchi
             Fix For: 1.3


When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 

This had the following three consequences:

1) The Stub name is more complex and frankly ugly 

instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 

2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.

3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.

Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.

I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.

My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Re: [jira] Created: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Most definitely +1 to the proposed algorithm for selecting a single port 
to codegen.

Sanjiva.

Paul Fremantle (JIRA) wrote:
> Codegen creating too many stubs most of the time
> ------------------------------------------------
> 
>                  Key: AXIS2-2831
>                  URL: https://issues.apache.org/jira/browse/AXIS2-2831
>              Project: Axis 2.0 (Axis2)
>           Issue Type: Improvement
>           Components: codegen
>     Affects Versions: 1.2
>             Reporter: Paul Fremantle
>             Assignee: Amila Chinthaka Suriarachchi
>              Fix For: 1.3
> 
> 
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> 
> This had the following three consequences:
> 
> 1) The Stub name is more complex and frankly ugly 
> 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> 
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> 
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> 
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 
> 
> 
> 
> 

-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Tom Jordahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507485 ] 

Tom Jordahl commented on AXIS2-2831:
------------------------------------

Paul makes a good point, if Axis2 changed behavior between 1.1 and 1.2, then you aren't being user friendly.
I also respond to his point that its not easy to figure out which stub to use when faced with all the generated code.  At the minimum, there should be an "-all" switch to get everything, and the default should emulate 1.1.



> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-2831:
------------------------------------

    Priority: Blocker  (was: Major)

> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-2831.
-------------------------------------------------

    Resolution: Fixed

fixed with the revision 551799.
added a new option called -ap <all-ports> to generate stubs for all the ports

> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508157 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-2831:
-----------------------------------------------------

hi all,
this is the thread we have discussed about this issue. there we have agreed to do it in the current way. http://marc.info/?l=axis-dev&m=117318735726122&w=2 .

When providing this feature there was a problem with the backword compatibility. That was a mistake I did. But I don't think that doing a mistake once give a free licence to any one to do the same again. I belive it is better to learn from the mistakes.

So paul can you please start a new mail thread in dev list clearly specifying your suggestion and on it please say "it is the final time we are going to dicuss this matter and will implement it in the way you have proposed if no one oppessed".  Otherwise people time to time raise this question.

Then I will do the necessary changes.

Amila.

> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Tom Jordahl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506615 ] 

Tom Jordahl commented on AXIS2-2831:
------------------------------------

Axis 1.x had the right idea for this, why doesn't Axis2 follow suit?
In particular, the GeneratedFileInfo class that was returned from the Emitter API would tell you exactly what files were generated and what each of them was (interface, locator, port, etc).  This allows programs the embed WSDL2Java (like mine) to pick the right stuff.

As far as code generation is concerned, I don't think picking one is the way to go.  We should follow Axis 1.x in its behavior.

If it isn't broken, why keep trying to fix it.


> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506645 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-2831:
-----------------------------------------------------

The main idea of the wsdl2java.sh is to generate the code for the whole wsdl assuming user has given a correct wsdl which represents his requrements.
So I think Generating code for all services by default is correct. Atleast if we change this now people raise many issues and may complain saying  the codegen is broken.
But for your case introduce three new options -saop11 -soap12 and -http and generate the code only for that pirticualar biniding. this way we can preserve the backword compatibility.


> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506610 ] 

Glen Daniels commented on AXIS2-2831:
-------------------------------------

What if there are multiple SOAP12 ports, for instance?  Favor HTTP over any other transport, or just pick the first one we understand?


> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2831) Codegen creating too many stubs most of the time

Posted by "Paul Fremantle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506836 ] 

Paul Fremantle commented on AXIS2-2831:
---------------------------------------

Glen: If there are multiple SOAP 12 ports then I would generate a stub for each of them. 

Tom: I think it is broken. I don't think its applicable to compare with Axis1, because we have a different strategy for databinding with Axis2, and that is where the issue 3 comes. 

Amila: I don't agree with your premise that the main point of wsdl2java is to generate code for the whole WSDL. Where is that stated? When did we decide that? My view is that the whole point of WSDL2Java is to generate A client or A service. I don't see why anyone would need 3 different clients to the same service?

And I don't think you can talk about preserving backwards compatibility. You broke all my 1.1.1 code when you changed this. If you had kept generating a single stub (PurchaseStub) named after the service then my old code would still work. That is completely bogus to claim that just because you broke it between 1.1.1 it now has to be fixed the way it is in 1.2 forever more.

I really care about this. The way it is now makes it hard for beginners to use our client generation code, which is the first thing they will try. So you are making it less likely users will stick with Axis2.

Paul

> Codegen creating too many stubs most of the time
> ------------------------------------------------
>
>                 Key: AXIS2-2831
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2831
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: codegen
>    Affects Versions: 1.2
>            Reporter: Paul Fremantle
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> When we moved from 1.1.1 to 1.2, we changed the codegen to create a different stub object per WSDL port. 
> This had the following three consequences:
> 1) The Stub name is more complex and frankly ugly 
> instead of PurchaseStub I get PurchasePurchaseSOAP12Port_httpStub 
> 2) There are more classes lying around (for a standard Axis2 service it now generates 6 classes instead of 2). It also means there are now warnings raised on the command line where classes are shared between stubs.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> Jun 20, 2007 3:40:03 PM org.apache.axis2.wsdl.codegen.writer.ClassWriter createOutFile
> INFO: The .\src\sample\axisversion\GetVersionFaultException.java file cannot be overwritten.
> 3) Its really hard to find the correct databinding class for the parameters of the stub. There are now multiple copies of each databinding class (as inner classes inside the different stubs). When I do code completion in Eclipse its pretty hard to figure out the right class, and I guess for a beginner maybe impossible.
> Now I realize that there are some wierd WSDLs out there, and maybe just maybe 1% of the time we need to do this. But in 99% of cases, and 100% of cases where Axis2 created the WSDL, this is unnecessary.
> I know what is gonna be said: I can use -pn Portname to explicitly choose one port. But that requires me to (1) be able to read WSDL correctly and (2) actually know about this option. Neither of those are appropriate for a beginner and also even for an advanced user they make life difficult.
> My proposal is simple - choose one port (how about the SOAP12 if it exists, then the SOAP11 one, then the HTTP one) and only generate code for that. Add a switch to generate all ports if required. I can't see why I need more than one working stub. If SOAP12 is working why do I care about having a SOAP11 stub lying around. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org