users@jax-rpc.java.net

xrpcc & abstract types

From: Sebastian, Dieter <Dieter.Sebastian_at_KOELN.SEMA.SLB.COM>
Date: Fri, 19 Jul 2002 10:19:09 +0200

> Hi all,
>
> I have built a running Web Service and a valid WSDL-File for this service.
> This file describes onle doc/literal soap operations.
> In this WSDL-File I have imported a schema, which is validated by XMLSpy.
>
> With xrpcc (from JWSDP 1.0) I sucessfully built the client stubs.
> This client successfully sends the request, but while processing the
> response,
> I get an exception:
> java.rmi.RemoteException: Runtime exception; nested exception is:
> deserialization error: deserialization error: unexpected element type:
> expected={http://www.myservice.com/}topicMap, actual=communityType
> at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:227)
> at
> com.slb.taxi.sun.WSClient.XTMESoapPortType_Stub.findTopics(XTMESoapPortTyp
> e_Stub.java:198)
> at com.slb.taxi.sun.WSClient.JAXRPCClient.main(JAXRPCClient.java:72)
> ...
>
> The response looks like this:
> -----
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <topicMap xmlns="http://..."
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <topic expired="false" handler="..." id="..." path="..."
> sumAssoc="0" sumClfd="0" xsi:type="communityType">
> <topName lang="de"><base>...</base></topName>
> <bbox .../></topic></topicMap>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> -----
>
> This is probably NOT a namespace error, as so often discussed here.
> If I omit the "xsi:type='communityType' " in the topic tag, the resonse
> succesfully will be processed by the client.
> But I cannot validate this response, because "topic" is an an element
> of type "TAbstractType", which is defined in the schema with the
> attribute "abstract='true'". So with "xsi:type='..'" I "instantiate" a
> community-type,
> which is defined with "<xs:complexContent><xs:extension
> base='TAbstractType'>...".
>
> I want to have a client, which can process a valid response.
>
> My ConfigFile for xrpcc looks like this:
> -----
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <wsdl location="http://www.myservice.com/wsdl/XTMEBase_1.wsdl"
> packageName="mypath.WSClient">
> <typeMappingRegistry/>
> </wsdl>
> </configuration>
> -----
>
> Do I have to change the typeMappings in the ConfigFile ? If so, how do I
> do this ?
> Do I have to write de-/serializers for "communityType" ? For my purpose
> only LiteralFragmentSerializers
> are required; aren't they default de/serializers ?
> Are there limitations in xrpcc's WSDL-Compiler ?
>
> I hope, my question is not too complicated.
> Thx in advance.
>
> Regards
>
>
> Dieter Sebastian
> XML Network
> Competence Center Content Management
> SchlumbergerSema
> Kaltenbornweg 3
> D 50679 Köln/Cologne
> +49 (0)221 8299 451
> Email: dieter.sebastian_at_koeln.sema.slb.com
> Internet: www.schlumbergersema.de
>