axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Fell (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1818) MessageElement [] for <any> doesn't include all elements
Date Tue, 22 Feb 2005 22:33:50 GMT
     [ http://issues.apache.org/jira/browse/AXIS-1818?page=comments#action_59615 ]
     
Simon Fell commented on AXIS-1818:
----------------------------------

I've attached a simple schema and instance document. using the .NET Xml Schema Validating
parser, it says the instance is valid to the schema. If you comment out the <any> in
the schema, then it will compain that the 2nd Id is not valid. (you can use xmlvalid from
http://www.sellsbrothers.com/tools to easily test this)

The XML Schema Validating parser in xerces gives the same results. Therefore i still i believe
my original statement is correct, and the 2nd Id element shoudl be represented in the any
collection. I could find nothing in the xml schema spec or the Walmsley Definitive XML Schema
book that indicates that both .NET and Xerces are wrong in this regard.


> MessageElement [] for <any> doesn't include all elements
> --------------------------------------------------------
>
>          Key: AXIS-1818
>          URL: http://issues.apache.org/jira/browse/AXIS-1818
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC2
>  Environment: XP / JDK 1.4.x / Axis 1.2 RC3
>     Reporter: Simon Fell
>     Assignee: Venkat Reddy
>  Attachments: sforce.xml, sforce.xsd
>
> This is with Axis 1.2 RC3
> Given this type fragment
> <sequence>
> <element name="type" type="xsd:string"/>
> <element name="fieldsToNull" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
> <element name="Id" type="tns:ID" nillable="true" minOccurs="0" maxOccurs="1"/>
> <any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> If a runtime message returns the Id element twice, the 2nd instance, which should end
up in the any collection gets dropped.
> There's a sample service at http://soap.4s4c.com/dotnet/any.wsdl that this test code
shows this problem.
> 		AnyServiceLocator loc = new AnyServiceLocator();
> 		Soap svc = loc.getSoap();
> 				
> 		QueryResult qr = svc.query("blah");
> 		
> 		for (int i =0; i < qr.getRecords().length; i++ ) {
> 			SObject s = qr.getRecords(i);
> 			MessageElement [] e= s.get_any();
> 			System.out.println("MessageElement array size is " + e.length);
> 			for (int j = 0; j < e.length; j++ ){
> 				System.out.print(" " + e[j].getValue());
> 			}
> 			System.out.println("");
> 		}
> This prints out "MessageElement array size is 2", even though there's 3 elements that
appear after the first Id element, here's the fragement of the response.
> <records xsi:type="sf:sObject">
> <sf:type>Contact</sf:type>
> <sf:Id>00330000006jryXAAQ</sf:Id>
> <sf:Id>00330000006jryXAAQ</sf:Id>
> <sf:FirstName>Fred</sf:FirstName>
> <sf:LastName>A&gt;B</sf:LastName>
> </records>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message