-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
11Questions
-
12Replies
Having Problem With loadQueryResults() fn...PLS LOOK INTO THIS CODE...
Hi,
In the follwoing code Iam getting some error:
private void MyTest() throws UnexpectedErrorFault, InvalidSObjectFault,
MalformedQueryFault, InvalidFieldFault, RemoteException {
//Verify that we are already authenticated, if not
//call the login function to do so
if (!loggedIn) {
if (!login()) {
return;
}
}
ArrayList records = new ArrayList();
records = this.loadQueryResults(binding.query("Select Id, FirstName,
LastName from Contact"));
for (int i=0;i<records.size();i++) {
HashMap fields = (HashMap)records.get(i);
Iterator iterator = fields.keySet().iterator();
while (iterator.hasNext()){
String key = (String)iterator.next();
System.out.println(key + ": " + fields.get(key));
}
System.out.println();
}
}
But I am getting the following error:
ArrayList records = new ArrayList();
records =this.loadQueryResults( binding.query(sql));
where it says that "loadQueryResult" not found in:" cannot resolve symbol
[javac] symbol : method loadQueryResults (com.sforce.soap.enterprise.QueryResult)"
Can you pls help as I don't know where this points to.
PLs help
Thanks,
Komal.
-
- komal
- April 11, 2005
- Like
- 0
Is this type of coding billable
Hi,
I am so sorry i Keep asking question as I am new to the API's and trying to learn them..
My question was that when I try to retrieve the data from the Object like Lead, it works properly..
But know the requirement is that the client will call a function in which we pass the SQL stmt as tha parameter and the reuired columns to be retrieved as the parameter also , now in the function I use
queryResult = binding.query(sql);
for (int k = 0; k < queryResult.getRecords().length; k++) {
System.out.println("lead property name:"+queryResult.getRecords()[k]);
SObject s=queryResult.getRecords(k);
org.apache.axis.description.TypeDesc descrip=queryResult.getTypeDesc();
System.out.println("Type Description:"+descrip);
// org.apache.axis.description.FieldDesc[] fd=descrip.getFields();
}
Now if you see the SObject has the required object...now how can i retrieve its contents of the fields..
I tired the above getTypeDesc() and getFields() method but failed!
Can anyone help me pls..
Thank you very much for all the help,
Komal.
-
- komal
- April 07, 2005
- Like
- 0
I needed help for the following code...
Hi,
I am so sorry i Keep asking question as I am new to the API's and trying to learn them..
My question was that when I try to retrieve the data from the Object like Lead, it works properly..
But know the requirement is that the client will call a function in which we pass the SQL stmt as tha parameter and the reuired columns to be retrieved as the parameter also , now in the function I use
queryResult = binding.query(sql);
for (int k = 0; k < queryResult.getRecords().length; k++) {
System.out.println("lead property name:"+queryResult.getRecords()[k]);
SObject s=queryResult.getRecords(k);
org.apache.axis.description.TypeDesc descrip=queryResult.getTypeDesc();
System.out.println("Type Description:"+descrip);
// org.apache.axis.description.FieldDesc[] fd=descrip.getFields();
}
Now if you see the SObject has the required object...now how can i retrieve its contents of the fields..
I tired the above getTypeDesc() and getFields() method but failed!
Can anyone help me pls..
Thank you very much for all the help,
Komal.
-
- komal
- April 01, 2005
- Like
- 0
pls need help in using get_any() fn.. with SObject
Hi,
Is anyone who can help me... I had emailed yesterday too.. thinking some one will read the message posted.
Pls help..
As I am writing a code to retireve the data from any sforce object and I was using get_any() fn as shown below:
for (int k = 0; k < queryResult.getRecords().length; k++) {
SObject le1=queryResult.getRecords()[k];
org.apache.axis.message.MessageElement[] ffields=le1.get_any();
;;;;
}
But still I am getting compilation error.. saying the symbol get_any() not found in
com.sforce.soap.enterprise.sobject.SObject
Pls help....
Pls...
Thank you,
Komal.
-
- komal
- March 31, 2005
- Like
- 0
about the runtime errors when the query is executed...
hi,
When we execute the query for the "select Id from Lead" in our program which is as follows:
QueryResult queryResult = null;
// Set up query options. Set the max batch size to 3
// so that we can exercise the queryMore call as well
_QueryOptions queryOptions = new _QueryOptions();
queryOptions.setBatchSize(new Integer(3));
// Add the query options to the SOAP header
binding.setHeader(new SforceServiceLocator().getServiceName().getNamespaceURI(), "QueryOptions",queryOptions);
// Invoke the query call and save the results
queryResult = binding.query("select Id from Lead");
// Determine whether the query returned all the possible records
if (queryResult.isDone()) {
// Iterate through the records and process them
for (int k = 0; k < queryResult.getRecords().length; k++) {
Lead le = (Lead) queryResult.getRecords(k);
ID idl = le.getId();
System.out.println("Lead number: " + (k + 1) + ": " + idl);
}
}
else {
// Need to use queryMore call after processing
// the first set of records from the query result
while (queryResult.getRecords() != null) {
for (int l = 0; l < queryResult.getRecords().length; l++) {
Lead lea = (Lead) queryResult.getRecords(l);
ID id1 = lea.getId();
System.out.println("Lead number: " + (l + 1) + ": " + id1);
}
// Invoke the queryMore call to get the next set of returned rows
queryResult = binding.queryMore(queryResult.getQueryLocator());
}
we get the following errors at the run time:
AxisFault
faultCode: {urn:fault.enterprise.soap.sforce.com}INVALID_QUERY_LOCATOR
faultSubcode:
faultString: INVALID_QUERY_LOCATOR: invalid query locator
faultActor:
faultNode:
faultDetail:
{urn:fault.enterprise.soap.sforce.com}fault:
<sf:exceptionCode>INVALID_QUERY_LOCATOR</sf:exceptionCode>
<sf:exceptionMessage>invalid query locator</sf:exceptionMessage>
INVALID_QUERY_LOCATOR: invalid query locator
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:125)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:111)
at com.sforce.soap.enterprise.fault.InvalidQueryLocatorFault.getDeserializer(InvalidQueryLocatorFault.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:176)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:117)
at org.apache.axis.encoding.DeserializationContextImpl.getDeserializer(DeserializationContextImpl.java:466)
at org.apache.axis.encoding.DeserializationContextImpl.getDeserializerForType(DeserializationContextImpl.java:481)
at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:172)
at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1672)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.sforce.soap.enterprise.SoapBindingStub.queryMore(SoapBindingStub.java:1614)
at newpjava.newpjavaThinlet.script2(newpjavaThinlet.java:630)
at newpjava.newpjavaThinlet.action(newpjavaThinlet.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at thinlet.Thinlet.invokeImpl(Unknown Source)
at thinlet.Thinlet.invoke(Unknown Source)
at thinlet.Thinlet.handleMouseEvent(Unknown Source)
at thinlet.Thinlet.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Can you pls help..........
Thank you ,
Komal.
-
- komal
- March 21, 2005
- Like
- 0
Regarding the SforceServiceLocator;
Hi
I m really trying this from many weeks but cant fing any way please help me !
I am trying to import -import com.sforce.soap.enterprise.SforceServiceLocator; along with the other API's of sforce
import javax.xml.rpc.ServiceException;
import org.w3c.dom.Element;
import com.sforce.soap.enterprise.DescribeGlobalResult;
import com.sforce.soap.enterprise.DescribeSObjectResult;
import com.sforce.soap.enterprise.Field;
import com.sforce.soap.enterprise.FieldType;
import com.sforce.soap.enterprise.GetUserInfoResult;
import com.sforce.soap.enterprise.ID;
import com.sforce.soap.enterprise.LoginResult;
import com.sforce.soap.enterprise.PicklistEntry;
import com.sforce.soap.enterprise.QueryResult;
import com.sforce.soap.enterprise.ResetPasswordResult;
import com.sforce.soap.enterprise.SaveResult;
import com.sforce.soap.enterprise.SetPasswordResult;
import com.sforce.soap.enterprise.SforceServiceLocator;
import com.sforce.soap.enterprise.SoapBindingStub;
import com.sforce.soap.enterprise._QueryOptions;
import com.sforce.soap.enterprise._SessionHeader;
import com.sforce.soap.enterprise.fault.ExceptionCode;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.enterprise.sobject.Account;
import com.sforce.soap.enterprise.sobject.Contact;
import com.sforce.soap.enterprise.sobject.SObject;
import com.sforce.soap.enterprise.sobject.Task;
import com.sforce.soap.enterprise.sobject.User;
and in one of my scripts i have written a function saying
String l1=getString(find("textfield3"),"text");
String l2=getString(find("textfield4"),"text");
//setString(find("textfield5"),"text","Loginm");
SoapBindingStub binding = (SoapBindingStub) new SforceServiceLocator().getSoap();String ENDPOINT_ADDRESS_POINT="";
LoginResult loginResult = binding.login(l1,l2);
binding = (SoapBindingStub) new SforceServiceLocator().getSoap(new java.net. URL(loginResult.getServerUrl()));
binding._setProperty(ENDPOINT_ADDRESS_POINT,loginResult.getServerUrl());
setString(find("textfield5"),"text","Logine");
the problem that i m having is whenever i build it ..it builds successfully but on my application it displays loginm(on the textfield5 in my application) but not logine(on the textfield5 in my application) which means its not reconising the soapbinding but its going inside the file ....
-
- komal
- March 18, 2005
- Like
- 0
I am trying to import the class files in my application but getting errors...
Hi,
Is anybody there to help me, as I have imported the calss files in my application after getting the java files from the enterprise wsdl and then after compiling the files into the class files... i am trying to import them into my application and when I compile I get the following errors:
Buildfile: build.xml
init:
compile:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file to C:\newsample\pjava\bin118\classes
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:37: Class javax.xml.rpc.ServiceException not found in import.
[javac] import javax.xml.rpc.ServiceException;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/DescribeGlobalResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:41: Class com.sforce.soap.enterprise.DescribeGlobalResult not found in import.
[javac] import com.sforce.soap.enterprise.DescribeGlobalResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/DescribeSObjectResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:42: Class com.sforce.soap.enterprise.DescribeSObjectResult not found in import.
[javac] import com.sforce.soap.enterprise.DescribeSObjectResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/Field.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:43: Class com.sforce.soap.enterprise.Field not found in import.
[javac] import com.sforce.soap.enterprise.Field;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/FieldType.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:44: Class com.sforce.soap.enterprise.FieldType not found in import.
[javac] import com.sforce.soap.enterprise.FieldType;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/GetUserInfoResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:45: Class com.sforce.soap.enterprise.GetUserInfoResult not found in import.
[javac] import com.sforce.soap.enterprise.GetUserInfoResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/ID.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:46: Class com.sforce.soap.enterprise.ID not found in import.
[javac] import com.sforce.soap.enterprise.ID;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/LoginResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:47: Class com.sforce.soap.enterprise.LoginResult not found in import.
[javac] import com.sforce.soap.enterprise.LoginResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/PicklistEntry.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:48: Class com.sforce.soap.enterprise.PicklistEntry not found in import.
[javac] import com.sforce.soap.enterprise.PicklistEntry;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/QueryResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:49: Class com.sforce.soap.enterprise.QueryResult not found in import.
[javac] import com.sforce.soap.enterprise.QueryResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/ResetPasswordResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:50: Class com.sforce.soap.enterprise.ResetPasswordResult not found in import.
[javac] import com.sforce.soap.enterprise.ResetPasswordResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SaveResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:51: Class com.sforce.soap.enterprise.SaveResult not found in import.
[javac] import com.sforce.soap.enterprise.SaveResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SetPasswordResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:52: Class com.sforce.soap.enterprise.SetPasswordResult not found in import.
[javac] import com.sforce.soap.enterprise.SetPasswordResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SforceServiceLocator.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:53: Class com.sforce.soap.enterprise.SforceServiceLocator not found in import.
[javac] import com.sforce.soap.enterprise.SforceServiceLocator;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SoapBindingStub.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:54: Class com.sforce.soap.enterprise.SoapBindingStub not found in import.
[javac] import com.sforce.soap.enterprise.SoapBindingStub;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/_QueryOptions.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:55: Class com.sforce.soap.enterprise._QueryOptions not found in import.
[javac] import com.sforce.soap.enterprise._QueryOptions;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/_SessionHeader.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:56: Class com.sforce.soap.enterprise._SessionHeader not found in import.
[javac] import com.sforce.soap.enterprise._SessionHeader;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/fault/ExceptionCode.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:57: Class com.sforce.soap.enterprise.fault.ExceptionCode not found in import.
[javac] import com.sforce.soap.enterprise.fault.ExceptionCode;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/fault/LoginFault.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:58: Class com.sforce.soap.enterprise.fault.LoginFault not found in import.
[javac] import com.sforce.soap.enterprise.fault.LoginFault;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/Account.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:59: Class com.sforce.soap.enterprise.sobject.Account not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Account;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/Contact.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:60: Class com.sforce.soap.enterprise.sobject.Contact not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Contact;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/SObject.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:61: Class com.sforce.soap.enterprise.sobject.SObject not found in import.
[javac] import com.sforce.soap.enterprise.sobject.SObject;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/Task.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:62: Class com.sforce.soap.enterprise.sobject.Task not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Task;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/User.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:63: Class com.sforce.soap.enterprise.sobject.User not found in import.
[javac] import com.sforce.soap.enterprise.sobject.User;
[javac] ^
[javac] 47 errors
Is there anybody who can look into in and help me pls.... I would really be very greatful...
Thank you,
Komal.
-
- komal
- March 07, 2005
- Like
- 0
Exyracting class files from java files
when i m trying to extract my class files from the java files extracted from WSDL and after setting the classpath as . ;C:\Downloads\quickstart.jar;C:\Downloads\axis-1_1\lib\axis.jar;C:\Downloads\axis-1_1\lib\commons-logging.jar;C:\Downloads\axis-1_1\lib\saaj.jar;C:\Downloads\axis-1_1\lib\axis-ant.jar;C:\Downloads\axis-1_1\lib\jaxrpc.jar;C:\Downloads\axis-1_1\lib\wsdl4j.jar;C:\Downloads\axis-1_1\lib\commons-discovery.jar;C:\Downloads\axis-1_1\lib\log4j-1.2.8.jar;C:\Downloads\xerces-2_6_0\xml-apis.jar;C:\Downloads\xerces-2_6_0\xercesImpl.jar;C:\Downloads\xerces-2_6_0\xmlParserAPIs.jar;
after setting this classpath when i run it on my cmd i m getting lots of errors which are as follows
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeGlobalResult.class, tru
e);
^
DescribeLayout.java:166: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeLayout.class, true);
^
DescribeLayoutSection.java:196: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeLayoutSection.class, tr
ue);
^
DescribeLayoutRow.java:117: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeLayoutRow.class, true);
^
DescribeLayoutItem.java:196: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeLayoutItem.class, true)
;
^
DescribeLayoutComponent.java:130: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeLayoutComponent.class,
true);
^
DescribeLayoutResult.java:137: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeLayoutResult.class, tru
e);
^
RecordTypeMapping.java:229: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(RecordTypeMapping.class, true);
^
PicklistForRecordType.java:121: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(PicklistForRecordType.class, tr
ue);
^
PicklistEntry.java:155: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(PicklistEntry.class, true);
^
DescribeSObjectResult.java:541: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(DescribeSObjectResult.class, tr
ue);
^
Field.java:603: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(Field.class, true);
^
GetDeletedResult.java:121: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(GetDeletedResult.class, true);
^
GetServerTimestampResult.java:76: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(GetServerTimestampResult.class,
true);
^
GetUpdatedResult.java:121: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(GetUpdatedResult.class, true);
^
GetUserInfoResult.java:362: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(GetUserInfoResult.class, true);
^
LeadConvert.java:296: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(LeadConvert.class, true);
^
LeadConvertResult.java:233: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(LeadConvertResult.class, true);
^
LoginResult.java:159: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(LoginResult.class, true);
^
QueryOptions.java:76: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(QueryOptions.class, true);
^
QueryResult.java:171: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(QueryResult.class, true);
^
ResetPasswordResult.java:76: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(ResetPasswordResult.class, true
);
^
SaveOptions.java:101: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(SaveOptions.class, true);
^
SaveResult.java:146: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(SaveResult.class, true);
^
SearchRecord.java:76: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(SearchRecord.class, true);
^
SearchResult.java:121: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(SearchResult.class, true);
^
SessionHeader.java:76: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(SessionHeader.class, true);
^
SetPasswordResult.java:44: cannot resolve symbol
symbol : constructor TypeDesc (java.lang.Class,boolean)
location: class org.apache.axis.description.TypeDesc
new org.apache.axis.description.TypeDesc(SetPasswordResult.class, true);
^
SoapBindingStub.java:33: package org.apache.axis.constants does not exist
oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
^
SoapBindingStub.java:34: package org.apache.axis.constants does not exist
oper.setUse(org.apache.axis.constants.Use.LITERAL);
^
SoapBindingStub.java:55: package org.apache.axis.constants does not exist
oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
^
SoapBindingStub.java:56: package org.apache.axis.constants does not exist
oper.setUse(org.apache.axis.constants.Use.LITERAL);
^
SoapBindingStub.java:76: package org.apache.axis.constants does not exist
oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
^
SoapBindingStub.java:77: package org.apache.axis.constants does not exist
oper.setUse(org.apache.axis.constants.Use.LITERAL);
^
SoapBindingStub.java:92: package org.apache.axis.constants does not exist
oper.setStyle(org.apache.axis.constants.Style.WRAPPED);
^
SoapBindingStub.java:93: package org.apache.axis.constants does not exist
oper.setUse(org.apache.axis.constants.Use.LITERAL);
^
^
Can you please help with this i would really appreciate your help Thankyou Jenny
-
- komal
- March 03, 2005
- Like
- 0
about using the salesforce Class files in the development environment......
Hi,
I need help again. As told, I exported all the java files from the wsdl file and then compiled them to make a class files and then i used them to be imported in my application file....For example : the directory i am using is:
c:\ D> has the com directory and all the other files to run the application is in the directory c:\D\d>
when I am importing the class files in the file which is in c:\D\d> (remember my com directory along with class files is in c:\D> directory) i get the following errors:
Pls help me........
[delete] Deleting: C:\testing1\Testing\pjava\bin118\classes\info\app.properties
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file to C:\testing1\Testing\pjava\bin118\classes
[javac] Since fork is true, ignoring compiler setting.
[javac] error: Invalid class file format: C:\axis\axis-1_1\lib\jaxrpc.jar(javax/xml/rpc/ServiceException.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:37: Class javax.xml.rpc.ServiceException not found in import.
[javac] import javax.xml.rpc.ServiceException;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/DescribeGlobalResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:41: Class com.sforce.soap.enterprise.DescribeGlobalResult not found in import.
[javac] import com.sforce.soap.enterprise.DescribeGlobalResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/DescribeSObjectResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:42: Class com.sforce.soap.enterprise.DescribeSObjectResult not found in import.
[javac] import com.sforce.soap.enterprise.DescribeSObjectResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/Field.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:43: Class com.sforce.soap.enterprise.Field not found in import.
[javac] import com.sforce.soap.enterprise.Field;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/FieldType.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:44: Class com.sforce.soap.enterprise.FieldType not found in import.
[javac] import com.sforce.soap.enterprise.FieldType;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/GetUserInfoResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:45: Class com.sforce.soap.enterprise.GetUserInfoResult not found in import.
[javac] import com.sforce.soap.enterprise.GetUserInfoResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/ID.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:46: Class com.sforce.soap.enterprise.ID not found in import.
[javac] import com.sforce.soap.enterprise.ID;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/LoginResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:47: Class com.sforce.soap.enterprise.LoginResult not found in import.
[javac] import com.sforce.soap.enterprise.LoginResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/PicklistEntry.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:48: Class com.sforce.soap.enterprise.PicklistEntry not found in import.
[javac] import com.sforce.soap.enterprise.PicklistEntry;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/QueryResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:49: Class com.sforce.soap.enterprise.QueryResult not found in import.
[javac] import com.sforce.soap.enterprise.QueryResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/ResetPasswordResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:50: Class com.sforce.soap.enterprise.ResetPasswordResult not found in import.
[javac] import com.sforce.soap.enterprise.ResetPasswordResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/SaveResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:51: Class com.sforce.soap.enterprise.SaveResult not found in import.
[javac] import com.sforce.soap.enterprise.SaveResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/SetPasswordResult.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:52: Class com.sforce.soap.enterprise.SetPasswordResult not found in import.
[javac] import com.sforce.soap.enterprise.SetPasswordResult;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/SforceServiceLocator.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:53: Class com.sforce.soap.enterprise.SforceServiceLocator not found in import.
[javac] import com.sforce.soap.enterprise.SforceServiceLocator;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/SoapBindingStub.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:54: Class com.sforce.soap.enterprise.SoapBindingStub not found in import.
[javac] import com.sforce.soap.enterprise.SoapBindingStub;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/_QueryOptions.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:55: Class com.sforce.soap.enterprise._QueryOptions not found in import.
[javac] import com.sforce.soap.enterprise._QueryOptions;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/_SessionHeader.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:56: Class com.sforce.soap.enterprise._SessionHeader not found in import.
[javac] import com.sforce.soap.enterprise._SessionHeader;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/fault/ExceptionCode.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:57: Class com.sforce.soap.enterprise.fault.ExceptionCode not found in import.
[javac] import com.sforce.soap.enterprise.fault.ExceptionCode;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/fault/LoginFault.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:58: Class com.sforce.soap.enterprise.fault.LoginFault not found in import.
[javac] import com.sforce.soap.enterprise.fault.LoginFault;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/sobject/Account.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:59: Class com.sforce.soap.enterprise.sobject.Account not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Account;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/sobject/Contact.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:60: Class com.sforce.soap.enterprise.sobject.Contact not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Contact;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/sobject/SObject.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:61: Class com.sforce.soap.enterprise.sobject.SObject not found in import.
[javac] import com.sforce.soap.enterprise.sobject.SObject;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/sobject/Task.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:62: Class com.sforce.soap.enterprise.sobject.Task not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Task;
[javac] ^
[javac] error: Invalid class file format: C:\sforce\quickstart.jar(com/sforce/soap/enterprise/sobject/User.class), wrong version: 46, expected 45
[javac] C:\testing1\Testing\pjava\src\Testapp\TestappThinlet.java:63: Class com.sforce.soap.enterprise.sobject.User not found in import.
[javac] import com.sforce.soap.enterprise.sobject.User;
[javac] ^
[javac] 48 errors
Pls help
Thank you,
Komal.
-
- komal
- March 03, 2005
- Like
- 0
The source code got from the wsdl file doesnot complie
Hi,
I seriously need help... all the java files got from the wsdl file donot compile....They are giving errors.I did include all the neessary jar files in the classpath but I still get errors... Pls help....
Thank you
komal.
-
- komal
- March 02, 2005
- Like
- 0
about compiling the java source code files
Hi,
I am sorry i am new to salesforce.com and according to the instructions given in the quickstrat, I used wsdl2java to get all the source code files. My question is how do complie the source code files stored in the com directory. Can you pls help I will really appreciate..
Thank You,
Komal.
-
- komal
- March 01, 2005
- Like
- 0
Having Problem With loadQueryResults() fn...PLS LOOK INTO THIS CODE...
Hi,
In the follwoing code Iam getting some error:
private void MyTest() throws UnexpectedErrorFault, InvalidSObjectFault,
MalformedQueryFault, InvalidFieldFault, RemoteException {
//Verify that we are already authenticated, if not
//call the login function to do so
if (!loggedIn) {
if (!login()) {
return;
}
}
ArrayList records = new ArrayList();
records = this.loadQueryResults(binding.query("Select Id, FirstName,
LastName from Contact"));
for (int i=0;i<records.size();i++) {
HashMap fields = (HashMap)records.get(i);
Iterator iterator = fields.keySet().iterator();
while (iterator.hasNext()){
String key = (String)iterator.next();
System.out.println(key + ": " + fields.get(key));
}
System.out.println();
}
}
But I am getting the following error:
ArrayList records = new ArrayList();
records =this.loadQueryResults( binding.query(sql));
where it says that "loadQueryResult" not found in:" cannot resolve symbol
[javac] symbol : method loadQueryResults (com.sforce.soap.enterprise.QueryResult)"
Can you pls help as I don't know where this points to.
PLs help
Thanks,
Komal.

- komal
- April 11, 2005
- Like
- 0
Is this type of coding billable
Hi,
I am so sorry i Keep asking question as I am new to the API's and trying to learn them..
My question was that when I try to retrieve the data from the Object like Lead, it works properly..
But know the requirement is that the client will call a function in which we pass the SQL stmt as tha parameter and the reuired columns to be retrieved as the parameter also , now in the function I use
queryResult = binding.query(sql);
for (int k = 0; k < queryResult.getRecords().length; k++) {
System.out.println("lead property name:"+queryResult.getRecords()[k]);
SObject s=queryResult.getRecords(k);
org.apache.axis.description.TypeDesc descrip=queryResult.getTypeDesc();
System.out.println("Type Description:"+descrip);
// org.apache.axis.description.FieldDesc[] fd=descrip.getFields();
}
Now if you see the SObject has the required object...now how can i retrieve its contents of the fields..
I tired the above getTypeDesc() and getFields() method but failed!
Can anyone help me pls..
Thank you very much for all the help,
Komal.

- komal
- April 07, 2005
- Like
- 0
Regarding the SforceServiceLocator;
Hi
I m really trying this from many weeks but cant fing any way please help me !
I am trying to import -import com.sforce.soap.enterprise.SforceServiceLocator; along with the other API's of sforce
import javax.xml.rpc.ServiceException;
import org.w3c.dom.Element;
import com.sforce.soap.enterprise.DescribeGlobalResult;
import com.sforce.soap.enterprise.DescribeSObjectResult;
import com.sforce.soap.enterprise.Field;
import com.sforce.soap.enterprise.FieldType;
import com.sforce.soap.enterprise.GetUserInfoResult;
import com.sforce.soap.enterprise.ID;
import com.sforce.soap.enterprise.LoginResult;
import com.sforce.soap.enterprise.PicklistEntry;
import com.sforce.soap.enterprise.QueryResult;
import com.sforce.soap.enterprise.ResetPasswordResult;
import com.sforce.soap.enterprise.SaveResult;
import com.sforce.soap.enterprise.SetPasswordResult;
import com.sforce.soap.enterprise.SforceServiceLocator;
import com.sforce.soap.enterprise.SoapBindingStub;
import com.sforce.soap.enterprise._QueryOptions;
import com.sforce.soap.enterprise._SessionHeader;
import com.sforce.soap.enterprise.fault.ExceptionCode;
import com.sforce.soap.enterprise.fault.LoginFault;
import com.sforce.soap.enterprise.sobject.Account;
import com.sforce.soap.enterprise.sobject.Contact;
import com.sforce.soap.enterprise.sobject.SObject;
import com.sforce.soap.enterprise.sobject.Task;
import com.sforce.soap.enterprise.sobject.User;
and in one of my scripts i have written a function saying
String l1=getString(find("textfield3"),"text");
String l2=getString(find("textfield4"),"text");
//setString(find("textfield5"),"text","Loginm");
SoapBindingStub binding = (SoapBindingStub) new SforceServiceLocator().getSoap();String ENDPOINT_ADDRESS_POINT="";
LoginResult loginResult = binding.login(l1,l2);
binding = (SoapBindingStub) new SforceServiceLocator().getSoap(new java.net. URL(loginResult.getServerUrl()));
binding._setProperty(ENDPOINT_ADDRESS_POINT,loginResult.getServerUrl());
setString(find("textfield5"),"text","Logine");
the problem that i m having is whenever i build it ..it builds successfully but on my application it displays loginm(on the textfield5 in my application) but not logine(on the textfield5 in my application) which means its not reconising the soapbinding but its going inside the file ....

- komal
- March 18, 2005
- Like
- 0
I am trying to import the class files in my application but getting errors...
Hi,
Is anybody there to help me, as I have imported the calss files in my application after getting the java files from the enterprise wsdl and then after compiling the files into the class files... i am trying to import them into my application and when I compile I get the following errors:
Buildfile: build.xml
init:
compile:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file to C:\newsample\pjava\bin118\classes
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:37: Class javax.xml.rpc.ServiceException not found in import.
[javac] import javax.xml.rpc.ServiceException;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/DescribeGlobalResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:41: Class com.sforce.soap.enterprise.DescribeGlobalResult not found in import.
[javac] import com.sforce.soap.enterprise.DescribeGlobalResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/DescribeSObjectResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:42: Class com.sforce.soap.enterprise.DescribeSObjectResult not found in import.
[javac] import com.sforce.soap.enterprise.DescribeSObjectResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/Field.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:43: Class com.sforce.soap.enterprise.Field not found in import.
[javac] import com.sforce.soap.enterprise.Field;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/FieldType.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:44: Class com.sforce.soap.enterprise.FieldType not found in import.
[javac] import com.sforce.soap.enterprise.FieldType;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/GetUserInfoResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:45: Class com.sforce.soap.enterprise.GetUserInfoResult not found in import.
[javac] import com.sforce.soap.enterprise.GetUserInfoResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/ID.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:46: Class com.sforce.soap.enterprise.ID not found in import.
[javac] import com.sforce.soap.enterprise.ID;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/LoginResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:47: Class com.sforce.soap.enterprise.LoginResult not found in import.
[javac] import com.sforce.soap.enterprise.LoginResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/PicklistEntry.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:48: Class com.sforce.soap.enterprise.PicklistEntry not found in import.
[javac] import com.sforce.soap.enterprise.PicklistEntry;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/QueryResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:49: Class com.sforce.soap.enterprise.QueryResult not found in import.
[javac] import com.sforce.soap.enterprise.QueryResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/ResetPasswordResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:50: Class com.sforce.soap.enterprise.ResetPasswordResult not found in import.
[javac] import com.sforce.soap.enterprise.ResetPasswordResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SaveResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:51: Class com.sforce.soap.enterprise.SaveResult not found in import.
[javac] import com.sforce.soap.enterprise.SaveResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SetPasswordResult.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:52: Class com.sforce.soap.enterprise.SetPasswordResult not found in import.
[javac] import com.sforce.soap.enterprise.SetPasswordResult;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SforceServiceLocator.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:53: Class com.sforce.soap.enterprise.SforceServiceLocator not found in import.
[javac] import com.sforce.soap.enterprise.SforceServiceLocator;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/SoapBindingStub.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:54: Class com.sforce.soap.enterprise.SoapBindingStub not found in import.
[javac] import com.sforce.soap.enterprise.SoapBindingStub;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/_QueryOptions.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:55: Class com.sforce.soap.enterprise._QueryOptions not found in import.
[javac] import com.sforce.soap.enterprise._QueryOptions;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/_SessionHeader.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:56: Class com.sforce.soap.enterprise._SessionHeader not found in import.
[javac] import com.sforce.soap.enterprise._SessionHeader;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/fault/ExceptionCode.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:57: Class com.sforce.soap.enterprise.fault.ExceptionCode not found in import.
[javac] import com.sforce.soap.enterprise.fault.ExceptionCode;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/fault/LoginFault.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:58: Class com.sforce.soap.enterprise.fault.LoginFault not found in import.
[javac] import com.sforce.soap.enterprise.fault.LoginFault;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/Account.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:59: Class com.sforce.soap.enterprise.sobject.Account not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Account;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/Contact.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:60: Class com.sforce.soap.enterprise.sobject.Contact not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Contact;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/SObject.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:61: Class com.sforce.soap.enterprise.sobject.SObject not found in import.
[javac] import com.sforce.soap.enterprise.sobject.SObject;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/Task.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:62: Class com.sforce.soap.enterprise.sobject.Task not found in import.
[javac] import com.sforce.soap.enterprise.sobject.Task;
[javac] ^
[javac] error: Invalid class file format: C:\defywire\Defywire\client\pjava\lib\pjavaclient.jar(com/sforce/soap/enterprise/sobject/User.class), wrong version: 46, expected 45
[javac] C:\newsample\pjava\src\sample\sampleThinlet.java:63: Class com.sforce.soap.enterprise.sobject.User not found in import.
[javac] import com.sforce.soap.enterprise.sobject.User;
[javac] ^
[javac] 47 errors
Is there anybody who can look into in and help me pls.... I would really be very greatful...
Thank you,
Komal.

- komal
- March 07, 2005
- Like
- 0
about compiling the java source code files
Hi,
I am sorry i am new to salesforce.com and according to the instructions given in the quickstrat, I used wsdl2java to get all the source code files. My question is how do complie the source code files stored in the com directory. Can you pls help I will really appreciate..
Thank You,
Komal.

- komal
- March 01, 2005
- Like
- 0