03-09-2009 9:54 PM
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.
03-10-2009 6:52 PM
Your crossdoman must be at the root of the app server. So if you haven't done so already, you need to change the default service of the default host in transaction SICF to point directly to your zroot service.
You should be able to reach the crossdomain directly like this.
http://10.10.0.66:8001/crossdomain.xml
Here is a vid I did a couple weeks ago, which deals with calling web service from Xcelsius(which is flex based) . The first part of the video shows exactly how to create this file and put it at the root.
http://enterprisegeeks.com/blog/2009/02/18/abap-freak-show-february-18-2009/
Regards,
Rich Heilman
03-10-2009 6:52 PM
Your crossdoman must be at the root of the app server. So if you haven't done so already, you need to change the default service of the default host in transaction SICF to point directly to your zroot service.
You should be able to reach the crossdomain directly like this.
http://10.10.0.66:8001/crossdomain.xml
Here is a vid I did a couple weeks ago, which deals with calling web service from Xcelsius(which is flex based) . The first part of the video shows exactly how to create this file and put it at the root.
http://enterprisegeeks.com/blog/2009/02/18/abap-freak-show-february-18-2009/
Regards,
Rich Heilman
10-08-2010 4:50 PM
Hi Rich,
I followed the steps in your video when our system was R/3 4.7 (WAS 6.20) and the test worked fine, i.e. accessing the crossdomain by typing http://server:port/crossdomain.xml.
I followed the same steps with our new version (we're undergoing an upgrade) but I kept getting the error message:
"BSP Exception: the BSP URL /crossdomain.xml Does Not Contain Any Application Entries". Then I saw Ivan post suggesting implementing OSS Note 1260386. I applied the Note but I got the same error message.
Then I ran function ICFBUFFER_INIT to make sure the buffer is cleared, cleared the cache in the browser and still got the same error message.
Our system is ERP 6.0, NetWeaver 7.0, level 17 (BASIS Component is SAPKB70017).
Please help. Thank you.
Achille.
03-11-2009 10:17 PM
Awesome video ! It worked !! Thanks a lot !!!
Edited by: abeehs on Mar 11, 2009 11:35 PM
04-07-2009 4:00 PM
Hi Rich,
Everything works fine after i implemented the solution provided by you in the video, however if the sap server is restarted, I get the error again.Only after i activate again it works as intended. Is there a solution or workaround to this issue. Any ideas would be very helpful
Thanks in Advance,
Karthik.
04-07-2009 7:57 PM
You can also check this post on my blog
[Add crossdomain.xml on the root of SAP Web application server |http://www.plinky.it/blog/index.php/2009/03/09/add-crossdomainxml-on-the-root-of-sap-web-application-server/]
Regards,
Ivan
04-23-2009 8:29 PM
Hi,
got a question about the crossdomain.xml issue:
When I try to add the bsp with the crossdoaim.xml as a default service (in BI7) I get a warning popup that the virtual host has got a reference service and that all requests will be redirected to the java stack due to the system parameters.
I also had this warning with the same issue at a NetWeaver Abap 7 Trial (which was no problem because there is no java stack).
My question: Are there any consequences when setting the default host with this popup? (I don't want to crash the portal or something else).
Thank you.
10-08-2010 4:33 PM
Hi Ivan,
Just to let you that I posted a question on your blog about "Add crossdomain.xml on the root of SAP Web application server".
Please reply. Thank you.
Achille.
02-22-2011 12:24 AM
Hi All,
Firstly, great thread.
My problem is that the service I am trying to access is on a ByDesign system and the ByD system does not have any default host for which I can maintain Default Service. The ByD system has a host with the client name and I can not maintain a default service for it.
Has anyone else faced the same issue?
Regards,
Amit