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 Virginie Legrand <Vi...@sophia.inria.fr> on 2005/04/06 11:09:04 UTC

Re: Null Pointer Exception

Does anybody never encounter this issue ??

Virginie Legrand wrote:

> Hello,
>
> I use axis axis-1_2RC3 and wsdl4j in order to generate a WSDL file.
> Here is a sample of my code :
>         Emitter emitter = new Emitter();
>         emitter.setDisallowedMethods(disallowedMethods);
>         emitter.setAllowedMethods(allowedMethods);
>         emitter.setLocationUrl(urlRouter);
>          emitter.setIntfNamespace(namespace);
>          emitter.setImplNamespace(namespace);
>          emitter.setCls(c);
>          emitter.setServiceElementName(serviceName);
> String wsdl = emitter.emitToString(Emitter.MODE_ALL);
>
>
> when calling the emitToString() method, I get a NullPointerException.
> I worked when I was using previous version of axis.
> What do I do wrong here ?
>
> Thanks for your help
>
> Regards,
>
> Virginie
>


Re: Null Pointer Exception

Posted by Venkat Reddy <vr...@gmail.com>.
try setting the TypeMappingRegistry before calling emitToString, if
you can get hold of msgContext -

emitter.setTypeMappingRegistry(msgContext.getTypeMappingRegistry());

- venkat

On Apr 6, 2005 8:17 PM, Virginie Legrand
<Vi...@sophia.inria.fr> wrote:
> Here is the Stack trace :
> 
> Exception in thread "main" java.lang.NullPointerException
>        at org.apache.axis.wsdl.fromJava.Emitter.init(Emitter.java:574)
>        at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:465)
>        at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:326)
>        at
> org.apache.axis.wsdl.fromJava.Emitter.emitToString(Emitter.java:399)
> 
> Venkat Reddy wrote:
> 
> > Can you provide the full exception stacktrace?
> >
> > - venkat
> >
> >
> > On Apr 6, 2005 2:39 PM, *Virginie Legrand*
> > <Virginie.Legrand@sophia.inria.fr
> > <ma...@sophia.inria.fr>> wrote:
> >
> >     Does anybody never encounter this issue ??
> >
> >     Virginie Legrand wrote:
> >
> >     > Hello,
> >     >
> >     > I use axis axis-1_2RC3 and wsdl4j in order to generate a WSDL file.
> >     > Here is a sample of my code :
> >     >         Emitter emitter = new Emitter();
> >     >         emitter.setDisallowedMethods(disallowedMethods);
> >     >         emitter.setAllowedMethods(allowedMethods);
> >     >         emitter.setLocationUrl(urlRouter);
> >     >          emitter.setIntfNamespace(namespace);
> >     >          emitter.setImplNamespace(namespace);
> >     >          emitter.setCls(c);
> >     >          emitter.setServiceElementName(serviceName);
> >     > String wsdl = emitter.emitToString(Emitter.MODE_ALL);
> >     >
> >     >
> >     > when calling the emitToString() method, I get a
> >     NullPointerException.
> >     > I worked when I was using previous version of axis.
> >     > What do I do wrong here ?
> >     >
> >     > Thanks for your help
> >     >
> >     > Regards,
> >     >
> >     > Virginie
> >     >
> >
> >
> 
>

Re: Null Pointer Exception

Posted by Virginie Legrand <Vi...@sophia.inria.fr>.
Here is the Stack trace :

Exception in thread "main" java.lang.NullPointerException
        at org.apache.axis.wsdl.fromJava.Emitter.init(Emitter.java:574)
        at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:465)
        at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:326)
        at 
org.apache.axis.wsdl.fromJava.Emitter.emitToString(Emitter.java:399)

Venkat Reddy wrote:

> Can you provide the full exception stacktrace?
>  
> - venkat
>
>  
> On Apr 6, 2005 2:39 PM, *Virginie Legrand* 
> <Virginie.Legrand@sophia.inria.fr 
> <ma...@sophia.inria.fr>> wrote:
>
>     Does anybody never encounter this issue ??
>
>     Virginie Legrand wrote:
>
>     > Hello,
>     >
>     > I use axis axis-1_2RC3 and wsdl4j in order to generate a WSDL file.
>     > Here is a sample of my code :
>     >         Emitter emitter = new Emitter();
>     >         emitter.setDisallowedMethods(disallowedMethods);
>     >         emitter.setAllowedMethods(allowedMethods);
>     >         emitter.setLocationUrl(urlRouter);
>     >          emitter.setIntfNamespace(namespace);
>     >          emitter.setImplNamespace(namespace);
>     >          emitter.setCls(c);
>     >          emitter.setServiceElementName(serviceName);
>     > String wsdl = emitter.emitToString(Emitter.MODE_ALL);
>     >
>     >
>     > when calling the emitToString() method, I get a
>     NullPointerException.
>     > I worked when I was using previous version of axis.
>     > What do I do wrong here ?
>     >
>     > Thanks for your help
>     >
>     > Regards,
>     >
>     > Virginie
>     >
>
>


Re: Null Pointer Exception

Posted by Venkat Reddy <vr...@gmail.com>.
Can you provide the full exception stacktrace?
 - venkat

 On Apr 6, 2005 2:39 PM, Virginie Legrand <Vi...@sophia.inria.fr> 
wrote: 
> 
> Does anybody never encounter this issue ??
> 
> Virginie Legrand wrote:
> 
> > Hello,
> >
> > I use axis axis-1_2RC3 and wsdl4j in order to generate a WSDL file.
> > Here is a sample of my code :
> > Emitter emitter = new Emitter();
> > emitter.setDisallowedMethods(disallowedMethods);
> > emitter.setAllowedMethods(allowedMethods);
> > emitter.setLocationUrl(urlRouter);
> > emitter.setIntfNamespace(namespace);
> > emitter.setImplNamespace(namespace);
> > emitter.setCls(c);
> > emitter.setServiceElementName(serviceName);
> > String wsdl = emitter.emitToString(Emitter.MODE_ALL);
> >
> >
> > when calling the emitToString() method, I get a NullPointerException.
> > I worked when I was using previous version of axis.
> > What do I do wrong here ?
> >
> > Thanks for your help
> >
> > Regards,
> >
> > Virginie
> >
> 
>