these are the types it supports if (value instanceof String) { serializeAnyType("string", value.toString(), xmlStreamWriter); } else if (value instanceof Integer) { serializeAnyType("int", value.toString(), xmlStreamWriter); } else if (value instanceof Boolean) { serializeAnyType("boolean", value.toString(), xmlStreamWriter); } else if (value instanceof URI) { serializeAnyType("anyURI", value.toString(), xmlStreamWriter); } else if (value instanceof Date) { serializeAnyType("date", convertToString((Date) value), xmlStreamWriter); } else if (value instanceof Calendar) { serializeAnyType("dateTime", convertToString((Calendar) value), xmlStreamWriter); } else if (value instanceof Time) { serializeAnyType("time", convertToString((Time) value), xmlStreamWriter); } else if (value instanceof Float) { serializeAnyType("float", value.toString(), xmlStreamWriter); } else if (value instanceof Long) { serializeAnyType("long", value.toString(), xmlStreamWriter); } else if (value instanceof Double) { serializeAnyType("double", value.toString(), xmlStreamWriter); } else if (value instanceof Short) { serializeAnyType("short", value.toString(), xmlStreamWriter); } else if (value instanceof BigDecimal) { serializeAnyType("decimal", value.toString(), xmlStreamWriter); } else if (value instanceof QName) { QName qNameValue = (QName) value; String prefix = xmlStreamWriter.getPrefix( qNameValue.getNamespaceURI()); if (prefix == null) { prefix = BeanUtil.getUniquePrefix(); xmlStreamWriter.writeNamespace(prefix, qNameValue.getNamespaceURI()); xmlStreamWriter.setPrefix(prefix, qNameValue.getNamespaceURI ()); } String attributeValue = qNameValue.getLocalPart(); if (!prefix.equals("")) { attributeValue = prefix + ":" + attributeValue; } serializeAnyType("QName", attributeValue, xmlStreamWriter); } else if (value instanceof UnsignedLong) { serializeAnyType("unsignedLong", convertToString((UnsignedLong) value), xmlStreamWriter); } else if (value instanceof UnsignedInt) { serializeAnyType("unsignedInt", convertToString((UnsignedInt) value), xmlStreamWriter); } else if (value instanceof UnsignedShort) { serializeAnyType("unsignedShort", convertToString((UnsignedShort) value), xmlStreamWriter); } else if (value instanceof UnsignedByte) { serializeAnyType("unsignedByte", convertToString((UnsignedByte) value), xmlStreamWriter); } else if (value instanceof PositiveInteger) { serializeAnyType("positiveInteger", convertToString((PositiveInteger) value), xmlStreamWriter); } else if (value instanceof NegativeInteger) { serializeAnyType("negativeInteger", convertToString((NegativeInteger) value), xmlStreamWriter); } else if (value instanceof NonNegativeInteger) { serializeAnyType("nonNegativeInteger", convertToString((NonNegativeInteger) value), xmlStreamWriter); } else if (value instanceof NonPositiveInteger) { serializeAnyType("nonPositiveInteger", convertToString((NonPositiveInteger) value), xmlStreamWriter); } else { throw new XMLStreamException("Unknow type can not serialize"); }
Please tell all the types you need. I'll add them. On 8/1/07, Richard Pöttler <[EMAIL PROTECTED]> wrote: > > On Wed, Aug 01, 2007 at 11:20:32AM +0530, Amila Suriarachchi wrote: > > This is an ADB problem. I have fixed this in the trunk and did not > merge > > it since it was big change and no one have report this earlier. > > use xsd:anyType for your element. > > use a nightly build from the trunk. > > Thanks for your reply. > Do you mean use anyType AND use nightly build of use anyType OR use > nightly build? I've downloaded the nightly build. If I then stick with the > anySimpleType the value interface is still OMElement. If I use anyType the > class changes to java.lang.Object. Now is the question which objects will > be accepted and transformed by axis2? What would i set for value, if i > want > to send a GMonth object? > > bye > richi > -- > quoting guide: http://www.xs4all.nl/~hanb/documents/quotingguide.html > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Amila Suriarachchi, WSO2 Inc.