You need to sign in to do that
Don't have an account?
Calling SoapBindingStub.getUserInfo() fails coming from a community portal
I've created a custom button on the opportunity layout which calls out to an external java app. It passes the session id and the partner API URL. The external app then creates a SOAP binding (leveraging the partner wsdl downloaded from Setup). The first thing I do with the binding is call SoapBindingStub.getUserInfo().
My org has the Communities feature enabled to allow partner users to log in through community portals. When I click the custom button coming from a community portal, the above fails and I see "Caused by: (411)Length Required" in the stack. It works just fine if I click the button coming from salesforce (rather than a community portal).
Any ideas what's causing the RemoteException? I'm using the same user for both scenarios. Here's the full stack trace:
Caused by: (411)Length Required
at org.apache.axis.transport.http.CommonsHTTPSender.invoke(CommonsHTTPSender.java:218)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sforce.soap.partner.SoapBindingStub.getUserInfo(SoapBindingStub.java:3994)
I'm wondering if the URL is the cause. Is there some setting/permission in communities that needs to be set in order to do this? Here are the URLS observed:
https://<myCommunityDomain>.force.com/<communityName>/services/Soap/u/28.0/00Di0000000eG2r -does not work
https://na15.salesforce.com/services/Soap/u/28.0/00Di0000000eG2r -works
Answer found in the following post:
http://boards.developerforce.com/t5/APIs-and-Integration/API-Access-Disabled-for-Communities/td-p/644035