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

Similar Messages

  • The server at Mac OS X Server Web Services requires a username and password

    I am running SL Server 10.6.2, wiki works but when a person clicks an attached file in a wiki and then selects "open" they get a login popup with the notification The server at Mac OS X Server Web Services requires a username and password. It doesn't matter what they put into the login/pass it comes back. If they hit cancel then the document opens. If they click save then it saves with no issue. I can type in the admin login/pass of the server and it works. Does this mean the security settings to the location of the files is wrong? Any help is greatly appreciated!

    By the way they are using Internet Explorer 7 when opening these documents.

  • 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

  • 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.

  • BAPI as Web Service

    Hi,
    I published an standard BAPI via SE80 as web service. In SOAMANAGER I configured Service an Endpoint for the WS-BAPI.
    Now there are a few problems.
    Secret  nature 1: The web-Service-Navigator for that binding doesn't work :Fehlercode:ICF-NF-http-c:000-u:SAPSYS-l:D-i:stuekenri52_SQ1_00-v:0-s:404-r:Notfound
    Secret  nature 2: The WDSL document for the binding is malformed. The mendatory parameter "address" is missing.
    - <wsa:EndpointReference xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
      <wsa:ReferenceParameters />
      </wsa:EndpointReference>
    Secret  nature 3:
    I can import the WSDL in Eclipse and generate an Webservice Consumer by ignoring the obove error. The first connet with authentication will work, but while accessing the Bapi I get an "connetion refused"
    12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector]  doSelection
    WARNUNG: WSP0075: Policy assertion "enableBlocking" was evaluated as "UNKNOWN".
    30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector]  doSelection
    WARNUNG: WSP0075: Policy assertion "enableCommit" was evaluated as "UNKNOWN".
    30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector]  doSelection
    WARNUNG: WSP0075: Policy assertion "required" was evaluated as "UNKNOWN".
    30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector]  doSelection
    WARNUNG: WSP0075: Policy assertion "enableWSRM" was evaluated as "UNKNOWN".
    30.03.2010 12:44:07 [com.sun.xml.ws.policy.EffectiveAlternativeSelector]  doSelection
    WARNUNG: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".
    Exception in thread "main" com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused: connect
         at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:134)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:140)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:86)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
         at com.sun.xml.ws.client.Stub.process(Stub.java:248)
         at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
         at $Proxy34.stdmaterialGetintnumber(Unknown Source)
         at de.stueken.ws.TestWSBAPIService.main(TestWSBAPIService.java:32)
    Caused by: java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
         at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
         at sun.net.www.http.HttpClient.New(HttpClient.java:306)
         at sun.net.www.http.HttpClient.New(HttpClient.java:323)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:852)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:831)
         at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:718)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:896)
         at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:122)
         ... 13 more
    Any suggestions?
    TIA
      Dirk
    Edited by: Dirk Niemeier on Mar 30, 2010 2:56 PM
    Where is my formatting gone? I preview it looks well.

    Hi Dirk,
    A couple of questions... Are you using a the enpoint URL to import the WSDL into Eclipse or you're importing it from your file system? If you're using the endpoint URL, does the URL have WS-Policy in it? If yes, do you need to be using WS-Policies?
    If you don't need to be using WS-Policies, when you specify the endpoint URL for import into Eclipse, replace the 'ws-policy' bit with 'standard' in the URL & check if that makes a difference.
    I always seem to have problems testing webservices with WS Navigator. I now only use SoapUI for testing.
    Regards, Trevor

  • XML Serialization Error- While testing BAPI turned Web service

    I have a requirement to create sales order in SAP R/3 from an e-commerce site. I went through many forums suggesting "exposing FMs into Web Service". I wrapped BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_TRANSACTION_COMMIT into one FM and exposed as Web Service. I did a successful test-sequence.
    When I tested the web service without giving values I got a response asking for "Sold-to Party or Ship-To Party". While testing the Web service with some values, I got the below error -
    XML Serialization Error. Object content does not correspond to Schema restrictions of type [urn:sap-com:document:sap:rfc:functions][numeric4].
    The e-commerce team tried to hit the Web service and got the below error-
    IWAB0383E Error validating parameters
    Note: Our servers does not have any ENHPacks. Only ECC 6.0.
    Please suggest what might have gone wrong and how to resolve this.
    Thanks!

    Hi Gourav Khare,
    I have created WSDL file through function module in SAP-ECC 5.0v.
    I have followed below steps:
    Crated FM (SE37)
    Crated Web-service (SE37)
    Generated WSDL file using (WSADMIN)
    And consumed WSDF file in SOAP UI (SOAP UI 4.5.2 Trailer version)
    Problem is: while consuming WSDL file in  SOAP UI I getting  ‘Serialisation failed’
    For your reference I have furnished xml string below.
    SOAP UI Input:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">
    <soapenv:Header/>
    <soapenv:Body>
    <urn:YSDF_INV_PRINT_FINAL_RFC_WS_N>
    <!--Optional:-->
    <PWR_INVOICE>
    <INVOICE_SHIPPED_LINE>
    <!--Zero or more repetitions:-->
    <item>
    <POSITION1></POSITION1>
    <SALES_PART></SALES_PART>
                      <PART_DESC></PART_DESC>
    <PRICE></PRICE>
    <QUANTITY></QUANTITY>
    <CUSTOMER_TAX_NO></CUSTOMER_TAX_NO>
    <PROD_NONINVENTORY></PROD_NONINVENTORY>
    <PROD_TAXABLE></PROD_TAXABLE>
    <TAX_LEVEL></TAX_LEVEL>
    </item>
    </INVOICE_SHIPPED_LINE>
    <INVOICE_NO></INVOICE_NO>
    <ORDER_NO></ORDER_NO>
    <DATE_PRINTED></DATE_PRINTED>
    <DIV_CD></DIV_CD>
                <LAST_COST_INVOICE></LAST_COST_INVOICE>
    <DELETE_ZERO_COST></DELETE_ZERO_COST>
    <DELETE_NON_SHIPPED></DELETE_NON_SHIPPED>
    <GLOBALREF></GLOBALREF>
    <ORIGIN></ORIGIN>
    <ORIGINID></ORIGINID>
    </PWR_INVOICE>
    </urn:YSDF_INV_PRINT_FINAL_RFC_WS_N>
    </soapenv:Body>
    </soapenv:Envelope>
    SOAP UI Output:
    <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">Serialisation failed</faultstring>
    <detail>
    <n0:SimpleTransformationFault xmlns:n0="http://www.sap.com/transformation-templates">
    <MainName>/1BCDWB/WSS0130716111624448000</MainName>
    <ProgName>/1BCDWB/WSS0130716111624448000</ProgName>
    <Line>8</Line>
    <Valid>X</Valid>
    <ReferenceFault>
    <DescriptionText>Error accessing the ref. node 'INVOICE_ID'</DescriptionText>
    <RefName>INVOICE_ID</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>
    And one more things are
    I don't know the exact reason, but now the WSDL is working fine. No Idea, will it be consistent.
    No changes in import and export parameters of RFC and no change in code, even if the logic is changed it should not affect the output on SOAP UI but in my case it does.
    Wonder why all this happens, I cannot explain the exact reason technically because my RFC works fine every time, only issue is with SOAP UI.
    From SAP point of view FM is working fine, and input parameter of FM is optional, validations are done by the programming logic and it will capture the message and its details with respect to input data.
    I am not sure SOAP will work consistently and we are using ECC 5.0 most of the t-code not there like "SOAMANAGER" and all.  
    Kindly help me on this
    Thanks & Regards,
       Akshath.L.T

  • 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).

  • Suggestions Pls | Web Service Requirement

    Hi,
    We have a requirement that C4C Standard BO - Standard Inbound Web Service to be called from External Non SAP System say X.
    Now before the Web Service post anything to Cloud directly, we want to involve Custom logic/code to determine certain information based on Incoming Country field.
    - Is this logic possible under SDK for Web Service.
    - If yes, please mention steps OR illustrate some example OR provide link to existing help.
    - If not,do you believe, its good idea to do required logic in ECC etc so system X calls ECC Web Service which internally executes logic and calls C4C Web Service i.e. flow would be system X consumes ECC Web Service A and ECC consumes C4C Web Service.
    Alim
    +91 9833744587

    Hi Alim,
    Did you solve this question? I have the same doubts.
    Regards,
    Bruno

  • How to deploy and start PHP web services required for a process

    hello everyone!
    i ve implemented some php web services. One of them is ManagePatientsImpl.php class
    and the corresponding ManagePatients.wsdl.
    How can deploy it? What are the files required apart from them?
    In addition there are some GUI-files. Should these files be deployed together?
    Thank you in advance!
    Edited by: user643354 on 14-Jul-2010 09:40

    i'm sorry, i assumed you were running weblogic server.
    in case of oc4j you could try this :
    http://tugdualgrall.blogspot.com/2005/03/php-on-oc4j-yes-with-jsr-223-ri.html
    OC4J communication with PHP

  • 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.

  • 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

  • Web Services Requirements on Oracle Application Server 10g

    Is there any special requirements for deploying Web Services to Oracle Application Server 10g? I can deploy a Hello World Web Service to Oracle 9i 9.0.3 (OC4J + Web Cache) without UDDI but if I try to deploy to Oracle Application Server 10g (OC4J + Web Cache) it does not recognize it as a Web Service? Is UDDI now required for Web Services on 10g?

    No. Not only it isn't certified, but it is also impossible to run forms compiled with the 11g compiler with the 10g runtime. For 11g there is a install bundle for the developer suite / application server.
    cheers

  • Create Web Service Proxy -  Union Schema Element has not been implemented

    Create Web Service Proxy
    Validation Failed:
    WSDLException: faultCode=INVALID_WSDL: unsupported XML Schema feature(Union Schema Element has not been implemented)
    WSDL source: http://personal.inet.fi/cool/sports/misc/FlatWSDL/SOAPFrontGetShowBalanceJMS.wsdl

    Looks like this was a false alarm. There were some issues with the message schema.
    Sorry for the confusion.

  • Material Availability Check Web service required

    Hi,
    I am after a standard web service that accepts a material code and returns a plant/location/s and availability/quantity.
    ex:
    input:    code:CMA0001
    output: plant: E100   QTY 3
                plant: E200   QTY 1
    Any help much appreciated
    Darren

    Hi Brad,
    Thanks for your fast reply.
    Unfortunately I am new to SAP and web services. I have used some webservices to create Purchase requisitions, get material list and detail, etc succefully, so I am into a bit of a learning curve
    Can you ellaborate a bit more. If you know at least which BAPI service I need to use will be of great help.
    Kind regards,
    Darren

  • MDM Web Services - Data Types Schema

    Hi,
    I am trying to call MDM Web Services from PI as per our requirement. I need to build a scenario in PI for that. The Web Service documentation only talks about the data types and their strucuture but never said where they are available for download.
    Can any one of you help me in finding them for download or do we have to create them manually? Please refer to the link below for documentation.
    http://help.sap.com/saphelp_mdm550/helpdata/en/45/0068130b0c0487e10000000a155369/content.htm
    Thanks and Regards,
    VJ

    See the thread for information
    Configuration of MDM Web Service
    You can download the webservices from SAP support portal
    Points are welcome if it is helpful
    Koti Reddy

Maybe you are looking for