I am trying to use apache cxf to interface with Salesforce Partner web service.

I can login but it seems that I am unable to query because the session id is not set.

Can you help?

Here's what I have done

    SforceService binding = new SforceService();

    LoginResult result = binding.getSoap().login(USERNAME, PASSWORD);
    String serverUrl = result.getServerUrl();
    System.out.println (serverUrl);
    JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean(); 

And then it fails at QueryResult queryResults = service.query(QUERY_STR);

: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.