Hello.

I am writing POJO webservice which returns an object with Long (not long) fields. Standard ADB mapping which is JavaTypeMap does map this type as xs:anyType while i want to map is as xs:long.

So i created a simple class

public class MyTypeMap extends JavaTypeMap {
    public MyTypeMap() {
        System.out.println("MyTypeMap init");
        addTypemappingEx(SchemaConstants.XSD_LONG,
                         Long.class.getName());
    }

    private void addTypemappingEx(QName name, String str) {
        getTypeMap().put(name, str);
    }
}

and wrote my-schema-compile.properties containing:

schema.bean.writer.class=org.apache.axis2.schema.writer.JavaBeanWriter
schema.bean.writer.template=/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
schema.bean.typemap=my.package.MyTypeMap

But when i run

export JAVA_OPTS=-Dorg.apache.adb.properties=/my-schema-compile.properties
./java2wsdl.sh -o . -cp /pathtomypackageroot -cn my.package.TestService

it still creates wsdl with my Long fields mapped as xs:anyType. And my debug line "MyTypeMap init" is not printed.

I played with placing my-schema-compile.properties and setting corresponding JAVA_OPTS almost everywhere ;)

Where am i wrong?

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to