Consume SAP WebService Bean with Flex

Hello,
I have an flex application thaht call an sap java webservice bean. And this bean have his own xml namespace.
How can I read this xml in flex ?
I have done some test with e4x but I found no solution.
flex :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
     <mx:Script>
          <![CDATA[
               import mx.controls.Alert;
               import mx.collections.ArrayCollection;
               import mx.rpc.events.ResultEvent;
               [Bindable] private var liste:ArrayCollection = new ArrayCollection();
               private function go(event:Event):void {
                    ws.getIViews.send();
               private function ergebnis(event:ResultEvent):void {
                    for each(var xml:XML in event.result) {
               liste.addItem(xml.child("pns:link"));
                    //liste = event.result as ArrayCollection;
               private function fehler(event:Event):void {
                    Alert.show(event.target.toString(),"Fehler");
          ]]>
     </mx:Script>
     <mx:WebService id="ws" wsdl="http://x.xxt.net:50000/xxPortalServices/Config1?wsdl">
          <mx:operation name="getIViews" result="ergebnis(event)" resultFormat="e4x" fault="fehler(event)">
               <mx:request>
                    <id>
                    </id>                    
               </mx:request>
          </mx:operation>
     </mx:WebService>
     <mx:Button id="get" click="go(event)" label="hol"/>
     <mx:DataGrid id="dg" dataProvider="" x="61" y="65">
          <mx:columns>
               <mx:DataGridColumn dataField="link"/>
          </mx:columns>
     </mx:DataGrid>
</mx:Application>
XML:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
      <rpl:getIViewsResponse xmlns:rpl="urn:xxPortalServicesVi">
         <rpl:Response xmlns:pns="urn:com.xx.ws.prt">
            <pns:IViewsModelDTO>
               <pns:link>test123</pns:link>
               <pns:pcdpath>portal_content/XX</pns:pcdpath>
               <pns:title>test123</pns:title>
            </pns:IViewsModelDTO>
         </rpl:Response>
      </rpl:getIViewsResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Edited by: Daniel Rothmund on Oct 17, 2009 6:47 PM

namespace soapen = "http://schemas.xmlsoap.org/soap/envelope/";
namespace rpl = "urn:xxPortalServicesVi";
namespace pns = "urn:com.xx.ws.prt" ;
use namespace soapen;
somevariable = responsexml.someelement (to read the entire soap body)
use namespace rpl ;
somevariable = responsexml.someelement (to read getIViewsResponse)
use namespace pns ;
somevariable = responseexml.someelement (to read rpl:Response)
i haven't tested this, but should work.
you may also check this
http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_6.html
Regards
Raja
Edited by: Durairaj Athavan Raja on Oct 26, 2009 8:40 AM

Similar Messages

  • Consume SAP webservices wsdl from Delphi 2007

    am trying to consume SAP webservices from Delphi 2007, but, i was some problems with this task. I used WSDL definition to make the Delphi interface and i´m working with THTTPRIO component to try consume SAP Webservices, but , occurs this error:
    Conexaosoasap
    Service Unavailable (503) - 'http://sapdev:50000/NovaCalculadora/ConfNovaCalc?style=document'
    OK  
    </b>
    What are the problem?
    Thanks.

    have you check the web service is activated?. Have a look to the SICF to see if the service is running.
    Eduardo.

  • Consuming SAP web services with tables

    I'm doing kind of feasibility study on consuming SAP web
    services from CF.
    So far so good, but I'm stuck dealing with tables
    (import/export parameters in SAP world).
    I know how to receive a table object from SAP functions:
    * With Apache Axis v1.2: pass an empty CF structure as a
    parameter
    * With Apache Axis v1.4: pass an empty CF array as a
    parameter
    Then the parameter is filled with data (replaced with Java
    object) and we can just parse the object accordingly.
    My question here is whether or not we can pass a *table with
    actual records*.
    For example, I want to pass a table with multiple records to
    update DB records under SAP.
    I tried passing (1) CF array of structure and (2) Java
    ArrayList with no chance.
    The web service call itself completes without errors (no
    method signature error), but the SAP function seems to see the
    parameter as an empty table.
    Anyone has been successful with this case?
    Any suggestion would be much appreciated.

    Thanks Dan,
    Unfortunately CF query object didn't work either.
    Now I'm looking at the code generated by Flex Builder to see
    how the classes are like ;-)
    It's just an ArrayCollection of simple value objects
    (representing a row).
    So CF array of structure or Java ArrayList looks a reasonable
    approach though they don't at all.

  • Consume SAP Web service with parameters in Forms using JS

    Hi All
    I am trying to execute a call to a webservice using javascript from my adobe form .
    I can get this working by creating a DataConnection and mapping input fields on the form to the Request structure (XFA method) .
    But when I use JS, i cannot get it working while using paramters.
    Here is my sample code.
    var cUrl = http://XXXXXXX:XXXX.........;
    var service = SOAP.connect(cUrl);
    var inputVal = {IvMatnr:MATNR.rawValue, Ivlgort:LGORT.rawValue, IvWerks:WERKS.rawValue};
    var result = service.ZppTestGetBatchNumbers(inputVal);
    //xfa.host.messageBox("Success");
    txtResult.rawValue = result;
    xfa.connectionSet.<DataConnectionName>.execute(0);
    Any help would be greatly appreciated
    Regards,
    ArMen

    Hi,
    Instead of using parameters, I am now using hidden text fields on the foem which I have bound to the web service call.
    This is a work around that is working fine for me..
    Cheers..

  • How to SAP Webservice in Flex 3

    Hi Experts,
    I am new to Adobe Flex. I am tring to use the SAP webservice in my Flex project. I have followed this article: [Consumption of SAP RFC in Adobe Flex 3 Application Using Web Service Introspection Method|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/20010e0b-b985-2c10-84a6-c4cea74a07f0]. It is working fine.
    Now I want to use standard SAP BAPI as webservice in my project. Can I use it in the same way as shown in the above tutorial?
    If yes, plz share the code.
    I have gone thru the code provided by Vivek in this thread: Re: Web service call in Flex But the input provided in this are hard coded. I want user to enter the values on screen  and then the BAPI should be fired. If someone has worked on similar requirments , plz share
    Regards
    Arjun

    Hi ,
    I am trying to use Web Service Introspection Method to consume BAPI_FLIGHT_GETLIST. I have written the following code, but it is not working.
    import mx.collections.*;
         import generated.webservice.*;
         import mx.rpc.events.*;
         import mypackage.Flightdata;
         import mx.controls.Alert;
    [Bindable]     
         private var flightdetails:ArrayCollection = new ArrayCollection();     
                         private var daterange:TableOfBapisfldra = new TableOfBapisfldra();
         private var destinationfrom:Bapisfldst = new Bapisfldst();
         private var destinationto:Bapisfldst = new Bapisfldst();
         private var extensionin:TableOfBapiparex = new TableOfBapiparex();
         private var extensionout:TableOfBapiparex = new TableOfBapiparex();
         private var flightlist:TableOfBapisfldat = new TableOfBapisfldat();
         private var maxrow:int = new int(10);
         private var returntemp:TableOfBapiret2 = new TableOfBapiret2();
    public function handleResult(event:FlightGetlistResultEvent):void{
    var row:Object;
    var mydata:Flightdata = new Flightdata(); "Flightdata is the name of the action script class
    for each (row in event.result.flightlist){
         mydata.AIRLINEID = row.AirlineID;
         mydata.AIRLINE = row.AIRLINE;
         mydata.CONNECTID = row.CONNECTID;
         mydata.FLIGHTDATE = row.FLIGHTDATE;
         mydata.AIRPORTTO = row.AIRPORTTO;
         mydata.AIRPORTFR = row.AIRPORTFR;
         flightdetails.addItem(mydata);
    public function handleFault(event:FaultEvent):void{
    Alert.show(event.fault.toString());
    public function ongetlist():void{
    var myservice:Zflight_listService = new Zflight_listService();
    myservice.addflightGetlistEventListener(handleResult);
    myservice.addZflight_listServiceFaultEventListener(handleFault);
    myservice.flightGetlist(Char3(Flight_name.text),daterange , destinationfrom, destinationto,
                                                   extensionin, extensionout, flightlist, maxrow, returntemp);     
    "Flight_name is the id of the TextInput
    "flightdetails is the dataprovider for the datagrid
    "I am calling ongetlist() method on click of a button.
    I have imported the webservice in my flex project
    I am not getting the output of this code. Can anybody help me out with this.     
    Regards
    Arjun

  • Consuming a Webservice on WAS 6.40

    Hello,
    i try to consume a Webservice created with the Webservice Creation Wizard. I have configured the logical port and i created the client proxy. But when i run the test program with the crated proxy i retrieve the following error:
    (id=SOAP:111): Unallowed RFC-XML Tag (SOAP_EINVALDOC)
    In the RFC-Trace the following log is displayed:
    INFO 16:34:40: SOAP Transport binding CL_SOAP_HTTP_TPBND_ROOT <
    XRFC> ->IF_SOAP_TRANSPORT_BINDING~RECEIVE() Try to receive message <
    XRFC> <
    XRFC> INFO 16:34:49: SOAP HTTP Binding CL_SOAP_HTTP_TPBND_ROOT->HANDLE <
    XRFC> STATUSCODE() Received return code 500 ( Internal Server Error ) <
    XRFC> <
    XRFC> ERROR 16:34:49: SOAP Message CL_SOAP_MESSAGE->IF_SOAP_MESSAGE <
    XRFC> PART~INITFOR_DESERIALIZE() A SOAP Runtime Core Exception <
    XRFC> occurred in method XP_READ_TAG of class CL_SOAP_XP at position id <
    XRFC> 1 with internal error id 111 and error text Unallowed RFC-XML Tag <
    XRFC> (SOAP_EINVALDOC) (fault location is 1 ).
    What's wrong here? Someone can help me?
    Thanks for your help!

    Hi Adriano,
    Here is the link I think you're looking for:
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/2e6a52c3cdc44d83169b181a9c62ba/frameset.htm
    Hope it helps.
    Thanks,
    Marty

  • Consuming a webservice in ABAP ECC 6.0 without using XI/ PI

    Hi Experts,
    I wanted to consume an external webservice without using XI / PI.After doing my homework and search on sdn I came to know that we can consume webservices in ABAP using proxies using SE80(Enterprise Services).
    I am trying to create a client proxy with the URL of webservice.It asks me the option to choose between URL or HTTP.
    I am selecting URL and in the second screen it asks about the package details and after that it finishes.Later I get an error message stating "NO VENDOR SPECIFIED".Its not allowing me to create a proxy.
    So, here are my questions.
    Does anyone faced the same kind of problem?
    Can we really consume a webservice without using XI / PI or any other middleware?
    Is it possible to consume the webservice only with URL or WSDL file ?
    Please let me know the exact process.
    Thanks in Advance.
    Shanker Pandey.

    Hi Martin,
      Please check these following links. Though you have reported already, these may help
    Proxy Object generation error using Wizard for Web Service Consumption
    Also, please have a look @ /people/thomas.jung/blog/2006/03/13/develop-a-web-service-that-sends-an-email--in-abap-netweaver-04s
    Hope this helps,
    Karthik

  • Consume a WebService that exists in SAP ECC 6.0

    Hello evrybody,
    I have a requirement that I've never done before, I have a webservice in transaction WSADMIN in a SAP ECC 6.0, and I need to consume it from PI but I don't know how, I've worked before with BAPI's and ABAP Proxies but never with WebServcies like this, do you know any documentation or maybe a blog on how to do this?, thanks in advance.
    Regards,
    Karla

    Thanks for your answers, I've used ABAP Proxies before, but in the way of generating an ABAP Proxy of a Inbound or Outbound interface from the IR, now I need to consume a WebService already created in SAP ECC 6.0, and I've never donde this before, I'm trying to understand that using SOAP Adapter I should get the WSDL File of the webservice and upload as an External Definition in the IR, but where could I get the URL to consume the webservice that exists in SAP ECC 6.0, thanks.

  • Calling Webservice defined in SAP R/3  in Flex builder using mx:Webservice

    Hi All,
    I am calling R/3 webservices in Flex builder using <mx:webservice> tag. but the wsdl is not accepting additional parameters like &, =  ....
    when I try to run this code Flex builder is generating an error
    <mx:WebService id="ws" wsdl="http://localhost.com:8088/sap/bc/srt/rfc/sap/Z_SIMPLE_TEST_WS?<b>sap-client=030</b>&wsdl<b>=1.1</b>"
              useProxy="false"
              result="handleResult(event)"
              fault="handleFault(event)" showBusyCursor="true" >
    and when I remove the <b>sap-client=030&</b> and <b>=1.1</b> from the wsdl, the program gets executed, however SAP is calling client 010 as that is the default client.
    I would appreciate if anyone can tell how to pass the parameter sap-client=030 in Flex.
    Thanks,
    Madhavi
    Message was edited by:
            Madhavi<b></b>
    Message was edited by:
            Madhavi

    its because of the & sign. instead use it like below it will work.
    Z_SIMPLE_TEST_WS?sap-client=030&emp;wsdl=1.1
    in the above line replace 'e' in emp with 'a' (amp)
    Raja

  • Help with Consuming a Webservice with the compact framework

    Hi all,
    i want to consume a SAP WebService within .NET in a smart device application. When I create the proxy, I get the following procedure in the .cs class:
    <i>[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.sap.com/_-ICO_-CM_XML_CREATE", RequestElementName="_-ICO_-CM_XML_CREATE", RequestNamespace="urn:sap-com:document:sap:rfc:functions", ResponseElementName="_-ICO_-CM_XML_CREATE.Response", ResponseNamespace="urn:sap-com:document:sap:rfc:functions", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)][return: System.Xml.Serialization.XmlElementAttribute("SUBRC", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]public string ICOCM_XML_CREATE([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string ORDERNR, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string ROUTE, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string TESTRUN, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string TOURNO, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string XML_FILE_LOCAL, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string XML_FILE_SERVER, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] out string XML_STRING) {object[] results = this.Invoke("_ICO_CM_XML_CREATE", new object[] {ORDERNR,ROUTE,TESTRUN,TOURNO,XML_FILE_LOCAL,XML_FILE_SERVER});XML_STRING = ((string)(results[1]));return ((string)(results[0]));}</i>
    When I compile the project I get the follwing error for each occurance of the "Form" Attribute :
    "<b>'System.Xml.Serialization.XmlElementAttribute' does not contain a definition for 'Form'" </b>
    When I try to consume this webservice with a "normal" kind of application, such as a windows-application, everything is ok.
    But when trying to use it with the compact framework, the error occurs.
    Is anyone outhere who can help me?
    Thank you
    Regardings

    It seems that the "Form" property of the XmlElementAttribute was missing in Compact Framework 1.1. It does exist in Compact Framework 2.0.
    You can try removing the "Form=System.Xml.Schema.XmlSchemaForm.Unqualified" entries from the proxy, but I'm not sure of it will still correctly work: For in-parameter it should be Ok to skip "Form=", but for out-paramters and result it could have the effect that no data is received.
    In this case the best option may be to upgrade to Compact Framework 2.0.

  • Biztalk with SAP XI Vs SAP Webservice

    HI everyone,
    We have biztalk as integration tool. I would like to know is it feasible to implement Biztalk with SAP XI to communicate with our SAP ECC server. I heard it will be over weight to use both Biztalk and SAP XI coz each will have its own message box and leads to more process time. So we are planning to use Biztalk with SAP webservices. So please let me know which is better as cost wise and work wise biztalk with SAP XI or Biztalk with SAP Web services.
    SAP Guys please take some time to provide some useful information. it will be much appreciated.
    cheers
    ram

    Hi Ram,
    how are you doing today ?
    From a business perspective, if u're using 2 rival products to do the same integration function, it is a defeat in architecture and in resurces consumed to do the requirement [tha two end systems]
    lisence issues of how much is paid to the vendor will also then be higher than if u used either one and not both
    technically speaking,
    it is making the system overly complex without any real benefit or requirement
    maintenance will increase and it will make troubleshooting more omplex when it does not need to be
    i'd recommend the use of either based on the resources available
    SAP web services are available since web AS 620, and just need to be enabled for the Function Module, RFC , BAPI
    check out transactions WSCONFIG, WSADMIN
    using them will make things simpler all around
    but again it depeneds on the type of application, it's demands on Quality of Service and the nature of the Data as well
    with respect,
    amit

  • Consuming external webservice in SAP

    Hi All,
    Wjile Consuming external webservice that is .NET webservice in SAP I am getting the error "Proxy generation terminated: WSDL
    (<extension> not supported)". Please can anyoone tell me what would be the issue and how should I resolve it.
    Thanks in Advance,
    Meenu.

    The SAP version that we are using is ECC 5.0. And the URL that they have given me to consume has some .svc extension.
    http://ctnhgesappdev.corp.timken.com/GES_EDISService/EDISService.svc?wsdl
    So when I am trying to consume this in SAP I am getting the error "Proxy generation Terminated : WSDL error : (<extension> not supported)".

  • Consuming a webservice from a message bean?

    i set up a webservice proxy in another application project.
    i want another project's Message Bean to consume the webservice proxy
    that is in the other project?
    TIA

    just moved the web service proxy to the same application..

  • How to consume sap xi pi web services or sap RFC with oracle 11g forms.

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

    Dear All
    how to consume sap xi pi web services or sap RFC with oracle 11g forms.
    or
    how to config 11g forms with sap xi....
    or how to call sap xi web services in 11g forms....
    or can send sample code....
    Regards
    smfatmi
    Edited by: smfatmi on Oct 17, 2011 2:16 AM
    Edited by: smfatmi on Oct 17, 2011 2:17 AM

  • Possible to consume a webservice with no usable operations defined?

    Hi all,
    I'm .NET programmer, I wanted to consume an AXIS web service on .NET.
    My problem is this:
    The webservice I'm consuming appears to have no usable operations defined. (I checked this out using Visual Studio). To be certain that the webservice indeed has no usable operations exposed, i downloaded J2EE and Netbeans and tested the webservice. Again, Netbeans (like .NET) reported that there are no usable operations defined in the webservice.
    Once more, I wrote sample web services with .net and java and both work perfectly on Visual Studio and Netbeans and there are completely interoparable.
    My question is:
    Is it possible to consume a webservice that has no usable operations defined? The webservice company is telling me that it is possible, but I can't figure it out how.
    Its very urgent, so please help
    Tnx in advance

    I have never been able to get CFINVOKE to work without a
    WSDL. It looks like CFINVOKE uses the WSDL to create the request:
    without a WSDL it does not know to to communicate with it.
    Alternatively you could just using CFHTTP to communicate manually,
    or make a Java app to talk to it.

Maybe you are looking for

  • Error in defining new calendar in r12

    Hello there i am trying to define a new calendar, but when i try to save it, i am getting the following error: APP-FND-01206: THIS RECORD ALREADY EXISTS. YOU ENTERED A DUPLICATE VALUE OR SEQUENCE OF VALUES THAT MUST BE UNIQUE FOR EVERY RECORD. please

  • Unable to use B2B Document Editor tool to create guideline from data file

    Does anyone successfully used the B2B Document Editor tool to generate the guideline doc from an HL7 data file ? I attempted to use the SpecGenerator feature of this tool to create a guideline from the "a01.xml" sample file in the HL7 tutorials (came

  • Committed quantity and committed date in STO

    Hello friends, How and on what basis the committed quantity, committed dates updates in STO delivery schedule tab while doing the STO. Regards, Cherryk

  • Can't drag edits (regions) with precision anymore

    Ever since I graduated to GB '09 fropm '05 I notice that I can't move edited regions to the beginning of measures with time-precision. e.g. If I want to place a two measure beat from one track in front of a beat on another track I can't place the new

  • Another Iphone topic with unable to join network

    Yes, I have reset the iphone and router Yes, I have unsecured the network and was able to join, but once I secured it...I get the unable to join Yes, I have updated the firmware and cycled the power on my WRT54GS Yes, I have tried lower case letter i