axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Boguerra (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-1911) String extension base in XML Schema provokes "argument type mismatch"
Date Tue, 05 Apr 2005 13:15:19 GMT
String extension base in XML Schema provokes "argument type mismatch"
---------------------------------------------------------------------

         Key: AXIS-1911
         URL: http://issues.apache.org/jira/browse/AXIS-1911
     Project: Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.2RC2    
 Environment: Linux redhat9, j2sdk1.4.2_07, Jonas 4.3.2 + Tomcat 5.0.30,axis 1.2RC2 (axis.jar
integrated in Jonas)
    Reporter: Marc Boguerra


Hi,

I have the following snippet in my xml schema

<xs:complexType name="PrimaryType">
		<xs:sequence>
			<xs:element name="SecondaryElement" type="res:SecondaryType" 
nillable="true"/>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="SecondaryType">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="SecondaryURI" type="xs:anyURI" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>

When i initialize an instance of PrimaryType with an instance of 
SecondaryType in my client and call my webservice i get an "argument type 
mismatch" error.
But when i change the extension base type of the SecondaryType (to int, 
float, whatever except string) and generate my classes with WSDL2Java i have no more error:

for example : 

<xs:complexType name="SecondaryType">
		<xs:simpleContent>
			<xs:extension base="xs:int">
				<xs:attribute name="SecondaryURI" type="xs:anyURI" use="optional"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>


Both client and server classes are generated with Wsdl2Java tool.

Here's the error trace : 
 

AxisFault
 faultCode: 
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.IllegalArgumentException: argument type 
mismatch
 faultActor:
 faultNode:
 faultDetail:
        
{http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException: argument type
mismatch
        at 
org.apache.axis.encoding.ser.SimpleDeserializer.setSimpleElements(SimpleDeserializer.java:476)
        at 
org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:192)
        at 
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502)
        at 
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
        at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
        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)

It seems that there's a problem with string extension base.

Thanks for any precision,
marc


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message