AbstractPortalComponent and call RFC via Connectivity Service

HI!
Can You help me?
public class start_RCW extends AbstractPortalComponent
     public void init(IPortalComponentInitContext arg0) throws PortalComponentException
          super.init(arg0);
     public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
          String KEY = "usb.bapi.utils.InitParams";
          String SAP_MANDANT_BS = "BS";
          String SAP_MANDANT_AM = "AM";
          String LOGGER_NAME = "logger_usb.bapi.utils.InitParams";
          // function name     
          String SAP_BAPI_NAME = "Z_EXT_SYSTEM_URL_GET";
          // param
          String SAP_BAPI_PARAM_EXT_SYSTEM = "EXT_SYSTEM";
          // result
          String SAP_BAPI_RESULT_ZEXT_SYSTEM_URL = "ZEXT_SYSTEM_URL";
          String SAP_BAPI_RESULT_FUNCTION = "FUNCTION";
          String SAP_BAPI_RESULT_URL_SYSTEM = "URL_SYSTEM";
          IPortalComponentRequest in_request = (IPortalComponentRequest) request;
          IUser user = in_request.getUser();
          String uid = user.getUniqueName();
          response.write(uid);
          String sapSystem = "BS";
          Hashtable result = new Hashtable();
          //final Logger my_logger = new Logger(LOGGER_NAME);
          try
               ConnectionProperties prop = null;
               IConnectorGatewayService cgService = null;
               IConnection connection = null;
               Object connectorservice = PortalRuntime.getRuntimeResources().getService(KEY); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
               cgService = (IConnectorGatewayService) connectorservice;
               prop = new ConnectionProperties(null, user);
               if (sapSystem.equalsIgnoreCase("AM"))
                    connection = cgService.getConnection(SAP_MANDANT_AM, prop);
               else if (sapSystem.equalsIgnoreCase("BS"))
                    connection = cgService.getConnection(SAP_MANDANT_BS, prop);
               // get the interaction interface for executing the command
               IInteraction ix = connection.createInteractionEx();
               // get interaction spec and set the name of the command to run
               IInteractionSpec ixspec = ix.getInteractionSpec();
               // put function name into interaction properties.
               ixspec.setPropertyValue("Name", SAP_BAPI_NAME);
               // prepare query
               RecordFactory rf = ix.getRecordFactory();
               MappedRecord input = rf.createMappedRecord("input");
               // put function input parameters
               input.put(SAP_BAPI_PARAM_EXT_SYSTEM, "BS");
               MappedRecord output = (MappedRecord) ix.execute(ixspec, input);
               Object result_sap = output.get(SAP_BAPI_RESULT_ZEXT_SYSTEM_URL);
               IRecordSet rs = (IRecordSet) result_sap;
               while (rs.next())
                    result.put(rs.getString(SAP_BAPI_RESULT_FUNCTION), rs.getString(SAP_BAPI_RESULT_URL_SYSTEM));
                    response.write(rs.getString(SAP_BAPI_RESULT_FUNCTION));
                    response.write(rs.getString(SAP_BAPI_RESULT_URL_SYSTEM));
               ix.close();
          catch (Exception e)
               response.write(e.toString());
When I "run"  component from Developer Studio I have "Portal dynamic error" and next record in log.
#1.5 #00145E75F2AE00860000923E0012907C0004A93490BC046F#1311943138477#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#Guest#0##n/a##bac05f90b9df11e0869b00145e75f2ae#SAPEngine_Application_Thread[impl:3]_28##0#0#Error#1#/System/Server#Java###Exception ID:02:38_29/07/11_0020_5587351
[EXCEPTION]
{0}#1#com.sapportals.portal.prt.component.PortalComponentException: Error in init method
Component : RCW_S.start_RCW
at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:251)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:271)
at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)
at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)
at com.sapportals.portal.prt.connection.PortalRequest.getRootContext(PortalRequest.java:488)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:607)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
at java.security.AccessController.doPrivileged(AccessController.java:246)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(AccessController.java:219)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
Caused by: com.sapportals.portal.prt.core.broker.PortalComponentInstantiationException: Could not instantiate implementation class com.usb.rcw.start_RCW of Portal Component RCW_S.start_RCW because: Linkage error while loading implementation class
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getInstanceInternal(PortalComponentItemFacade.java:234)
at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.getComponentInstance(PortalComponentItemFacade.java:160)
at com.sapportals.portal.prt.core.broker.PortalComponentItem.getComponentInstance(PortalComponentItem.java:732)
at com.sapportals.portal.prt.component.PortalComponentContext.getComponent(PortalComponentContext.java:103)
at com.sapportals.portal.prt.component.PortalComponentContext.init(PortalComponentContext.java:242)

Hi,
the error message tells that there is a linkage error at runtime. Therefore, I guess you need to add some private sharing references in the portal app xml of your file.
This worked for me in a similar scenario.
    <property name="PrivateSharingReference" value="com.sap.portal.pcd.glservice, com.sap.portal.ivs.api_landscape, com.sap.portal.usermanagement, com.sap.portal.ivs.connectorservice"/>   
I am not sure whether you will need all of them.
Best regards,
Martin

