hzw6666 / sfdc-wsc Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/sfdc-wsc
Automatically exported from code.google.com/p/sfdc-wsc
What steps will reproduce the problem?
1. The license information at
http://sfdc-wsc.googlecode.com/svn/trunk/wsc22/dist/wsc_license.html points to
wsc-20. Is there any plan to update the license for wsc-22 with the correct
version number ? If yes, can you please let us know the timeframe you are
looking at?
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Jan 2012 at 9:59
What steps will reproduce the problem?
1. Try to run the Bulk API xample
What is the expected output? What do you see instead?
Expect to log in, but instead, see this:
Exception in thread "main" java.lang.ClassCastException:
com.sforce.soap.partner.LoginResult cannot be cast to
com.sforce.ws.bind.XMLizable
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:618)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:495)
at
com.sforce.soap.partner.LoginResponse_element.loadFields(LoginResponse_element.j
ava:68)
at
com.sforce.soap.partner.LoginResponse_element.load(LoginResponse_element.java:59
)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:619)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:495)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:154)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:128)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:103)
at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:791)
at
com.sforce.soap.partner.PartnerConnection.<init>(PartnerConnection.java:315)
at BulkExample.getRestConnection(BulkExample.java:171)
at BulkExample.runSample(BulkExample.java:43)
at BulkExample.main(BulkExample.java:34)
Problem shows up here in PartnerConnection.class on line 791:
__response = (com.sforce.soap.partner.LoginResponse_element)
__connection.send("",
login_qname, __request, loginResponse_qname,
com.sforce.soap.partner.LoginResponse_element.class);
What version of the product are you using? On what operating system?
17.0 on Mac OS X Snow Leopard
Java 1.6
Please provide any additional information below.
Username and password are correct. The Bulk API documentation references
wsc-18_0.jar, but that jar does not exist on the google site. Not sure why
there's documentation, but no jar file. So, we're using the example from a
previous version of the bulk api documentation (version 17.0).
No matter what we do, we get this ClassCastException error and there's no
way for us to get around it.
Original issue reported on code.google.com by [email protected]
on 3 Feb 2010 at 8:15
What steps will reproduce the problem?
1.Generate jar from any wsdl (I'm using the SFDC partners one)
2.Configure proxy parameters ( see code example below)
3.Call new PartnerConnection(config)
What is the expected output? What do you see instead?
Successful connection.
Instead I'm getting:
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1
407 Proxy Authentication Required
What version of the product are you using? On what operating system?
I tested the issue on wsc-22.jar
Please provide any additional information below.
I'm using the following code:
ConnectorConfig config = new ConnectorConfig();
config.setUsername(userId);
config.setPassword(passwd);
config.setProxy("my_proxy", my_port);
config.setProxyUsername(my_username);
config.setProxyPassword(my_password);
connection = new PartnerConnection(config);
It works fine if I use HTTP instead of HTTPS.
I found a way to make it work using the following code but it shouldn't be this
way:
Authenticator.setDefault(new ProxyAuthenticator("my_username", "my_password"));
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("my_proxy", my_port));
URL url = null;
try {
url = new URL("https://mail.google.com");
} catch (MalformedURLException e) {
e.printStackTrace();
}
HttpURLConnection uc = (HttpURLConnection)url.openConnection(proxy);
uc.connect();
ConnectorConfig config = new ConnectorConfig();
config.setUsername(userId);
config.setPassword(passwd);
config.setProxy("my_proxy", my_port);
config.setProxyUsername(my_username);
config.setProxyPassword(my_password);
connection = new PartnerConnection(config);
Original issue reported on code.google.com by [email protected]
on 17 Feb 2012 at 4:31
The ALL_OR_NONE_OPERATION_ROLLED_BACK status code is missing from
com.sforce.async.StatusCode.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_concept
s_core_data_objects.htm#i1421521
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_header_allorn
oneheader.htm
Original issue reported on code.google.com by [email protected]
on 11 Apr 2011 at 6:07
Are you using Rhino in this project? If so, what version?
Original issue reported on code.google.com by [email protected]
on 23 Sep 2010 at 4:06
What steps will reproduce the problem?
1.Proxy Network getBatchInfo() Not working
2.Need Inside getBatchInfo() -> doHttpGet() --> HttpURLConnection -->
url.openConnection(proxy);
3. Exception in thread "main" java.lang.IllegalArgumentException: input
stream can not be null
at com.sforce.ws.parser.MXParser.setInput(MXParser.java:522)
at com.sforce.ws.parser.XmlInputStream.setInput
(XmlInputStream.java:64)
at com.sforce.async.RestConnection.parseAndThrowException
(RestConnection.java:112)
at com.sforce.async.RestConnection.doHttpGet
(RestConnection.java:283)
at com.sforce.async.RestConnection.getBatchInfoList
(RestConnection.java:190)
What is the expected output? What do you see instead?
Need Interface Setting for Proxy
What version of the product are you using? On what operating system?
17
Please provide any additional information below.
Proxy p = new Proxy( Proxy.Type.HTTP,new InetSocketAddress("proxy",8080));
getBatchInfoList(String jobId,proxy);
InputStream stream = doHttpGet(url,proxy);
HttpURLConnection connection = (HttpURLConnection) url.openConnection
(proxy);
Original issue reported on code.google.com by [email protected]
on 21 Oct 2009 at 12:39
What steps will reproduce the problem?
1. run java -classpath wsc-18.jar;wsc-gae.jar;"C:\Program
Files\Java\jdk1.6.0_18\lib\tools.jar" com.sforce.ws.tools.wsdlc
enterprise.wsdl.xml output.jar
What is the expected output? What do you see instead?
Problem:
Exception in thread "main" java.io.FileNotFoundException: Unable to find
file: c
om/sforce/ws/tools/aggregateResult.template
at com.sforce.ws.template.Template.createInputStream(Template.java:129)
at com.sforce.ws.template.Template.exec(Template.java:88)
at com.sforce.ws.tools.wsdlc.generateAggregateResult(wsdlc.java:151)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:85)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:311)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:302)
What version of the product are you using? On what operating system?
Using wsc-18.jar on window xp.
Please provide any additional information below.
Tried it on different operating systems, still the same problem.
Original issue reported on code.google.com by [email protected]
on 27 May 2010 at 1:22
Modify the build.xml file to include a jar manifest with Main-Class:
<manifest>
<attribute name="Main-Class" value="com.sforce.ws.tools.wsdlc" />
</manifest>
With this manifest, wsdlc can be invoked with the -jar flag:
java -jar wsc.jar <wsdl-file> <jar-file> [temp-dir]
Attached build.xml with this change (rev 56)
Daniel
[email protected]
Original issue reported on code.google.com by [email protected]
on 11 May 2011 at 2:20
Attachments:
What steps will reproduce the problem?
1. Generate enterprise.jar and add to build bath
2. Make a query that includes a custom DateTime field (select id,
my_date_time__c from Account)
What is the expected output? What do you see instead?
Successful query is the expected output. Instead I'm getting an error:
"com.sforce.ws.ConnectionException: unable to find end tag at: START_TAG seen
...</sf:IsActiveCustomer__c><sf:Last_Run__c>... @1:474"
at com.sforce.ws.bind.TypeMapper.consumeEndTag(TypeMapper.java:382)
at com.sforce.soap.enterprise.sobject.Account.load(Account.java:3004)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:607)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:507)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:485)
at com.sforce.soap.enterprise.QueryResult.loadFields(QueryResult.java:151)
at com.sforce.soap.enterprise.QueryResult.load(QueryResult.java:134)
What version of the product are you using? On what operating system?
Running wsc on Google App Engine with the enterprise wsdl
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2010 at 8:04
Can you release a wsc 22.jar built with Java JDK1.5? our environment only runs
Java JDK 1.5. And you supplied us with a wsc 18.jar with Java JDK 1.5
previously.
Original issue reported on code.google.com by [email protected]
on 5 Jul 2011 at 9:36
Currently, wsdlc only outputs a jar containing both sources and classes in the
same jar. This is not convenient for production releases, particularly for
mobile apps. It would be more convenient to have the binaries (classes jar)
jar and sources (*.java) in separate jar files.
The only way to achieve this currently is via a script to unarchive the
generated jar, separate the classes from sources, and rebuild two jars.
Original issue reported on code.google.com by [email protected]
on 30 Nov 2011 at 4:15
What steps will reproduce the problem?
1. Goto http://realtime.nationalrail.co.uk/ldbws/wsdl.aspx and save it as
wsdl file.
2. run java -classpath wsc-gae-16_0.jar com.sforce.ws.tools.wsdlc
mywsdlfile.wsdl c:\temp\myservice.jar
What is the expected output? What do you see instead?
You would see:
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: Unknown
element: import
at com.sforce.ws.wsdl.Definitions.parse(Definitions.java:191)
at com.sforce.ws.wsdl.Definitions.read(Definitions.java:104)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:68)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:74)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:291)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:282)
What version of the product are you using? On what operating system?
Java 1.5 command line utility on a windows vista.
I dont understand why would it throw an exception on an import element ?
Your help would be much appreciated.
Thanks
Original issue reported on code.google.com by [email protected]
on 17 Jan 2010 at 10:45
What steps will reproduce the problem?
1. Create a ConnectorConfig object setting username and password
2. Use this to create a MetadataConnection
3. Invoke a method on the connection such as listMetadata
What is the expected output? What do you see instead?
The expected output is the retrieved metadata. Instead an exception is
raised with message "INVALID_SESSION_ID: Invalid Session ID found in
SessionHeader: Illegal Session"
What version of the product are you using? On what operating system?
I've compiled my own version of the stubs (after fixing the source for
Encoding.java). I've also tried this with both the standard and gae
specific wsc libraries (wsc-16_0 and wsc-gae-16_0)
Please provide any additional information below.
Looking at the generated stubs I noticed that the MetadataConnection cstr:
public MetadataConnection(ConnectorConfig config)
throws ConnectionException {
this.__config = config;
this.__typeMapper.setPackagePrefix(null);
this.__typeMapper.setConfig(config);
__SessionHeader = new SessionHeader_element();
__SessionHeader.setSessionId(config.getSessionId());
}
gets the session id from the given config -- but this will always be null
when the config is built from a username and pwd. This null value is what
is sent to the SOAP endpoint and causes the exception.
Sample standalone program is included.
If help is needed to address this issue, I would also be interested in
contributing.
Original issue reported on code.google.com by [email protected]
on 16 Jun 2009 at 5:01
Attachments:
What steps will reproduce the problem?
1. Run: C:\SFDC\API_java>java -classpath wsc-22-jdk-1-5.jar
com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar
What is the expected output? What do you see instead?
Expected: Compile & generation of enterprise.jar successful.
Instead:
C:\SFDC\API_java>java -classpath wsc-22-jdk-1-5.jar com.sforce.ws.tools.wsdlc
enterprise.wsdl enterprise.jar
[WSC][wsdlc.run:312]Created temp dir: C:\Users\user\AppData\Local\Temp\wsdlc-te
mp-1058389390010706246-dir
[WSC][wsdlc.<init>:79]Generating Java files from schema ...
[WSC][wsdlc.<init>:79]Generated 489 java files.
[WSC][wsdlc.compileTypes:262]Compiling to target 1.6...
javac: invalid target release: 1.6
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
Error: Failed to compile
What version of the product are you using? On what operating system?
JDK: 1.5
OS: Windows 7 Professional
Please provide any additional information below.
This issue is happening in the downloaded file WSC 22.0 (JDK 1.5) in the
Downloads section, and also setting the property compileTarget=1.5, directly in
the build file and in the command line as: ant -DcompileTarget=1.5 all
Neither option worked.
Original issue reported on code.google.com by [email protected]
on 6 Jul 2011 at 10:27
Hello, I'm wanting to push some Oracle data to a SalesForce custom object and
I'm not sure how to do the SaveResults[] with a single call. Hereafter is a
code snippet from my class. Any example on how to accomplish this would be
appreciated.
// Here I get the data from Oracle
stmt = connMkt.createStatement();
rs = stmt.executeQuery("SELECT * FROM MKT_RIGTL_STAGE");
// Here I instantiate the existing SalesForce custom object
SObject rtl = new SObject();
rtl.setType("Rig_Timeline__c");
// Here I populate the SObject with data from Oracle
// I want to add 100 records to SObject rtl and do a Single SaveResult after the while loop how can I accomplish this?
while(rs.next()) {
rtl.setField("Award_Rate__c", rs.getString("Award_Rate"));
rtl.setField("End_Date__c", rs.getString("End_Date"));
rtl.setField("HDR_Common_Name__c", rs.getString("Hdr_Common_Name"));
rtl.setField("Options__c", rs.getString("Options"));
rtl.setField("Rig_Code__c", rs.getString("Rig_Code"));
rtl.setField("Rig_Name__c", rs.getString("Rig_Name"));
rtl.setField("SEG_Common_Name__c", rs.getString("Seg_Common_Name"));
rtl.setField("Start_Date__c", rs.getString("Start_Date"));
}
SaveResult[] results = conn.create(new SObject[] { rtl });
Original issue reported on code.google.com by [email protected]
on 12 Jan 2012 at 5:41
What steps will reproduce the problem?
The Below Code is Used:
partnerConnection = Connector.newConnection(config);
partnerConnection.login(USERNAME, PASSWORD);
System.out.println("SessionId: " + config.getSessionId());
MyWebServiceBindingStub Stub = new WyndhamMyWebServiceBindingStub();
MyWebServiceServiceLocator objMyWebServiceLocator=new
MyWebServiceServiceLocator();
Stub=(MyWebServiceBindingStub)new
MyWebServiceServiceLocator().getMyWebService();
SessionHeader_element sh = new SessionHeader_element();
sh.setSessionId(config.getSessionId());
Stub.setHeader(objMyWebServiceLocator.getServiceName().getNamespaceURI(),"Sessio
nHeader", sh);
Stub.callAction();
What is the expected output? What do you see instead?
the code for the my java client looks like this but when I am executing the
code am always getting No serializer found for class
com.sforce.soap.partner.SessionHeader_element in registry
org.apache.axis.encoding.TypeMappingDelegate@96cf11
What version of the product are you using? On what operating system?
Windows 7 and latest version of wsc and partner wsdl
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 16 Aug 2011 at 8:08
Would like a meta data sample and library
Original issue reported on code.google.com by [email protected]
on 28 May 2009 at 9:56
What steps will reproduce the problem?
1. Downloaded wsc-19.jar from http://code.google.com/p/sfdc-wsc/
2. Generated partner.wsdl as specified in the BulkAPI developers guide
3. Created the standalone java sample client.
What is the expected output? What do you see instead?
I am getting an error in the following method which is mentioned in
documentation
[code]
private BulkConnection getBulkConnection(String userName, String password)
[/code]
What version of the product are you using? On what operating system?
Salesforce Unlimited edition.
wsc-20.jar or wsc.19.jar
Windows xp 32 bit
java se 1.6.x
Please provide any additional information below.
I am trying the sample java client as mentioned in the Bulk API documentation,
I am getting an error in BulkConnection method, rest everything looks fine. I
am wondering which jar file will have the BulkConnection class.
Regards,
Arup
Original issue reported on code.google.com by [email protected]
on 29 May 2011 at 4:56
What steps will reproduce the problem?
1. Create a partner connection with an endpoint such as
https://login.salesforce.com/services/Soap/u/16.0 or
https://login.salesforce.com/services/Soap/u/17.0
2.Call describeSObject
3.
What is the expected output? What do you see instead?
A DescribeSObjectResult is expected. An exception is seen instead:
Exception in thread "main" com.sforce.ws.ConnectionException: Unexpected
element. Parser was expecting element 'urn:partner.soap.sforce.com:field'
but found 'urn:partner.soap.sforce.com:deprecated'
at com.sforce.ws.bind.TypeMapper.verifyTag(TypeMapper.java:379)
at com.sforce.ws.bind.TypeMapper.verifyElement(TypeMapper.java:408)
at
com.sforce.soap.partner.ChildRelationship.loadFields(ChildRelationship.java:150)
at com.sforce.soap.partner.ChildRelationship.load(ChildRelationship.java:134)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:619)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:519)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:497)
at
com.sforce.soap.partner.DescribeSObjectResult.loadFields(DescribeSObjectResult.j
ava:656)
at
com.sforce.soap.partner.DescribeSObjectResult.load(DescribeSObjectResult.java:64
3)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:619)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:495)
at
com.sforce.soap.partner.DescribeSObjectResponse_element.loadFields(DescribeSObje
ctResponse_element.java:68)
at
com.sforce.soap.partner.DescribeSObjectResponse_element.load(DescribeSObjectResp
onse_element.java:59)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:619)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:495)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:154)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:128)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:103)
at
com.sforce.soap.partner.PartnerConnection.describeSObject(PartnerConnection.java
:853)
What version of the product are you using? On what operating system?
Tried running with both the wsc-16_0.jar and the wsc-17_0.jar. Stack trace
above is from 17.0 jar file.
Please provide any additional information below.
This also may be a problem with the way sfdc servers are handling things.
I know that the describeSObject behavior has changed in 17.0. I would not
expect this to effect calls using the 16.0 API though.
Looking at the SOAP traces:
For 15.0 the response looks like:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="urn:partner.soap.sforce.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soapenv:Body>
<describeSObjectResponse>
<result>
<activateable>false</activateable>
<childRelationships>
<cascadeDelete>false</cascadeDelete>
<childSObject>Account</childSObject>
<field>ParentId</field>
</childRelationships>
and for 16.0 the response has additional "deprecated" related elements:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="urn:partner.soap.sforce.com"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soapenv:Body>
<describeSObjectResponse>
<result>
<activateable>false</activateable>
<childRelationships>
<cascadeDelete>false</cascadeDelete>
<childSObject>Account</childSObject>
<deprecated>false</deprecated>
<deprecatedAndHidden>false</deprecatedAndHidden>
<field>ParentId</field>
</childRelationships>
Original issue reported on code.google.com by [email protected]
on 17 Dec 2009 at 8:31
Hi Manoj/Ron,
I don't know how to contact you guys, so opening a ticket for this.
Its regarding WSC integration with "Tolerado". Tolerado is an open source
Apache Axis and WSC Java client wrapper that gives transparent
* Fault recovery and retrying on retryable failures.
* Caching of bindings, so that we don't need to do something extra to maintain salesforce session for re-using it.
Tolerado, also gives some wrappers over various web service operations. Like
queryMore(), that requires to correctly set the required headers in the client
stubs.
I am done with Tolerado + Apache Axis integration and I am about to complete
"Tolerado + WSC" integration. I believe Tolerado would be a nice topping over
WSC project and will ease life of developers in using it. So was wondering how
to submit it to you guys for review ?
More details on Tolerado can be found here :
http://code.google.com/p/tolerado-salesforce-web-services-client-wrappers/
Tolerado mentioned on Salesforce Blog :
http://blog.sforce.com/sforce/2010/07/supercharge-your-java-apps-for-better-use-
of-forcecom-web-service-apis-with-tolerado.html
Original issue reported on code.google.com by abhinavgupta697
on 1 Aug 2010 at 8:17
What steps will reproduce the problem?
1. The home page has a link to the BSD license template. I don't see a
BSD license updated specific for this project. Are there plans to provide
the product specific BSD license?
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 7 Jun 2010 at 3:12
What steps will reproduce the problem?
1. Generate jar from any valid wsdl using wsdlc
2. Setup code for GAE usage (config.setTransport(.....))
3. Setup code for proxy usage (config.setProxy("host", port))
What is the expected output? What do you see instead?
java.lang.NoClassDefFoundError: java.net.InetSocketAddress is a restricted
class. Please see the Google App Engine developer's guide for more details.
at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java
:51)
at com.sforce.ws.ConnectorConfig.setProxy(ConnectorConfig.java:95)
What version of the product are you using? On what operating system?
wsc-18, partner-18 and wsc-gae on Windows 7
Please provide any additional information below.
Even though proxy is not available or needed in GAE, it may be needed for
development (while still running on the development server) for some
networks. Would it still be possible to add proxy support using only the
white-listed classes?
Original issue reported on code.google.com by marcklaser
on 25 May 2010 at 7:17
Hi,
This is not a bug but a software license question. However, I could not
find anyway to contact the authors, so I am creating an issue here.
I see in Project Home it says "New BSD License," and every file under
java/src/com/sforce/ws has the license at the top of the file. However,
files under java/src/com/sforce/async do not. Are async/* also under BSD
License, or are they proprietary?
Thanks
Original issue reported on code.google.com by [email protected]
on 1 Feb 2010 at 8:50
Enhancement request:
Would it be possible to use OAUth to authorize access to Salesforce instead of
the current setUsername and setPassword way of connecting?
Original issue reported on code.google.com by [email protected]
on 18 Jul 2011 at 5:28
What steps will reproduce the problem?
1. download the Siebel CRM On Demand Opportunity Webservice and SFDC-wsc
library - wsc-18.jar, wsc-gae.jar and partner-18.jar
2. Create a appengine appcliation and copy the above jar inside the
war/WEB-INF/lib
3. Run the command java -classpath wsc-18.jar com.sforce.ws.tools.wsdlc
ODOpportunity.wsdl.xml ODOpportunity.jar from inside war/WEB-INF/lib
What is the expected output? What do you see instead?
It should generate jar file out the wsdl but there are error in compilation
of generated java files.
What version of the product are you using? On what operating system?
I am using wsc-18.jar, wsc-gae.jar and partner-18.jar
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Apr 2010 at 10:04
I was playing with this new feature introduced in WSC API release v20. I wish
it was documented somewhere, I just found it while debugging ConnectorConfig.
It would be great, if we can have a release notes wiki page, to explain whats
changed in the API for a release.
Anyway, what I was trying with Java code is available in
attachments(WSCSessionTest.java). I can't make SessionRenewer work correct for
me, I believe, its just written to take care of timed out salesforce sessions.
But session can get invalidated in other ways too. For my testing I just used
the "logout()" call. So I would suggest, to make SessionRenewer work
generically on INVALID_SESSION_ID fault codes too.
It would be great, if you can provide a sample showing how to use
SessionRenewer correctly.
Original issue reported on code.google.com by abhinavgupta697
on 14 Nov 2010 at 6:39
Attachments:
What steps will reproduce the problem?
1. call Connector.newConnection(user, password)
What is the expected output? What do you see instead?
I would expect to get an EnterpriseConnection. Instead, I get the
following stack trace:
Failed to get next elementcom.sforce.ws.ConnectionException: Failed to get
next element
at com.sforce.ws.parser.XmlInputStream.nextTag(XmlInputStream.java:168)
at
com.sforce.ws.transport.SoapConnection.readSoapEnvelopeStart(SoapConnection.java
:230)
at
com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:163)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:133)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:106)
at
com.sforce.soap.enterprise.EnterpriseConnection.login(EnterpriseConnection.java:
1)
at
com.sforce.soap.enterprise.EnterpriseConnection.<init>(EnterpriseConnection.java
:1)
at com.sforce.soap.enterprise.Connector.newConnection(Connector.java:1)
at com.sforce.soap.enterprise.Connector.newConnection(Connector.java:1)
at helloworld.testServlet.doGet(testServlet.java:94)
What version of the product are you using? On what operating system?
I'm using wsc-gae-16_0.jar and the Enterprise library (not partner)
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 4 Dec 2009 at 4:29
What steps will reproduce the problem?
1.Generate jar from any wsdl (I'm using the SFDC partners one)
2.Configure proxy parameters ( see code example below)
3. Call Connector.newConnection(config)
What is the expected output? What do you see instead?
Successful connection.
Instead I'm getting:
java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1
407 Proxy Authentication Required ( The ISA Server requires authorization to
fulfill the request. Access to the Web Proxy filter is denied. )"
What version of the product are you using? On what operating system?
I tested the issue on wsc-20.jar
Please provide any additional information below.
I'm using the following code example:
***********************************************************************
package test.ws;
import com.sforce.soap.partner.*;
import com.sforce.soap.partner.sobject.*;
import com.sforce.ws.*;
public class simple {
/**
* @param args
*/
public static void main(String[] args) {
ConnectorConfig config = new ConnectorConfig();
config.setUsername("myUser");
config.setPassword("mypass");
config.setProxy("10.1.1.15", 8080);
config.setProxyUsername("proxyUser");
config.setProxyPassword("ProxyPass");
PartnerConnection connection = null;
try {
connection = Connector.newConnection(config);
} catch (ConnectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
SObject account = new SObject();
account.setType("Account");
account.setField("Name", "My Account1");
try {
connection.create(new SObject[]{account});
} catch (ConnectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
**************************************************************************
I'm using Microsoft ISA as my proxy configured to allow Basic auth.
While tracing the network traffic using wireshark I can see that the request is
sent without auth header, the response is the 407 message and there is no
following CONNECT with authentication being sent.
The following code seems to work:
When tracing the following code with wireshark, I can see that the first
CONNECT message is sent with no authentication headers, the same 407 message is
returning from the server and the client respopnd by CONNECT that has the
authentication header (Proxy-authorization: Basic......)
**********************************************************************
package test.ws;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
class ProxyAuthenticator extends Authenticator {
private String user, password;
public ProxyAuthenticator(String user, String password) {
this.user = user;
this.password = password;
}
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(user, password.toCharArray());
}
}
**************************************************************************
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.MalformedURLException;
import java.net.Proxy;
import java.net.URL;
public class TestProxy2 {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
Authenticator.setDefault(new ProxyAuthenticator("proxyUser", "ProxyPass"));
Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("10.1.1.15", 8080));
String line="";
URL url = null;
try {
url = new URL("https://mail.google.com");
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
HttpURLConnection uc = (HttpURLConnection)url.openConnection(proxy);
uc.connect();
StringBuffer page=new StringBuffer();
StringBuffer tmp = new StringBuffer();
BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
while ((line = in.readLine()) != null){
page.append(line + "\n");
System.out.println(page.toString());
}
System.out.println("page.toString()");
}
}
**********************************************************************
Original issue reported on code.google.com by [email protected]
on 5 Dec 2010 at 12:11
What steps will reproduce the problem?
1. save http://advertisersapi.doubleclick.net/v1.7/api/dfa-api/site?wsdl to
site.wsdl
2. java com.sforce.ws.tools.wsdlc site.wsdl ./dfa.jar
What is the expected output? What do you see instead?
Expected output is a dfa.jar file containing web services class files
I got this on the command line:
[WSC][wsdlc.run:288]Created temp dir:
C:\DOCUME~1\wkinchin\LOCALS~1\Temp\wsdlc-t
emp-7684125469716399361-dir
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: attribute
name
can not be null at: 11:71
at com.sforce.ws.wsdl.Attribute.read(Attribute.java:73)
at com.sforce.ws.wsdl.ComplexType.read(ComplexType.java:126)
at com.sforce.ws.wsdl.Schema.read(Schema.java:117)
at com.sforce.ws.wsdl.Types.read(Types.java:64)
at com.sforce.ws.wsdl.Definitions.parse(Definitions.java:162)
at com.sforce.ws.wsdl.Definitions.read(Definitions.java:104)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:68)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:74)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:288)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:279)
What version of the product are you using? On what operating system?
wsc-gae-16_0.jar
windows xp
jdk1.6.0_13
command propmt
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Jul 2009 at 4:36
What steps will reproduce the problem?
1. use wsc-gae-16_0.jar to build a gae app
2. deploy to GAE
3. attempt using the PartnerConnection object (as from
Connector.newConnection(config)
What is the expected output? What do you see instead?
error: java.lang.NoClassDefFoundError: java.net.Proxy is a restricted class.
It appears that the changes in r35 to remove the proxy references were not
built into a new jar.
What version of the product are you using? On what operating system?
wsc-gae-16_0.jar - downloaded 2010-02-28 from sfdc-wsc project site.
Please provide any additional information below.
Could we have a jar built from r35, or access to the source for the latest
GAE-compatible version?
Original issue reported on code.google.com by [email protected]
on 1 Mar 2010 at 1:24
I'm using wsc-18 on GAE, having problems connecting to a Professional Edition
instance. My app has passed the SFDC security review, and I'm trying to supply
my client ID like so:
PartnerConnection connection = Connector.newConnection(config);
connection.setCallOptions("xxx/yyy/", null);
Unfortunately I still get a LoginFault 'INVALID_LOGIN' ('Invalid username,
password, security token; or user locked out.'). I've checked the login,
password, and security token several times, so I wanted to check and see if
anyone else has confirmed that setCallOptions actually yields the proper SOAP
output. Is there some way I can capture that w/ a configuration change?
Original issue reported on code.google.com by [email protected]
on 16 Oct 2010 at 12:29
Can the WSC be added to a central maven repository somewhere? It would be nice
to have a central repository rather than manually adding a maven dependency.
Original issue reported on code.google.com by [email protected]
on 16 Jun 2010 at 10:58
Manoj,
Can you see the email text below and let me know if you can fix the license
text issue:
=============================
When we spoke I was only concerned about the Rhino files, but now I notice that there are also files taken from other sources.
The SFDC-WSC project on Google Code (hereinafter “Manoj’s project”) ships as a Jar file (wsc-19.jar), with no documentation. On Google code, the license for Manoj’s project is listed as BSD.
If you open the jar file of Manoj’s project, you find two class trees – one rooted at com.sforce, and one rooted at org.mozilla. I noticed that the org.mozilla tree is identical to the Rhino project (which is under dual GPL/MPL license) and in fact some Rhino copyright notices are preserved within the jar file.
If you browse Manoj’s source code on Google Code, you’ll find the following license text at http://code.google.com/p/sfdc-wsc/source/browse/trunk/wsc19/dist/wsc_license.html
End User License Agreement
Force.com WSC version 18.0
Except as described below, the wsc jar files are Copyright (c)
2005-2009, salesforce.com, inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
<ul>
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. </li>
<li>Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. </li>
<li>Neither the name of salesforce.com, inc. nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission. </li>
</ul>
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.</p>
<p>The following Third Party components are licensed as follows:</p>
Xml Pull Parser
MXParser.java
MXSerializer.java
XmlPullParser.java
XmlPullParserException.java
Your use of the Xml Pull Parser code is subject to the terms and conditions of
the Indiana University Extreme! Lab Software License, Version 1.2,
available at http://extreme.indiana.edu/license.txt
--
Rhino: JavaScript for Java
js-1.7R2.jar
<p>Your use of the Rhino code is subject to the terms and conditions of the
Mozilla Public License, available at <A
HREF="http://www.mozilla.org/MPL/">http://www.mozilla.org/MPL/</A
<http://www.mozilla.org/MPL/%3c/A>
FindBugs
annotations.jar
Your use of the FindBugs code is subject to the terms and conditions of the GNU
Lesser General Public License, available at <A
HREF="http://www.gnu.org/licenses/lgpl.html">http://www.gnu.org/licenses/lgpl.ht
ml</A></p> </body> </html>
Most of these third-party licenses have requirements like “Redistributions in
binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other
materials provided with the distribution. ” – and I can’t find any
qualifying notice in Manoj’s binary distribution.
Those are technicalities, Manoj could fix them by adding a proper notice file
to his distribution.
There’s a somewhat worse problem in the case of FindBugs, which is LGPL –
our legal team gets a bit nervous around the LGPL. However, annotations code
should not be necessary to include in the binary distribution, and I’ve just
about convinced myself that there is no FindBugs code present in the binary
distribution of Manoj’s project. Please ask Manoj to verify.
Manoj’s license text is not entirely accurate: in the current distribution,
the *contents* of js-1.7R2.jar (I think – could be a slightly different
version) are present, but not in the form of a jar file. Also, most of the XML
Pull Parser code that he’s using is in the public domain – MXParser is
under Indiana license but not the other files, which come from xmlpull.org.
(However, there is some reason to think that Salesforce.com then modified the
files – there’s a package.html which purports to apply salesforce.com’s
BSD license to all the XML Pull Parser code.) The more accurately Manoj can
describe the origin and license of the code, the easier time our legal team
will have.
Original issue reported on code.google.com by [email protected]
on 23 Sep 2010 at 9:12
RPC and multiple port type support would be nice...
Original issue reported on code.google.com by [email protected]
on 9 Jun 2009 at 3:04
steps m following :-
1.SObject[] upserts = new _case[1];
2. _case upsertCase= new _case();
3.upsertCase.setRMA_Number__c("1000015177");
4.upserts[0]=upsertCase;
5.UpsertResult[] upsertResults =soapBinding.upsert("RMA_number__c ", upserts);
What is the expected output? What do you see instead?
Ans: It should give the array of matched records.
What version of the product are you using? On what operating system?
OS in win XP
Please provide any additional information below.
Error:- RMA_number__c does not match an External ID for Case
Original issue reported on code.google.com by [email protected]
on 8 Sep 2011 at 1:52
What steps will reproduce the problem?
1. add config.setRequestHeader("Authorization", "Basic "+hash);
2. where hash is Base64encoded username:password
3. make web service call as usual
What is the expected output? What do you see instead?
Using a packet sniffer (wireshark) I expect to see this in the http post
request as a header. I do not.
I believe the setRequestHeader() function does not work at all - as I have
tried other values with the same outcome
What version of the product are you using? On what operating system?
GAE - wsc-18.jar
Please provide any additional information below.
Need some help with authentication - its undocumented.
Original issue reported on code.google.com by [email protected]
on 9 Jun 2010 at 1:25
What steps will reproduce the problem?
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
SObject so = new SObject();
so.setType("Opportunity");
so.setField("CloseDate", dateFormat.parse("1980-05-20");
so.setField("StageName", "Prospecting");
so.setField("Name", "Test Object");
connection.create(new SObject[]{ so });
What is the expected output? What do you see instead?
Expected: Opportunity object created inside salesforce.
See: Object not created, with error com.sforce.ws.SoapFaultException: Element
type "sobj:CloseDate" must be followed by either attribute specifications, ">"
or "/>".
What version of the product are you using? On what operating system?
Tried wsc-18,wsc-19,wsc-20 with partner wsdl and wsc-gae. Using Google App
Engine 1.4.0 and Window XP
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Dec 2010 at 7:33
What steps will reproduce the problem?
This only happen to some objects, the object that fails for me is
"ContentVersion".
1. run connection.describeLayout("ContentVersion", null).
2. It throws a ConnectionException with the error:
com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting
element 'urn:partner.soap.sforce.com:layouts' but found
'urn:partner.soap.sforce.com:recordTypeMappings' : Unexpected element. Parser
was expecting element 'urn:partner.soap.sforce.com:layouts' but found
'urn:partner.soap.sforce.com:recordTypeMappings'
What is the expected output? What do you see instead?
It should return a DescribeLayoutResult object.
What version of the product are you using? On what operating system?
wsc-22, wsc-gae, app engine 1.5.2.
Original issue reported on code.google.com by [email protected]
on 11 Aug 2011 at 12:03
What steps will reproduce the problem?
1. Download wsc_java15.jar from this site
2. Download partner.wsdl from salesforce.com
3. Run the wsdl tool on Java 1.5 environment: java -classpath wsc_java15.jar
com.sforce.ws.tools.wsdlc partner.wsdl partner.jar
What is the expected output? What do you see instead?
partner.jar must be created without any errors.
But I am getting this error message: javac: invalid target release: 1.6
C:\salesforce>java -classpath C:\salesforce\wsc\wsc.jar;C:\salesforce\wsc\js.jar
com.sforce.ws.tools.wsdlc C:\salesforce\wsdl\partner\partner.wsdl .\partner.jar
.\gen
[WSC][wsdlc.run:290]Created temp dir: C:\salesforce\.\gen
[WSC][wsdlc.<init>:78]Generating Java files from schema ...
[WSC][wsdlc.<init>:78]Generated 162 java files.
[WSC][wsdlc.compileTypes:238]Compiling ...
javac: invalid target release: 1.6
Usage: javac <options> <source files>
What version of the product are you using? On what operating system?
wsc_java15.jar on java 1.5 on windows 7
Please provide any additional information below.
If I use Java 1.6 it works but I need to use the Salesforce Bulk API in Java
1.5 due to environment dependencies at my workplace.
I would appreciate your help.
Thanks,
Ram Vittal
Original issue reported on code.google.com by [email protected]
on 20 Aug 2010 at 10:29
We're trying to use WSC-GAE-16_0 to parse another WSDL. It's working great
for our Salesforce enterprise WSDL, but failing with the following error on
our other one.
What steps will reproduce the problem?
1. Run the command:
C:\tools\GAE>java -classpath wsc-gae-16_0.jar com.sforce.ws.tools.wsdlc
other.wsdl other-library.jar
What is the expected output? What do you see instead?
Expect it to parse the WSDL correctly.
Due to:org.mozilla.javascript.WrappedException: Wrapped
java.lang.IllegalArgumentException: Operation.output got more than one
element:com.sforce.ws.wsdl.Operation@6cb8 (<template>#59)
Exception in thread "main" org.mozilla.javascript.WrappedException: Wrapped
java.lang.IllegalArgumentException: Operation.output got more than one
element:com.sforce.ws.wsdl.Operation@6cb8 (<template>#59)
at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:16
93)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:157)
at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:20
1)
at
org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:64)
at org.mozilla.javascript.gen.c17._c0(<template>:59)
at org.mozilla.javascript.gen.c17.call(<template>)
at
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:3
37)
at
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:275
What version of the product are you using? On what operating system?
Windows Professional Edition
Environment:: java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)
Original issue reported on code.google.com by [email protected]
on 20 Jul 2009 at 11:36
I ran into problems when a call contained a string with international
characters, in my case the Swedish letters "å", "ä" and "ö".
I made a small patch to entity-encode characters above code point 127 in
MXSerializer.java. I'm not sure that this is the best solution, but it
Worked For Me:
@@ -966,6 +966,10 @@ public class MXSerializer {
// "character zero is not allowed
in XML 1.1 output"+getLocation());
// }
}
+ } else if (ch>127) {
+ if(i > pos) out.write(text.substring(pos, i));
+ out.write("&#"+((int)ch)+";");
+ pos = i + 1;
}
if(seenBracket) {
seenBracketBracket = seenBracket = false;
Original issue reported on code.google.com by [email protected]
on 7 Aug 2009 at 2:03
Attachments:
What steps will reproduce the problem?
1.running command java -classpath wsc-19.jar com.sforce.ws.tools.wsdlc xxx.wsdl
xxx.jar
2.
3.
What is the expected output? What do you see instead?
[WSC][wsdlc.run:312]Created temp dir: <some-path>\wsdlc-
temp-179931989525067769-dir
Exception in thread "main" com.sforce.ws.wsdl.WsdlParseException: Unable to find
schema for element; {http://www.w3.org/2001/XMLSchema}schema
at com.sforce.ws.wsdl.Types.read(Types.java:91)
at com.sforce.ws.wsdl.Definitions.parse(Definitions.java:162)
at com.sforce.ws.wsdl.Definitions.read(Definitions.java:104)
at com.sforce.ws.wsdl.WsdlFactory.create(WsdlFactory.java:68)
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: com.sforce.ws.ConnectionException: Unable to find schema for element;
{http://www.w3.org/2001/XMLSchema}schema
at com.sforce.ws.wsdl.Types.getSchema(Types.java:144)
at com.sforce.ws.wsdl.Types.getElement(Types.java:136)
at com.sforce.ws.wsdl.Types.updateElementRef(Types.java:111)
at com.sforce.ws.wsdl.Types.read(Types.java:89)
... 6 more
What version of the product are you using? On what operating system?
wsc-19.jar; windows 7
Please provide any additional information below.
When trying to run the command at step 1, I get the above error;
The error appears at line <s:element ref="s:schema"/> in the following sequence
<s:element name="SomeName">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SomeName">
<s:complexType>
<s:sequence>
<s:element ref="s:schema"/>
<s:any/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
Original issue reported on code.google.com by [email protected]
on 4 Oct 2010 at 11:08
delete is not supported yet?
Original issue reported on code.google.com by [email protected]
on 26 Feb 2010 at 4:41
What steps will reproduce the problem?
1. Query for accounts.
QueryResult result = connection.query("select id, name, phone from Account");
2. Get contact from accounts
for (SObject x: result.getRecords()) {
Account temp = (Account) x
QueryResult contacts = temp.getContacts();
}
What is the expected output? What do you see instead?
Should return a QueryResult of contacts under the specific account. But it
returns null instead. Tested this on every account.
What version of the product are you using? On what operating system?
wsc-18.jar,wsc-gae.jar, google app engine 1.3.4
Please provide any additional information below.
It works fine if I do a query on contacts instead (QueryResult result =
connection.query("select contact.account.name from Contact"))
Also it seems impossible to create/update contact or other custom object.
Is this not supported?
Original issue reported on code.google.com by [email protected]
on 27 May 2010 at 10:27
If partner (or enterprise) objects are generated from a given WSDL, then the
service endpoint (URL to use *after* logging in) is baked into the generated
class files. For normal API calls, the ConnectorConfig object exposes the
serviceEndpoint property via setters/getters, so that it can be reset after
login. In fact, the WSC code appears to already do this for you.
The problem is when you want to use WSC for metadata API calls. Again, the
endpoints will be baked into the code upon code-generating from meta.wsdl,
however the ConnectorConfig object does not expose
LoginResponse.Result.metadataServerUrl - so there is no getter.
The issue manifests when you build with a partner.wsdl/meta.wsdl from one org
and try run on another org with a different instance host.
The code should look like this:
ConnectorConfig partnerConfig = new ConnectorConfig();
ConnectorConfig metadataConfig = new ConnectorConfig();
partnerConfig.setUsername(USERNAME);
partnerConfig.setPassword(PASSWORD);
PartnerConnection partnerConnection =
com.sforce.soap.partner.Connector.newConnection(partnerConfig);
metadataConfig.setSessionId(
partnerConnection.getSessionHeader().getSessionId());
metadataConfig.setServiceEndpoint(partnerConnection.getMetadataEndpoint()); <== no such API - we need it!!
So here's my work-around:
String metaurl = partnerConfig.getServiceEndpoint();
metaurl = metaurl.replace("Soap/u", "Soap/m");
metadataConfig.setServiceEndpoint(metaurl);
Original issue reported on code.google.com by [email protected]
on 21 Mar 2011 at 6:07
What steps will reproduce the problem?
1. Call a remote web service which takes longer than 10 seconds to respond
What is the expected output? What do you see instead?
Expect the method to return a value, instead get
com.sforce.ws.transport.GaeHttpTransport getContent: getContent: Timeout while
fetching: http://<my.host>/PortalFour42/LiveSSO.asmx
What version of the product are you using? On what operating system?
wsc-18.jar and wsc-gae.jar on GAE 1.3.8
Original issue reported on code.google.com by [email protected]
on 27 Oct 2010 at 6:03
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 [email protected]
on 1 Jun 2009 at 10:31
I try to connect to call a webservice that send a multi-part response.
1. Creating a com.sforce.ws.ConnectorConfig (call config)
2. Setting the ServiceEndpoint
3. Deactive Compression
4. Creating SoapConnection using Connector.newConnection(config);
5. Call a function
6. Having an exception
Caused by: com.sforce.ws.ConnectionException: Failed to get next element
at com.sforce.ws.parser.XmlInputStream.nextTag(XmlInputStream.java:168)
at com.sforce.ws.transport.SoapConnection.readSoapEnvelopeStart(SoapConnection.java:246)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:160)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:144)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
at xxx.xxxxxx.SoapConnection.myFunction(SoapConnection.java:XX)
... X more
Caused by: com.sforce.ws.parser.XmlPullParserException: only whitespace content
allowed before start tag and not - (position: START_DOCUMENT seen \r\n-...
@2:2)
at com.sforce.ws.parser.MXParser.parseProlog(MXParser.java:1505)
at com.sforce.ws.parser.MXParser.nextImpl(MXParser.java:1382)
at com.sforce.ws.parser.MXParser.next(MXParser.java:1085)
at com.sforce.ws.parser.MXParser.nextTag(MXParser.java:1070)
at com.sforce.ws.parser.XmlInputStream.nextTag(XmlInputStream.java:166)
... 13 more
Response is good but because of the multi-part data parse failed. It try to
parse as XML the whole http request body, and not just the XML part.
Here is an example of the http request body:
--uuid:09210c62-1047-4f46-a159-1fd1a867b297
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>
[Here goes the XML we want to parse]
--uuid:09210c62-1047-4f46-a159-1fd1a867b297--
I use SFDC-WSC-20 on Linux Fedora Core 11 with Jboss 5.1 and JDK 1.6
I call another webservice on the same server that do not use Multi-part
response and it works.
Can SFDC-WSC works with multi-part Response?
If yes, how?
Otherwise can you help for fixing it?
Original issue reported on code.google.com by [email protected]
on 24 Feb 2011 at 3:05
What steps will reproduce the problem?
1. Add in a parent directory for the output jar file to get around this issue
BREAKS: java -classpath wsc-gae-16_0.jar <wsdl_file> output.jar
WORKS: java -classpath wsc-gae-16_0.jar <wsdl_file> ./output.jar
What is the expected output? What do you see instead?
Would expect this to parse the input wsdl and output a jar. Instead I get
this error:
Exception in thread "main" java.lang.NullPointerException
at com.sforce.ws.tools.wsdlc.checkTargetFile(wsdlc.java:115)
at com.sforce.ws.tools.wsdlc.<init>(wsdlc.java:66)
at com.sforce.ws.tools.wsdlc.run(wsdlc.java:288)
at com.sforce.ws.tools.wsdlc.main(wsdlc.java:279)
What version of the product are you using? On what operating system?
Using wsc-gae-16_0.jar on Mac OS 10.5.6 (Intel Core 2 Duo)
Original issue reported on code.google.com by [email protected]
on 22 Jun 2009 at 1:40
What steps will reproduce the problem?
1. Install grails
2. Install app-engine grails plugin
3. download and install sfdc-wsc jars in grails lib
4. try example code on this site
What is the expected output? What do you see instead?
I would expect to have the code create and account, instead I get this:
org.codehaus.groovy.runtime.InvokerInvocationException:
java.lang.ClassCastException: com.sforce.soap.partner.LoginResult cannot be
cast to com.sforce.ws.bind.XMLizable
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineW
ebAppContext.java:54)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Transactio
nCleanupFilter.java:43)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilte
r.java:121)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineW
ebAppContext.java:54)
at
com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.han
dle(JettyContainerService.java:313)
Caused by: java.lang.ClassCastException:
com.sforce.soap.partner.LoginResult cannot be cast to
com.sforce.ws.bind.XMLizable
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:606)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:483)
at
com.sforce.soap.partner.LoginResponse_element.loadFields(LoginResponse_element.j
ava:68)
at
com.sforce.soap.partner.LoginResponse_element.load(LoginResponse_element.java:59
)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:607)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:483)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:157)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:131)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:106)
at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:754)
at
com.sforce.soap.partner.PartnerConnection.<init>(PartnerConnection.java:294)
at com.sforce.soap.partner.Connector.newConnection(Connector.java:27)
at
com.sdfcgae.demo.SalesforceConnectionService.createAccount(SalesforceConnectionS
ervice.java:35)
at ContentController$_closure2.doCall(ContentController.groovy:19)
at ContentController$_closure2.doCall(ContentController.groovy)
... 5 more
What version of the product are you using? On what operating system?
Snow Leopard, version of grails is 1.1.1, app-engine plugin is 0.8.3,
sdfc-wsc client is may 2009 jars
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 17 Sep 2009 at 5:54
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.