users@jax-rpc.java.net

Re: unexpected element type: QName vs. string

From: Baltz, Kenneth <Kbaltz_at_firstam.com>
Date: Tue, 11 Mar 2003 10:43:25 -0800

Check out NetTool:

http://www.capescience.com/downloads/index.shtml

It's a proxy that lets you monitor SOAP traffic.

K.C.

> -----Original Message-----
> From: Robert Lowe [mailto:rmlowe_at_RMLOWE.COM]
> Sent: Tuesday, March 11, 2003 10:26 AM
> To: JAXRPC-INTEREST_at_JAVA.SUN.COM
> Subject: unexpected element type: QName vs. string
>
>
> As a learning exercise, I'm trying to invoke the Amazon.com
> Web services
> using JAX-RPC. I have the Web Service Developers Kit version 1.1, with
> JAX-RPC 1.0.3.
>
> I have run the wscompile command against the WSDL descriptor,
> using the
> attached config.xml file, with a command line of the form:
>
> wscompile -d classes -gen -keep -s src -verbose config.xml
>
> This works fine; I generate javadocs from the generated
> source files, and
> package the classes in a JAR file. I then try to invoke the
> service using
> the attached Java client (AmazonClient.java). I get the
> exception shown
> below. It looks as though some element or attribute name
> can't be converted
> to a QName, but I cannot tell why.
>
> Obviously it would be easier to debug this if I could
> intercept the actual
> SOAP message. I'm wondering what would be the easiest way to
> do this--would
> I need to write a handler?
>
> Thanks in advance for any help.
>
> ========================================
>
> java.rmi.RemoteException: Runtime exception; nested exception is:
> unexpected element type:
> expected={http://www.w3.org/2001/XMLSchema}QName,
> actual={http://www.w3.org/2001/XMLSchema}string
>
> unexpected element type:
> expected={http://www.w3.org/2001/XMLSchema}QName,
> actual={http://www.w3.org/2001/XMLSchema}string
>
> at
> com.sun.xml.rpc.encoding.SerializerBase.verifyType(SerializerB
> ase.java:129)
>
> at
> com.sun.xml.rpc.encoding.SimpleTypeSerializer.deserialize(Simp
> leTypeSerializ
> er.java:101)
>
> at
> com.sun.xml.rpc.encoding.SOAPFaultInfoSerializer.doDeserialize
> (SOAPFaultInfo
> Serializer.java:63)
>
> at
> com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(Obje
> ctSerializerBa
> se.java:165)
>
> at
> com.sun.xml.rpc.client.StreamingSender._readBodyFaultElement(S
> treamingSender
> .java:348)
>
> at
> com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:165)
>
> at
> com.netdimen.amazon.AmazonSearchPort_Stub.keywordSearchRequest
> (AmazonSearchP
> ort_Stub.java:623)
>
> at amazon.AmazonClient.doKeywordSearch(AmazonClient.java:49)
>
> at amazon.AmazonClient.main(AmazonClient.java:61)
>
>
>
> Robert Lowe
> http://RMLowe.com/
>
> +852 9520 4722
> rmlowe_at_rmlowe.com
>