You need to sign in to do that
Don't have an account?
firefox
performance tuning - avoiding multiple stubs in a single session
Hi,
I am implementing a client using Axis2, and partner.wsdl
I've read that creation of multiple stubs will lead to performance issues.
In the Axis2, we need to pass each and every parameter like sessionheader, calloptions, etc for each call (query, update, etc) we make.
- So, I am just thinking of reusing the same stub once it's endpoint is changed after the login
- across a single session
- or for an entire application. (Does the URL change every time we login?)
BTW, are there any other points to consider to improve performance.
Please clarify.
You can use either partner or enterprise wsdl for login, using the default url. On return what API endpoint you get depends on which WSDL you used for login i.e. Partner or Enterprise.
So here is the general template of sfdc endpoint
https://<NODE-API host name>/services/Soap/u/<api-version>
Partner URL is having something like "/u/", if its Enterprise its having "/c/"
Once session is created you get LoginResult from the login call. It has the session id, that is reusable across all WSDLs. You just need to form correct API endpoint. I usually do it using LoginResult.getMetadataServerUrl() and constructing other required endpoints. A code sample is shown below
All Answers
This is a very common problem when working with web services. We need to do a couple of things like
Thanks for the reply Abhinav.
WSC seems to be a better solution. However, I need to stick to the Axis2 for consistency. (We use many webservices and all of them were implemented using Axis2)
Please share if you have any info on Axis2-sforce tuning.
Another question -
--> Does the URL (endpoint) change after every login?
No endpoint URL remains the same even after login. It just slightly changes across WSDLs like metadata,partner or apex.
Try digging into Tolerado Axis version for details on session caching etc. I am not sure to port Tolerado to Axis 2, it requires decent effort.
Though will try adding a blog post about this soon.
Thanks Abhinav.
I' m sorry, getting confused. You mentioned -
" It just slightly changes across WSDLs like metadata,partner or apex. "
I'm just wondering that the partner wsdl/created stubs remain the same once the application is deployed. So, when does the endpoint change.
Here is my question.
-> I use default URL to login. Then I get the new endpoint for every login.
-> Does the return endpoint URL depend on login credentials? otherwise it should remain the same whatever the case. (unless multiple server for load balancing)
I apologize if I missed some obvious points.
I'm thinking of reusing the stub after referring to WSO2 link
You can use either partner or enterprise wsdl for login, using the default url. On return what API endpoint you get depends on which WSDL you used for login i.e. Partner or Enterprise.
So here is the general template of sfdc endpoint
https://<NODE-API host name>/services/Soap/u/<api-version>
Partner URL is having something like "/u/", if its Enterprise its having "/c/"
Once session is created you get LoginResult from the login call. It has the session id, that is reusable across all WSDLs. You just need to form correct API endpoint. I usually do it using LoginResult.getMetadataServerUrl() and constructing other required endpoints. A code sample is shown below