Hi, I tried to generate a SOAP header code that should serialize/deserialize something like:
<f:Foo b:id="1234" time="2004-07-29T10:00:00Z" xmlns:f="urn:foo" xmlns:b="urn:bar"> <child>...</child> </f:Foo> So far I was not able to generate a class that has a global attribute like in the above example ({urn:bar}id). Could someone tell me how to do this? I created two schemas: one for urn:foo and one for urn:bar, as in file:foo.xsd <xs:schema targetNamespace="urn:foo" xmlns:f="urn:foo" xmlns:b="urn:bar"> <xs:import namespace="urn:bar" schemaLocation="bar.xsd"/> <xs:element name="Foo" type="f:Foo"/> <xs:complexType name="Foo"> <xs:sequence> <xs:element name="child" type="xs:string"/> </xs:sequence> <xs:attribute ref="b:id"/> <xs:attribute name="time" type="xs:dateTime"/> </xs:complexType> </xs:schema> file:bar.xsd <xs:schema targetNamespace="urn:bar" xmlns:b="urn:bar"> <xs:attribute name="id" type="xs:string"/> </xs:schema> Then, the generated code for Foo got the time attribute right but not the id attribute. Thanks for your help. Regards, Aki