[ 
https://issues.apache.org/jira/browse/CXF-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sumeet Mahajan updated CXF-7523:
--------------------------------
    Description: 
I have below code,

JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); 
client = dcf.createClient("/sm/ws/wsdl/DataImportUtility.wsdl", 
Thread.currentThread().getContextClassLoader()) 

This generates POJO classes defined in my WSDL and then I saves the "client" as 
a private variable at class level in a singleton instance.
When i try to load it it does load the classes and invokes webservice.

But on the 2nd run, when i try to use the same "client" instance and load the 
POJO's using below code,
ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); 
Object req = classLoader.loadClass(pkg+".GetHoldingsRequest").newInstance(); 

I get ClassNotFoundException.

  was:
I have below code,

JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); 
client = dcf.createClient("/sm/ws/wsdl/DataImportUtility.wsdl", 
Thread.currentThread().getContextClassLoader()) 

This generates POJO classes defined in my WSDL.
When i try to load it it does load the classes and invokes webservice.

But on the 2nd run, when i try to use the same "client" instance and load the 
POJO's using below code,
ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); 
Object req = classLoader.loadClass(pkg+".GetHoldingsRequest").newInstance(); 

I get ClassNotFoundException.


> JaxWsDynamicClientFactory loads classes in classpath only "once"
> ----------------------------------------------------------------
>
>                 Key: CXF-7523
>                 URL: https://issues.apache.org/jira/browse/CXF-7523
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 3.1.13
>            Reporter: Sumeet Mahajan
>            Priority: Critical
>         Attachments: DataImportUtility.wsdl
>
>
> I have below code,
> JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); 
> client = dcf.createClient("/sm/ws/wsdl/DataImportUtility.wsdl", 
> Thread.currentThread().getContextClassLoader()) 
> This generates POJO classes defined in my WSDL and then I saves the "client" 
> as a private variable at class level in a singleton instance.
> When i try to load it it does load the classes and invokes webservice.
> But on the 2nd run, when i try to use the same "client" instance and load the 
> POJO's using below code,
> ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); 
> Object req = classLoader.loadClass(pkg+".GetHoldingsRequest").newInstance(); 
> I get ClassNotFoundException.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to