• jensenaxel
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    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? 

 

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? 

 

The code:


private function login():void {

    var policyUrl:String = "http://www.salesforce.com/services/crossdomain.xml";
       
    Util.debug(this, "loading the policy file: " + policyUrl);
    Security.loadPolicyFile(policyUrl);


    var lr:LoginRequest = new LoginRequest;
    lr.server_url = Application.application.parameters.server_url;   
    lr.session_id = Application.application.parameters.session_id;
    lr.username = 'username@domain.com';
    lr.password = 'password';           
    lr.callback = new AsyncResponder(loginResult, loginFault);


    Util.debug(this, 'apex.login ( ' +ObjectUtil.toString(lr) +'\n);' );   
    apex.login(lr);

}

private function loginResult(result:Object):void {
    Alert.show("Success");
}

private function loginFault(fault:Object):void {
    Alert.show("Login error!");
}


It always goes straight to loginFault, and here is my error message:


Warning: Ignoring invalid <allow-access-from> tag for domain 'http://www3.stream.co.jp' in policy file at http://www.salesforce.com/crossdomain.xml
Warning: Ignoring invalid <allow-access-from> tag for domain 'http://salesforce.sitestream.com' in policy file at http://www.salesforce.com/crossdomain.xml

[FaultEvent fault=[RPC
    Fault faultString="HTTP request error"
    faultCode="Server.Error.Request"
    faultDetail="Error: [IOErrorEvent
                                        type="ioError"
                                        bubbles=false
                                        cancelable=false
                                        eventPhase=2
                                        text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/9.0"].
    URL: http://www.salesforce.com/services/Soap/u/9.0"]
    messageId="FA86E4BC-40CE-E542-80D0-0F0DF9206919"
    type="fault"
    bubbles=false
    cancelable=true
    eventPhase=2]


I know this is from not having a crossdomain file, but even when I explicitly set one, it defaults to http://www.salesforce.com/crossdomain.xml and NOT http://www.salesforce.com/services/crossdomain.xml. 

Help? :(