axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raghu Havaldar <rhaval...@shodaka.net>
Subject set up Deserializers (in a junit/test environment) ?
Date Fri, 14 May 2004 22:46:11 GMT
Hi,

Am attempting to develop a custom handler. Writing a test (junit) for it 
(in TDD fashion).
As I need to pass in a MessageContext, I went about it creating it  by 
doing:
    AxisServer server = new AxisServer();
    MessageContext context = new MessageContext(server);
    //....created an envelope w/ some header content....
    Message request = new Message(env);
    context.setRequestMessage(request);

When I attempt to do ->  header.getValueAsType(Constants.XSD_LONG);
 I get the following error:
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.Exception: No deserialization context to use in 
MessageElement.getValueAsType()!
 faultActor:
 faultNode:
 faultDetail:
    {http://xml.apache.org/axis/}stackTrace:java.lang.Exception: No 
deserialization context to use in MessageElement.getValueAsType()!
    at 
org.apache.axis.message.MessageElement.getValueAsType(MessageElement.java:690)
    at 
org.apache.axis.message.MessageElement.getValueAsType(MessageElement.java:685)

I guess I will have to somehow setup a DeserializationContext (which 
will provide a Deserializer for XSD_LONG). How
can I do that  ? How are the 'default set' of deserializers/serializers 
setup in Axis ?

thanks.

-- 
Raghu Havaldar
rhavaldar@shodaka.net
Blog: http://www.shodaka.net/blojsom/blog/
p(ersonal)Wiki: http://www.shodaka.net/pwiki
e(exploration)Wiki: http://www.shodaka.net/wiki/jsp/Wiki?StartingPoints


Mime
View raw message