You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/10/27 12:53:36 UTC

DO NOT REPLY [Bug 24145] New: - TypeMapping not inheriting

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24145>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24145

TypeMapping not inheriting

           Summary: TypeMapping not inheriting
           Product: Axis
           Version: 1.1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: matthew_pocock@yahoo.co.uk


The TypeMapping associated with .fromJava.Emitter knows about things like
Strings. I replace this by using the code:

            TypeMappingImpl tmi = new TypeMappingImpl(
                    emitter.getDefaultTypeMapping());
            emitter.setTypeMapping(tmi);
            typeMappingSet.execute(this, tmi);

where typeMappingSet.execute populates tmi with custom typemapping info. I would
have expected tmi to inherit all of the type mapping information of
emitter.getDefaultTypeMapping(), but it doesn't know about things like
java.lang.String. If I comment out this code, then the emitter does know about
strings but doesn't know about my custom types. Replacing
emitter.getDefaultTypeMapping() with .getDefaultMapping() doesn't help.

I think it's possible that this is a symptom of emitter.getDefaultTypeMapping()
is returning null when it should have been initialized.

Here's a typical stack trace.

[axis-java2wsdl] Please register a typemapping/beanmapping for 'java.lang.String'
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1431)
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.writeRequestMessage(Emitter.java:1173)
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:924)
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:894)
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:395)
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:268)
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:346)
[axis-java2wsdl]        at
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:268)