You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "daryoush mehrtash (JIRA)" <be...@incubator.apache.org> on 2005/05/28 05:02:51 UTC

[jira] Updated: (BEEHIVE-769) WSM client control can not load WSDL file from @WSDL annotation

     [ http://issues.apache.org/jira/browse/BEEHIVE-769?page=all ]

daryoush mehrtash updated BEEHIVE-769:
--------------------------------------

           type: New Feature  (was: Bug)
       Priority: Major  (was: Critical)
    Fix Version: TBD

I have change the bug to a feature request for the next version to improve on the error message.



> WSM client control can not load WSDL file from @WSDL annotation
> ---------------------------------------------------------------
>
>          Key: BEEHIVE-769
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-769
>      Project: Beehive
>         Type: New Feature
>   Components: Controls
>     Versions: V1
>  Environment: Win XP SP2, JDK 1.5.03
>     Reporter: Yongqin Xu
>     Assignee: daryoush mehrtash
>      Fix For: TBD

>
> In WSM web service client control, I specified @WSDL(path="Skugen.wsdl"...) as I did before. But latest unit test failed with following error:
> -------------------------------------------------------------------------
> bcc
> java.lang.NullPointerException: bcc
> 	at java.beans.beancontext.BeanContextSupport.getResourceAsStream(BeanContextSupport.java:646)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.getWSDLStream(ServiceControlImpl.java:514)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.initialize(ServiceControlImpl.java:457)
> 	at org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.invoke(ServiceControlImpl.java:126)
> 	at com.bea.wlw.aa.skugen.ws.GenerateSKUBean.ping(GenerateSKUBean.java:124)
> 	at com.bea.wlw.aa.skugen.ws.SkuGeneratorClientControlTest.testPing(SkuGeneratorClientControlTest.java:80)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at 
> ----------------------------------------------------------------------------
> According to stack trace. In source code:
> org.apache.beehive.controls.system.webservice.jaxrpc.ServiceControlImpl.java,
> the private method getWSDLStream(String), at line 514:
> wsdlStream =cbContext.getBeanContext().getResourceAsStream(pathToWSDL, null);
> The second parameter is "null". But by checking JDK source code 1.5.03 in
> java.beans.beancontext.BeanContextSupport.java, at line 644, the method:
>     public InputStream getResourceAsStream(String name, BeanContextChild bcc) {
> 	if (name == null) throw new NullPointerException("name");
> 	if (bcc  == null) throw new NullPointerException("bcc");
> 	if (containsKey(bcc)) {
> 	    ClassLoader cl = bcc.getClass().getClassLoader();
> 	    return cl != null ? cl.getResourceAsStream(name)
> 			      : ClassLoader.getSystemResourceAsStream(name);
> 	} else throw new IllegalArgumentException("Not a valid child");
>     }
> "bcc" is required somehow, that is why the NullPointerException happened.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira