function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
alimillsalimills 

Feature Request

I have a very minor feature request for Salesforce and would like to contact someone about it.  After a quick look around the site I can't tell how to do so.  Can someone please assist me?  How do I make a feature request?  Who should I contact?  The request is minor.  I need a certain permission file added to the Web service machines so that the technology I'm using will work.

Thanks.


Ali

benjasikbenjasik
The proper way to do this is a log a case with customer support with your request.

Providing more info here (if you can) will also help other people answer your question if it has a solution today.
alimillsalimills

Hello benjasik,

My goal is to access Salesforce's Web services through Flash.  This is easy to do from a Flash application hosted under the same domain as the services, but it requires an additional step in order to work from an application hosted under a different domain.  Part of Flash's security model prevents it from reading files from other servers unless a specific cross-domain permission file called, "crossdomain.xml" exists in the root level of the server.  The contents of the file would look like:

< - - - - - - - - - - - - start - - - - - - - - - - - - >
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">

  


< - - - - - - - - - - - -  end  - - - - - - - - - - - - >

If the above file existed in the root level of Salesforce's Web services server, all remote Flash clients would be able to call SF services.

In my inital post when I asked how to request a feature, this is the feature of which I spoke.  I would like to request that a cross-domain permission file be added to the server running Salesforce's Web services.

Is this sort of request appropriate for customer support, or should I address it to someone else?

Thanks,

Ali

Information on cross-domain files can be found at:

http://www.macromedia.com/support/flash/ts/documents/loadvars_security.htm

http://moock.org/asdg/technotes/crossDomainPolicyFiles/

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001097.html

alimillsalimills

The previous file contents were incorrect.  The looked fine when I previewed, but got munged up when I posted.  Here goes the second try:

< - - - - - - - - - - - - start - - - - - - - - - - - - >

<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <allow-access-from domain="*" />
</cross-domain-policy>

<- - - - - - - - - - - -  end  - - - - - - - - - - - - >

Ali

kimkim

Hi Alimills,

I am curious on how send the soap headers for the serverUrl and sessionID for subsequent calls from Flash.

Read a thread which confuses me a bit:

http://www.flash-db.com/Board/index.php?board=9;action=display;threadid=6647

KJ

alimillsalimills

Hey Kim,

I tried to use Flash's built in Web service objects without any luck, so I decided to write my own implimentation of Soap.  It's simple.  It looks like:

- - - - - - Start - - - - - -


import com.foo.net.*;

class SfSoap extends XML {
 public var ignoreWhite:Boolean = true;
 
 public function SfSoap(str:String) {
  super(str);
     addRequestHeader(createHeaders());
 }
 
 private function createHeaders():Array {
  var headers = new Array();
  headers.push("SOAPAction");
  headers.push("''");
  return headers;
 }
}

- - - - - -  End  - - - - - -

I use this Soap object combined with some other classes I built based on information gathered from http://www.sforce.com/us/docs/sforce40/wwhelp/wwhimpl/common/html/wwhelp.htm?context=sforceAPI_WWHelp&file=sforce_API_messages_create.html#wp1316195 to access Salesforce's services. 

I am successfully hitting Salesforce services through the URL https://na1.salesforce.com/services/Soap/c/4.0.  I've found that I don't need to add the sessionID to the actual Soap header.  Placing it in  

To address your question of how to send Soap headers for the server URL and sessionID

 

alimillsalimills

Hey Kim,

I tried to use Flash's built in Web service objects without any luck, so I decided to write my own implimentation of Soap.  It's simple.  It looks like:

- - - - - - Start - - - - - -


import com.foo.net.*;

class SfSoap extends XML {
 public var ignoreWhite:Boolean = true;
 
 public function SfSoap(str:String) {
  super(str);
     addRequestHeader(createHeaders());
 }
 
 private function createHeaders():Array {
  var headers = new Array();
  headers.push("SOAPAction");
  headers.push("''");
  return headers;
 }
}

- - - - - -  End  - - - - - -

I use this Soap object combined with some other classes I built based on information gathered from http://www.sforce.com/us/docs/sforce40/wwhelp/wwhimpl/common/html/wwhelp.htm?context=sforceAPI_WWHelp&file=sforce_API_messages_create.html#wp1316195 to access Salesforce's services. 

I am successfully hitting Salesforce services through the URL https://na1.salesforce.com/services/Soap/c/4.0.  I've found that I don't need to add the sessionID to the actual Soap header.  Placing it in hte  

To address your question of how to send Soap headers for the server URL and sessionID

 

alimillsalimills

Hey Kim,

I tried to use Flash's built in Web service objects without any luck, so I decided to write my own implimentation of Soap.  It's simple.  It looks like:

- - - - - - Start - - - - - -

import com.foo.net.*;

class SfSoap extends XML {
 public var ignoreWhite:Boolean = true;
 
 public function SfSoap(str:String) {
  super(str);
     addRequestHeader(createHeaders());
 }
 
 private function createHeaders():Array {
  var headers = new Array();
  headers.push("SOAPAction");
  headers.push("''");
  return headers;
 }
}

- - - - - -  End  - - - - - -

I use this Soap object combined with some other classes I built based on information gathered from http://www.sforce.com/us/docs/sforce40/wwhelp/wwhimpl/common/html/wwhelp.htm?context=sforceAPI_WWHelp&file=sforce_API_messages_create.html#wp1316195 to access Salesforce's services.

I am successfully hitting SF services through the URL https://na1.salesforce.com/services/Soap/c/4.0.  I've found that including the sessionID in the Soap request in the following way:

= = = = = = Start = = = = = =
 
<soapenv:Header>  
 <ns1:SessionHeader soapenv:mustUnderstand="0" xmlns:ns1="urn:enterprise.soap.sforce.com">   
     <ns2:sessionId xmlns:ns2="urn:enterprise.soap.sforce.com">SESSION_ID</ns2:sessionId>  
    </ns1:SessionHeader>
</soapenv:Header> 

= = = = = =  End  = = = = = =        

works just fine.

Good luck.


Ali

kimkim

Hey Ali,

Been working on some other tasks but now back on this again,
I can connect via ColdFusion but I dont really want that. I am still not able to go via Flash. I can login, get all the results, set the endpoint to the returned url and hit the new url, but any new call fails:

I tried it using the SoapHeaderFix from MM technote, http://www.macromedia.com/support/flash/ts/documents/soapheaderfix.htm setting the header value upon onResult from the login call like this:

---test.as--

import mx.services.*;
SoapHeaderFix.Install();
// #include this file in the frame 1 script of an empty .FLA, and then run it.. PLEASE LOOK AT MM SoapHeaderFix Documentation
// Creates a Log object which records all events when calling a web service.
SforceServiceLog = new Log(Log.DEBUG);
SforceServiceLog.onLog = function(txt) {
 trace(txt);
};
// Create a new instance of web service .
var myServerURL:String = "http://localhost/enterprise.wsdl";
var SforceService = new WebService(myServerURL, SforceServiceLog);
// Call the login method and assign it to the pending call object to handle results.
SforceResultObj = SforceService.login("myuseridhere", "thepasswordhere");
SforceService.onLoad = trace("loading");

// the onResult function is called if the service is successful
SforceResultObj.onResult = function(result) {
 for (var i in SforceResultObj.myCall) {
  trace("MyCall SoapCall Properties: "+i+"  "+SforceResultObj.myCall[i]);
 }
 
 var myNewServerURL:String;
 var mySessionID:String;
 var myUserID:String;
 myNewServerURL = result.serverUrl;
 mySessionID = result.sessionId;
 myUserID = result.userId;
 trace("my NEW ServerURL: "+myNewServerURL);
 trace("my SID: "+mySessionID);
 trace("my UserID: "+myUserID);
 var mySessionString:String = ""+mySessionID+"";
 var header1:XML = new XML(mySessionString);
 //add persistent soap header
 SforceService2.AddPersistentSOAPHeader(header1);
 //Now create the second service to call with new endpoint and sessionID in the header
 var SforceService2 = new WebService(myNewServerURL, SforceServiceLog);
 
 //new call
 SforceResultObj2 = SforceService.GetServerTimestamp();
 
 SforceService2.onLoad = trace("loading");
 //get results
 SforceResultObj2.onResult = function(result) {
  for (var i in SforceResultObj2.myCall) {
   trace("MyCall SoapCall Properties: "+i+"  "+SforceResultObj2.myCall[i]);
  }
  trace("timestamp: "+timestamp);
 };
 SforceResultObj2.onFault = function(fault) {
// If there is any error such as the service not working, the onFault handler will be invoked.
 trace(fault.faultCode+","+fault.faultstring);
 };
};
SforceResultObj.onFault = function(fault) {
 // If there is any error such as the service not working, the onFault handler will be invoked.
 trace(fault.faultCode+","+fault.faultstring);
};

Have you tried this route too or could you help me out a more detailed example of your implementation??
I really want to see how flash is handling this.
If you want to attach an example, you can also send it to: warempage@NOSPAMyahoo.com; much appreciated!

KJ