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 mizu <mi...@zimen.sk> on 2006/02/28 16:06:21 UTC

SAXException: Unregistered type: class ....

Hi

   I'm not sure if this problem is related to this mailing list.
   if not, please navigate me to right way.

   I'm using globusToolkit4 with Axis web services.

   The problem what i have is that i cant call one method with complex
   parameter:

   		public void query(Attributes attr){...};


   Parameter Attributes is generated from WSDL code: (nothing special)

	<xsd:complexType name="Attributes">
		<xsd:sequence>
			<xsd:element name="id" type="xsd:string"/>
			<xsd:element name="name" type="xsd:string"/>
			<xsd:element name="resources"
				type="tns:Object"
				minOccurs="1" maxOccurs="unbounded"/>
			<xsd:element name="state" 
				type="tns:State"
				minOccurs="1" maxOccurs="1"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="Object">
		<xsd:simpleContent>
			<xsd:extension base="xsd:float">
				<xsd:attribute name="type" type="tns:ObjectType"/>
				<!--<xsd:attribute name="type" type="xsd:string"/>-->
			</xsd:extension>
		</xsd:simpleContent>
	</xsd:complexType>

	<xsd:simpleType name="ObjectType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="CPU"/>
			<xsd:enumeration value="DISK"/>
			<xsd:enumeration value="MEM"/>
		</xsd:restriction>
	</xsd:simpleType>

	(All these types are defined in the same namespace, 
	 and generated classes are deployed at the axis container. I don't
	 have any problems with using them by normal operations.)


	Client crashes on this exception:

RemoteException: org.xml.sax.SAXException: Unregistered type:  
			class org.mizu.stubs.gara2.MyService.ObjectType
  AxisFault
	 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
  faultSubcode: 
  faultString: org.xml.sax.SAXException: Unregistered type:  class
  						org.mizu.stubs.gara2.MyService.ObjectType
   faultActor: 
    faultNode: 
     faultDetail: 
             {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
	     Unregistered type:  class org.mizu.stubs.gara2.MyService.ObjectType

	  at org.apache.axis.encoding.ser.SimpleDeserializer.onStartElement(SimpleDeserializer.java:363)
          at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
          at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
          at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
          at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
          at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:238)
          at org.apache.axis.message.RPCElement.getParams(RPCElement.java:386)
          at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
          at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
          at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
          at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
          at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
          at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
          at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
          at org.globus.wsrf.container.ServiceThread.doPost(ServiceThread.java:677)
          at org.globus.wsrf.container.ServiceThread.process(ServiceThread.java:398)
          at org.globus.wsrf.container.GSIServiceThread.process(GSIServiceThread.java:130)
          at org.globus.wsrf.container.ServiceThread.run(ServiceThread.java:302)
....


  When i exchanged tns:ObjectType with xsd:string it works well.
  

  Where should i looking for bug ?


  thanks in advance	


  					mizu





-- 
    -- mizu --
"Every man dies; not every man really lives."
                       --William Wallace, Braveheart