• bbp
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Installed certficate in  NodeDefaultTrustStore > Signer certificates ->Retreive from port (salesforce.com, port 443) but still getting  error. Any suggestions?

--------------------

 

LOGGING IN NOW....

[2/10/10 10:45:04:611 CST] 00000022 SystemOut O

Failed to execute query succesfully, error message was:

; nested exception is:

javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.h: No trusted certificate found

[2/10/10 10:45:04:611 CST] 00000022 SystemOut O

Hit return to continue...

-----------------------

  • February 10, 2010
  • Like
  • 0
I'm trying to re-implement the following C# code in Java, and it is not working for reasons that are almost obvious.

Using WebSphere 5.12 and the IBM WebSphere V5 Web service runtime (SOAP stack).

First, the C# code, followed by the nearly equivalent (but not quite working) Java code.

C#:
private SforceService loginWithSession(string sessionId, string serverUrl) {

SforceService sfdc = new SforceService();
sfdc.SessionHeaderValue = new SessionHeader();
sfdc.SessionHeaderValue.sessionId = sessionId;
sfdc.Url = serverUrl;
return sfdc;

}

Java:
private SoapBindingStub loginWithSession(String sessionId, String serverUrl) throws ServiceException, MalformedURLException {

SoapBindingStub soapBindingStub = (SoapBindingStub) new SforceServiceLocator().getSoap(new java.net.URL(serverUrl));

SessionHeader sessionHeader = new SessionHeader();
sessionHeader.setSessionId(sessionId);

soapBindingStub._setProperty("SessionHeader", sessionHeader);
return soapBindingStub;
}


Question 1: The "INVALID_SESSION_ID" exception is raised by the sforce service.

Question 2: I see no way to reset the endpoint URL. No Url property, and no setUrl() method in the SoapBindingStub class. Is this a problem?

I'm certain that I'm using a valid sessionId string. I am, however, running through a proxy.

I would appreciate any suggestions.