You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "daryoush mehrtash (JIRA)" <be...@incubator.apache.org> on 2005/06/13 22:39:47 UTC

[jira] Commented: (BEEHIVE-807) Service control generation gens controls which will fail compilation

    [ http://issues.apache.org/jira/browse/BEEHIVE-807?page=comments#action_12313512 ] 

daryoush mehrtash commented on BEEHIVE-807:
-------------------------------------------

Chad,

This is a great piece of functionality to add, there are two issues that I see:

a) Shouldn't the reserve word  rule applies to any names and not just parameter name (eg. method names, class names, more?)   I think the name conversion should take place at those points also.

b)  I think this functionality doesn't belong to the ExtensionMaker, rather it should be done in XMLBeanWSDLProcessor.  The Extension make should let the object model enforce rules on the wsdl.   One thing to keep in mind is that the WSM also generates Java source code from the Object model (from WSDL use case).  To have this in Extension Maker means that the same thing is duplicated in the WSDL2AJava.


> Service control generation gens controls which will fail compilation
> --------------------------------------------------------------------
>
>          Key: BEEHIVE-807
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-807
>      Project: Beehive
>         Type: Bug
>   Components: Controls
>     Versions: V1
>     Reporter: Chad Schoettger
>  Attachments: BEEHIVE-807.diff
>
> The web service control's generator does not create valid Java code when the return value for a web method call is included in a control method's paramter list and has the name  of 'return'.  It is possible to generate the control from the WSDL but the compilation of the control fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (BEEHIVE-807) Service control generation gens controls which will fail compilation

Posted by Daryoush Mehrtash <dm...@gmail.com>.
Good point. As you pointed out we clearly need to keep the original WSDL 
names. There are two issues that we are trying to solve here:

 a) we need the "encoding" for java class names, method names, parameters 
names, and Exceptions (potentially the package name also)).

b) We have so far identified more than one use case for this encoding, 
WSDL->Annotated Java and WSDL -> JCX

 I did some digging in the JaxRPC spec and the Axis code. Chapter 20 on the 
JaxRPC spec (version 1.1) talks about Mapping of XML Names, there is an 
implementation of it in Axis org.apache.axis.utils.JavaUtils. 
xmlNameToJava(). I think there must also be one in XMLBeans which we might 
be able to tap in as oppose to doing our own.

 I think we need to make distinction between XML Names and Java names. My 
proposal is to add methods in the object model (where we need this 
"encoding") to get the Java names in addition to the current methods that 
expose the WSDL names. 


On 6/14/05, Chad Schoettger <ch...@gmail.com> wrote:
> 
> I had thought about pushing it into the the XMLBeanWSDLProcessor but it
> seemed that would case problems at runtime, since the object model is used
> at runtime by the service control.
> 
> If for example, parameter names in the model were tweaked ('_return' for
> example), they would no longer match the WSDL and would cause problems in
> calling the web service operation. Same thing for the web service 
> operation
> names. It seems like this functionality needs to stay at the code 
> generation
> level. Let me know if I'm not understanding this correctly.
> 
> - Chad
> 
> 
> On 6/13/05, daryoush mehrtash (JIRA) <be...@incubator.apache.org>
> wrote:
> > [
> 
> http://issues.apache.org/jira/browse/BEEHIVE-807?page=comments#action_12313512]
> >
> > daryoush mehrtash commented on BEEHIVE-807:
> > -------------------------------------------
> >
> > Chad,
> >
> > This is a great piece of functionality to add, there are two issues that 
> I
> see:
> >
> > a) Shouldn't the reserve word rule applies to any names and not just
> parameter name (eg. method names, class names, more?) I think the name
> conversion should take place at those points also.
> >
> > b) I think this functionality doesn't belong to the ExtensionMaker, 
> rather
> it should be done in XMLBeanWSDLProcessor. The Extension make should let 
> the
> object model enforce rules on the wsdl. One thing to keep in mind is that
> the WSM also generates Java source code from the Object model (from WSDL 
> use
> case). To have this in Extension Maker means that the same thing is
> duplicated in the WSDL2AJava.
> >
> >
> > > Service control generation gens controls which will fail compilation
> > > --------------------------------------------------------------------
> > >
> > > Key: BEEHIVE-807
> > > URL: http://issues.apache.org/jira/browse/BEEHIVE-807
> > > Project: Beehive
> > > Type: Bug
> > > Components: Controls
> > > Versions: V1
> > > Reporter: Chad Schoettger
> > > Attachments: BEEHIVE-807.diff
> > >
> > > The web service control's generator does not create valid Java code 
> when
> the return value for a web method call is included in a control method's
> paramter list and has the name of 'return'. It is possible to generate the
> control from the WSDL but the compilation of the control fails.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> > -
> > For more information on JIRA, see:
> > http://www.atlassian.com/software/jira
> >
> >
> 
> 


-- 
Daryoush

Weblog: http://perlustration.blogspot.com/

Re: [jira] Commented: (BEEHIVE-807) Service control generation gens controls which will fail compilation

Posted by Chad Schoettger <ch...@gmail.com>.
I had thought about pushing it into the the XMLBeanWSDLProcessor but it 
seemed that would case problems at runtime, since the object model is used 
at runtime by the service control.

If for example, parameter names in the model were tweaked ('_return' for 
example), they would no longer match the WSDL and would cause problems in 
calling the web service operation. Same thing for the web service operation 
names. It seems like this functionality needs to stay at the code generation 
level. Let me know if I'm not understanding this correctly.

- Chad


On 6/13/05, daryoush mehrtash (JIRA) <be...@incubator.apache.org> 
wrote:
> [ 
http://issues.apache.org/jira/browse/BEEHIVE-807?page=comments#action_12313512]
> 
> daryoush mehrtash commented on BEEHIVE-807:
> -------------------------------------------
> 
> Chad,
> 
> This is a great piece of functionality to add, there are two issues that I 
see:
> 
> a) Shouldn't the reserve word rule applies to any names and not just 
parameter name (eg. method names, class names, more?) I think the name 
conversion should take place at those points also.
> 
> b) I think this functionality doesn't belong to the ExtensionMaker, rather 
it should be done in XMLBeanWSDLProcessor. The Extension make should let the 
object model enforce rules on the wsdl. One thing to keep in mind is that 
the WSM also generates Java source code from the Object model (from WSDL use 
case). To have this in Extension Maker means that the same thing is 
duplicated in the WSDL2AJava.
> 
> 
> > Service control generation gens controls which will fail compilation
> > --------------------------------------------------------------------
> >
> > Key: BEEHIVE-807
> > URL: http://issues.apache.org/jira/browse/BEEHIVE-807
> > Project: Beehive
> > Type: Bug
> > Components: Controls
> > Versions: V1
> > Reporter: Chad Schoettger
> > Attachments: BEEHIVE-807.diff
> >
> > The web service control's generator does not create valid Java code when 
the return value for a web method call is included in a control method's 
paramter list and has the name of 'return'. It is possible to generate the 
control from the WSDL but the compilation of the control fails.
> 
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
> 
>