• pedrovarela1590
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies

is it possible not to use https? I have a local server running, and a local domain setup, http://demo.mm.com, and i get a trace error:

 

"Warning: Domain www.salesforce.com does not explicitly specify a meta-policy, but Content-Type of policy file http://www.salesforce.com/crossdomain.xml is 'text/x-cross-domain-policy'.  Applying meta-policy 'by-content-type'."

 

 

if i examine the call with service capture, it gives me some other errors: 

 

<soapenv:Envelope xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>sf:UNSUPPORTED_CLIENT</faultcode>

         <faultstring>UNSUPPORTED_CLIENT: HTTPS Required</faultstring>

         <detail>

            <sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault">

               <sf:exceptionCode>UNSUPPORTED_CLIENT</sf:exceptionCode>

               <sf:exceptionMessage>HTTPS Required</sf:exceptionMessage>

            </sf:UnexpectedErrorFault>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope> 

 

 

 

<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx = "http://www.adobe.com/2006/mxml" xmlns:salesforce = "http://www.salesforce.com/" layout = "absolute" applicationComplete = "login(event)" backgroundColor = "#FFFFFF" backgroundGradientColors= "[#FFFFFF,#FFFFFF]" width = "100%" height = "100%" pageTitle = "SalesForce Simple Demo" viewSourceURL="srcview/index.html"> <salesforce:Connection id = "apex" serverUrl = "http://www.salesforce.com/services/Soap/u/11.0" protocol = "http" /> <mx:Script> <![CDATA[ import vo.AccountVO; import mx.collections.ArrayCollection; import com.salesforce.results.QueryResult; import mx.utils.ObjectUtil; import mx.controls.Alert; import com.salesforce.AsyncResponder; import com.salesforce.objects.LoginRequest; import utils.ParsingUtils; [Bindable] private var acAccountList:ArrayCollection = new ArrayCollection(); [Bindable] private var acMassagedAccountList:ArrayCollection = new ArrayCollection(); private function login(event:Event):void { //Security.loadPolicyFile("http://www.salesforce.com/services/crossdomain.xml"); //Security.allowDomain('http://demo.mm.com'); apex.protocol = 'http'; var lr:LoginRequest = new LoginRequest(); //lr.server_url = 'http://demo.mm.com'; //lr.session_id = parameters.session_id; lr.username = '****************'; lr.password = '**********YR11kQ3K2meEmjXj8uzbsqg' lr.callback = new AsyncResponder(loadData, handleFault); apex.login(lr); } private function handleFault(fault:Object):void { Alert.show(ObjectUtil.toString(fault)); } private function loadData(lr:Object):void { apex.query( "Select Name, Phone, Type From Account", new AsyncResponder( handleQueryResult,handleFault) ); } private function handleQueryResult( event:QueryResult ):void { if (event.size > 0) { acAccountList.source = event.records.source; } //massage data for issue in datagrid if( acAccountList.length ) { acMassagedAccountList.source = ParsingUtils.convertToArrayCollection( acAccountList,vo.AccountVO ).source; } } ]]> </mx:Script> <mx:TabNavigator width = "100%" height = "100%" > <mx:VBox width = "100%" height = "100%" horizontalScrollPolicy = "off" verticalScrollPolicy = "off" label = "my own results after massaging data from force.com" > <mx:DataGrid width = "100%" height = "100%" dataProvider = "{acMassagedAccountList}" > <mx:columns> <mx:DataGridColumn dataField="Name" /> <mx:DataGridColumn dataField="Phone" /> <mx:DataGridColumn dataField="Type" /> </mx:columns> </mx:DataGrid> </mx:VBox> <mx:VBox width = "100%" height = "100%" horizontalScrollPolicy = "off" verticalScrollPolicy = "off" label = "wierd results straight from force.com" > <mx:Label width = "100%" text = "Grid does not highlight correctly due to SObject in salesforce api, not sure why... " /> <mx:DataGrid width = "100%" height = "100%" dataProvider = "{acAccountList}" > <mx:columns> <mx:DataGridColumn dataField="Name" /> <mx:DataGridColumn dataField="Phone" /> <mx:DataGridColumn dataField="Type" /> </mx:columns> </mx:DataGrid> </mx:VBox> </mx:TabNavigator> </mx:Application>

 

I just dont understand what I need to do to develop and deploy the test application?

 

I've put the security token at the end of the password, which solved one issue, got everything up and going locally, then created the domain for the application and try pushing the application out, and a mix of looking around at the forums answered some things... but I'm stuck now... I've white listed my IP address, and i'm just lost as to why i'm getting these issues...

 

can anyone help? 

 

I'm following the Flex Mashup tutorial

 

http://wiki.developerforce.com/index.php/Creating_a_Flex_Mashup_on_Force.com

 

I'm getting a policy file warning that's preventing me from authenticating

 

Warning: Domain www.salesforce.com does not explicitly specify a meta-policy, but Content-Type of policy file https://www.salesforce.com/crossdomain.xml is 'text/x-cross-domain-policy'.  Applying meta-policy 'by-content-type'.

 

I know salesforce policy files have been a stumbling block for developers in the past but I haven't seen any documentation that points me in the right direction. 

 

I've tried Security.loadPolicy("https://www.salesforce.com/crossdomain.xml"); to no avail.

is it possible not to use https? I have a local server running, and a local domain setup, http://demo.mm.com, and i get a trace error:

 

"Warning: Domain www.salesforce.com does not explicitly specify a meta-policy, but Content-Type of policy file http://www.salesforce.com/crossdomain.xml is 'text/x-cross-domain-policy'.  Applying meta-policy 'by-content-type'."

 

 

if i examine the call with service capture, it gives me some other errors: 

 

<soapenv:Envelope xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>sf:UNSUPPORTED_CLIENT</faultcode>

         <faultstring>UNSUPPORTED_CLIENT: HTTPS Required</faultstring>

         <detail>

            <sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault">

               <sf:exceptionCode>UNSUPPORTED_CLIENT</sf:exceptionCode>

               <sf:exceptionMessage>HTTPS Required</sf:exceptionMessage>

            </sf:UnexpectedErrorFault>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope> 

 

 

 

<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx = "http://www.adobe.com/2006/mxml" xmlns:salesforce = "http://www.salesforce.com/" layout = "absolute" applicationComplete = "login(event)" backgroundColor = "#FFFFFF" backgroundGradientColors= "[#FFFFFF,#FFFFFF]" width = "100%" height = "100%" pageTitle = "SalesForce Simple Demo" viewSourceURL="srcview/index.html"> <salesforce:Connection id = "apex" serverUrl = "http://www.salesforce.com/services/Soap/u/11.0" protocol = "http" /> <mx:Script> <![CDATA[ import vo.AccountVO; import mx.collections.ArrayCollection; import com.salesforce.results.QueryResult; import mx.utils.ObjectUtil; import mx.controls.Alert; import com.salesforce.AsyncResponder; import com.salesforce.objects.LoginRequest; import utils.ParsingUtils; [Bindable] private var acAccountList:ArrayCollection = new ArrayCollection(); [Bindable] private var acMassagedAccountList:ArrayCollection = new ArrayCollection(); private function login(event:Event):void { //Security.loadPolicyFile("http://www.salesforce.com/services/crossdomain.xml"); //Security.allowDomain('http://demo.mm.com'); apex.protocol = 'http'; var lr:LoginRequest = new LoginRequest(); //lr.server_url = 'http://demo.mm.com'; //lr.session_id = parameters.session_id; lr.username = '****************'; lr.password = '**********YR11kQ3K2meEmjXj8uzbsqg' lr.callback = new AsyncResponder(loadData, handleFault); apex.login(lr); } private function handleFault(fault:Object):void { Alert.show(ObjectUtil.toString(fault)); } private function loadData(lr:Object):void { apex.query( "Select Name, Phone, Type From Account", new AsyncResponder( handleQueryResult,handleFault) ); } private function handleQueryResult( event:QueryResult ):void { if (event.size > 0) { acAccountList.source = event.records.source; } //massage data for issue in datagrid if( acAccountList.length ) { acMassagedAccountList.source = ParsingUtils.convertToArrayCollection( acAccountList,vo.AccountVO ).source; } } ]]> </mx:Script> <mx:TabNavigator width = "100%" height = "100%" > <mx:VBox width = "100%" height = "100%" horizontalScrollPolicy = "off" verticalScrollPolicy = "off" label = "my own results after massaging data from force.com" > <mx:DataGrid width = "100%" height = "100%" dataProvider = "{acMassagedAccountList}" > <mx:columns> <mx:DataGridColumn dataField="Name" /> <mx:DataGridColumn dataField="Phone" /> <mx:DataGridColumn dataField="Type" /> </mx:columns> </mx:DataGrid> </mx:VBox> <mx:VBox width = "100%" height = "100%" horizontalScrollPolicy = "off" verticalScrollPolicy = "off" label = "wierd results straight from force.com" > <mx:Label width = "100%" text = "Grid does not highlight correctly due to SObject in salesforce api, not sure why... " /> <mx:DataGrid width = "100%" height = "100%" dataProvider = "{acAccountList}" > <mx:columns> <mx:DataGridColumn dataField="Name" /> <mx:DataGridColumn dataField="Phone" /> <mx:DataGridColumn dataField="Type" /> </mx:columns> </mx:DataGrid> </mx:VBox> </mx:TabNavigator> </mx:Application>

 

I just dont understand what I need to do to develop and deploy the test application?

 

I've put the security token at the end of the password, which solved one issue, got everything up and going locally, then created the domain for the application and try pushing the application out, and a mix of looking around at the forums answered some things... but I'm stuck now... I've white listed my IP address, and i'm just lost as to why i'm getting these issues...

 

can anyone help? 

 

I'm trying to get a simple HelloWorld application working on my local machine using the FlexBuilder v3 Beta and the most recent SFC Flex Toolkit. I've followed the code exactly as documented in the samples found online,  various screencasts, and even in downloaded the samples. Now matter what I do, I get the following error in the login step:

[FaultEvent fault=[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] messageId="274B3986-6992-1A79-1276-D7DF53D645C3" type="fault" bubbles=false cancelable=true eventPhase=2]

The login function I'm using is below:
    private function doLogin():void
    {
     var lr:LoginRequest = new LoginRequest();
     lr.username = "devlogin@blablabla.com";
     lr.password = "devloginpassword";
     lr.server_url = "http://www.salesforce.com/services/Soap/u/9.0";
     lr.callback = new AsyncResponder(loginResult, loginFault);
     conn.login(lr);
    }
What am I doing wrong?

Thanks for any help,

Mike