axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heitzso <>
Subject href, mozilla soap, and custom serializers
Date Tue, 04 Jun 2002 16:24:18 GMT
HELP! Ouch.  HELP HELP  (please ... and thanks ...)

Mozilla 1.0rc3 SOAP doesn't handle hrefs. I recoded a java 
bean (returned from web service)
to only contain simple data types and arrays of simple
data types but axis still uses a href even though 
nothing is gained by it.

I'm trying _hard_ to code a custom serializer for my
bean to avoid the href but my serializer/axis setup
breaks with a null pointer exceptions.  I'm following
all of the doc and the encoder sample app, but it's
still a nogo.  null pointer coming out of (beta2): 688 (647, 628, 507, 488).
Line 688 in is:

My wsdd element that's triggering the null pointer:
<typeMapping xmlns:ns="urn:ferrett" qname="ns:SelectionNodeSet"

Null pointer trigger occurs when I go to AxisServlet to just list the 
exposed classes/methods.

My ser/deser factories follow the sample code exactly.  

The ser code:

public class SelectionNodeSetSerializer implements Serializer {
 public static final String LENGTH = "length";
 public static final String NAMES = "names";
 public static final String IDS = "ids";
 public static final String DESCRIPTIONS = "descriptions";
 public static final String TERMINALS = "terminals";
 public static final QName myTypeQName = new QName("urn:ferrett",
 public SelectionNodeSetSerializer() {}
 public void serialize(QName name, Attributes attributes, Object value,
SerializationContext context) throws IOException {
   if (! (value instanceof SelectionNodeSet)) {
      throw new IOException(.....);
   SelectionNodeSet selectionNodeSet = (SelectionNodeSet) value;
   context.startElement(name, attributes);
   context.serialize(new QName("urn:ferrett", LENGTH), null, new
Integer(selectionNodeSet.length), Integer.class);
   //ArraySerializer arraySerializer = new ArraySerializer();
   //arraySerializer.serialize(new QName("", IDS), null, 
selectionNodeSet.ids, context);
   //arraySerializer.serialize(new QName("", NAMES), null,
selectionNodeSet.names, context);
   //arraySerializer.serialize(new QName("", DESCRIPTIONS), null,
selectionNodeSet.descriptions, context);
   //arraySerializer.serialize(new QName("", TERMINALS), null,
selectionNodeSet.terminals, context);
 public String getMechanismType() { 
  return Constants.AXIS_SAX; 
 public boolean writeSchema(Types types) throws Exception {
  return false;


Note that I've commented out the array serializers while I sort
out the simplest piece -- serializing a single integer.


View raw message