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
indyindy 

Java client access salesforce custom web service with WSC

Hi,

 

I am in the process of developing client application using java by going through the link

http://wiki.developerforce.com/page/Introduction_to_the_Force.com_Web_Services_Connector

 

 

But ended with the error message. Please help.

 

Input:

 

D:\Sfdc Practice>java -classpath wsc-22-jdk-1.7.jar com.sforce.ws.tools.wsdlc enterprisewsdl.wsdl enterprise.jar

 

Output:

 

[WSC][wsdlc.run:312]Created temp dir: C:\Users\371278\AppData\Local\Temp\wsdlc-t
emp-5760672496630946977-dir
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: Parse error: enterprisewsdl.wsdl (The system cannot find the file specified)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:61)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:75)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:312)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:303)
Caused by: java.io.FileNotFoundException: enterprisewsdl.wsdl (The system cannot
find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:58)
... 3 more

 

 

Thanks,

Indy

sfdcfoxsfdcfox
You should make sure that enterprisewsdl.wsdl is in the correct path. It should be in the current folder (CWD); the file should be located in C:\Sfdc Practice, as should the jar file.
indyindy

Hi Sfdcfox,

 

Thanks for your reply.

 

I placed both enterprise.xml and jar file in D:\Sfdc Practice. Do I need to place any other file apart from these two.?

 

 

Thanks,

Indy

 

 

 

sfdcfoxsfdcfox
As long as the jar files and xml file are in the same folder, you should be okay. Make sure that if you name the file enterprise.xml that the command-line prompt parameters match the same name (instead of enterprisewsdl.wsdl).