• delanc1
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies

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

  • September 05, 2013
  • Like
  • 0

We have created a managed package (beta version) and installed it into a client's salesforce sandbox org. The package works correctly for the user who has installed it, but all other users are unable to access a custom object within it. The package is installed with the "Grant Access to All Users" setting. What could be preventing the other users from using this object?

  • September 07, 2011
  • Like
  • 0

I created the sample REST api class (found here) in my developer org, and I'm trying to hit it from javascript on a visualforce page in the same org, but I'm getting the following error:

 

"NetworkError: 405 Method Not Allowed - https://na9.salesforce.com/services/apexrest/Account/001E000000B9GjD"

 

From the guide in the link mentioned above, a 405 means "The request method does not have a corresponding Apex method."

Any ideas? Here's the related code:

 

Apex class:

@RestResource(urlMapping='/Account/*')
global with sharing class MyRestResource {

  @HttpGet
  global static Account doGet(RestRequest req, RestResponse res) {
     ...
  }
}

 Visualforce page:

var session = '{!$Api.Session_ID}';
var Url = "https://na9.salesforce.com/services/apexrest/Account/001E000000B9GjD";
        
xmlHttp = new XMLHttpRequest(); 
xmlHttp.onreadystatechange = ProcessRequest;
xmlHttp.open( "GET", Url, true );
xmlHttp.setRequestHeader('Set-Cookie', session);
xmlHttp.send( null );

 

I'm creating an "extension" to a client's salesforce org in which I use some of their custom fields. When I package my code up, it wants to include these custom fields since there are dependencies. This creates an issue with installing the package because the fields already exist in the client's org, so the install fails due to duplicate custom fields.

 

Any way around this? Thanks

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

  • September 05, 2013
  • Like
  • 0

We have created a managed package (beta version) and installed it into a client's salesforce sandbox org. The package works correctly for the user who has installed it, but all other users are unable to access a custom object within it. The package is installed with the "Grant Access to All Users" setting. What could be preventing the other users from using this object?

  • September 07, 2011
  • Like
  • 0

I'm creating an "extension" to a client's salesforce org in which I use some of their custom fields. When I package my code up, it wants to include these custom fields since there are dependencies. This creates an issue with installing the package because the fields already exist in the client's org, so the install fails due to duplicate custom fields.

 

Any way around this? Thanks