Hi,

sridhar veerappan wrote:
> 
> Hi,
> 
> I am trying to call the wsdl file, intial step itself it is getting
> failed.
> 
> Code Snippet:
>  ClassLoader classLoader =
> Thread.currentThread().getContextClassLoader();
>         DynamicClientFactory dcf = DynamicClientFactory.newInstance();
>         Client client =      dcf.createClient(wsdlURL,  classLoader);
> 
> or
> 
>  // JaxWsDynamicClientFactory factory =
> JaxWsDynamicClientFactory.newInstance();
>      //   Client client =(Client)factory.createClient(wsdlURL);
> 
> Could anyone tell me is there anything I am doing wrong.
> 
> [STDERR] Jul 17, 2009 7:33:49 PM
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory createClient
> SEVERE: Could not compile java files for
> file:/C:/Test/Parsing-New/Servicewsdl.
> 19:33:56,593 ERROR [http-127.0.0.1-9080-2] [[campaignmgr]]
> Servlet.service()
> for servlet campaignmgr threw exception
> javax.xml.bind.JAXBException: "com.communicationchannels" doesnt contain
> ObjectFactory.class or jaxb.index
>  at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:183)
> 

I am getting the same error here and I think the real problem is that javac
fails. This is logged as is show in your trace but no exception is throws
until instantiating the JAXBContext fails and throws the JAXBException. When
testing with http://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl I get the following
trace.

Jul 23, 2009 12:15:26 PM
org.apache.cxf.endpoint.dynamic.DynamicClientFactory outputDebug
INFO: Created classes: com.cdyne.ws.ip2geo.IPInformation,
com.cdyne.ws.ip2geo.ObjectFactory, com.cdyne.ws.ip2geo.ResolveIP,
com.cdyne.ws.ip2geo.ResolveIPResponse
[ERROR] IOException during exec() of compiler "javac". Check your path
environment variable.
Jul 23, 2009 12:15:39 PM
org.apache.cxf.endpoint.dynamic.DynamicClientFactory createClient
SEVERE: Could not compile java files for
http://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl.
java.lang.IllegalStateException: Unable to create JAXBContext for generated
packages: "com.cdyne.ws.ip2geo" doesnt contain ObjectFactory.class or
jaxb.index


For me this leads to a new question as I am testing this in an OSGi
environment. The classloader I pass in is a BundleClassloader (which is not
an instanceof URLClassLoader). Therefore
DynamicClientFactory.setupClasspath() will only see my felix.jar used to
boostrap the OSGi framework and javac will fail to compile the generate
source... ok, BUT how should/could this work when the classes are supplied
from a dynamically deployed OSGi bundle?

Regards,
Bram
-- 
View this message in context: 
http://www.nabble.com/DynamicClientFactory-createClient--Could-not-compile-java-files-for--file%3A-C%3A-Test-Parsing-New-Servicewsdl.-tp24535282p24623236.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to