Reply
Contributor
HarisK
Posts: 3
0
Accepted Solution

Using logout with partner wsdl

Hi Iwas provided partner WSDL and service built without problems. However I have problem doing logout. All examples I have found utilize 'connection', that had not built with provided WSDL.

Here is a part of my code:

 

SforceServiceLocator loc=new SforceServiceLocator();
 Soap sop=loc.getSoap();
LoginResult res=sop.login("myUsername","myPasswordr3bJepFr4yi2qgTuR6oproe9i3");
String sid=res.getSessionId();
System.out.println(sid);
System.out.println(res.getUserId());
System.out.println("adr2="+loc.getSoapAddress());
String surl=res.getServerUrl();
System.out.println(surl);

loc.setSoapEndpointAddress(surl);

//works up to this point
sop.logout(); //<--- throws Destination URL not reset


What am I doing wrong?

 

 

Moderator
SimonF
Posts: 7,982
0

Re: Using logout with partner wsdl

You need to update the url of the sop instance before calling any more API calls including logout.

Cheers
Simon
docs | blog | twitter
Contributor
HarisK
Posts: 3
0

Re: Using logout with partner wsdl

Thanks,  Simon, I got it working, but another problem arised. I posted new question