You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case the XSD not having complex types, the java class is generated from JAXB, but the avro schema is not generated, If I add a complex type to this as follows,
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:sobject.partner.soap.sforce.com"> <xs:element name="type" type="xs:string"/> <xs:element name="Id" nillable="true" type="xs:string"/> <xs:element xmlns:urn="urn:sobject.partner.soap.sforce.com" name="Account" type="urn:AccountType"/> <xs:element name="Name" type="xs:string"/> <xs:element name="Amount" type="xs:float"/> <xs:complexType name="AccountType"> <xs:sequence> <xs:element type="xs:string" name="type"/> <xs:element type="xs:string" name="Id" nillable="true"/> <xs:element type="xs:string" name="Name"/> </xs:sequence> </xs:complexType> </xs:schema>
then, avro schema is generated only for the complex type parameters and the root level parameters such as <xs:element name="Name" type="xs:string"/> <xs:element name="Amount" type="xs:float"/>
are ignored...
The text was updated successfully, but these errors were encountered:
This behavior seems to be currently unsupported. If you look here you can see that only the classes and enums generated by JAXB are turned into an avro schema. At the moment I'm not sure how to do that, but it could probably be done by synthesizing some root class and manually placing the root elements on it. Either that or JAXB is already creating a root class but it's not in the usual classes list.
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:sobject.partner.soap.sforce.com"> <xs:element name="type" type="xs:string"/> <xs:element name="Id" nillable="true" type="xs:string"/> <xs:element name="Name" type="xs:string"/> <xs:element name="Amount" type="xs:float"/> </xs:schema>
In the case the XSD not having complex types, the java class is generated from JAXB, but the avro schema is not generated, If I add a complex type to this as follows,
<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:sobject.partner.soap.sforce.com"> <xs:element name="type" type="xs:string"/> <xs:element name="Id" nillable="true" type="xs:string"/> <xs:element xmlns:urn="urn:sobject.partner.soap.sforce.com" name="Account" type="urn:AccountType"/> <xs:element name="Name" type="xs:string"/> <xs:element name="Amount" type="xs:float"/> <xs:complexType name="AccountType"> <xs:sequence> <xs:element type="xs:string" name="type"/> <xs:element type="xs:string" name="Id" nillable="true"/> <xs:element type="xs:string" name="Name"/> </xs:sequence> </xs:complexType> </xs:schema>
then, avro schema is generated only for the complex type parameters and the root level parameters such as
<xs:element name="Name" type="xs:string"/> <xs:element name="Amount" type="xs:float"/>
are ignored...
The text was updated successfully, but these errors were encountered: