BAPI/RFC as Web Service

I have a sample FM which when run from SICF gives a server 500 error. (SICF path /default_host -> sap -> bc -> srt -> rfc -> sap -> Z_MYSERVICE.  I test it using the TEST SERVICE option and it pops up the browser with address
http://<my.fdqn.host>:8000/sap/bc/srt/rfc/sap/z_bapi_user_existence_check?sap-client=800
but if I test the service using WSADMIN it pups up the url
http://<my.fdqn.host>:50100/wsnavigator/jsps/explorer.jsp?description=description&wsdl=http%3A%2F%2Fwarbird.ocluk.com%3A8000%2Fsap%2Fbc%2Fsrt%2Frfc%2Fsap%2FZ_BAPI_USER_EXISTENCE_CHECK%3Fsap-client%3D800%26wsdl%3D1.1%26mode%3Dsap_wsdl&name=name
and I can use the test function and it works.
Now this may have something to do with authentication - but I tried setting SICF to allow annonymous logon.
Also if I try from a third part tool which can use the wsdl and test, it comes back with an "unauthorised access to backend".
So after all that
1) Should the test in SICF work (hopefully yes)?
2) to generate the serice I ran the wizard on any FM and the tried SICF - was there something more?
3) when it worked it useed my portal on port 50100 to do the test, but when it failed it just used the R/3 WAS on port 8000 - is this significant?
Thanks in advance for any help or suggestions.

I am joining into this party as well. I have the same SOAP exception 112 thing coming up when I try to run a webservice hosted on my ECC 6.0 system.
It looks something like this when I test it from SICF :
http://<hostname>:8010/sap/bc/srt/rfc/sap/ZBAPI_FLIGHT_GETLIST_WS2?sap-client=100
When I add the following parameter &wsdl=1.1 , to the end of this URL , I get to see what the SOAP envelope looks like , so I assumed things are fine.
The problem is when I call this webservice from my Portal WS Navigator...I've managed to overcome the authorisation issue mentioned by Chuckie earlier by making this webservice authentication as Standard R/3 user instead of internet user.
I am able to test this BAPI wrapped in my webservice ..and then when I execute, the response envelope shows errors.SM21 shows exactly what you guys have faced earlier.
If its a patch issue , I suppose logging an OSS note should help , otherwise , does anyone here think it could be j2ee config setting issue ?
-Chandra

Similar Messages

  • Gettinfg error in RFC to Web Service scenario

    hi friends,
    I am getting the following error while configuring RFC to Web Service scenario.
    I have used the ws :http://webservices.imacination.com/distance/Distance.jwsPlease help me out.
    <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML; HTTP 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. )</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

    Hi
    check this thread
    Getting error in target SOAP communication channel
    regards
    krishna

  • RFC- XI- Web services

    Hi All,
          We are configuring RFC->XI->Web Services scenario.
    We are using SOAP adapter in the receiver side. We are getting the following error message.
    soap fault: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: ConversionRate. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing).
    Kindly help.

    Hi,
    Quick checks-
    1) Reciever SOAP Adapter configuration
    2) Check the Target URL - it should be wsdl URL
    3) Transport protocol used (HTTP)
    Check this blog about SOAP Adapter Configuration carefully-
    /people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2
    http://help.sap.com/saphelp_nw2004s/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm
    Regards,
    Moorthy

  • BAPI call throw Web Service

    Hi, I have some problem to call web service generated from BAPI on WAS 6.20. My Scenario is the following:
    I took the famous BAPI_FLIGHT_GETLIST, generate Web Service on WAS 6.20, and consume it throw Web Dynpro Web Service model on WAS 6.40.
    Now, I want to pass parameters to my web service.
    I successfully passed all tables and my web service  worked, the problem starts when I try to set data to one of the input structures namely DESTINATION_FROM. It looks like WS simply ignores the data I set there, so I am unable to pass the filter to the BAPI.
    I also want to mention that I can call the same web service from Web Service navigator on my WAS 6.40. If I do it from there it works as required which means the problem in Web Dypro Side.
    In addition I tried to set this structures with context mapping, without context mapping and directly to the model. It didn't work.
    Any ideas?
    Victor.

    Hi,
    I have problems executing this BAPI through the Web Service.
    I don't get any exception but I get an empty result table.
    In the LogicalPort, I did define a "Stateless Communication".
    1) Should I do this ?
    2) I choosed a Basic(username/password) HTTP authentication. Should I do it ?
    However, I removed these choices and it didn't work.
    In the component controller, I wrote :
      public void wdDoInit()
        //@@begin wdDoInit()
        Request_BAPI_FLIGHT_GETLISTPortType_BAPI_FLIGHT_GETLIST req =
             new Request_BAPI_FLIGHT_GETLISTPortType_BAPI_FLIGHT_GETLIST();
            wdContext.nodeRequest_BAPI_FLIGHT_GETLISTPortType_BAPI_FLIGHT_GETLIST().bind(req);
        //@@end
      public void execute_BAPI( )
        //@@begin execute_BAPI()
        try {
        wdContext.currentRequest_BAPI_FLIGHT_GETLISTPortType_BAPI_FLIGHT_GETLISTElement()
                  .modelObject().execute();
    //    wdContext.nodeResponse().invalidate();
         wdContext.nodeRequest_BAPI_FLIGHT_GETLISTPortType_BAPI_FLIGHT_GETLIST().nodeResponse().invalidate();
        } catch(Exception e) {
        //@@end
    Is it OK ?
    When my model is a SAP/R3 system, I was creating a Custom Controller and I wasn't using the Component Controller.
    Is anyone can help...Thanks in advance.
    Bye

  • RFC - XI - Web service

    Hi All,
    I have a RFC -> XI -> Web service synchronous scenario.
    After setting up scenario in XI, I execute RFC. When I check sxmb_moni, it shows me error.
    The error is pasted here.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: failed to get the input stream from socket: java.lang.NullPointerException</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Can somebody explain me, why is this or to cross-verify my settings, steps in detail to set up this type of scenario.
    Please don't take me to the documentation present here which explains about configuring Web service based scenario.
    I have already looked at it and understood that it's not much useful at this stage.
    Your help is highly appreciated.
    Thanks & Regards,
    -smita

    Hi Smita,
    How are you doing the communication from FRC ==> XI ??
      1. Are you using Outbound(sender)RFC Adapter, if so did you create a registered program for communication from r3 to XI (rfc destination
         sm59->tcpip)
      2. Are you using an outbound(Sender) Client abap proxy??
      3. Are you calling an external webservice(not in XI)if
         so make sure the soap action is correct
    Naveen
    Message was edited by: Naveen Pandrangi

  • Synchronous RFC-XI-Web Service with no request method

    Hello guys,
    I'm trying to set up an RFC-XI-Web Service scneario.  But with the particularitity that the WSDL does not have a request method. It only has a very simple response method.
    How can I make this? How can XI call the Web Service, if I dont have any request method?
    Thanks for your help.
    Felipe

    Matias, after some test I think that VJ is correct.
    It is failing at the moment of delivering the message to the WS, I'm getting the followin error messages:
    com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 302 Moved Temporarily
    I tested the WS with XMLspy and works correctly.
    I'm starting to believe that the best solution is to simply create a dummy request in the WS.
    It would be great if someone else test in their own and see if we get the same result.  Thanks,
    Felipe

  • Help:  Exposing BAPI's as Web Services in WAS 6.20

    Hello,
    I'm very new to WAS and I don't have access to a development environment yet (network issues).  I was hoping someone might be able to shed some light on the following: 
    I'd like to expose certain BAPI's as Web Services in a way that my .NET client can talk SOAP directly to WAS 6.20 (without having to generate proxies). Is this possible? 
    Also, is there a Web Service Creation Wizard in 6.20 that makes the process of exposing BAPI's simple, similar to the wizard in 6.40?  To date I've been able to navigate the BOR and generate WSDL for the BAPI's that I'm interested in however, this doesn't get me all the way there.  I'm looking for documentation on how to make the Web Service interface for those BAPI's generally available through WAS.
    I'll take anything at this point.  Even a pointer to some documentation.
    Thanks,
    Jay

    Hi Jay,
    Yes, it is possible in Web AS 6.20 to expose BAPIs as Web services. You find the exact documentation of how to do this in the SAP Service Marketplace: http://service.sap.com/connectors. Then go to "SOAP Processor" --> "Media Library". However, the wizard that helps you create the Web service is not yet available in 6.20.
    Regards,
    Susanne

  • Expose RFC as Web Service

    Hi Guys;
    Can anyone provide me step by step procedure for RFC to Web Service scenario?
    meaning to expose the RFC as Web Service in the SAP CRM?
    Thanks
    Kfir

    Hello Kfir,
    You can host webservice  by doing the below steps:
    Login to CRM system and goto txn:BSP_WD_CMPWB
    Give component as :WS_DESIGN_TOOL
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • Generate XML file from RFC using Web Services

    Hi,
      I am trying to save an RFC enabled Function Module output to an XML file using ABAP web services.
    I could able to create Web Service and release it using WSCONFIG/WSADMIN. I can actually get the output in XML file when i launch the web service home page. But I need this to be done in the ABAP program itself. So If i run the RFC I could able to create,release web service and capture the Generated XML file by SOAP runtime.
    Any FM available?
    Thanks,
    Ram Sanjeev

    which version of WAS you are on .
    if you are on WAS6.40 check the following weblog on how to consume webservice using the wsdl file.
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    lower version of WAS use class cl_http_client.
    if this case you have to manually build the soap message.
    /people/durairaj.athavanraja/blog/2004/09/20/consuming-web-service-from-abap
    Regards
    Raja

  • Error "Deserialisation failed" when trying to use BAPI via a web service

    I created a web service in BW with the help from the wizard WS_WZD_START. The web service contains
    (among others) the RFC BAPI_ODSO_READ_DATA_UC.
    The web service runs OK & can be used from the SAP Web Services Navigator.
    Now when i try to use the web service from Delphi i get
    an error: "Deserialisation failed" (SimpleTransformationFault) "ODSOBJECT erwartet".
    The ODSOBJECT parameter is there to be sure.
    I saw the same error before in this forum but found no real solution there. I am using BW 6.40 & SP 12.
    XML sent:
    <?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header>
    <sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/">
    <enableSession>true</enableSession></sapsess:Session></SOAP-ENV:Header>
    <SOAP-ENV:Body><ns1:BAPI_ODSO_READ_DATA_UC xmlns:ns1='urn:sap-com:document:sap:rfc:functions'>
    <DATALAYOUT></DATALAYOUT><INFOOBJECTLIST><item>
    <INFOOBJECT>/CIVGM/NUM</INFOOBJECT></item></INFOOBJECTLIST>
    <MAXROWS>2</MAXROWS><ODSOBJECT>/CIVGM/BPLO001</ODSOBJECT><ORDERBY></ORDERBY>
    <RESULTDATA></RESULTDATA><SELECTIONCRITERIA></SELECTIONCRITERIA><UNICODE>N</UNICODE>
    </ns1:BAPI_ODSO_READ_DATA_UC></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Answer:
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body><soap-env:Fault><faultcode>soap-env:Client</faultcode>
    <faultstring xml:lang="en">Deserialisation failed</faultstring>
    <detail><n0:SimpleTransformationFault xmlns:n0="http://www.sap.com/transformation-templates">
    <MainName>/1BCDWB/WSS0050825153239449000</MainName>
    <ProgName>/1BCDWB/WSS0050825153239449000</ProgName>
    <Line>73 </Line>
    <Valid>X</Valid>
    <MatchFault>
    <DescriptionText>Element 'ODSOBJECT' erwartet</DescriptionText>
    <TokenType>S</TokenType>
    <TokenName>CODEPAGE</TokenName>
    <TokenNameSpace>urn:sap-com:document:sap:rfc:functions</TokenNameSpace>
    <TokenValue></TokenValue>
    </MatchFault><Caller>
    <Class>CL_SRG_RFC_PROXY_CONTEXT</Class>
    <Method>IF_SXML_PART~DECODE</Method>
    <Positions>1 </Positions>
    </Caller></n0:SimpleTransformationFault>
    </detail></soap-env:Fault>
    </soap-env:Body></soap-env:Envelope>
    The same error occurs when I take the exact XML that was sent from Web Services Navigator (the XML that worked) and send that from Delphi.
    What could be wrong?

    Hi Simon,
       Other thing you can do is compare the HTTP requests (including header) from both Delphi and XMLSPY. I suspect if the SOAP message is same in both case the difference might be in the header. But one thing is certain, WAS can not respond differently for same request, don't you think so ?
    Cheers,
    Sanjeev

  • BAPI as a Web Service confusion

    I apologize if this is answered more directly in another post, I promise I looked first.
    I have an ERP 2004 IDES system. (Web AS ABAP+Java)
    I want to access BAPI_PROCORD_GET_LIST as a web service.
    I can generate a virtual interface and a web service definition from transaction BAPI using the wizard. I can then run the Web Services Navigator from my browser, type in the address of the WSDL, and successfully execute a test of the BAPI that returns the orders that match the criteria I set in the test (e.g. all orders in production plant 3100).
    I learned in another thread that the BAPIs also have WSDL available through
    http://<was_server>:<port>/sap/bc/soap/wsdl11?services=<BAPI_NAME_IN_CAPS>&sap-client=<client>
    I can also type this into Web Services Navigator as the address of the WSDL, and after I authenticate to the correct client (in this case, 800), it returns a valid service that I can test.
    However, when I go to run the test, I can create the request criteria, but the system doesn't return any values - I believe this is because there's no place to specify the sap-client (which should be 800 for the test to succeed) and I think the system then defaults to client 000, in which there are no process orders.
    In fact, during this sequence of activity, the system makes me authenticate again, and I cannot authenticate with the same credentials that got me to the test screen (username/password valid in client 800) - I can only get through the authentication with a user that is valid for client 000.
    My question is: should I be able to use the second form of the WSDL as a web service, and if so, how do I specify the client information during the service invocation?

    Hi,
    There is no web service wizard for BAPIs in SAP 4.7 version. BAPIs are already available as web services. One just needs to download the WSDL description of the corresponding BAPI's web service from the Web Service Browser, a BSP application whose URL is of the format -
    http://<host_name>:<port_number>/sap/bc/bsp/sap/WebServiceBrowser/search.html?sap-client=<relevant_client>
    where the first two placeholders can be determined from  transaction SMICM (choose GoTo -> Services).
    To generate the WSDL description for a BAPI from the above URL, enter the name of the BAPI under "Search by Name" field, and press Enter to confirm.
    Note that entries in this field are case-sensitive.
    Links to the WSDL description and the stored documentation are displayed next to the name of the BAPI.
    Regards
    Deepthi

  • Discovery System: Problems with exposing RFC as web service

    We have a version 2 discovery system and have successfully implemented the three exercises from the TechEd workshop (Sales Order Distribution, Creating a PO Store Record WS, Adding a New Step to the Procurement Scenario with SAP CAF GP). It seems to work fine except for two issues with the RFC/WS:
    1) The RFC, and therefore the WS, always returns an empty string instead of the 'X' that the documentation shows in Step 4.h. We checked the RFC itself and it looks like it has an error with the price field; it always appends a blank to the end of the price string and then errors.
    2) The created web service does not show up on the Web Services Navigator page. Since the instructions tell you to save the URL to the WSDL, we can find the web service and test it, but you cannot find it on the Navigator page.
    Neither of these problems are huge, but they make me worry that something is not quite right in the Discovery System and we may end up with larger problems later. Any ideas what could cause these two problems, and how to fix them?
    Thanks, Eric
    Message was edited by:
            ERIC HAMER

    Hi Eric,
    First of all let me assure you that your system is perfectly fine and both topics that you have raised are the way the system is suppose to respond.
    1. The reason that the service is returning a null is because you are entering the same input parameters more than once. Since some of the parameters are used as primary key's in the database, you will need to change them in order to successfully store the data.
    2. The reason that you don't see the service in the Navigator page is because this service resides in the ERP and not in WebAS. Only services deployed on the WebAS will appear in the Web Service Navigator page.
    Thanks,
    Itai

  • Meaning of RFC and web services

    Experts,
       Can anyone explain the basic meaning of RFC and webservices.What do u mean by RFC call etc.When do we use webservices and what are the advantages of using this?
    I will not disappoint any  expert.
    Thanks
    Veeru

    Simply put , for a lay man
    RFC is a piece of code ( function module in ECC which is remote enabled . ...as it can be accessed and used depending upon the functionality in  ECC
    from PI perspective . RFC is used as a technique to interface with ECC in different scenaros .. preferably in synchronous interfaces
    Web services on the other hand are functionalities exposed on to the internet  which can be created and consumed (utilized) on the web
    for more info on web services also google WSDL, SOAP , HTTP and UDDI
    they will be reallly helpful

  • RFC vs web services

    Hi
    i want to extract data from portal to BI .
    some one asked me prapose technology whether rfc is better or webservices is better.
    can u give me any advantages for this technologies

    Hi Johannes,
    Go through below help documents.
    Adaptive Web Service Model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b04308ed-62d5-2910-b3a6-c26771b1c78e
    Do and Don't with Adaptive RFC Model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
    Benefits and important infomation about the Adaptive Webservice model:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
    Once you go through the above mentioned documents, you will understand which one to use in which scenario.
    Thanks
    Krishna

  • Exposing RFC as Web Service in XI

    Hi,
    I want to expose RFC of an external R/3 System as a Web Service in XI. I do not have much Idea about XI.
    It will be great help If I can get some documentation on step by step tutorial of the same type of Scenario.
    Thanks
    Naresh

    Technically it can be done though.
    I have done it in Xi 3.0.  You create a synchronous interface in XI.  Generate the WSDL from the repository.  The calling systems consumes it using SOAP.  The destination system does not need to be WAS.  It can be 4.6C, or even non-Sap.
    I have tested this for Asynch postings into 4.6C and it works fine so it should work for synch also however, XI has some problems with the bindings in the WSDL at this stage.  You may need to manipulate the WSDL generated in the repository to create SOAP bindings.  I understand the problem is being resolved in SP4....
    If you do not know about WSDL bindings go to: http://www.w3schools.com/wsdl/default.asp
    Regards,
    Jason

Maybe you are looking for

  • Why can't I access the app catalog?

    I have a Verizon palm Pre Plus and when I try to access the app catalog I get this: The action could not be completed. Try again later. When I go online and send the app to my phone and then use my phone to click the link it gives me this same messag

  • Postcript fonts not showing in any of the CS6 applications

    I cannot get any of the postscript fonts to appear in the CS6 apps. I am using FontAgent Pro 4.1 to manually activate fonts with CS6 applications (auto-activiation works fine in pre CS6 programs - I do realize that InsiderSoftware has not released up

  • Down payment to vendors an open item?

    DDown payments to vendors: Is it considered as an open item during payment running?? Example: 1:Down payment $50 2 – Goods receipt/invoice $80 3 – Now when running the payment the open item to be paid should be $30, that’s the net of the two open ite

  • Delegated admin 6.3 Invalid login ID or password, please try again

    Dear Oracle, I am having problem login to delegated admin. previously the login was OK until recently not sure what cause the login fail. Please advice where should i start to t/s Cheer Sam

  • Controlling volume in a Flash Slide Presentation

    Hello, I am working in Flash Slide Presentation mode. I have a started a sound file playing on the "master" slide and I want it to play throughout my entire presentation. However, on a couple of slides, I want to play some short voice clips. How can