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 "Jürgen Weber (JIRA)" <ji...@apache.org> on 2008/06/13 16:14:45 UTC
[jira] Created: (AXIS2-3856) Wrong WSDL for sequences in Corba IDL
structs
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Resolved: (AXIS2-3856) Wrong WSDL for sequences in Corba IDL
structs
Posted by "Eranga Jayasundera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranga Jayasundera resolved AXIS2-3856.
---------------------------------------
Resolution: Fixed
Fix Version/s: nightly
This issue is resolved.
> 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: corba
> Reporter: Jürgen Weber
> Assignee: Eranga Jayasundera
> Priority: Blocker
> Fix For: nightly
>
>
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Updated: (AXIS2-3856) Wrong WSDL for sequences in Corba IDL
structs
Posted by "Eranga Jayasundera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranga Jayasundera updated AXIS2-3856:
--------------------------------------
Component/s: (was: modules)
corba
> 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: corba
> Reporter: Jürgen Weber
> Assignee: Eranga Jayasundera
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
[jira] Assigned: (AXIS2-3856) Wrong WSDL for sequences in Corba IDL
structs
Posted by "Eranga Jayasundera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-3856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eranga Jayasundera reassigned AXIS2-3856:
-----------------------------------------
Assignee: Eranga Jayasundera
> 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
> Assignee: Eranga Jayasundera
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org