Hi All,
We are in the process of trying to integrate 4 SAP bapis exposed as Web services from adobe flex.
When we do so we are getting a "security error accessing URL"
The URL of our flex application is:
http://10.10.0.48:8081/water0305/iden.html
The WSDL of the web service is:
http://10.10.0.66:8001/sap/bc/srt/rfc/sap/ZKK_BAPI_EQMT_DETAIL?sap-client=800&wsdl=1.1
We looked at various forums and we found that adding a crossdomain.xml file to the root directory
(at the destination server) will resolve the issue.
I did implement all those steps on the R/3 side to add a crossdomain.xml to an ABAP WAS.
however i still get those errors(security error accessing URL).
Below is the code i use to access the SAP web service
<mx:WebService
id="EqmtDetailWS" showBusyCursor="true" fault="Alert.show(event.fault.faultString)" >
<mx:operation name="EqmtDetail" resultFormat="e4x" result="getEquip_result(event);" fault="getFault(event);">
<mx:request>
<Equipment></Equipment>
</mx:request>
</mx:operation>
</mx:WebService>
We are displaying the SAP info on a map service provided by esri so we included the load operation here.
<
-Loading the wsdl
->
private
function onExtentChange(event:ExtentEvent):void {
EqmtDetailWS.wsdl=
"http://10.10.0.66:8001/sap/bc/srt/rfc/sap/ZKK_BAPI_EQMT_DETAIL?sap-client=800&wsdl=1.1&sap-user=******&sap-password=****&sap-language=EN&~transaction=iw51";
EqmtDetailWS.loadWSDL();
}
<
Displaying the info from SAP
>
private function getEquip_result(event:ResultEvent):void {
equip_desc = event.result.Equitext.Equidescr;
txtAreaEquipDetail.htmlText = txtAreaEquipDetail.htmlText + "Equi. Desc. : " + event.result.Equitext.Equidescr + "\n";
var material:String=event.result.Equimaster.Material;
SAPIDAliasEquipDesc =event.result.Equitext.Equidescr;
material=material.substring(14,18);
txtAreaEquipDetail.htmlText = txtAreaEquipDetail.htmlText + "Material : " + material + "\n";
txtAreaEquipDetail.htmlText = txtAreaEquipDetail.htmlText + "Serial No : " + event.result.Equimaster.Serialno + "\n";
var costcntr:String=event.result.Equilocation.Costcenter;
costcntr=costcntr.substring(7,10);
txtAreaEquipDetail.htmlText = txtAreaEquipDetail.htmlText + "Cost Center : " + costcntr + "\n";
CustomerID = event.result.Equisales.Customer;
}
This is how we load the policy file.
Security.loadPolicyFile(
http://10.10.0.66:8001/sap/bc/bsp/sap/zroot/crossdomain.xml);
This works fine when we run it from the IDE but throws up an error when we deploy it on the server
So are we missing something ?
Is there anything else to be done to overcome the security issue ?
Thanks in advance.
Regards,
Karthik.