Similar Messages

  • How to send file as attachment and call RFC to trigger event in ECC?

    Hello,
    A file is retrieved from FTP into PI (w/ NO MAPPING required - just pass through) and placed on the ECC appl. Server. Then, a RFC is made to trigger an event to process the file in ECC.  However, a RFC cannot be called in the graphical mapping if there is no mapping required.
    I have seen this Blog, u201CFile to R/3 via ABAP Proxyu201D, http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1847. [original link is broken] [original link is broken] [original link is broken]  But we are told not to touch the file as it will be converted in ECC by a program.
    Also, I read that using ABAP proxy-PI-FTP, I can do a pseudo mapping, simple one node, (just so a RFC can be triggered) and also pass the file as an attachment.  Letu2019s say this works:
    Question 1:  What configuration steps in the FTP adapter that will allow me to u201Calsou201D send the file as an attachment? 
    Question 2: (Continue with ABAP proxy option) How do I control where will it be deposited so that the program can access it?
    Question 3:  If this is not the best approach, how many steps would I need to do it in BPM (i.e. pick up the file from FTP, place it on appl server, and trigger a RFC to call an event to process file)?
    Thanks for any suggestions!
    John_Xi

    I have read those two help file and was able to use it in the ABAP proxy code.  Thanks.
    This is the current outcome.  I totally understand that SAP PI communicates via XML.  So when PI picks up a file that contains XML tags, the Inbound proxy is triggered.  I can see its processing in SM50.  However, when I give the Sender FTP adapter a non-XML file to pick up, the Inbound Proxy does not trigger.  The file itself should be read into memory so that I can save it to the application server via ABAP code (with no mapping).  That is why there is no operation mapping
    The reason I am using using FTP to ABAP proxy is because I need to call a subsequent RFC step to process the file.  Else, I will just use FTP to File Adapter scenario.
    Question 1: I am thinking that that file is the attachment.  Is that where I am incorrect and I still need to send in an XML file with the attachment as an addition?
    Question 2: Is this the best approach or should I use BPM?  If BPM, what steps do I need?

  • Async Interface being called synchronously via Web service/SOAP

    Hi,
    I have an asynchronous interface to receive data into XI which is being sent to a file system, I can successfully use this interface to send data to XI using the file sender communication channel, and the monitoring shows the same as asynchronous.
    The problem is when i want to use the same setup to send data from a .Net client using SOAP/Web service. This time if I go to monitoring I get to see that the call is synchronous..????... which is quite baffeling...
    I am not calling the XI webservice in synchronous mode I am calling the BeginInvoke method thus making an async call.
    what is it that I have to do to get the interface to behave as async on being called from a webservice?
    Thanks
    Aniruddha

    Thanks guys. I do understand that this is a old post. However I cannot find the following information. I too have C# Web App call SAP PI BAPI web service getting [NullReferenceException: Object reference not set to an instance of an object.]
    Extract of WSDL: In the Request section: How do I initialize these fields:
    COMPTEGENERAL
                   ITEMS occurs 0 to unbounded.
                             NUMERO_OU_NO_DE_COMPTE String
                             COMPTE_GENERAL String
                             CENTRE_DE_COUTS String
                             MONTANT_DEVISE Decimal
    webservicename.COMPTEGENERAL[] = new Mywebservice.Request FromWS[0].ToString();// Does not Work.
       <xsd:element name="COMPTEGENERAL">
                <xsd:annotation>
                  <xsd:appinfo source="http://sap.com/xi/TextID">9ce79547e32411e2a321f4ce4610676a</xsd:appinfo>
                </xsd:annotation>
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element minOccurs="0" maxOccurs="unbounded" name="ITEM">
                      <xsd:annotation>
                        <xsd:appinfo source="http://sap.com/xi/TextID">85ebea01eedf11e2bbe7f4ce4610676a</xsd:appinfo>
                      </xsd:annotation>
                      <xsd:complexType>
                        <xsd:sequence>
                          <xsd:element name="NUMERO_OU_NO_DE_COMPTE" type="xsd:string">
                            <xsd:annotation>
                              <xsd:appinfo source="http://sap.com/xi/TextID">85ebe9faeedf11e29c4bf4ce4610676a</xsd:appinfo>
                            </xsd:annotation>
                          </xsd:element>
                          <xsd:element name="COMPTE_GENERAL" type="xsd:string">
                            <xsd:annotation>
                              <xsd:appinfo source="http://sap.com/xi/TextID">85ebe9fceedf11e28cd7f4ce4610676a</xsd:appinfo>
                            </xsd:annotation>
                          </xsd:element>
                          <xsd:element minOccurs="0" name="CENTRE_DE_COUTS" type="xsd:string">
                            <xsd:annotation>
                              <xsd:appinfo source="http://sap.com/xi/TextID">85ebe9fdeedf11e2b57df4ce4610676a</xsd:appinfo>
                            </xsd:annotation>
                          </xsd:element>
                          <xsd:element name="MONTANT_DEVISE">
                            <xsd:annotation>
                              <xsd:appinfo source="http://sap.com/xi/TextID">85ebea00eedf11e2bdcbf4ce4610676a</xsd:appinfo>
                            </xsd:annotation>
                            <xsd:simpleType>
                              <xsd:restriction base="xsd:decimal">
                                <xsd:totalDigits value="18" />
                                <xsd:fractionDigits value="4" />
                              </xsd:restriction>
                            </xsd:simpleType>
                          </xsd:element>
                        </xsd:sequence>
                      </xsd:complexType>
                    </xsd:element>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:schema>
      </wsdl:types>

  • Writing SMS on MacBookPro and Sending them via connected (USB,BT) iPhone

    This feature was once possible within the Mac Adressbook / i believe emitSMS worked as well in the past with the iPhone. Somehow this feature is not supported anymore. Will there be a fix/app in the near future? It kinda suxx owning two apple devices which are not fully compatible...which is a SHAME !
    (i was able to use this feature allready with stone-aged nokia devices paired with pcs)
    ps: i know about programs that use a iphone-webserver/vncserver for sending sms but ****...this should be one of the MOST BASIC native features

    <http://itunes.apple.com/ca/app/id352226779?mt=8>

  • MDB receive a message and then call an external web service

    Title basically says it all, but I'm looking for suggestions for the best way to have a message driven bean receive a message then process it and call an external web service with the results. This seems like a straightforward problem to solve but I keep getting stuck in the deployment to weblogic when I do it my way so I'm looking for new ideas.
    Basically, I have an MDB that gets deployed to WL 10.3 and receives messages just fine. Also, I have a standalone class, that runs from the command line or IDE, that can send messages to the external web service. But when I try to bring the code from the standalone class into the MDB and get it deployed, I can't get all the dependencies to resolve.
    So, is there a proper (quick and easy) way to do this? Which wizard should I be using to get Workshop to create web service client so that I can use it in my MDB project? Any suggestions to tutorials?
    Thanks,
    Matt

    Yes BusinessService is the reference point used in OSB to call a backend provider service. So we need to configure the business service based on the external service (they can be http based, jms based, etc ..)
    In your case I am assuming it is a http based web service. So below are the steps to be done:
    1. Create a business service (if you dont have a wsdl then create it as "Any soap type" else upload the wsdl as a wsdl resource and then use it) and configure the url of the business service with the URL of the external service you want to invoke.
    2. From the proxy flow, have a service callout action and select the business service. Then configure the appropriate body and header variables.
    3. Then test the proxy service from the test console, you should be able to see the response from the external service as a part of the service callout response.
    Let me know if you still have issues.
    Thanks,
    Patrick

  • JCo Call RFC

    I have defined a RFC and call it via JCo.
    The RFC is used to fill data to my table.
    The problem is the data can be fill via the import parameter, but the table parameter is not work. I have tested the RFC in function builder and it work.
    Here is my RFC:
    FUNCTION Z_FYP_BAPI_ORDER_CREATEFROMDAT.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(PLACEORDER_IMPORT) TYPE  ZFYP_ORDER
    *"  EXPORTING
    *"     VALUE(RETURN) TYPE  BAPIRETURN
    *"     VALUE(ORDERID_EXPORT) TYPE  ZFYP_ORDER-ORDERID
    *"  TABLES
    *"      ORDERITEM_IMPORT STRUCTURE  ZFYP_ORDERITEM
      DATA: RC LIKE INRI-RETURNCODE,
            NUMBER(10) TYPE C,
            ITEMID TYPE I.
      TABLES: ZFYP_ORDER.
      TABLES: ZFYP_ORDERITEM.
      DATA WA_ORDERITEM LIKE LINE OF ORDERITEM_IMPORT.
      CALL FUNCTION 'NUMBER_GET_NEXT'
        EXPORTING
          OBJECT      = 'ZFYP_OR'
          NR_RANGE_NR = '1'
        IMPORTING
          RETURNCODE  = RC
          NUMBER      = NUMBER.
      PLACEORDER_IMPORT-ORDERID = NUMBER.
      ORDERID_EXPORT = NUMBER.
      INSERT INTO ZFYP_ORDER VALUES PLACEORDER_IMPORT.
      ITEMID = 0.
      LOOP AT ORDERITEM_IMPORT INTO WA_ORDERITEM.
        WA_ORDERITEM-ORDERID = NUMBER.
        WA_ORDERITEM-ORDERITEMID = ITEMID.
        INSERT INTO ZFYP_ORDERITEM VALUES WA_ORDERITEM.
        ITEMID = ITEMID + 1.
      ENDLOOP.
    ENDFUNCTION.

    Hi Chun,
    just follow this code.
    private static JCO.Client client;
    private static JCO.Repository repository;
    client =
    JCO.createClient(
    "<client num>",
    "<user name>",
    "<password>",
    "en",
    "<server ip or server name>",
    "<instance number>");
    client.connect();
    repository = new JCO.Repository("REP", client);
    try {
    IFunctionTemplate m_read_container;
    m_read_container =repository.getFunctionTemplate("<RFC Name>");
    JCO.Function function_read_cont = m_read_container.getFunction();
    JCO.ParameterList tables =
    function_read_cont.getTableParameterList();
    //For Tables
    JCO.Table table = tables.getTable("<Your table Name from table parameter>");
    <b>// specified number of empty rows at the end of the table
    table.appendRows(<Enter the number of expected rows>);
    for(int i=0;i<table.getNumRows();i++)
    // Moves the row pointer to the next row
       table.nextRow();
    // public void setValue(<Data Type> value,java.lang.String fieldName)
    //  set the field values . must have a look at the data type of the field to be set.
    // Here can use table.getNumColumns()  .. to find out the number of of columns in the table , and loop through this...
        table.setValue(<use type casted data value>,<fieldName>);
    }</b>
    // Execute the RFC
    client.execute(function_read_cont);
    } catch (Exception e) {
    For function details  just refer these links.
    JCO API
    http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.html
    JCO.Table
    http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.Table.html
                                            Regards
                                              Kishor Gopinathan

  • Call RFC  using java procedure

    Hi
    How can I to use java procedure and call RFC for to access tables of SAP ?
    Thank You

    RFC? That term in the IT environment usually means "+Request For Comments+" and refers to Internet protocol and usage standards.
    Do you perhaps means RPC (Remote Process/Procedure Calls)? Or something else?
    Also, SAP is a company. Not a product. SAP has a product called R3. This runs inside a database.
    Connecting from Java to a database typically requires nothing more than a JDBC driver. So why can't you use a JDBC driver and need to call the database (and access tables) using another method?

  • Calling RFC with webdynpro java (in NetWeaver Developer studio)

    Calling RFC with webdynpro java (in NetWeaver Developer studio)
    Hi,
    I want to call only one parameter RFC with webdynpro.
    Flight example is very complex.
    I want to push a button and pass parameter to RFC input and call RFC.
    After execution some message must appaer on the screen.
    Is there a step by step .pdf?
    Thanks.

    Hello Cemil,
    There's a seperate Web Dynpro forum for such posts, you should take a look there.
    Nonetheless, the classic tutorial is the FlightList. If I was you, I would make sure to do this tutorial step-by-step as it should give you the fundamentals for understanding aRFC. On top of that, it's most likely already available to you on your SAP system...
    Here's the link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a00f7103-6790-2a10-ac9c-fcac7c5b18a3
    Cheers,
    Hermann

  • OSB call to remote Web Service via https proxy and https CONNECT problem

    Hi
    I have a service that calls a web service on another server as a web service. This call is via https and the certificate validation raises no errors.
    I now want this call to go via a squid httpd proxy on port 3128 on some machine. So I would like to use HTTP CONNECT (RFC 2817) proxying,. But when I set up this as a proxy, I am getting "Certificate chain" error messages. The certifcate chains is no different now from when I called without the http proxy, so what am I doing wrong? Does OSB support HTTP CONNECT?
    -Johan

    The exeption we are getting is BEA-380000
    General runtime error: [Security:090477]Certificate chain received from XXX - 123.123.123.123 --> test.salesforce.com was not trusted causing SSL handshake failure.
    This is of course not relevant if the callout were using CONNECT. In the CONNECT scenario, OSB would not care about XXX's certificate.

  • Browser based InfoPath form deployed on a Claims based Web Application calling a Secure Web Service via Data Connection

    hi,
    We have a Browser based InfoPath Form deployed on a Claims based Web Application. We are tyring to call WCF Services that are secure using Certificates via the Data Connections on Infopath Form.
    Earlier we used to get the Data in BCS External List via the WCF Services and the Data Connections used to get the Data from the BCS External List. Due to Performance Issues, we want to remove the BCS External List and straightaway call the secure WCF Services
    via the Data Connections.
    Have anyone implemented this scenario.
    Thanks
    Ram
    Thanks Ram

    Hi Ram,
    As these are browser based InfoPath forms, you have two options 
    1) Deploy as sandboxed forms
    In this case you have to create a secure store application id and then set the credentials for that account.
    You then have to export the data connection to Data connections library and modify the .udcx file to utilize the newly created secure store application id.
    This may sometime give issues related to sandboxed code service. You have to give permissions on the secure store for the user account which the sandboxed code service is running.
    2) Deploy as administrator approved forms
    This would be ideal way of doing things as you have full control over the web request if you write code behind InfoPath forms.
    3) Deploy as a Hybrid solution
    a) Write a full trust proxy solutions (extend SPProxyOperation class and override execute method) and make the web request call inside this and return the response
    b) Invoke above operation from the sandboxed InfoPath form's code behind by SPUtility.RegisteredProxyOperation(four part assembly name, operation args)
    Hope this helps.
    Thanks,
    Srikanth

  • Got a new LG in Anchorage and was told Glennallen, AK is in a service area.  Got home and all I get is Message 41, Roaming. Can make calls with WiFi connection but not on the road. Any idea whats going on?

    Got a new LG in Anchorage and was told Glennallen, AK is in a service area.  Got home and all I get is Message 41, Roaming.
    I can make calls with WiFi connection but not on the road. Any idea whats going on?

        Oh no! I'm sorry to hear you had problems in the are you're in AkJohnDye. I checked your coverage and I do see we have an extended 4G coverage. This means you're able to use your phone but it needs to be activated in a 4G LTE Verizon Wireless coverage zone. I apologize.
    AdaS_VZW
    Follow us on Twitter at @VZWSupport 

  • We are getting calls from "peoples connect u.s.a." telling us they are providers of service for Microsoft and Macintosh. They have been informed our computer has informed them our drivers are in going to crash. legit. We think they are bogus. Right?

    Does anyone else get calls from "Peoples' Connect U.S.A." indicating they have received error signals from our computer that that all drivers are going to crash and that our system is at high risk?

    I get about one a day, usually saying our Windoze computer is infected (we don't have a Win computer). I cheerily thank then for calling and say I need to transfer them to our IT manager (I'm a home user so no such thing), lay down the phone near a radio with elevator music, and go about my business.
    One person reported here within the last month that they fell for the trick. The callers ended up with $600 of her money for something that did not need fixing. They also ended up with her credit card number, her phone number, and her e-mail address. They had a good day; she didn't.
    As most of these calls come from overseas (I call them "Mike from Mumbai" calls), the FCC can't do much but wring their hands. They've not been able to stop the "Rachel from Cardholder Services" robo-calls that have been plaguing US households for nearly a decade.

  • Open and close RFC connection with portals...

    Hi Experts,
    I created a RFC having a query which is taking a long time to execute. So i want to close RFC connection with portals which is via java connector(JCO)  before that query and open the connction again after that query.
    Please advice is it possible to achieve this. If yes, then how.
    Regards,
    Guddan

    Hi Guddan,
    I created a RFC having a query which is taking a long time to execute. So i want to close RFC connection with portals which is via java connector(JCO) before that query and open the connction again after that query.
    I guess i will need to understand your requirement a little more in detail, as i understand you have an RFC which has a query within to fetch some data and is taking a long time to do so. In the meantime you don't want to keep the connection open?
    My question would be, Is the role of this RFC to only execute the query and fetch the data or does it do something else?
    If it does other things and these are independent of the query execution, then you can span a parallel call within the RFC to execute the query and in the meantime the RFC does the other things (or vice versa) hence reducing the overall time taken.
    If the sole purpose of this RFC is to execute the query, then you will not be able(i mean to say there is no simple and direct way of doing this) to close the connection after the Query is started and re-establish the connection after its execution, for a simple reason that - how will you know if the query has completed it's execution, so that you can establish the connection back.
    Alternate solutions, make this a two way asynchronous call, 1) You invoke the RFC asynchronously and close the connection, the RFC in turn will execute the query and transfer the data to JCO via another RFC call.
    If this needs to be a synchronous call, then you will need to optimize the query to its best.
    Regards,
    Chen

  • Multiple (parallel) RFC Calls through  one connection?

    Hi SAP gurus,
    Is there a possibility for parallel RFC calls through one open connection via one SAP system user?
    As I know when calling RFCs it opens a new session and the dialog users have only 6 sessions permitted.
    Do you know any possible solution for this?
    Thanks a lot in advance

    Is this question about the SAP StreamWork APIs. I think you have posted to the wrong forum.

  • Calling a CAF program via web service generates QName cannot be null error, but only for 1/5 of the same call in a parallel for loop.

    I'm calling 5 identical web service calls using a parallel for loop in BPM. Obviously the data in each slightly differs. Why would this call suspend the process and give the following errors:
    handleCommunicationError( ErrorContextData, Throwable, TransitionTicket ): A technical error occurred.
    Interface namespace = myNamespace
    Interface name = myService
    Operation name = myOperation
    Connectivity type = WS
    Application name = myAppName
    Reference name = 8bd95deb-8cf1-453d-94e5-0576bb385149
    Message Id = null
    WS style = DOC
    Start time of WS call = 2014-02-26 17:51:23.297
    Return time of WS call = 2014-02-26 17:51:23.412
    Principal name = SAP_BPM_Service
    Root error message = local part cannot be "null" when creating a QName
    Error message = Could not invoke service reference name 8bd95deb-8cf1-453d-94e5-0576bb385149, component name myComp application name myappname
    com.sap.engine.interfaces.sca.exception.SCADASException: Could not invoke service reference name 8bd95deb-8cf1-453d-94e5-0576bb385149, component name
    myCompname
    at com.sap.engine.services.sca.das.SCADASImpl.invokeReference(SCADASImpl.java:341)
    at com.sap.glx.adapter.app.ucon.SCADASWrapperImpl.invoke(SCADASWrapperImpl.java:101)
    at com.sap.glx.adapter.app.ucon.UnifiedWebServiceCallObject.invokeWebServiceOperation(UnifiedWebServiceCallObject.java:101)
    at com.sap.glx.adapter.app.ucon.UnifiedWebServiceCallClass.invoke(UnifiedWebServiceCallClass.java:178)
    at com.sap.glx.core.dock.impl.DockObjectImpl.invokeMethod(DockObjectImpl.java:657)
    at com.sap.glx.core.kernel.trigger.config.Script$MethodInvocation.execute(Script.java:248)
    at com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:798)
    at com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:78)
    at com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:196)
    at com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:163)
    at com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)
    at com.sap.glx.core.resource.impl.j2ee.J2EEResourceImpl$Sessionizer.run(J2EEResourceImpl.java:261)
    at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:152)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:337)
    at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:149)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
    Caused by: java.lang.IllegalArgumentException: Could not process message for operation myOperation in web service plugin module.
    at com.sap.engine.services.sca.plugins.ws.WebServiceImplementationInstance.accept(WebServiceImplementationInstance.java:228)
    at com.sap.engine.services.sca.das.SCADASImpl.invokeReference(SCADASImpl.java:314)
    ... 19 more
    Caused by: java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
    at javax.xml.namespace.QName.<init>(QName.java:246)
    at javax.xml.namespace.QName.<init>(QName.java:190)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceImpl.getInterfaceInvoker(DInterfaceImpl.java:126)
    at com.sap.engine.services.webservices.espbase.wsdas.impl.WSDASImpl.<init>(WSDASImpl.java:43)
    at com.sap.engine.services.webservices.espbase.wsdas.impl.WSDASFactoryImpl.createWSDAS(WSDASFactoryImpl.java:39)
    at com.sap.engine.services.sca.plugins.ws.tools.wsdas.WsdasFactoryWrapper.createWsdas(WsdasFactoryWrapper.java:30)
    at com.sap.engine.services.sca.plugins.ws.WebServiceImplementationInstance.initWsdas(WebServiceImplementationInstance.java:256)
    at com.sap.
    Surely if it was the service group unassign then reassign issue then none of the calls would have worked?

    Hi David,
    While a random error is still an error it will be difficult for support to find a problem for an error which is not reproducible. It is always a faster resolution if you can determine how to provoke the error and provide those details. If we can reproduce an error on internal systems then we can fix the problem quickly and without having to access your system.
    regards, Nick

Maybe you are looking for