Connect web service to ERP

Hi,
We have created a Web service from a java class using SAP Neatweaver developer studio. The web service works fine. It takes some inputs and makes changes to a java table stored on our SAP Enterprise Portal.
We would like to add the following functionality to the web service. We want the web service to connect to our ERP system and store some values there. Our ERP has an abap function module that can accept values and make the necessary changes.
Is there a way to do so?
Thanks in advanced

Hi,
We import the com.sap.jco packages and we wrote the following code in our class (web service) :
Client client = JCO.createClient("200", "user", "password", "EL", "servername", "01");
client.connect();
Repository repository = new JCO.Repository("SAP", client);
IFunctionTemplate functionTemplate = repository.getFunctionTemplate("function_module");
Function function = functionTemplate.getFunction();
ParameterList parameterList = function.getImportParameterList();
parameterList.setValue("Value1", "Variable1");
parameterList.setValue("Value2", "Variable2");
parameterList.setValue("Value3", "Variable3");
parameterList.setValue("Value4", "Variable4");
client.execute(function);
The problem now is that we get the following message when we test the web service:
"An error has occurred. Maybe the request is not accepted by the server:
com/sap/mw/jco/JCO$BasicRepository"
Can anyone help us find the problem?
Thnaks in advanced.

Similar Messages

  • Difference between building/consuming web service in ERP vs. XI (PI)

    Hi All,
    Can someone direct me to the pros and cons of whether to build/consume a web service in ERP (ABAP - SE80, etc.) versus in XI?  We have ECC 6.0 and the latest version of Web AS running - so no issues with that.  I'm just wondering - if we can build and consume everything in ERP, why even waste our time with XI (for web services)?  What gives?
    Thanks,
    Matt

    Hi there,
    There are three main aspects in using XI for Enterprise Services:
    1. The ESR - Enterprise Service Repository (based on Integration Repository)
    2. The Service Registry (coming as part of latest XI release: PI 7.1)
    3. The need for asynchronous services
    <b>1. The ESR</b>
    This one should be used for designing your services -ESR is design-time-, defining object data model, interfaces, operations and so on based on <u>Global Data Types</u>.
    The use of Global Data Types allows to ensure that when we speak of e.g. an amount being 1,000.52, it will be understood correctly from the other side thanks to a common set of data types.
    Furthermore, the ESR comes with pre-defined content (interfaces and others) that makes the building of new services faster.
    Note that once you've defined your service in XI, you'll have to generate a proxy (ABAP or JAVA) in your ERP (in case ABAP) where you'll need to implement your code, this means that at run-time your're not obliged to pass through XI to run the service.
    <b>2. The SR</b>
    The Service Registry is the ultimate place where all enterprise services of your company will be published. This will really be your ES yellow pages where you can get services WSDL and location so that you can integrate them easily in any of your applications. Services available in the SR are (should) be "released" services, so in contrary to what you can find in the ESR (where you can have work in progress), here you'll only have services that are completed and ready to use.
    <b>3. Asynchronous ES</b>
    The ERP does not allow you to create real asynchronous services, and this is true as well when you call a service from your ERP as when you provide a service in your ERP to external calls (proxy client).
    In case you need to work with asynchronous scenario, you'll have to go through XI.
    Of course in an ERP system, there are many ways of making a "kind of" asynchronous behaviour with coding, workflow and so on, but in this case the other party (the external service provider or caller) will probably have also to be adapted which is not always possible.
    Well, these are from my point of view the most important elements; so, if you don't need asynchronous behaviour and you don't have to many services to manage you can certainly work without XI.
    Now, if you start having services from different systems, and you build a complete enterprise SOA based infrastructure, XI/PI becomes a necessity.
    Rgds,
    Karim

  • HOW TO: Connect web service (remote application module) to existing model

    Hello.
    I have J2EE application which displays some data in an applet, which reads them by a web service. I'd like to use persistence and connect with a web service called by applet to my current model set within a session. I tried to pass a session id to web service (to a function of an application module implementation). I wanted to create a new SessionCookie instance with such a session id and application id which are used for web application session (by ApplicationPoolImpl.createSessionCookie() or with custom session cookie factory). But I don't know how to pass a session and application ids to a sessioncookie creation process (ApplicationPool environment). I tried to use custom EnvInfoProvider, which set my properties, but it passes the params after a SessionCookie instance is created.
    Samples ... AppModuleServer - file generated to provide ws functionality. I changed code to use EnvInfoProvider:
    public class AppModuleServer extends Object{
      public AppModuleServer(){}
      public SomeObject[] myCustomFunction(String sessionId){
        AppModuleImpl _am = null;
        String appId="someValue";
        CustomEnvInfoProvider envProvider=new CustomEnvInfoProvider(appId, sessionId);
        try{
          _am=(AppModuleImpl)Configuration.createRootApplicationModule("data.AppModule", "AppModuleLocal", envProvider);
          return _am.myCustomFunction(sSessionId);
        finally{
          if (_am != null)Configuration.releaseRootApplicationModule(_am, false);
    }CustomEnvInfoProvider:
    public class CustomEnvInfoProvider implements EnvInfoProvider{
      private String applicationId;
      private String sessionId;
      public CustomEnvInfoProvider(String applicationId, String sessionId){
        this.applicationId=applicationId;
        this.sessionId=aessionId;
      public Object getInfo(String info, Object environment){
        if(info==null)return null;
        return ((Hashtable)environment).get(info);
      public void modifyInitialContext(Object environment){
        if(applicationId!=null)((Hashtable)environment).put("CookieApplicationId", applicationId);
        if(sessionId!=null)((Hashtable)environment).put("SessionId", sessionId);
      public int getNumOfRetries(){
        return 2;
    }Does anybody knows how to pass information from custom EnvInfoProvider just before a SessionCookie is created (e.g. how to run modifyInitialContext() function). Or another way how to pass these information from a web service base function into ApplicationPoolImpl instance. E.g., there is parameter "properties" whithin a createSessionCookie method of ApplicationPoolImpl, which is null during calling. Is it possible to pass there some additional information?
    Thanks for any suggestions.

    Use the Web Service Proxy wizard in JDeveloper to create a class that calls your Web service, and then call this class from code in your AM.
    http://docs.oracle.com/cd/E16340_01/web.1111/b31974/web_services.htm#CJAHGIEF

  • Database connection Web Service state

    If a Web Service conntects to a database, when should I connect and when should I disconnect? I want to hold the same connection during multiple Web service calls. I use JWSDP 1.0.

    Have your service implementation class implement javax.xml.rpc.server.ServiceLifecycle. Create the connection in the init() method and close it in the destroy() method.
    Mike

  • UD Connect, DB Connect, Web Services

    Hi Guys,
    I am preparing for BI 7.0 Certification. I am reading help.sap.com. Can anyone send any simpler documentation basically beginner level documentation on the following topics:
    1. Web Service DataSources and SAP NetWeaver XI / SAP NetWeaver BI Integration
    2. Database Connect
    3. Universal Data Connect and Universal Data Integration

    Hi,
    check the link :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/frameset.htm

  • ADOBE Connect Web Service Transaction ID

    Hi All,
    Hope I can make my question clear, but here goes.
    We are integrating an LMS into ADOBE Connect , so far so good. Managed to write all our intergration classes and all is working great. My question is as follows, If we launch a URL (SCO Content) the content launches and we can see the "attempt" via the report-user-training-transcripts webservice. This works well if we assume that all attempts are going to be logged and the users internet is working correctly etc.
    Is there a way when we launch to uniquely identify what the "transaction-id" will be. This means on our LMS side we know we launched with this transaction-id and when we read the transcript we can just filter for that specifictransaction-id. If there is no transaction-id this could be that the user closed before the content launched or there was a network issue.
    In short I want to know what SCO I am launching from the LMS to match the attempt with the transaction-id. I have tried to send through a custom field, but it does not pull through on the report..
    Any suggestions would help?
    Regards,
    Gavin

    Hi All,
    Hope I can make my question clear, but here goes.
    We are integrating an LMS into ADOBE Connect , so far so good. Managed to write all our intergration classes and all is working great. My question is as follows, If we launch a URL (SCO Content) the content launches and we can see the "attempt" via the report-user-training-transcripts webservice. This works well if we assume that all attempts are going to be logged and the users internet is working correctly etc.
    Is there a way when we launch to uniquely identify what the "transaction-id" will be. This means on our LMS side we know we launched with this transaction-id and when we read the transcript we can just filter for that specifictransaction-id. If there is no transaction-id this could be that the user closed before the content launched or there was a network issue.
    In short I want to know what SCO I am launching from the LMS to match the attempt with the transaction-id. I have tried to send through a custom field, but it does not pull through on the report..
    Any suggestions would help?
    Regards,
    Gavin

  • Web Service Error : Unable to connect to the remote server

    Hi,
    I encountered below errors while I run the web service in ERP 2006 system :
    Unable to connect to the remote server,
    No connection could be made because the traget machine actively refused at xxx.xxx.xxx.xxx:443
    Pls kindly advise.
    Thanks.
    Edward Tso

    Hi,
    Do you have proxy server , check property added t.o the java proxyparameter .
    Also check the log , any fire wall restricting the connection.
    Its better, you put error log you get.
    Regards
    Nagaraju

  • "Unable to log URL" error when importing WSDL into Web Service connection

    Hello Experts
    I'm using Xcelsius Engage and I'd like to use Web Service connection.
    I've developed my own Web service (that is using 2 other web service inside it).
    and now I'm trying to import it into the Xcelsius (connection --> Web service connection).
    And I get the follwoing error:
    "Unable to log URL"
    When I browse to my wsdl file in IE the file is loaded with no problem.
    When trying to import other URLs it also works fine (for example: http://www.xignite.com/xFinancials.asmx?wsdl)
    Any idea?
    Thanks,
    Miki

    Hi Matt
    Thanks a lot!!!
    Indeed the solution was in the follwoing thread:
    VB.net code to create XML
    Parsing the query result fixed the problem.
    For others who might have the same problem:
    Here's a working web service (C# code, for vb code follow the link to the thread above):
    public Service () {
        public struct QueryResult
          public string SlpName;
          public string Commission;
        [WebMethod]
      public QueryResult[] RunQuery()
          // Open Connection - Query Data from DB table - Close connection
          SqlConnection connection = new SqlConnection("Data Source=(local);Integrated Security=SSPI;Initial Catalog=SBODemoUS");
          SqlDataAdapter adapter = new SqlDataAdapter(
            "SELECT SlpName, Commission FROM OSLP", connection);
          DataTable DT_QryResult = new DataTable();
          adapter.Fill(DT_QryResult);
          connection.Close();
          // Parse data to be forward to Xcelsius
          QueryResult[] QryRes = null;
          QryRes = new QueryResult[DT_QryResult.Rows.Count];
          int i=0;
          foreach (DataRow row in DT_QryResult.Rows)
            QryRes<i>.SlpName = row["SlpName"].ToString();
            QryRes<i>.Commission = row["commission"].ToString();
            i++;
          return QryRes;
    Best regards,
    Miki

  • Problem with XI web service,

    Create webDynpro DC try to connect web service in XI side, I have created Adaptive web service, set up username and password in Visual Administrator, point url to a uddi wsdl, but when i try to run the application , I got error says "InvocationException occurred invoking method" when i try to new the model class.
    the other thing is that the some wsdl files with location field like "http://server:port/sap/xi/engine?type=entry&version=3.0&Sender.Service=BS_ESALES_PORTAL&"
    and other wsdl files with location field like ""http://server:port/XISOAPAdapter/MessageServlet?Version=3.0&Channel=:"
    which wsdl format is the correct way in order to let webDynpro application to call it. Please help me if you have an idea, thanks a lot!

    Hao fan,
    If you are using SOAP as your sender adapter then your second one is good. Also please check this document on how to post it to XI using SOAP:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f9cd4
    The first one we will use when you post directly to integration engine instead of uisng SOAP adapter. Check this weblog by stefan on this:
    /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
    So first you make sure how you are sending data to XI. Then create a WSDL according to that and then test your webservice.
    ---Satish

  • Web service authorization problem

    Hi everyone,
    I am trying to call a web service that is located in SAP/R3 using XI.
    I do success calling this WS using C#.
    Now I want to use WebDynpro and having some dificulties.
    When I execute the application,I get the following error :
    Service call exception; nested exception is: java.net.ConnectException: Connection refused: connect
    Can someone help with that issue ?
    Thanks in advance.

    Hi David,
    Please check this thread...
    java.net.ConnectException: Connection refused: connect - Web Service
    Hope it helps!
    cheers,
    Prashanth
    P.S Please mark helpful answers

  • Web Services - Quiz Takers scores are zero for Meetings

    Hello,
    I am using the Adobe Acrobat Connect Web Services to read data from a Connect Pro Hosted account.
    I have a piece of content (a SCORM quiz) which I am able to get scores from if I query the piece of content directly (using the "report-quiz-takers" action). Anyone who has taken the quiz by opening the content directly (via the direct URL) have scores I can get at.
    However, if that same quiz is shared while inside a meeting, I can't get the scores or max-scores of the quiz attempts. They all come up as "0" (zero). Actually, max-score is blank, and score is always zero. The best I can get is "Status" which will be "Completed" or "Incomplete".
    Any idea why the score always comes up "0" if a person takes the quiz while inside a meeting?
    Any help greatly appreciated!
    -Jeff

    Hello Jawahar
    If you run your (RFC-enabled) function modules using the SAP-GUI (i.e. in dialog) then the GUI automatically replaces leading zero when the function module returns any data. However, calling the same function module remotely you will always see these leading zeros.
    These so-called conversion exits are defined as attribute of domains in the ABAP dictionary. If the function module used for the WebService is a standard fm then you have little chances to get rid of the leading zero. Perhaps the WebService has some attribute to suppress conversion exits or activate them when retrieving the data.
    Regards, 
       Uwe

  • Web Service transport

    Hi ,
    We have created web service in development system and shared the WSDL file to be consumed in ERP(non sap) system.
    Now, we have to move the web service to production system. So, how the WSDL file will take the production system URL?
    It will happen automaticaly or need to change any settings?
    We are also consuming the web service of ERP system, To consume the web service, we have created external integeration in development system.
    Now, after this object transportation to production, how WSDL will take ERP production URL. shall we ask ERP team to share production copy of WSDL file and create external integeration object for the same?
    Please suggest.
    Thanks
    Nilesh

    If you did this in SDK, then you can export the solution from one tenant and import it into another tenant. This will "transport" any custom web services you have exposed (creating C4C SOAP APIs) as well as any web services/WSDLs you have consumed (consuming 3rd party SOAP/REST APIs).
    Once you do this you will still need to create a new C4C communication arrangement/communication system in the new tenant since this is tenant specific.
    So to answer your specific questions
    -> Now, we have to move the web service to production system. So, how the WSDL file will take the production system URL?
    It will happen automaticaly or need to change any settings?
    RK- Since you will transport the custom C4C web service from one tenant to another one, the WSDL structure will be the same but the FQDN (fully qualified domain name) of the WSDL address will be different since every tenant has a unique FQDN. So in your 3rd party system that is consuming the C4C WSDL/webservice you will need to update the FQDN to the new address of the new tenant.
    -> We are also consuming the web service of ERP system, To consume the web service, we have created external integeration in development system. Now, after this object transportation to production, how WSDL will take ERP production URL. shall we ask ERP team to share production copy of WSDL file and create external integeration object for the same?
    RK- Again the ERP Basis team will need to need to provide the FQDN of the ERP WSDL/webservice for production ERP since it will be different than the dev/test ERP. If the ERP Basis team transported the WSDL from dev/test to production the WSDL structure will be the same so in C4C all you will need to do is update the ERP communication system/arrangement so that the FQDN of the WSDL/webservice reflects the production address and not the development one.

  • Adobe Connect Web Sevices - CMS Integration

    Hello,
    our company would like to intrgrate Adobe Connect Pro with e-learning solution using Adobe Connect Web Services API.
    It seems possible http://www.adobe.com/devnet-archive/acrobatconnect/articles/firstapp.html
    Here are our questions:
    Q1: If we buy license for Adobe Connect Pro eg: 5 hosts 100 users, can we already use Adobe Connect Web Services API? Or do we need to host Adobe Connect Server ourselves to use it? It seems logical, that its possible in both cases hosted and SAS (software as service from adobe). But we need to be sure.
    Q2: 1 host is 1 person than can manage 1 conference at a time. Is this 1 host bound to 1 adobe id account?
    Q3: we want to be able to have up to 20 simultaneous conferences in each 20 participants. Analog to 20 classrooms 20 students each. What kind of license must we buy?
    I called adobe support, no clear answer, called resellers, the same, Hope hiere someone will know.
    thanks,
    Sylwester

    Muse itself publishes all the html pages to the same folder and hence assumes that there is no multi-level folder structure for html pages. Please note that Muse uses document-relative referencing in menus i.e. href="index.html" and not root-relative referncing i.e. href="/index.html". Now if you add some third party content/link that leads to a page/content inside a directory or URL referring to a subdirectory, then a menu link referring to "index.html" would actually be referring to an index.html page in the current subdirectory and hence breaking the original intended reference.
    To get around this, a simple workaround is to use the Manual mode of menu creation and explicitly specify /index.html or /about.html, etc for the menu item hyperlinks. This would help you create a menu with links using root-relative referencing that will not break even when you go deeper into subdirectories.
    Hope this helps.
    Cheers,
    Vikas

  • Test Connection fails for VC system of type Web Service

    Hi All
    I ve created a VC system of the type Web Service in Portal. In this VC system, I have given Url of the Enterprise Service that I want to use in VC.
    (for eg: http://erp.esworkplace.sap.com/sap/bc/srt/wsdl/sdef_ECC_SALESORDER002QR/wsdl11/ws_policy/document?sap-client=800)
    In the next step, I did user mapping for the VC user that will be consuming this Enterprise Service.
    The system was created successfully but when I did ‘Connection Tests’ , I got the following exception:
    “Test Details:
    The test consists of the following steps:
    1. Retrieve the default alias of the system
    2. Check the connection to the backend application using the connector defined in this system object
    Results
    Retrieval of default alias successful
    Connection failed. Make sure that Single Sign-On is configured correctly”
    Do I need to do any more configurations before I can use such ES portal system in my VC work studio ?
    I understand that I have provided little information about the exception thrown by Portal.
    I kindly request you to feel free in asking any other details about the same.
    Regards
    Kapil S Kamble

    Hi Natty
    thanks for your immediate reply.
    I followed your instructions and created iView of the type URL and set the fetch mode property to 'server side' as told.
    Initially, I gave 'http://www.sap.com' as the Url and I was successful in opening the site.
    Later, when I gave Enterprise Service url and tried to preview the iView, I got the following exception:
    *'http://erp.esworkplace.sap.com/sap/bc/srt/wsdl/sdef_ECC_SALESORDER002QR/wsdl11/ws_policy/document?sap-client=800
    Error # 401'*
    I ll need to give username and password. But how do i give them as parameters?
    Please note, these parameteres are appended to the Url. So, I fear that if url of Enterprise service is changed, then it wont open.
    what do you think ?
    Kapil

  • Erro in SAP VC  with SAP ERP Web Services

    Hello SDN,
    I wanna use the SAP WebService of an ERP 2005 system in the SAP Visual Composer 7.0 SPS8. I have configured the logical destinations as decibed in http://help.sap.com/saphelp_nw2004s/helpdata/de/f8/7889ce12924273a379c1c590675573/frameset.htm and the proxy settings.
    When I try to search the webservice in SAP VC choosing the systems <SID> and <SID_metadata> the list keeps empty. I have configured the basic authentication for the system.
    Could you please provide any help.
    Thanks.
    Best Regards,
    Olaf Reiss

    Hi Olaf,
    I can only guess. Did you walk through Prakash' document on Troubleshooting (https://wiki.sdn.sap.com/wiki/display/VC/Troubleshooting+Connections)?
    - You set the proxy, your system connection to ERP05 works when you test it in the portal?
    - Does your mapped user have the right authorizations in ERP to browse the list?
    - Does your VC use have the VCRole (https://wiki.sdn.sap.com/wiki/display/VC/Roles+needed)?
    - Did you look in the VC log what it says (https://wiki.sdn.sap.com/wiki/display/VC/Enable+Log)?
    - Alternatively: are you able to connect to a web service to this ERP system without browsing it, but by using the direct URL?
    Let us know...
    Mario

Maybe you are looking for

  • 30G video iPod won't show on desktop or in iTunes

    Powerbook G4, 10.4.8, iTunes 7.0.1 30G Video iPod, connected by USB cable -- oh so frustrated! Big trip coming up and can't put any of my audible books on my iPod! This seems to have started after I upgraded iTunes to 7.0, is this source of my proble

  • Workflow Error status in checking In records (Records still getting syndicated to Port)

    Hi Experts, I have syndication strencil step before stop (check in) step. After successfully syndication of records to respective ports when i see status of workflow it is going in Error state. When i checked history of workflow then in last check in

  • IPhone cannot be used because the required software is not installed.

    I had trouble updating my itunes for some time, before I was finally able to delete and uninstall all apple software from my computer (iTunes, Bonjour, mobile support, etc). While using the older version of itunes, my device still synced properly wit

  • Missing Spartan3E_Read32VI.vi for homework

    Hi guys! I´m trying to run the digital filter (the last one) example from the LabVIEW FPGA Module Training for Xilinx Spartan 3E XUP Hardware and when I try to open the ADChost.vi I got an error that says "Open the VI named Spartan3E_Read32VI.vi"  a

  • No item displayed

    Hi, I don't see any output displayed from this JSF. <f:facet name="start"> <af:panelGroupLayout layout="scroll" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="pgl1"> <af:toolbar id="t1"> <af:inputText id="it1" label="Name:" > </af:inputText> <