SOAPFaultException: IllegalArgumentException: Decoding tip

As part of my ongoing work on the SOA and SCA (Society of Confused Architects) bandwagon, I have a new not-so-easy error to explain and share with you.

Here is how the error will reads from the client side, when using Oracle Web Services tech Stack on the 10gR3 releases:
javax.xml.rpc.soap.SOAPFaultException: Caught exception while handling request:
deserialization error: java.lang.IllegalArgumentException


The SOAP response will look something like that:

1 <?xml version = '1.0' encoding = 'UTF-8'?>
2 <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
3 <env:Body>
4 <env:Fault>
5 <faultcode>env:Client</faultcode>
6 <faultstring>Caught exception while handling request: deserialization
7 error: java.lang.IllegalArgumentException</faultstring>
8 </env:Fault>
9 </env:Body>
10 </env:Envelope>



In my case, the error was just because I was having an invalid value
for some XML Schema type - the incomming value was not in the set
defined in the schema.


1 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
2 xmlns:tns="http://ws.rajkovic.org/samples"
3 targetNamespace="http://ws.rajkovic.org/samples"
4 elementFormDefault="qualified"
5 attributeFormDefault="unqualified">
6 ...
7 <xs:simpleType name="TitleType">
8 <xs:restriction base="xs:string">
9 <xs:enumeration value="Company"/>
10 <xs:enumeration value="Mr."/>
11 <xs:enumeration value="Ms."/>
12 </xs:restriction>
13 </xs:simpleType>
14 <xs:element name="title" type="tns:TitleType"/>
15 ...
16 </xs:schema>



Hope it can help some of you out there, getting to the bottom
of your interoperability issues faster.

-Ecco

Comments

Popular posts from this blog

Changing the version of JDK used by JDeveloper

Connection reset from a WCF Web Service

unexpected null value for literal data