axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Kulak <pku...@gmail.com>
Subject Trouble mapping a fault to my own exception
Date Wed, 03 Aug 2005 21:17:15 GMT
Here's what I'm getting over the wire:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body>
  <SOAP-ENV:Fault>
   <faultactor></faultactor>
   <faultcode>SOAP-ENV:</faultcode>
   <faultstring>MemberKey not found</faultstring>
   <detail>
    <NS1:EInvalidMembidException xmlns:NS1="urn:InitEvalClasses"
xsi:type="NS1:EInvalidMembidException"/>
   </detail>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and here's my attempt to map that to my own exception:

ServiceFactory serviceFactory = ServiceFactory.newInstance();
service = serviceFactory.createService(new QName(uri, serviceName));

TypeMappingRegistry registry = service.getTypeMappingRegistry();
TypeMapping map = registry.getDefaultTypeMapping();

QName q = new QName("urn:InitEvalClasses", "EInvalidMembidException");
map.register(InvalidMemberIdException.class, q,
	new BeanSerializerFactory(InvalidMemberIdException.class, q),
	new BeanDeserializerFactory(InvalidMemberIdException.class, q));

The documentation surrounding this kind of thing is a bit sparse and I
have no idea if I'm even aproaching this from the right angle. Can
anyone help me out? Thanks!

Mime
View raw message