Hi again,
I just want to report the solution (or better workaround) to the below
mentioned problem:
javax.xml.ws.Holder<de.h_da.fbi.xsd.TestDataType> testDataType = new
javax.xml.ws.Holder<de.h_da.fbi.xsd.TestDataType>( );
testDataType.value = new TestDataType();
testDataType.value.setPackage(testDataType.value.g etPackage()); //the
actual workaround - note that you don't have to set the attribute package.
Best,
Sascha
Sascha Roth wrote:
> Hi everyone,
>
> I have a WSDL file with the following ComplexType:
>
> <xs:complexType name="TestDataType">
> <xs:all>
> <xs:element name="elem1" type="xs:string"/>
> <xs:element name="elem2" type="xs:string"/>
> </xs:all>
> <xs:attribute name="package" use="required" type="xs:string"
> fixed="java.lang"/>
> </xs:complexType>
>
> I'm trying to generate a Web Service Client with NetBeans or Eclipse.
> Both WS Clients just ignore the "use" and the "fixed" attribute of the
> xs:attribute element. After looking into the generated sourcecode, it
> seems that this attribute becomes 1) optional 2) either no default value
> (Eclipse WebTools plugin) or it is just not working (NetBeans JAX-WS).
>
> Literally speaking, it should be generating:
> <TestDataType package="java.lang"/>
>
> instead it generates:
>
> <TestDataType/>
>
> Can anyone confirm this as a bug?
> Any other WS Library that I could use which doesn't ignore the fixed
> attributes?
>
> For the attribute I already tried with no type def.:
> <xs:attribute name="package" use="required" fixed="java.lang"/>
>
> Thanks for your help.
>
> Best regards
>
> Sascha
>
> P.S.: What I also noticed is that XMLSpy (2008 SE) can't generate a
> proper SOAP Message either. But if I just use the Schema "standalone" it
> generates a proper XML sample file.
>
|