function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
EclipseTalkEclipseTalk 

wsdlLocation cannot be set

 Hello,

I'm using the sample code for JAX-WB. I've defined an Eclipse Java project. Everything compiles fine but I can't get the URL wsdl location. It always returns null although the entreprise file is present.

Does anyone know why this line of code doesn't work...

 

URL wsdlLocation = this.getClass().getClassLoader().getResource("META-INF/enterprise.wsdl");

 

Thank you for your help.

 

Best Answer chosen by Admin (Salesforce Developers) 
EclipseTalkEclipseTalk
Thanks for the reply. I tried that but to no avail. If I run the QuickStart sample I can log in but when I import the project into an Eclipse environment the URL wsdlLocation always returns null. It must  be something really studip but it's driving me crazy...

All Answers

mpiercempierce
Try with a leading / in front of META-INF.
EclipseTalkEclipseTalk
Thanks for the reply. I tried that but to no avail. If I run the QuickStart sample I can log in but when I import the project into an Eclipse environment the URL wsdlLocation always returns null. It must  be something really studip but it's driving me crazy...
This was selected as the best answer
EclipseTalkEclipseTalk

fyi - I finally fixed it. I had to add the directory to the classpath in the Eclipse run configuration.

 

Thanks