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

Problem compiling generated files for Java

I downloaded the Enterprise WSDL, and used Axis to generate the Java classes. It all look fine, until I tried to compile said classes. I got an error saying that the constructor for had too many parameters.  Since I am not using that class, I commented out the constructor and tried to recompile. This time I got another error message saying that the system had ran out of resources.

Any pointers on how to overcome this? I only to retrieve data from some custom objects, not create new ones.
Are there any pre-compiled classes I can use?
A way to minimize the size of the WSDL?
Or another way to retrieve object data through Java?

PS: I called SFDC for support last week but no one returned my call.
I could never get axis to work properly (though I had different issues). I'm using JAX-WS now; you could try using that.
Thanks for the suggestion, but I tried to generate the classes with wsimport and I'm getting an error as well.
Line 7568:
            <element name="describeLayout">
                        <element name="sObjectType" type="xsd:string"/>
                        <element name="recordTypeIds" type="tns:ID" minOccurs="0" maxOccurs="unbounded"/>

Line 7274:
            <complexType name="DescribeLayout">
                    <element name="detailLayoutSections" type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
                    <element name="editLayoutSections"   type="tns:DescribeLayoutSection" minOccurs="0" maxOccurs="unbounded"/>
                    <element name="id"                   type="tns:ID"/>

                    <element name="relatedLists"                type="tns:RelatedList" minOccurs="0" maxOccurs="unbounded"/>


ERROR] Two declarations cause a collision in the ObjectFactory class.
 line 7568 of file:/C:/Program%20Files/jaxws-ri/bin/Prodenterprise.wsdl

ERROR] (Related to above error) This is the other declaration.
 line 7274 of file:/C:/Program%20Files/jaxws-ri/bin/Prodenterprise.wsdl

Does any one know of a successful way to get elements from SFDC using Java? I'm just trying to query data (not update it) but we do have a lot of custom objects in our organization.

Message Edited by Eren on 08-15-2008 03:25 PM
You could try using the following snippet of code as a binding for the wsimport ant task. It solved some name conflicts for me.

      underscoreBinding="asCharInWord" />
          suffix="Type" />