Wrong WSDL for sequences in Corba IDL structs ---------------------------------------------
Key: AXIS2-3856 URL: https://issues.apache.org/jira/browse/AXIS2-3856 Project: Axis 2.0 (Axis2) Issue Type: Bug Components: modules Reporter: Jürgen Weber Priority: Blocker For some sequences containing structs and/or structs containing sequences there is a wrong WSDL generated (at least the generated Axis2 Java Stubs produce an XML that results in a wrong Corba call). At runtime this results in the Orb complaining about NULL elements being marshalled. To reproduce: Take the sample from http://wso2.org/library/2807 and include these IDL definitions: struct B { string s; }; struct A { sequence<B> Bseq; string x; }; typedef sequence<A> Aseq; interface MyCorbaService { void testSeq(in Aseq pAs); this results in the WSDL snipped below. The representation for string x should be outside of the xs:sequence. <xs:element name="testSeq"> <xs:complexType> <xs:sequence> <xs:element name="pAs" nillable="true" type="ns:Aseq"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Aseq" type="ns:Aseq"/> <xs:complexType name="Aseq"> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="ns:A"/> </xs:sequence> </xs:complexType> <xs:element name="A" type="ns:A"/> <xs:complexType name="A"> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="Bseq" nillable="true" type="ns:B"/> <xs:element name="x" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:element name="B" type="ns:B"/> <xs:complexType name="B"> <xs:sequence> <xs:element name="s" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> For this Test Client Code: MycorbaserverStub.TestSeq ts = new MycorbaserverStub.TestSeq(); MycorbaserverStub.B b = new MycorbaserverStub.B(); b.setS("hello"); MycorbaserverStub.A a = new MycorbaserverStub.A(); a.addBseq(b); a.setX("x"); MycorbaserverStub.Aseq as = new MycorbaserverStub.Aseq(); as.addItem(a); ts.setPAs(as); stub.testSeq(ts); Using JacORB you see [INFO] org.omg.CORBA.MARSHAL: Cannot marshall null string. vmcid: 0x0 minor code: 0 completed: No The XML on the wire is <?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <ns1:testSeq xmlns:ns1="http://corba2ws/xsd"> <ns1:pAs> <ns1:item> <ns1:Bseq> <ns1:s>hello</ns1:s> </ns1:Bseq> <ns1:x>x</ns1:x> </ns1:item> </ns1:pAs> </ns1:testSeq> </soapenv:Body> </soapenv:Envelope> -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]