|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
[jira] Created: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generationminOccurs="0" always generated by Java2WSDL - problems with .NET client generation
---------------------------------------------------------------------------------- Key: AXIS2-3300 URL: https://issues.apache.org/jira/browse/AXIS2-3300 Project: Axis 2.0 (Axis2) Issue Type: Bug Components: Tools Affects Versions: 1.3 Reporter: Mauro Molinari 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. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@... For additional commands, e-mail: axis-dev-help@... |
|
|
[jira] Assigned: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Deepal Jayasinghe reassigned AXIS2-3300: ---------------------------------------- Assignee: Deepal Jayasinghe > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: Tools > Affects Versions: 1.3 > Reporter: Mauro Molinari > Assignee: Deepal Jayasinghe > > 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. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@... For additional commands, e-mail: axis-dev-help@... |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564948#action_12564948 ] Ling Yu commented on AXIS2-3300: -------------------------------- I encountered the same problem when axis2 auto generates WSDLs for my web services classes. By looking into the DefaultSchemaGenerator.java in kernel module, both methods: generateSchemaforFieldsandProperties() and addContentToMethodSchemaType() seems to always set the minOccurs to 0 when the schema type is primitive. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: Tools > Affects Versions: 1.3 > Reporter: Mauro Molinari > Assignee: Deepal Jayasinghe > > 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. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@... For additional commands, e-mail: axis-dev-help@... |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645175#action_12645175 ] Girish Khemani commented on AXIS2-3300: --------------------------------------- Please can you let me know the status of this. Is this getting fixed. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: Tools > Affects Versions: 1.3 > Reporter: Mauro Molinari > Assignee: Deepal Jayasinghe > > 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. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@... For additional commands, e-mail: axis-dev-help@... |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670354#action_12670354 ] Chris van Es commented on AXIS2-3300: ------------------------------------- Hi, I'm currently in the process of testing changing minOccurs to 1 for primitive schema types in axis2 1.4.1, what's the process for submitting a patch for this issue? > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: Tools > Affects Versions: 1.3 > Reporter: Mauro Molinari > Assignee: Deepal Jayasinghe > > 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. |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670359#action_12670359 ] Nandana Mihindukulasooriya commented on AXIS2-3300: --------------------------------------------------- Hi Chris, Create a diff of your changes against the current trunk and attach the patch here. When attaching please grant license to ASF for inclusion. Then a committer will review it and apply it to the trunk. thanks, nandana > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: Tools > Affects Versions: 1.3 > Reporter: Mauro Molinari > Assignee: Deepal Jayasinghe > > 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. |
|
|
[jira] Updated: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris van Es updated AXIS2-3300: -------------------------------- Attachment: axis2-1.4.1.diff This has been built successfully, running all tests, against the 1.4 branch and I've verified that minOccurs="0" is now no longer the default for primitive schema types in auto-generated wsdl. I haven't been able to verify that this is an issue in the trunk as there appears to be some substantial changes in DefaultSchemaGenerator.java. Chris. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736041#action_12736041 ] Matthias Gaiser commented on AXIS2-3300: ---------------------------------------- Are there any changes in this subject? I still see minOccurs="0" getting generated for Axis2.1.5. The diff suggested to replace setMinOccurs(0) with setMinOccurs(1) in the DefaultSchemaGenerator. Is there anything that is against it? Hoping for a soon solution! Matthias. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736053#action_12736053 ] Chris van Es commented on AXIS2-3300: ------------------------------------- I patched the DefaultSchemaGenerator in that fashion and we haven't had any problems to date. Chris. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generationHi Chris (or someone else),
maybe it is just a misunderstanding on my side. I am generating a wsdl from a java class via java2wsdl. I am using a simple method like public String login(String user, String password); java2wsdl now generates a wsdl where the parameters are marked with minOccurs="0", which should not be the case for my webservice. Is there a possibility to set the standard behavior to minOccurs="1"? As far as I have seen in the DefaultSchemaGenerator the minOccurs="0" is hardcoded. Generated wsdl fragment: <xs:element name="login"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="user" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> Please help me in clarfying this issue. Thank you, Matthias. -----Ursprüngliche Nachricht----- Von: Chris van Es (JIRA) [mailto:jira@...] Gesendet: Dienstag, 28. Juli 2009 14:49 An: axis-dev@... Betreff: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation [ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736053#action_12736053 ] Chris van Es commented on AXIS2-3300: ------------------------------------- I patched the DefaultSchemaGenerator in that fashion and we haven't had any problems to date. Chris. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
Re: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generationHi Matthias, in my personal view you are asking to much. to achieve interoperability, its not unusual that one has to adjust automatically generated wsdls/schemes manually. if you try to do webservices fully dynamically you'd better make sure the same webservice-engine is present on both sides Seen from the java side, how could the generator tell from the code whether a variable is meant to be optional or obligatory or even nullable? Usually it can't so it generates the most general approach, which is optional and nullable obviously. Cheers, Wolfgang --- On Wed, 7/29/09, Matthias.Gaiser@... <Matthias.Gaiser@...> wrote: > From: Matthias.Gaiser@... <Matthias.Gaiser@...> > Subject: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > To: axis-dev@... > Date: Wednesday, July 29, 2009, 2:10 PM > Hi Chris (or someone else), > > maybe it is just a misunderstanding on my side. > > I am generating a wsdl from a java class via java2wsdl. I > am using a simple method like > public String login(String user, String password); > > java2wsdl now generates a wsdl where the parameters are > marked with minOccurs="0", which should not be the case for > my webservice. Is there a possibility to set the standard > behavior to minOccurs="1"? As far as I have seen in the > DefaultSchemaGenerator the minOccurs="0" is hardcoded. > Generated wsdl fragment: > <xs:element name="login"> > <xs:complexType> > <xs:sequence> > > <xs:element minOccurs="0" name="user" nillable="true" > type="xs:string"/> > > <xs:element minOccurs="0" name="password" nillable="true" > type="xs:string"/> > </xs:sequence> > </xs:complexType> > </xs:element> > > > Please help me in clarfying this issue. > > Thank you, > Matthias. > > -----Ursprüngliche Nachricht----- > Von: Chris van Es (JIRA) [mailto:jira@...] > Gesendet: Dienstag, 28. Juli 2009 14:49 > An: axis-dev@... > Betreff: [jira] Commented: (AXIS2-3300) minOccurs="0" > always generated by Java2WSDL - problems with .NET client > generation > > > [ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736053#action_12736053 > ] > > Chris van Es commented on AXIS2-3300: > ------------------------------------- > > I patched the DefaultSchemaGenerator in that fashion and we > haven't had any problems to date. > > Chris. > > > minOccurs="0" always generated by Java2WSDL - problems > with .NET client generation > > > ---------------------------------------------------------------------------------- > > > > > Key: AXIS2-3300 > > > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > > > Project: Axis 2.0 (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. > > |
|
|
Re: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generationWhat this example really shows is that to achieve interoperability and
to make everybody's life easier (in an environment where different platforms are used), you should not use a code first approach, but a contract first. Andreas On Thu, Jul 30, 2009 at 11:26, WJ Krpelan<krpelan_wj@...> wrote: > > Hi Matthias, > in my personal view you are asking to much. > to achieve interoperability, its not unusual that one has to adjust automatically generated wsdls/schemes manually. > if you try to do webservices fully dynamically you'd better make sure the same webservice-engine is present on both sides > > Seen from the java side, how could the generator tell from the code whether a variable is meant to be optional or obligatory or even nullable? > Usually it can't so it generates the most general approach, which is optional and nullable obviously. > > Cheers, > Wolfgang > > > --- On Wed, 7/29/09, Matthias.Gaiser@... <Matthias.Gaiser@...> wrote: > >> From: Matthias.Gaiser@... <Matthias.Gaiser@...> >> Subject: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation >> To: axis-dev@... >> Date: Wednesday, July 29, 2009, 2:10 PM >> Hi Chris (or someone else), >> >> maybe it is just a misunderstanding on my side. >> >> I am generating a wsdl from a java class via java2wsdl. I >> am using a simple method like >> public String login(String user, String password); >> >> java2wsdl now generates a wsdl where the parameters are >> marked with minOccurs="0", which should not be the case for >> my webservice. Is there a possibility to set the standard >> behavior to minOccurs="1"? As far as I have seen in the >> DefaultSchemaGenerator the minOccurs="0" is hardcoded. >> Generated wsdl fragment: >> <xs:element name="login"> >> <xs:complexType> >> <xs:sequence> >> >> <xs:element minOccurs="0" name="user" nillable="true" >> type="xs:string"/> >> >> <xs:element minOccurs="0" name="password" nillable="true" >> type="xs:string"/> >> </xs:sequence> >> </xs:complexType> >> </xs:element> >> >> >> Please help me in clarfying this issue. >> >> Thank you, >> Matthias. >> >> -----Ursprüngliche Nachricht----- >> Von: Chris van Es (JIRA) [mailto:jira@...] >> Gesendet: Dienstag, 28. Juli 2009 14:49 >> An: axis-dev@... >> Betreff: [jira] Commented: (AXIS2-3300) minOccurs="0" >> always generated by Java2WSDL - problems with .NET client >> generation >> >> >> [ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736053#action_12736053 >> ] >> >> Chris van Es commented on AXIS2-3300: >> ------------------------------------- >> >> I patched the DefaultSchemaGenerator in that fashion and we >> haven't had any problems to date. >> >> Chris. >> >> > minOccurs="0" always generated by Java2WSDL - problems >> with .NET client generation >> > >> ---------------------------------------------------------------------------------- >> > >> > >> Key: AXIS2-3300 >> > >> URL: https://issues.apache.org/jira/browse/AXIS2-3300 > >> > >> Project: Axis 2.0 (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. >> >> > > > > |
|
|
Re: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generationWell said Andreas :)
On Thu, Jul 30, 2009 at 11:00 AM, Andreas Veithen <andreas.veithen@...> wrote: What this example really shows is that to achieve interoperability and -- Ajith Ranabahu Reading, after a certain age, diverts the mind too much from its creative pursuits. Any man who reads too much and uses his own brain too little falls into lazy habits of thinking - Albert Einstein |
|
|
Re: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generationHi folks, Right - by pure doctrine. However, the need to master xml-schema and wsdl doesnt make life so much easier for web service developers, does it? Cheers Wolfgang --- On Thu, 7/30/09, Ajith Ranabahu <ajith.ranabahu@...> wrote: > From: Ajith Ranabahu <ajith.ranabahu@...> > Subject: Re: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > To: axis-dev@... > Date: Thursday, July 30, 2009, 11:06 PM > Well said Andreas :) > > On Thu, Jul 30, 2009 at 11:00 AM, > Andreas Veithen <andreas.veithen@...> > wrote: > > What this example really shows is that to achieve > interoperability and > > to make everybody's life easier (in an environment > where different > > platforms are used), you should not use a code first > approach, but a > > contract first. > > > > Andreas > > > > On Thu, Jul 30, 2009 at 11:26, WJ Krpelan<krpelan_wj@...> > wrote: > > > > > > Hi Matthias, > > > in my personal view you are asking to much. > > > to achieve interoperability, its not unusual that one > has to adjust automatically generated wsdls/schemes > manually. > > > if you try to do webservices fully dynamically > you'd better make sure the same webservice-engine is > present on both sides > > > > > > Seen from the java side, how could the generator tell > from the code whether a variable is meant to be optional or > obligatory or even nullable? > > > Usually it can't so it generates the most general > approach, which is optional and nullable obviously. > > > > > > Cheers, > > > Wolfgang > > > > > > > > > --- On Wed, 7/29/09, Matthias.Gaiser@... > <Matthias.Gaiser@...> > wrote: > > > > > >> From: Matthias.Gaiser@... > <Matthias.Gaiser@...> > > >> Subject: AW: [jira] Commented: (AXIS2-3300) > minOccurs="0" always generated by Java2WSDL - > problems with .NET client generation > > >> To: axis-dev@... > > >> Date: Wednesday, July 29, 2009, 2:10 PM > > >> Hi Chris (or someone else), > > >> > > >> maybe it is just a misunderstanding on my side. > > >> > > >> I am generating a wsdl from a java class via > java2wsdl. I > > >> am using a simple method like > > >> public String login(String user, String > password); > > >> > > >> java2wsdl now generates a wsdl where the > parameters are > > >> marked with minOccurs="0", which should > not be the case for > > >> my webservice. Is there a possibility to set the > standard > > >> behavior to minOccurs="1"? As far as I > have seen in the > > >> DefaultSchemaGenerator the minOccurs="0" > is hardcoded. > > >> Generated wsdl fragment: > > >> <xs:element name="login"> > > >> <xs:complexType> > > >> <xs:sequence> > > >> > > >> <xs:element minOccurs="0" > name="user" nillable="true" > > >> type="xs:string"/> > > >> > > >> <xs:element minOccurs="0" > name="password" nillable="true" > > >> type="xs:string"/> > > >> </xs:sequence> > > >> </xs:complexType> > > >> </xs:element> > > >> > > >> > > >> Please help me in clarfying this issue. > > >> > > >> Thank you, > > >> Matthias. > > >> > > >> -----Ursprüngliche Nachricht----- > > >> Von: Chris van Es (JIRA) [mailto:jira@...] > > >> Gesendet: Dienstag, 28. Juli 2009 14:49 > > >> An: axis-dev@... > > >> Betreff: [jira] Commented: (AXIS2-3300) > minOccurs="0" > > >> always generated by Java2WSDL - problems with .NET > client > > >> generation > > >> > > >> > > >> [ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736053#action_12736053 > > > >> ] > > >> > > >> Chris van Es commented on AXIS2-3300: > > >> ------------------------------------- > > >> > > >> I patched the DefaultSchemaGenerator in that > fashion and we > > >> haven't had any problems to date. > > >> > > >> Chris. > > >> > > >> > minOccurs="0" always generated by > Java2WSDL - problems > > >> with .NET client generation > > >> > > > >> > ---------------------------------------------------------------------------------- > > >> > > > >> > > > >> Key: AXIS2-3300 > > >> > > > >> URL: https://issues.apache.org/jira/browse/AXIS2-3300 > > > > > >> > > > >> Project: Axis 2.0 (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. > > >> > > >> > > > > > > > > > > > > > > > > > -- > Ajith Ranabahu > > Reading, after a certain age, diverts the mind too much > from its creative pursuits. Any man who reads too much and > uses his own brain too little falls into lazy habits of > thinking - Albert Einstein > > > > |
|
|
AW: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generationHi,
I see your point about having contract first, but this is a philosophical question. I would have loved something like an option in java2wsdl to specify minOccurs="1" or minOccurs="0". Axis1 did generate everything without minOccurs which results basically in minOccurs="1". I guess, I'll have to find a way to make it work for me. Thank you for your comments anyways, so I know that I don't have to wait for any changes in this direction. Matthias. -----Ursprüngliche Nachricht----- Von: WJ Krpelan [mailto:krpelan_wj@...] Gesendet: Freitag, 31. Juli 2009 11:33 An: axis-dev@... Betreff: Re: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation Hi folks, Right - by pure doctrine. However, the need to master xml-schema and wsdl doesnt make life so much easier for web service developers, does it? Cheers Wolfgang --- On Thu, 7/30/09, Ajith Ranabahu <ajith.ranabahu@...> wrote: > From: Ajith Ranabahu <ajith.ranabahu@...> > Subject: Re: AW: [jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > To: axis-dev@... > Date: Thursday, July 30, 2009, 11:06 PM > Well said Andreas :) > > On Thu, Jul 30, 2009 at 11:00 AM, > Andreas Veithen <andreas.veithen@...> > wrote: > > What this example really shows is that to achieve > interoperability and > > to make everybody's life easier (in an environment > where different > > platforms are used), you should not use a code first > approach, but a > > contract first. > > > > Andreas > > > > On Thu, Jul 30, 2009 at 11:26, WJ Krpelan<krpelan_wj@...> > wrote: > > > > > > Hi Matthias, > > > in my personal view you are asking to much. > > > to achieve interoperability, its not unusual that one > has to adjust automatically generated wsdls/schemes > manually. > > > if you try to do webservices fully dynamically > you'd better make sure the same webservice-engine is > present on both sides > > > > > > Seen from the java side, how could the generator tell > from the code whether a variable is meant to be optional or > obligatory or even nullable? > > > Usually it can't so it generates the most general > approach, which is optional and nullable obviously. > > > > > > Cheers, > > > Wolfgang > > > > > > > > > --- On Wed, 7/29/09, Matthias.Gaiser@... > <Matthias.Gaiser@...> > wrote: > > > > > >> From: Matthias.Gaiser@... > <Matthias.Gaiser@...> > > >> Subject: AW: [jira] Commented: (AXIS2-3300) > minOccurs="0" always generated by Java2WSDL - > problems with .NET client generation > > >> To: axis-dev@... > > >> Date: Wednesday, July 29, 2009, 2:10 PM > > >> Hi Chris (or someone else), > > >> > > >> maybe it is just a misunderstanding on my side. > > >> > > >> I am generating a wsdl from a java class via > java2wsdl. I > > >> am using a simple method like > > >> public String login(String user, String > password); > > >> > > >> java2wsdl now generates a wsdl where the > parameters are > > >> marked with minOccurs="0", which should > not be the case for > > >> my webservice. Is there a possibility to set the > standard > > >> behavior to minOccurs="1"? As far as I > have seen in the > > >> DefaultSchemaGenerator the minOccurs="0" > is hardcoded. > > >> Generated wsdl fragment: > > >> <xs:element name="login"> > > >> <xs:complexType> > > >> <xs:sequence> > > >> > > >> <xs:element minOccurs="0" > name="user" nillable="true" > > >> type="xs:string"/> > > >> > > >> <xs:element minOccurs="0" > name="password" nillable="true" > > >> type="xs:string"/> > > >> </xs:sequence> > > >> </xs:complexType> > > >> </xs:element> > > >> > > >> > > >> Please help me in clarfying this issue. > > >> > > >> Thank you, > > >> Matthias. > > >> > > >> -----Ursprüngliche Nachricht----- > > >> Von: Chris van Es (JIRA) [mailto:jira@...] > > >> Gesendet: Dienstag, 28. Juli 2009 14:49 > > >> An: axis-dev@... > > >> Betreff: [jira] Commented: (AXIS2-3300) > minOccurs="0" > > >> always generated by Java2WSDL - problems with .NET > client > > >> generation > > >> > > >> > > >> [ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736053#action_12736053 > > > >> ] > > >> > > >> Chris van Es commented on AXIS2-3300: > > >> ------------------------------------- > > >> > > >> I patched the DefaultSchemaGenerator in that > fashion and we > > >> haven't had any problems to date. > > >> > > >> Chris. > > >> > > >> > minOccurs="0" always generated by > Java2WSDL - problems > > >> with .NET client generation > > >> > > > >> > ---------------------------------------------------------------------------------- > > >> > > > >> > > > >> Key: AXIS2-3300 > > >> > > > >> URL: https://issues.apache.org/jira/browse/AXIS2-3300 > > > > > >> > > > >> Project: Axis 2.0 (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. > > >> > > >> > > > > > > > > > > > > > > > > > -- > Ajith Ranabahu > > Reading, after a certain age, diverts the mind too much > from its creative pursuits. Any man who reads too much and > uses his own brain too little falls into lazy habits of > thinking - Albert Einstein > > > > |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763750#action_12763750 ] Charles Galpin commented on AXIS2-3300: --------------------------------------- Any word on this patch getting accepted? I ran into this problem with axis2-1.5 as well. thanks, charles > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763877#action_12763877 ] Matthias Gaiser commented on AXIS2-3300: ---------------------------------------- As far as I've seen it in the current axis-2.1.5 release and the current sources there is still setMinOccurs(0) in it (unless I am missing something here). I am generating the wsdl with java2wsdl and perform an xsl transformation on it to remove all minOccurs="0". Maybe that's a possible solution for you as well, Charles. Matthias. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763990#action_12763990 ] Charles Galpin commented on AXIS2-3300: --------------------------------------- Thanks Matthias. In my case I'm letting axis generate the WSDL dynamically from my POJO class and would like to keep it that way for ease of maintenance. But worst case I can generate and serve the static (edited) copy. But it would be nice to see this fixed since a patch has been submitted a few months ago. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763991#action_12763991 ] Matthias Gaiser commented on AXIS2-3300: ---------------------------------------- I totally agree to you, Charles. > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
|
|
[jira] Commented: (AXIS2-3300) minOccurs="0" always generated by Java2WSDL - problems with .NET client generation[ https://issues.apache.org/jira/browse/AXIS2-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772637#action_12772637 ] Charles Galpin commented on AXIS2-3300: --------------------------------------- Well it turns out there is a bug when serving the static copy of my WSDL so I have no work around for this bug. Can you give us an idea of when this might be included Deepal? thanks, charles > minOccurs="0" always generated by Java2WSDL - problems with .NET client generation > ---------------------------------------------------------------------------------- > > Key: AXIS2-3300 > URL: https://issues.apache.org/jira/browse/AXIS2-3300 > Project: Axis 2.0 (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. |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |