Providing ABAP Webservices with Exception

Hi Experts!
I have designed an Remote Function Module with a custom exception. And exposed same as a webservice; I am quite surprised that the exception is not visible at WSDL level or when we tested it using SoapUI.
Please guide me to design a standard webservice with custom exceptions.
Thanks,
Nikhil

this might help you
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7074e7d4-f1b1-2910-02a3-81afc36bba3b
http://help.sap.com/saphelp_nw04/helpdata/EN/38/3afc3f8fc2c542e10000000a1550b0/content.htm
http://sapinno.blogspot.com/2007/06/exception-handling-for-sap-web-services.html
regards
nag

Similar Messages

  • Abap error with exception CX_SY_IMPORT_MISMATCH_ERROR.

    Hello Everyone,
    I got the abap dump with exception CX_SY_IMPORT_MISMATCH_ERROR.
    The reason for the exception is:
    When importing the object "AUS_S000", the component no. 13 in the dataset has a different type from the corresponding component
    of the target object in the program "SAPLZTEST".
    The data type is "P" in the dataset, but "C" in the program.
    In How to correct Error:
    Try to find out why the data type is 32.
    I dont know what was the issue. When i check in ST22 i saw this message which i mentioned above Error Analysis and How to correct Error.
    Please help me out, Your inputs will be helpufl

    Hi All,
    For the first time:
    Try to import the data to the IT with old structure (say 32 fields)
             IMPORT ty_data = it_temp_old FROM DATABASE indx(sp) TO wa_indx ID obj.    
       2. Append the data it_temp_old to new structure it_temp_new.
             EXPORT ty_data = it_temp_new TO DATABASE indx(sp) TO wa_indx ID obj. 
    For the next time:  
    Edit the IMPORT statement.
             Import the data to IT with new structure (40)
             IMPORT ty_data = it_temp_new FROM DATABASE indx(sp) TO wa_indx ID obj.
       2. Perform the required Operations and export the same data with new structure(40).
             EXPORT ty_data = it_temp_new TO DATABASE indx(sp) TO wa_indx ID obj.
    Thanks,
    Shameer.

  • Integrating  ABAP Webservice  with  sharepoint

    Hi ,
    I want to intergrate ABAP  Webservie  to  sharepoint  through  DUET.
    Here , Can i need  XI ?
    Thanks,
    Sam

    Hi,
    As far as I know, it should be available that configuring Save to SharePoint via the HP Web Jetadmin (WJA) utility:
    "Plans are also in place to provide fleet level configuration of Save to SharePoint via the HP Web Jetadmin (WJA) utility. We anticipate availability of this function mid-year 2013."
    Reference:http://www.lasercare.com/downloads/capture-store-saveSharePoint.pdf
    You can contact with the HP Web Jetadmin support for more information:
    http://h30499.www3.hp.com/t5/Print-Servers-Network-Storage/bd-p/bsc-254#.VDeWhXkcSM8
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Call ABAP WebService with Elips Studio /Flex

    Hi everybody,
    Does somebody has experience with Elips Studio for Flex? I can't find much about it..
    I would lik to call my SAP Webservices into my Elips project. (I know it's not the same as a regular Flex project, there are some differents...)
    Can somebody help me out with this?
    Tanks a lot guru's! Really appriciate it!

    He is not asking about Eclipse
    its Elips
    http://www.openplug.com/products/elips-studio
    consuming Elips is similar to flex.
    check this out
    http://developer.openplug.com/about/blog/180-elips-studio-helps-mashing-up-the-web-20-on-smartphones

  • Webservice with SSL Certificate givivg error

    Hi all,
    I am configuring an abap webservice with client certificate
    I had
    1) installed the sap cryptographic library.
    2) created SSL Server PSE in transaction STRUST
    3)imported the certificate response by CA.
    4)Exported the certificate to local computer.
    5)Added the certificate in mmc under trusted certificate authority.
    but when i am running the endpoint url, i am getting folllowing error
    Error Code: ICF-LE-https-c:800-l:E-T:-C:5-U:4-P:4-L:7
    HTTP 401 - Unauthorized
    Your SAP Internet Communication Framework Team
    Please help me on what step i am missing.
    Thanks,
    Anshul

    You can add FOR TEST your pi userid & passw into enpoint url, like follow:
    &sap-user=<userid>&sap-password=<passw>
    Example:
    http://sapi.sap.com:50xxx/sap/xi/.....&sap-user=donald&sap-password=duck
    ps. Create a Service User into PI System for this. Regarding Role, i'm not a security guru, but i think that SAP_BC_WEBSERVICE_PI_CFG_SRV or SAP_BC_WEBSERVICE_ADMIN roles can be enough for this purpose.

  • Problem when adding ABAP custom webservice with Visual Studio 2010

    Hi All,
    After creating a webservice for a custom RFC function developed in a ECC6.0 SAP machine, I tried to add it to a Visual Studio 2010 windows aplication (through a web reference connection).
    The sequence I've done is:
    - Create RFC in ABAP, with testing ok
    - Create a WEBSERVICE with the ABAP editor
    - Configured the webservice with SICF with:
         Procedure: Standard
         Logon data: standard R3 user
         Security requirement: Standard
         Authentication: Standard SAP User
    Then, in SOAMANAGER I copied the webservice URL and tried to add it to Visual Studio 2010, but it keeps asking me the user and password. I try to supply the R3 username and password but if fails.
    Why is ECC6.0 asking the user and passord if I've defined a SAP user for the login process?
    Is there any way to disable this?
    Thanks,
    Manuel Dias

    Hello Manuel,
    You can use the following code:
    CredentialCache cache = new CredentialCache();
          cache.Add(new Uri("WEBSERVICEURL:PORTNUMBER/"), "Basic", new NetworkCredential("USERNAME", "PASSWORD"));
    SAP needs a password.
    Kind regards,
    JK

  • WS security on webservices with JAX-WS Provider Interface

    Hi Experts:
    I have developed webservices with JAX-WS Provider Interface (WSProvider),it gives message level handling and also eliminates POJOs for user defined types; but how to add operation level Weblogic security policy on such services ?
    In my Weblogic console, I can see the endpoint of the service, and my services has at least 10 operations as defined in the WSDL, but I do not see operations details in the server console when I try to attach Weblogic security policy; so how do I add security rule to decide which operation is allowed by which user?
    am I missing something? or this is not possible ?  I am using WSProvider Interface and wondering is any issue because of that?  Or my operations should be visible regards of any JAX-WS standards implementation ?
    Thanks in advance!

    appaerently with the switch to the oc4j ws providers - a regression was introduced - bug 5665917 ... which is to be fixed for 10.1.3.3 ..
    pls contact oracle support to retrieve the patch ..
    /clemens

  • Webservice returned with exception in method 'isConnectionLoopbackAlive'

    Hello,
    during monitoring of last 24 hours logs i found message:
    <b>Webservice returned with exception in method 'isConnectionLoopbackAlive'
    category: /Applications/CAF/KM
    Application:  sap.com/irj
    Location:com.sap.portal.prt.cafkm.com.sap.caf.km.service.ConnectionTestService.isConnectionLookupAlive(String)
    </b>
    can anybody help me? what does it mean?
    Denis
    ip
    Edited by: Denis Yugay on Mar 18, 2008 5:10 AM

    Hello, Vincent.
    Situation is same after rebooting server.
    Denis
    Edited by: Denis Yugay on Mar 20, 2008 5:17 AM

  • Problem with local SAP name inside ABAP webservice

    Hi all,
    I've created a simple webservice in our SAP development machine, with the normal steps (create RFC, then generated the webservice inside SE38, then activated webservice in SOAMANAGER).
    The problem is that when I call the webservice from outside (external .NET program) I get the following error:
    There was no endpoint listening at http://srv.devm2.local:8004/sap/bc/srt/rfc/sap/zwebservice1/060/zwebservice1/zwebservice1 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    I believe this problem is related somehow with the internal srv.devm2.local SAP name that is unknown from outside.
    If I open the WSDL definition, in the end I can find this internal srv.devm2.local reference of our SAP DEV server:
    </wsdl:binding>
    <wsdl:service name="ZWEBSERVICE1Service">
    <wsdl:port name="zwebservice1" binding="tns:zwebservice1">
    <soap:address location="http://srv.devm2.local:8004/sap/bc/srt/rfc/sap/zwebservice1/030/zwebservice1/zwebservice1"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    How can I force the webservice to map our external IP address, instead of the internal local name srv.devm2.local?
    Or there it another problem that I'm not aware of?
    Thanks all!
    jc

    I meant changing it in the calling application (external .NET). Can you not download the wsdl to your pc and change it there manually and then use this local wsdl in your external application to call the webservice ?
    It is just to see if the sap name is the problem. If that is the problem then it should work if you replace the name with the IP address.
    If this works then maybe basis need to adjust some settings (firewall ?, access authorizations ?)
    Also are you sure the service is activated in SOAMANAGER ? Sometimes when you save it stays inactive and it does not give you a clear error message, easy to overlook.
    And try to call the webservice with SOAPUI and the wsdl from soamanager. Does that work ? When I test with SOAPUI I always use the http port and don't forget to fill in user and password.
    If soapui call works, then the problem is with the external .NET application.

  • Consuming ABAP Webservice in webdynpro java.

    hi All,
    i tried the all ways provided in sdn to create a webservice in ABAP when i test its working fine on j2ee server.
    when i call the same webservice from webdynpro its throughing this error can any body kindly help me in this.
    java.rmi.RemoteException: Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (502) Proxy Error ( The ISA Server denied the specified Uniform Resource Locator (URL).  ). The requested URL "xxxxxxxxxx".
    Thank you.
    venkat.

    Hi Venkatramana,
    The class of the ProxyGenerator is com.inqmy.lib.wsdl.ProxyGenerator. It is located in <SAPj2eeEngine_install_dir>/cluster/server/additional-lib/inqmysoap.jar or <SAPj2eeEngine_install_dir>/alone/additional-lib/inqmysoap.jar file. In addition the following JAR files must be included in your classpath - mail.jar, activation.jar, inqmyxml.jar, inqmysoap.jar, located in <SAPj2eeEngine_install_dir>/cluster/server/additional-lib/ or <SAPj2eeEngine_install_dir>/alone/additional-lib/ directory. You need also the inqmy-lib.jar file in <SAPj2eeEngine_install_dir>/cluster/server/lib/ or <SAPj2eeEngine_install_dir>/alone/lib/ directory in order to run the generator.
    SAP Note : <a href="https://websmp201.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=547847&_NLANG=E">547847</a>
    Before deploying make sure the JCo’s are up and running
    Go to http://server:port/webdynpro/dispatcher/sap.com/tcwdtools/Explorer to check the status of JCo’s.
    Regards,
    Mithu

  • Consuming ABAP Webservice in Webdynpro app

    Hi,
    I have wrote a webdynpro app for consuming ABAP webservice. I used the procedure in the link below
    http://wiki.sdn.sap.com/wiki/display/WDJava/ConsumingABAPWebServiceinJavaWD
    Everything seemed to be went well, I created model and Webservice destinations. I have written the code for calling the webservice, which does not return data as part of response. I mean though the RFC returns data at the backend,its not showing the returned records in the webdynpro table.
    I have also tried checking the same by setting external break point. when the webservice is executed from my webdynpro app,it goes to the ABAP debugger and i could clearly see the records in the export parameters of RFC,but the same is not returned in the reponse object.
    Could any one let me know what could be missing. Any help is greatly appreciated?
    I have used the following code in Init method of my View
    Request_ZMYRFC input=new Request_ZMYRFC (model);
    wdContext.nodeRequest_ZMYRFC ().bind(input);
    ZMYRFC  req= new ZMYRFC (model);
    req.setPUserid("EDLAS00C");
    req.setPLtc("E");
    input.setMYRFC (req);
    IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
        wdContext.currentRequest_ZMYRFCElement().modelObject().execute();
          wdContext.nodeResponse().invalidate();
          wdContext.nodeZMYRFCResponse().invalidate();
          wdContext.nodeReturn_res().invalidate();
         wdContext.nodeItem_res_ret().invalidate();
          wdContext.nodeILtcg_res().invalidate();
          wdContext.nodeItem_res_ltcg().invalidate();
        catch(Exception e)
          manager.reportException(e.getMessage(), false);
    Thanks
    Santhosh

    santosh,
    Check provider system defination in nwa for webservice.After this mapp the provider system and service group after wd app deployed.This is mandatory while consuming webservice in webdynpro for latest versions of CE7.11 or later.for reference check this article/document. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50d70a19-45a3-2b10-bba0-807d819daf46
    Thanks,
    Murthy.
    Edited by: Murthy Karaka on Mar 22, 2010 12:59 PM

  • Consuming ABAP Webservice from Android device

    Dear Experts,
    I am ABAP developer (limited knowledge on android) trying to connect  Android device to a.SAP Webservice
    Through trial and error and help from SDN and Android forums i managed to link up the ABAP webservice and android using KSOAP2 API.Its working perfectly now but only when i save the username password for SAP access in the webservice settings in transaction SICF.I need to access the service by passing the username and password values through the SOAP request header but so far my efforts have failed me.im presently using the following code to pass my auth values.
    I would be grateful if you can point me in the proper direction.
           String NAMESPACE = "mynamespace (works properly without auth)";
            String METHOD_NAME = "mymethod (works properly without auth)";
            String SOAP_ACTION = "mynamespace/mymethod (works properly without auth)";
            String URL = "myURL{works properly without auth)";
            SoapObject Request = new SoapObject(NAMESPACE, METHOD_NAME);
            Request.addProperty("Purchaseorder","4500001168");
            Request.addProperty("Username", "myusername");
            Request.addProperty("Password", "mypassword");
           SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
           envelope.setOutputSoapObject(Request);
           HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
    try
               androidHttpTransport.call(SOAP_ACTION, envelope);
               SoapObject response = (SoapObject)envelope.bodyIn;
               String testValue =  response.getProperty("PoHeader").toString();
               AlertDialog alertDialog = new AlertDialog.Builder(this).create();
               alertDialog.setMessage(testValue);     
               alertDialog.show();
           catch(Exception e)
                e.printStackTrace();
    Thanx & Best Regards

    Hi,
    you can develop a custom Transport class wich extends the: HttpTransportSE class by authentication features.
    example:
    public class AuthTransportSE extends HttpTransportSE{
         private String username;
         private String password;
         public AuthTransportSE(String url, String username, String password) {
              super(url);
              this.username = username;
              this.password = password;          
         protected ServiceConnection getServiceConnection() throws IOException {
              ServiceConnection midpConnection = new ServiceConnectionSE(url);
              addBasicAuthentication(midpConnection);
              return midpConnection;
         protected void addBasicAuthentication(ServiceConnection midpConnection) throws IOException {
            if (username != null && password != null) {
                StringBuffer buf = new StringBuffer(username);
                buf.append(':').append(password);
                byte[] raw = buf.toString().getBytes();
                buf.setLength(0);
                buf.append("Basic ");
                org.kobjects.base64.Base64.encode(raw, 0, raw.length, buf);
                midpConnection.setRequestProperty("Authorization", buf.toString());
    Afterwards you can initialize the Webservice with:
    AuthTransportSE androidHttpTransport = new AuthTransportSE(URL, userName, pasword);
    Cheers,
    Dennis.

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        DATA: ixml TYPE REF TO if_ixml,
              xml_document TYPE REF TO if_ixml_document,
              xml_root TYPE REF TO if_ixml_element,
              xml_element TYPE REF TO if_ixml_element,
              xml_node TYPE REF TO if_ixml_node.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = l_xstring
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            xml_element ?= xml_root->get_first_child( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

  • Query Problem With Exception Aggregation

    Hello,
             I have two I/O 0Customer and 0Cont_Acct and also I have a Infoset made out of both. Here is the problem i am trying to solve,
    I want to figure out the customers who has more than five contract accounts associated with each customer number.
    Here is the solution I approached....
        1) Created a formula variable counter on the KF # of data records (which is provided in the Infoset automatically ) with exception aggregation total while referencing the contract acct I/O.
       2) Kept my customer #  and Contract acct on my rows area.
    The results I am getting is less than satisfying.  I am expecting   this output below.
    Customer #                 Cont Acct                  Total No of Cont.acct
    A                                  1001                                1
                                         1002                                1
                                         1003                                1
                                                                                  3
    B                                  1007                                 1
    I would appreciate anybody's help in this.  Thanks a lot.
    -A

    Hi,
    We have the same problem and raised an OSS ticket. They replied us with the note 1257455 which offers all ways of improving performance in such cases. I guess there s nothing else to do, but to precalculate this exception aggregated formula in data model via transformations or ABAP.
    By the way, cache can not help you in this case since exc. agg. is calculated after cache retrieval.
    Hope this helps,
    Sunil

  • Serialisation failed  : ABAP webservices  as webdynpro model

    Hi All,
             I have created a webdynpro application consisting of a ABAP webservice model  . This webservice takes some input parameters which are  optional and give output which we are displaying as webdynpro table.. we have successfully deployed and run it on our development server .
    We have transported the EAR to Quality server after changing the target address under model> webservice> logical port corresponding to Quality webservice URL..
    But at quality server it is giving "Serialisation failed" for particular input parameter. for rest of the input parameter proper output is coming  .
    Please tell the possible solution.
    regards
    Poonam

    The input that you are trying to give might not be complaint with the data that you are providing .. go to http://server:port/wsnavigator and give the data there and test .If the data type and the length of the input parameter are not complaint with the data that you are providing u will get that error

Maybe you are looking for

  • Cycle Count Entries Form not showing specific employee name in "Counted By" LOV List

    Cycle Count Entries Form not showing specific employee name in "Counted By" LOV List.But the Employee is active . Is there any setup for this activity?

  • IMac 21.5" MC309LL/A -- Can I have an external monitor?

    Hello all -- I have a 2011 iMac Model MC309LL/A -- Is it possible to have a 2nd display on this iMac? I've done some research and it seems you can with the 2010 model -- so im a bit confused as why they would take this feature away in a newer year. A

  • Plz meke me understand the given code!!!!!!

    Dear All, I am giving you the code below. Please any one can explain me the whole program and the purpose. specially form LOOP section to the end of the program. I will be very kind if someone will help to make me understood. Regards, Abhay. TABLES:b

  • ACE as ssl client

    Hello all, has anyone been able to successfully configure the ACE board to initiate and terminate ssl connections as ssl client. We tried a lot, but no luck... Is there a working configuration example out there, because the documentation does not tel

  • 11i Upgrade - Projects Pre-Upgrade steps

    We are upgrading from 10.7SC to 11i (11.5.2) and in running several of the Category 2 pre-upgrade steps, we have found that only really old projects show up as exceptions that should be "fixed" prior to the upgrade. These projects are now closed and