Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > WS Clients: JAX-WS, JAX-RPC, Axis ignoring fixed attribute in XMLSchema type

Reply
Thread Tools

WS Clients: JAX-WS, JAX-RPC, Axis ignoring fixed attribute in XMLSchema type

 
 
Sascha Roth
Guest
Posts: n/a
 
      06-07-2009
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.

 
Reply With Quote
 
 
 
 
SergeyT
Guest
Posts: n/a
 
      06-08-2009
Have you read what is 'fixed' attribute for in the XML Schema
definitions? Packages are usually defined using namespaces.
 
Reply With Quote
 
 
 
 
Sascha Roth
Guest
Posts: n/a
 
      07-03-2009
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.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XMLSchema pattern based on attribute patrik.nyman@orient.su.se XML 3 10-26-2007 03:56 PM
IE6 ignoring "height" CSS attribute? Oliver Wong HTML 3 06-05-2007 01:26 PM
AXIS jars org.apache.axis.wsi.* and org.apache.axis.transport.jms.* unkwb@web.de Java 0 02-23-2005 04:02 PM
Axis 1.1 don't delete attachments in the axis attachment cache Stefan Java 0 05-06-2004 08:00 PM
axis.jar does not contain org.apache.axis.client.ServiceClient? Joey Vendetta Java 0 04-01-2004 05:51 PM



Advertisments