You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Kador, Daniel" <da...@lmco.com> on 2005/06/06 18:25:07 UTC

Simple type confusion

This may not be suited for this list.  If this is the case, I apologize
for cluttering up your inboxes.

I'm having a problem getting Axis to deploy properly with a WSDL that
uses a schema in an external file.  Here is the type called "Purpose"'s
definition in the schema:

<xs:complexType name="Purpose">
	<xs:annotation>
		<xs:documentation>5.1.41</xs:documentation>
	</xs:annotation>
	<xs:sequence>
		<xs:element name="HasRole" type="Role"
maxOccurs="unbounded">
		</xs:element>
		<xs:element name="Optimizer" type="xs:string"
maxOccurs="unbounded">
		</xs:element>
	</xs:sequence>
	<xs:attribute name="description" type="descriptionType"
use="required"/>
</xs:complexType>

The problem lies in the "description" attribute.  It's of type
"descriptionType".  Here is "descriptionType"'s declaration:

<xs:simpleType name="descriptionType">
	<xs:annotation>
		<xs:documentation>5.1.5</xs:documentation>
		<xs:documentation>restricted to
xs:string</xs:documentation>
	</xs:annotation>
	<xs:restriction base="xs:normalizedString"/>
</xs:simpleType>

When I use this, after I deploy my WSDL normally, I try to view the WSDL
through my web browser.  This is the error I get:

AXIS error

Sorry, something seems to have gone wrong... here are the details:

	Fault - Bean attribute description is of type
org.apache.axis.types.NormalizedString, which is not a 	simple type

	AxisFault
	 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
	 faultSubcode: 
	 faultString: Bean attribute description is of type
org.apache.axis.types.NormalizedString, which is
not a simple type
	 faultActor: 
	 faultNode: 
	 faultDetail: 
	{http://xml.apache.org/axis/}hostname:ORLIWG2H5Y61

This didn't make sense to me at first, because xs:normalizedString IS of
simpleType (at least according to the O'Reilly reference that I use).  I
can solve this problem in one of two ways.  I can change the attribute
type of "description" from "descriptionType" to "xs:normalizedString".
Or, I can change the restriction base of "descriptionType" from
"xs:normalizedString" to "xs:string".

The problem is, I don't want to have to change my schema, because it
corresponds to industry standards as it is.  Can anybody see a problem
that I'm missing?  I can provide the WSDL/schema if requested.

Thanks,
Dan Kador