You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "dev.nul@mail.ru" <de...@mail.ru> on 2011/11/20 01:22:06 UTC

Problem with tweaking ADB

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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org