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 "Markus (Commented) (JIRA)" <ji...@apache.org> on 2012/04/20 08:40:40 UTC
[jira] [Commented] (AXIS2-5029) Problem with automatically
generated WSDL and nested classes
[ https://issues.apache.org/jira/browse/AXIS2-5029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258049#comment-13258049 ]
Markus commented on AXIS2-5029:
-------------------------------
Good to know, that's great. Thanks.
> Problem with automatically generated WSDL and nested classes
> -------------------------------------------------------------
>
> Key: AXIS2-5029
> URL: https://issues.apache.org/jira/browse/AXIS2-5029
> Project: Axis2
> Issue Type: Bug
> Components: wsdl
> Affects Versions: 1.5.3
> Environment: Windows
> Reporter: Fadila Mumbasic
> Fix For: 1.5.6, 1.6.1
>
>
> The automatically generated WSDL does not contain the "type" attribute
> for the element which corrsponds to the nested class.
> My Java class looks like:
> package com.uniserv.nested.test;
> public class NestedClass {
>
> public static class InnerStruct{
> private String x;
> private String y;
>
> public InnerStruct(){
> x= "";
> y= "";
> }
>
> public String getX(){
> return this.x;
> }
>
> public String getY(){
> return this.y;
> }
>
> public void setX(String x){
> this.x = x;
> }
>
> public void setY(String y){
> this.y = y;
> }
> }
>
> public class Output{
> private InnerStruct[] innerStructArray;
>
> public Output() {
> innerStructArray = null;
> }
>
> public InnerStruct[] getInnerStructArray(){
> return this.innerStructArray;
> }
>
> public void setInnerStructArray (InnerStruct[]
> innerStructArray){
> this.innerStructArray = innerStructArray;
> }
> }
>
> public Output testIt (String a ){
>
> Output output = new Output();
> InnerStruct[] innerStructArray =
> output.getInnerStructArray();
>
> if(innerStructArray == null){
>
> innerStructArray = new NestedClass.InnerStruct[2];
>
> InnerStruct struct1 = new NestedClass.InnerStruct();
> struct1.setX("x1");
> struct1.setY("y1");
> innerStructArray[0]= struct1;
>
> InnerStruct struct2 = new NestedClass.InnerStruct();
> struct2.setX("x2");
> struct2.setY("y2");
> innerStructArray[1]= struct2;
> }
>
> output.setInnerStructArray(innerStructArray);
> return output;
> }
> }
> The automaticaly generated WSDL contains following:
> - <wsdl:types>
> - <xs:schema xmlns:ax210="http://test.nested.uniserv.com/xsd"
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://test.nested.uniserv.com">
> <xs:import namespace="http://test.nested.uniserv.com/xsd" />
> - <xs:element name="testIt">
> - <xs:complexType>
> - <xs:sequence>
> <xs:element minOccurs="0" name="a" nillable="true"
> type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> - <xs:element name="testItResponse">
> - <xs:complexType>
> - <xs:sequence>
> <xs:element minOccurs="0" name="return" nillable="true"
> type="ax210:Output" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> - <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified"
> targetNamespace="http://test.nested.uniserv.com/xsd">
> - <xs:complexType name="Output">
> - <xs:sequence>
> <xs:element maxOccurs="unbounded" minOccurs="0"
> name="innerStructArray" nillable="true" />
> </xs:sequence>
> </xs:complexType>
> - <xs:complexType name="InnerStruct">
> - <xs:sequence>
> <xs:element minOccurs="0" name="x" nillable="true" type="xs:string" />
> <xs:element minOccurs="0" name="y" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
> </wsdl:types>
> The definition of the complexType Output does not contain the type of
> the particular elements:
> <xs:element maxOccurs="unbounded" minOccurs="0" name="innerStructArray"
> nillable="true" />
> I would expect to see
> <xs:element maxOccurs="unbounded" minOccurs="0" name="innerStructArray"
> nillable="true" type="ax210:InnerStruct" />
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org