Create BAPI as Web Service

Hi,
I have expose a BAPI as a web service.
Application : PA
BAPI : EmployeePersonalData
Method : Create
When i try to test the web serive with the following test data:
Employeenumber (String) = 12345678
Validitybegin (String) = 2001-01-01
Validityend (String) = 2003-01-01
It give me the following error:
=============================================
HTTP/1.1 500 Internal Server Error
Set-Cookie: <value is hidden>
content-type: text/xml; charset=utf-8
content-length: 803
sap-srt_id: 20080128/122539/v1.00_final_6.40/DCCD591434D56BF19BA300145E6770F3
server: SAP Web Application Server (1.0;700)
<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/WSS0080123034217187000</MainName><ProgName>/1BCDWB/WSS0080123034217187000</ProgName><Line>128 </Line><Valid>X</Valid><ReferenceFault><DescriptionText>Error accessing the ref. node 'EMPLOYEENUMBER'</DescriptionText><RefName>EMPLOYEENUMBER</RefName></ReferenceFault><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>
============================================
What wrong with it? Any idea how to resolve this problem?
Regards,
Rayden

Hi Rayden
It will surely help you.
Please reward pts if help.
Deepanker
Expose BAPI as a Web Service
1. Go to transaction SE80.Select Function Group from drop down menu; enter the function group in which the BAPI (which is to be exposed as Web Service) comes. You can find this Function Group from function module (BAPI) itself. Go to transaction SE37 and enter function module name (BAPI name) and click on display. You can see the function group here under attribute tab .
2. Then from Function Modules list choose the BAPI to which you want to expose as a   
    Web Service .
3. On right clicking on the BAPI a context menu appears. Click on create and Web Service option .
4. New window will pop up. Click on Continue.
5. Give the name for Enterprise service and short description. Click on continue.
6.  New window will pop up.Click on Continue
7. New window pop up. Click on 'Release service for runtime'. Click on Continue.
8. This window pops up. Click on Complete.
9. New pop up window come up asking for Package. Give the package name and click on SAVE button.
10. New window pop up asking for Request . Give request and click on OK.
11. New window comes displaying service definition.
12. Now go to transaction WSADMIN and choose your web service. Go to Web Service menu and choose WSDL option.
13. New pop up window come.Check on Include SAP Feature in WSDL and click on OK.
14. Internet browser will be opened and asking for User Name and Password .
15. After giving values for user name and password, you will get WSDL file opened in internet explorer. SAVE this locally on your computer for further use.

Similar Messages

  • BAPIs and Web Services

    Hello, I have the following Question. As I understand it,
    I can setup a Java App to access a BAPI via JCo and SOAP, thus creating a Web Service which can pass on the results to a Client.
    Or I can let XI do the work, which can publish a Web Service, handling communication to the related BAPIs internally.
    Is there any other way to access a BAPI via Web Services, using SOAP and Java?
    I hope this question makes sense, otherwise I would ask you to clarify the issues for me.
    Thank you in advance.
    Felipe Hernandez

    http://help.sap.com -> SAP NetWeaver -> Application Platform -> ABAP Technology -> ABAP Workbench -> Tools or: http://help.sap.com/saphelp_nw04/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
    and continue Enterprise Services Architecture: Web Service
    Jiri

  • Creating PL/SQL web services from PL/SQL records

    Hello
    Jdeveloper does not allow to create web services from pl/sql packages that use PL/SQL records.to do this,we have to use the jpublisher ?without using the jpublisher,if we create a webservice then the following error is displayed in the web service xml output file.
    <faultstring>Internal Server Error (Caught exception while handling request: java.rmi.RemoteException: java.sql.SQLException: ORA-06550: line 1, column 49: PLS-00181: unsupported preprocessor directive '$WS_SP_EVEN' )</faultstring>
    </env:Fault>
    Could any one suggest me, how to solve the above issue..?
    Regards
    Malathi

    Thank you, with db adapter it was working and also
    pl/sql web-services working successfully with object types.If we want to send the web-services to the client, do we need to send the entire folder that is created in the web-services folder of the external oc4j..?
    Creating the client process:
    we are using the wsdl file that is generated in the web-services and adding to the partner link to Invoke the operations of web-services. Is there any other way to invoke the webservices?Could any one please suggest me?
    Thanking you
    Malathi

  • Creating PL/SQL web services from object types

    Hello
    Jdeveloper, pl/sql web-services working successfully with object types.If we want to send the web-services to the client, do we need to send the entire folder that is created in the web-services folder of the external oc4j..?
    Creating the client process:
    we are using the wsdl file that is generated in the web-services and adding to the partner link to Invoke the operations of web-services. Is there any other way to invoke the webservices?Could any one please suggest me?
    Thanking you
    Malathi

    Hello
    Accessing the pl/sql webservices from the application server:
    I have created pl/sql webservice using the nested tables. This will insert the object data into database tables.after deplying the webservice into external oc4j, when I test the webservice locally with url: http://localmachine:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
    The above web-services working and I am able to insert into the database tables.
    Same when I want to access through the application server, I have changed the wsdl file soap address as
    <soap:address location="http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort"/>
    When I access this url, I am able to give the input data
    http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
    but the out from the web-service is:
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>env:Server</faultcode>
    <faultstring>Error creating target: DBConnImpMftest.ObjWebserviceUser</faultstring>
    <faultactor/>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    Err from the OC4j log:<PAYLOAD>
    <MSG_TEXT>An error occurred for port: {http://dbconnimpmftest/Nested_Webserv.wsdl}Nested_WebservSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creating target: dbconnimpmftest.Nested_WebservUser.</MSG_TEXT>
    </PAYLOAD>
    Could any one help me to solve the above issue?
    Kind regards
    Malathi

  • Invoking a web service not created using oracle web service lib

    Hi All,
    I have a need to invoke my web service from oracle sql command. My web service not created using oracle web service library, but it is created using axis c++ libraries. Is it possible to do so,
    Thanks in advance,
    Regards,
    Monica

    In order to call out from the database process, is SQL (or PL/SQL) you need to generate some client code, that understand the details about the specific of the service you want to invoke and can produce the correct SOAP request. Once this proxy is uploaded in the Database, you can use it.
    There is a set of Database Web services samples that should help you get started. You can also take a look at the developer's guide - see Developing a Web Service Client in the Database.
    Hope it answers your question.
    --eric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Create an SAP Web Service Consumer (calling External Sharepoint Web Service from ABAP)

    hi all,
    i am trying to
    Create an SAP Web Service Consumer (calling sharepoint Web Service from ABAP) using blog given on following link
    Create an SAP Web Service Consumer (calling External Web Service from ABAP) 
    but when i am using my url at the end of step 3, i am getting error as follows:
    i dont want to use local file option. Can anyone help me in this??
    thanks in advance
    regards,
    SDS

    Hi SDS,
    you recieved a http 404 error when trying to access the Sharepoint Web service. Http 404 indicates that the resource is not reachable (cf. HTTP 404 - Wikipedia, the free encyclopedia). There could be different reasons for that. I'd suggest rubble checking the URL of the Web service first. Try to access it from a browser on you desktop. If the URL is correc. Most likely the SAP system is not able to connect to the URL. This could, for example, be due to some firewall restrictions. You should ask a SAP Basis colleague if they are able to access the URL of the Web service from the server on which the SAP system is running.
    Christian

  • How to create document/literal web services with WLS7

    How do you create document/literal web services with WLS7 ( not workshop)
    - Is it possible with servicegen and stateless EJBs as the backend component?
    The default is RPC/Soap-encoded is there anyway to craft the web-services.xml
    to make it document/literal
    - Is it possible with the JMS-implemented web services - have not tried this yet
    - Is there another mechanism?

    That would be the <web-service> element in the web-services.xml file, of course.
    "Michael Wooten" <[email protected]> wrote:
    >
    Hi Rich,
    Try adding a style="document" attribute to the starting <web-service>
    element.
    The might be a way to get <servicegen> to do this for you, but I haven't
    found
    it yet :-)
    Regards,
    Mike Wooten
    "Rich Muth" <[email protected]> wrote:
    How do you create document/literal web services with WLS7 ( not workshop)
    - Is it possible with servicegen and stateless EJBs as the backend component?
    The default is RPC/Soap-encoded is there anyway to craft the web-services.xml
    to make it document/literal
    - Is it possible with the JMS-implemented web services - have not tried
    this yet
    - Is there another mechanism?

  • Getting the Error when creating the WSD(Web Service Defination)

    Hello,
    When I tried to create the WSD(Web Service Defination) through the Wizard or function module I am getting the error "Error during activation" and again it is giving the error "internal error ACTIVATE in WEBSERVICE Wizard;".
    What will be the probable cause of this error.
    Is I have to change some configuration
    Please Suggest.
    Thanks
    Vineet

    I have the same problem - error returned is
    Error during activation
    Message no. WS_TOOL085
    but no further information is provided
    But the Virtual Interface in the package does activate with no problem - so this is WSD specific!
    Some help would be appreciated...

  • How to Create and Deploy Web Services Using Oracle 9i JDeveloper

    Hi,
    My Question is how to create and deploy Web Services using Oracle 9i JDeveloper.Anybody please give me a detailed Reply.Please Reply to [email protected]
    Hopr to Hear From you,
    Regards,
    G Sreekumar

    You could use datasources. You should do this in your BC4J Configuration. Then when deploying your applicaiton use the command -installDataSource (from admin.jar) to create the right datasource.
    You could probably use the name of your connection + "DS" so you can also use it locally in JDeveloper as JDev seesm to create this automaticly for your Connections.

  • Creating folder structure web service

    hi,
    can any one tell how to create folders using web services from a J2EE application, is their any folder-related functions come with the default wsdl files??

    hi,
    can any one tell how to create folders using web services from a J2EE application, is their any folder-related functions come with the default wsdl files??

  • Scalability Issues for Creating Pl/sql Web Services

    While Creating Pl/Sql Web Services , jdeveloper automatically creates wrappers files for the same, When using complex types for pl/sql Procedures, the wrappers contain huge no of attributes , Will there be a scalability issue for such kind of complex PL/SQL API Web services, will there be a round trips to database in order to map the attributes of java wrapper files with the Pl/SQL API files
    Also there is something called as Public View Object VO, how different it is from the normal View Object,is there a specific way to create Public View Object and XSD file for that, or its just a normal VO exposed publicly?

    Hello
    Accessing the pl/sql webservices from the application server:
    I have created pl/sql webservice using the nested tables. This will insert the object data into database tables.after deplying the webservice into external oc4j, when I test the webservice locally with url: http://localmachine:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
    The above web-services working and I am able to insert into the database tables.
    Same when I want to access through the application server, I have changed the wsdl file soap address as
    <soap:address location="http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort"/>
    When I access this url, I am able to give the input data
    http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
    but the out from the web-service is:
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>env:Server</faultcode>
    <faultstring>Error creating target: DBConnImpMftest.ObjWebserviceUser</faultstring>
    <faultactor/>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    Err from the OC4j log:<PAYLOAD>
    <MSG_TEXT>An error occurred for port: {http://dbconnimpmftest/Nested_Webserv.wsdl}Nested_WebservSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creating target: dbconnimpmftest.Nested_WebservUser.</MSG_TEXT>
    </PAYLOAD>
    Could any one help me to solve the above issue?
    Kind regards
    Malathi

  • Bapi as web service - required by schema description

    Hello,
    I exposed a BAPI as a web service. Lets take for example the bapi to update / change a business partner. When trying to update for example the first name I have to create a complex type: centralPersonData and I have to create ALL simple types that are subtypes of centralPersonData even when I only want to change one of this attributes otherwise I will get a:
    com.sap.engine.services.webservices.jaxrpc.exceptions.XmlMarshalException: XML Serialization Error. Property [...] of class [...] must exist and can not be null. This is required by schema description.
    I know that I get this error because the XML element tags are not created when I do not initialize the values. In the moment I initialize all values "by hand" and have to write sometimes about 50 lines of code only to update one value. Is there a better way to solve this?
    Thanks for your answers!
    Felix

    Hi
    Check This URL and you will get some Solutions to your problem
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/ae1b9a5d2cef4ea4b579f19d902871/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/7c/a4f1b3c59aef4f8ea3c32cda0c0486/frameset.htm
    Regards
    Chandran

  • BAPI as Web Service in XI 2.0

    Hi there,
    I have been struggling for about a week trying to <u>deploy/call a BAPI as a Web Service in XI 2.0. </u>
    However, despite all my attempts I didn't manage to get this "simple" scenario to work.
    My conclusion until now; is that XI 2.0 just does not or is not ready to provide this kind of functionality.
    Hopefully in version 3.0  all these shortcomings will be part of the past.
    Regards,
    Rob.
    Message was edited by: rob viana

    Hi rob, how are you ?
    I have done this at least two weeks, to validate the concept, I had some problems until proceed correctly but, yes, works fine !
    First I did import the BAPI_MATERIAL_GETLIST, create 2 data types, one to receive parameters from webservice client and map to BAPI call, and another to get the BAPI response(I have created an sync interface), so, created 2 message types, corresponding to 2 data types, and 1 message interface specifying the outbound and inbound message types.
    So, I did create two message mappings, one to map the request to BAPI and another to map the response to client, and a interface mapping to set the request and response with respective mappings and interfaces.
    After, I did create the corresponding configuration objects and, in the configuration, I´ve used the menu "Tools/Define Web Service..." to generate a wsdl(I´ve used this option only to check the parameters that will be exposed, and check the endpoint that XI is suggering to be used, I didn´t use the WSDL to call the webservice)- here is a trip: to me, the option mentioned above generate the following address as endpoint: http://:1080/sap/xi/engine/?type=entry,
    and the port listed above(1080) is incorrect, the correct value is found at SMICM transaction, looking on Active Services, this is a http port available on this screen(in my case, the correct value is 8030).
    The ultimate task is configure the SOAP Adapter to listen the SOAP requests to this interface.
    I think that the problem is to find correct documentation, I have experienced many situations where I have a problem to solve and, its very difficult to get a document, help, etc.. that explain how to solve the problem.

  • BAPI as 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 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): in fact, the system makes me authenticate again, and I can only authenticate 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?
    Message was edited by: Michael DePriest

    I need to clarify something from the initial post. During the second web service test I described, as I am executing the test, the system requires me to authenticate even though I already authenticated in order to get the WSDL.
    The first authentication is OK when I provide a username/password that is valid in client 800.
    The second authentication does not accept the client 800 credentials. It will only succeed if I provide a username and password that are valid in client 000.
    As a result I don't get anything in response to the test (there are no process orders in client 000 on this instance).

  • Connect to BAPI with web service

    Hi everyone,
    I am trying to make a web service that call a BAPI and retrieve a result (a table or a structure).
    Is it possible ? If yes, how ?
    Thanks a lot.

    So,
    1st step : create a SAP enterprise connector.
    2nd step : create a portal service ?
    3th step : create a web service.
    4th step : create a proxy and a client.
               In the client, for the example, I wrote :
              JCO.Client jcoclient =
                      JCO.createClient(
                         "CLIENT",
                         "USER",
                         "PASSWORD",
                         "LANGUAGE",
                         "SERVER",
                         "SYSTEM",
                         "GROUP");
              jcoclient.connect();
    It doesn't work. I get this exception :
    com.sap.mw.jco.JCO$Exception: (102)
    RFC_ERROR_COMMUNICATION: Connect to message server failed
    Is it right ?
    Thanks for the help.
    Message was edited by: David Fryda

Maybe you are looking for

  • Update from apple software - seems to have broken displays

    I have just taken delivery of my mac pro (felt like christmas) - ran through the setup all of 6 minutes (eat your heart out Bill) - ran software update as it popped up to get it up to latest settings etc.. now monitors do not work they flash on and o

  • SERVICE_OS in CRM_ORDER_MAINTAIN for a follow up document

    Hello SAP Guru's! Currently I'm working with my customer requirement that begins with the creation of a case after some business rules an appointment should be created with specific information. As I mentioned, the first document is a case and the se

  • Regarding download of ODI 10.1.3

    Please provide me download of ODI 10.1.3 and installation guide.I am new to ODI.Please share some materials too for beginners to ODI.

  • Sales Order Consumption

    Hi All The business want unconfirmed sales orders (Type BM) to consume forecast in APO, I've tried changing the 'Qty Type' in the category group to 'Blank' (pegging relevant) and '02' (original quantity) but this doesn't seem to work.  Consumtion in

  • Help to estimate timeline for Stellent UCM & DAM project

    Hi, To answer a customer RFP on Stellent UCM & DAM project i urgently need to estimate timeline to do similar project. Is there any experienced consultant Oracle Stellent person to contact or documents regarding UCM & DAM project already done or Gant