johvargas / sfdc-wsc

Automatically exported from code.google.com/p/sfdc-wsc
0 stars 0 forks source link

wsdlc doesn't work with a wsdl of metadata api #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I tried to generate a jar file for the metadata api wsdl using wsdlc.  
Then I got a following error

------------------------------
$ java -classpath wsc-16_0.jar com.sforce.ws.tools.wsdlc ./meta.wsdl 
./meta.jar
[WSC][wsdlc.run:288]Created temp dir: /tmp/wsdlc-temp-6652931952603519756-
dir
[WSC][wsdlc.<init>:78]Generating Java files from schema ...
[WSC][wsdlc.<init>:78]Generated 222 java files.
[WSC][wsdlc.compileTypes:238]Compiling ...
/tmp/wsdlc-temp-6652931952603519756-
dir/com/sforce/soap/metadata/Encoding.java:12: ',', '}', or ';' expected
   UTF-8,
      ^
/tmp/wsdlc-temp-6652931952603519756-
dir/com/sforce/soap/metadata/Encoding.java:12: '}' expected
   UTF-8,
       ^
2 errors
Error: Failed to compile
------------------------------

2. This is because a generated class, Encoding.java includes hyphens in 
identifier.
-------------------
package com.sforce.soap.metadata;
/** * Generated enum, please do not edit. */
public enum Encoding {
    /**   * Enumeration  : UTF-8   */
    UTF-8 ,    <-- UTF-8 includes a hyphen, even though it is an 
identifier!
......
--------------------

What is the expected output? What do you see instead?
All hyphens should be replaced by underscores.

What version of the product are you using? On what operating system?
The latest one (as of June 1st, 2009).

Please provide any additional information below.

Original issue reported on code.google.com by sno...@gmail.com on 1 Jun 2009 at 10:31

GoogleCodeExporter commented 8 years ago
You can replace the hyphen with underscore in the WSDL to work around this 
problem.
Will fix this in the next release. 

Original comment by manoj.ch...@gmail.com on 4 Jun 2009 at 2:53

GoogleCodeExporter commented 8 years ago
I tried to generate jar file from Siebel CRM On Demand web service. but I am 
getting
compilation error. I checked to generated java files and there I found that It 
is
appending "."(DOT) before package name in the first statement. here is the 
command
line output.
D:\temp>java -classpath wsc-18.jar;JAVA_HOME/Classes/classes.jar
com.sforce.ws.tools.wsdlc ODOpportunity.wsdl.xml ODOpportunity.jar
[WSC][wsdlc.run:311]Created temp dir:
C:\DOCUME~1\aahirwar\LOCALS~1\Temp\wsdlc-temp-8732909027325978347-dir
[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 105 java files.
[WSC][wsdlc.compileTypes:261]Compiling to target 1.6...
C:\DOCUME~1\aahirwar\LOCALS~1\Temp\wsdlc-temp-8732909027325978347-dir\crmondeman
d\xml\Opportunity\Query\ProductRevenueQuery.java:1:
<identifier> expected
package .crmondemand.xml.Opportunity.Query;/** * Generated class, please do not 
edit.
*/public class ProductRevenueQuery implements com.sforce.ws.bind.XMLizable {  
/**   *
Constructor   */  public ProductRevenueQuery() {  }        /**   * element  :
ModifiedDate of type {urn:/crmondemand/xml/Opportunity/Query}quer
yType   * java type: .crmondemand.xml.Opportunity.Query.QueryType   */  private
static final com.sforce.ws.bind.TypeInfo ModifiedDate__typeInfo =    new 
............................................................................
Any workarround for it?

Regards,
Anil

Original comment by a.ahir...@gmail.com on 26 Apr 2010 at 9:54