axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WJ Krpelan <krpelan...@yahoo.com>
Subject Re: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation
Date Thu, 07 Jan 2010 10:44:55 GMT
Dear ppl,
I think this leads us nowhere.
Webservices is neither JAVA nor DOTNET nor PHP nor PERL-specific nor should it  be. Webservices
is expected to interoperate with all of them. How is this to be accomplished?
By adhering to the standards laid down for WSDL.
So PLEASE restrain yourself to using language constructs which can be clearly defined within
the reach of WSDL/XML-Schema, and keep it simple on top of that.
It is the JAVA-Programmers or DOTNET-Programmers duty to guarantee that unproper values are
not put into WS-clients or WS-Server-stubs!!
Cheers, Wolfgang


--- On Thu, 1/7/10, Mauro Molinari (JIRA) <jira@apache.org> wrote:

> From: Mauro Molinari (JIRA) <jira@apache.org>
> Subject: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL -
problems with .NET client generation
> To: axis-dev@ws.apache.org
> Date: Thursday, January 7, 2010, 11:24 AM
> 
>     [ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797580#action_12797580
> ] 
> 
> Mauro Molinari commented on AXIS2-3300:
> ---------------------------------------
> 
> I fear I am not really understanding your last
> intervention. Looking at the source code of
> org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator
> and your last patch quickly, it seems that nillable=true is
> actually specified whenever a type is not a primitive one.
> So this would actually mean that, after your patch, the
> behaviour would be the one you mentioned in your comment of
> 05/Jan/10 05:46 AM. 
> 
> If this is so, feel free to solve again this bug and sorry.
> I just understood that you opted for removing minOccurs=0
> without adding nillable=true for object type parameters.
> This is ok for me, however keep in mind that .NET 1.1
> compatibility will stay compromised.
> 
> > minOccurs="0" always generated by Java2WSDL - problems
> with .NET client generation
> >
> ----------------------------------------------------------------------------------
> >
> >             
>    Key: AXIS2-3300
> >             
>    URL: https://issues.apache.org/jira/browse/AXIS2-3300
> >         
>    Project: Axis2
> >          Issue Type: Bug
> >          Components: Tools
> >    Affects Versions: 1.3
> >            Reporter:
> Mauro Molinari
> >            Assignee:
> Deepal Jayasinghe
> >         Attachments:
> axis2-1.4.1.diff
> >
> >
> > When you try to expose a POJO as a webservice, suppose
> you have two Java methods with the following signatures:
> > public Integer a(String, Integer)
> > public String b(Integer, String) 
> > Java2WSDL adds the minOccurs="0" for each element of
> each complex type, both for the input parameters and for the
> output parameters. 
> > When generating clients using .NET WebService Studio
> 2.0, the result is the following:
> > - all the generated C# methods input parameters are
> doubled, except for the string ones: the doubled parameters
> are booleans whose meaning is: "is the previous parameter
> specified or not?"
> > - all the generated C# methods return parameters are
> void, except for the string ones
> > The actual result are clients with methods like
> these:
> > public void a(string, int, bool);
> > public string b(int, bool, string);
> > This is obviously a problem, particularly for the
> "void" return type.
> > If I remove minOccurs="0", clients are generated
> correctly by .NET WebService Studio 2.0.
> > The issue is this: why does Java2WSDL always adds
> minOccurs="0"? If its meaning were "it can be null", I think
> nillable="true" attribute should be more appropriate...
> Moreover, if I substitute Integer with int in the original
> Java class methods, minOccurs="0" is still added by
> Java2WSDL, even if an int cannot be null.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue
> online.
> 
> 


      

Mime
View raw message