Calling a BAPI in JSF Application

Hi Experts,
We are planning to create a Demo applicaiton for calling a BAPI in JSF  applicaiton.
Basically we have to create a sample JSF application which will cal a BAPI and display the information.
Can you please share the step by step document or any helpful links.
Thanks&Regards,
Raghu

i would try SAP Enterprise connector even though it is deprecated

Similar Messages

  • How to call a BAPI in EJB application

    Hi ,
    I need to develop an webservice that takes data from a BAPI and insert in to ORACLE database. I think webservices can be created through EJB application.
    I am not having idea regarding how to call an BAPI in EJB application. can anyone help me out in this.
    Regards,
    Laxmi.

    Hi,
    you can use JCO Connection,
    look this
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/fcadaf90-0201-0010-4091-bd0bcd7b7f6a]
    Regards,
    Matteo

  • How to call a stand alone java application from ADF BC JSP, struts or JSF

    Hi,
    My requirement is that there are utilities or stand alone java applications that I want to call from our existing applications.
    We have two seperate applications one ADF BC Struts application we developed using JDeveloper 10.1.2 and another ADF BC JSF application we developed using JDeveloper 10.1.3.2.
    We want to integrate applications like JTwain and others to help us in scanning. The application will be placed on the same server as our application. How can I do this without loosing all the current session information.
    Please help.
    Thanks and regards,

    There are two possible solutions.
    First, if the tool or application you want to integrate, has an Java-API you can use this api and integrate the tool in your application (using one or more jars you add to the classpath).
    Second, if the tool has no java api, you can call the tool via runtime.exec(...) as a shell process. This way you open a command shell in you application and execute the tool like you do on a normal command shell.
    For tide integration and control I recommend the first approach. The second one is only for those tools which don't offer a java api.
    Timo

  • Call a JSF application from a Standar Web application (JSP)

    Hi all,
    We have 2 aplication, one is JSF and the other one is standar web jsp.
    We want to invoke from the standard web application to the JSF application and pass param from the jsp to the *.jsf page.
    how can I do that?
    Thanks.

    You can open a jsf page from any other application.
    <form action="http://hostip:port/app/MyPage.jsf?key1=value1&key1=value1">
    as we do in any other jsp page.
    Now in JSF application, in MyPage.jsf write a scriptlet to get the parameters and from there you can use these params.
    You can get a managed Bean reference in your jsp page. Here is the code for that.(ResultsInExcelBean is my managed bean.)
    FacesContext fc = FacesContext.getCurrentInstance();
         ResultsInExcelBean resultsInExcelBean = (ResultsInExcelBean)fc.getApplication().createValueBinding("#{ResultsInExcelBean}").getValue(fc);     
    Hope this helps you.
    Sravan

  • Error while calling BAPI_PARTNEREMPLOYEE_CREATE BAPI using JCO

    Hi All,
    Our requirement is to create and update customer contact details from java application. For this purpose we are trying to call BAPI_PARTNEREMPLOYEE_CREATE BAPI for create contact and BAPI_PARTNEREMPLOYEE_EDIT for updating contact information. As these BAPIs are of online version, error is coming while calling these BAPIs.
    So is there any way to call these BAPIs through JCO or are there any alternative BAPIs available for same purpose?
    Thanks in advance,
    Arati.

    Hi,
    All the bapi or function module available in SAP to create contact person will internally do a call transaction to VAP1 and VAP2 tcodes in order to create or change contact person respectively.
    We had a similar problem when we were creating and updating customer contact person using inbound idoc. We then created a bdc recording for the same and then created two function module with name Z_CREATE_CONTACT and Z_CHANGE_CONTACT. In your case you can make this function modules as RFC enabled FM and call them using JCO I guess.
    KR Jaideep,

  • Servlet calling a BAPI Web Service...

    Hi everyone,
    I downloaded the wsdl file for the BAPI_USER_GETLIST.
    I created a Deployable Proxy that points to this wsdl file.
    I created a Web modul project with a servlet.
    I also created an Enterprise application project that contains my Web modul project.
    In the Web modul project, I created  a servlet :
    Here is the code of the servlet :
    <b>try {               
         InitialContext ic = new InitialContext();                    
         BAPI_USER_GETLISTService sampleWS = (BAPI_USER_GETLISTService)ic.lookup("java:comp/env/SampleWSProxy");
         BAPI_USER_GETLISTPortType vi = sampleWS.getLogicalPort();
         BAPI_USER_GETLIST importParams  = new BAPI_USER_GETLIST();
         ArrayList list = new ArrayList();
         BAPIUSNAME structure = new BAPIUSNAME();
         structure.setUSERNAME(new String());
         structure.setFIRSTNAME(new String());
         structure.setLASTNAME(new String());
         structure.setFULLNAME(new String());
         list.add(structure);
         BAPIUSNAME[] rows = new BAPIUSNAME[list.size()];
         list.toArray(rows);
         importParams.setUSERLIST(rows);
         importParams.setWITH_USERNAME("X");
         BAPI_USER_GETLISTResponse exportParams = null;
              BAPIUSNAME[] res = vi.BAPI_USER_GETLIST(rows,"");
              for(int i=0;i<res.length;i++)
                   response.getWriter().write(res<i>.getFIRSTNAME());
    } catch(Exception e)
              response.getWriter().write("ERROR!!!" + e.getMessage());
    </b>
    The exception is :
    <b>ERROR!!!Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.</b>
    Can someone help with this security problem ?
    Is the code OK except the security problem ?
    Thanks a lot.

    Hi David,
    Before calling a BAPI, we have to make a connection to
    R/3. Try following code...
    import com.sap.mw.jco.*;
    public class TutorialConnect1 extends Object {
       JCO.Client mConnection;
       public Connect1() {
         try {
           // Change the logon information to your own system/user
           mConnection =
              JCO.createClient("001", // SAP client
                "<userid>", // userid
                "****", // password
                null, // language
                "<hostname>", // application server host name
                "00"); // system number
           mConnection.connect();
           System.out.println(mConnection.getAttributes());
           mConnection.disconnect();
        catch (Exception ex) {
          ex.printStackTrace();
          System.exit(1);
      public static void main (String args[]) {
        Connect1 app = new Connect1();
    This code from sap help, for details visit this link..
    http://help.sap.com/saphelp_erp2004/helpdata/en/bc/42e13d82fcfb34e10000000a114084/frameset.htm
    Hope this helps.
    Regards,
    Narinder Hartala

  • How to create JSF application from xsd files?

    Hi,
    We have many xsd files describing xml's which we are supposed to send to web services. Application which we are creating should allow user to fill xml documents with data and then we should send those xml files to some web service. We want to automatize as much as possible the process of application creation to avoid possible errors and to minimize our efforts (there are plenty of quite complex xsd files).
    Our first approach was: we used Oracle JSXB to generate java classes basing on xsd files (using JDeveloper 10.1.3.2.0.4066). Then we tried to generate DataControls, but this action fails with following error:
    Window title: Error in init bean
    Message: Could not complete initbean because it would result in an invalid document
    Details: oracle.bali.xml.model.XmlInvalidOnCommitException: SEVERE: Wartość atrybutu Name nie jest typu ID (Value of Name attribute is not of ID type)
    Wartość musi być następującego typu: (Value must be of following type)
    Nazwa typu: ID (Type name)
    Typ pierwotny: string (Primitive type)
    Z następującymi więzami: (With following constraints)
    zgodne z wzorcem: [\i-[:]][\c-[:]]* (Compliant with template)
    [ node = Name ]
    <JavaBean version="10.1.3.40.66" id="XSLStylesheet" BeanClass="oracle.xml.xslt.XSLStylesheet" Package="oracle.xml.xslt" isJavaBased="true">
    <Attribute Name="classMethodParams" IsUpdateable="0" Type="java.util.Hashtable" />
    We tried Sun implementation fo JAXB - it generated different java classes (with annotation mechanism). Creation of DataControls using those classes was successful. Then we created simple JSF page and tried to put those DataControls on it in order to let the user fill it with data. The thing is that those controls are read only as there is no row created in those DC. We can't create any row in those DC as there are only 'commit' and 'rollback' operations. When we try to call 'CreateInsert' operation on child elements of those DC we get error in JDeveloper log window:
    2007-05-29 10:08:46 oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: JBO-29000: DataControl:createRowData
    2007-05-29 10:08:46 oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: DataControl:createRowData
    new row is not created and controls are still read-only.
    The question is:
    1. is there another, more efficient way to create JSF application from xsd files?
    2. if this is the best way to do it, what do we do wrong?
    Leszek

    To anyone who might find it useful: our solution to mentioned problem.
    Few tips how to solve described problem:
    1. Do not use JAXB (we checked Oracle and Sun)
    2. Use castor http://www.castor.org/
    a) for each xsd generate java files in separated package
    b) use java 1.5 to let castor generate lists
    c) use mapping of xml namespaces to java packages to have only 1 implementation of each xsd
    3. Create facades - java files for you root-level java objects
    4. Right click those facades and choose 'Create DataControl' in jdev
    5. Now you may drag and drop you DataControls and use them in your JSF (or UIX) application
    I hope it will help someone :)
    Leszek

  • How to Call third party Jar into Application

    Hi Can any Expert help ?
    I want to put third party Jar into my application but i have some problem occur.
    1. how to call jar with parameter in application ?
    2. when i exit the third party jar task, it will exit my main task too. How to set my main tast exit stats standalone ?
    3. I have over 10 jar files in one application, how can i set a classpath for client to call JNLP, instread of load all jar to client before run.
    Thanks.
    Sanki Poon ([email protected])

    1) Sounds like you are trying to launch the third party from it's application main instead of using it as an API How does your code interact with it or is that not important?. You don't call a jar, you load a class. You could use a exec http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html to run the java launcher and pass it all it's command line stuff(But this may not be possible security wise via WebStart).
    2) if it is launched in the same JVM and it calls a System.exit there is nothing you can do about your app closing too. It would need to be in another instance of the JVM
    3) Under the resources tag you can have as many jar tags as needed.
        <resources>
            <j2se version="1.5.0" java-vm-args="-esa -Xnoclassgc"/>
            <jar href="/jsf-wita/apps/MathMLWebEditor.jar"/>
        </resources>

  • Best practices desiging JSF applications

    I have an intermediate level of knowledge on JSF but after completing a component for an application I'm still stumped about the best practices required when designing a Java Server Faces application.
    The issue I faced mostly in the first iteration was Loading of dependant objects.
    Wherever we needed to display an editable view of an object by way of a request parameter there was always the question at what point to load the entity?
    For example, I have a page edit.jspx?itemId=21
    In my faces config, I have a Backing bean which has a managed property:
    <managed-property>
        <property-name>itemId</property-name>
        <property-class>java.lang.Integer</property-class>
        <value>#{param.itemId}</value>
    </managed-property>My backing bean has the getters and setters for this property but at which point is it best to load the item with id of "itemId"?
    It also gets a bit more complex when I depend on other injected properties for example an application scope manager class.
    One thing I have learned is, that the order that you declare the managed-properties in the faces-config appears to be the order that they are injected - I can't make a definitive answer on this as that's just the way it works on Sun App Server 8.1 and JSF 1.1. But I'm still trying to work out when to undertake a simple load for dependant entities in a backing bean.
    One appraoch I have looked at taking is introducing some "Loader" classes - basically a POJO that performs loads based on request param setting events:
        <managed-bean>
            <managed-bean-name>UserLoader</managed-bean-name>
            <managed-bean-class>testfaces.loader.UserLoader</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>invManager</property-name>
                <property-class>testfaces.aspect.InvestigationManager</property-class>
                <value>#{InvestigationManager}</value>
            </managed-property>
            <managed-property>
                <property-name>userId</property-name>
                <property-class>java.lang.Integer</property-class>
                <value>#{param.userId}</value>
            </managed-property>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ItemBean</managed-bean-name>
            <managed-bean-class>testfaces.jsf.bean.ItemBean</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>user</property-name>
                <property-class>org.ikeda.testfaces.model.UserEntity</property-class>
                <value>#{UserLoader.user}</value>
            </managed-property>
        </managed-bean>Ergo, each time I use the ItemBean in a JSP it will try and set the "user" property which is retrieved from the UserLoader provided the param.userId is set from the query string. Mind you this limits me to using only the request parameter (okay for Portlet integration) as there is no property called userId in the ItemBean - another workaround to work out!
    Of course this kind of functionality can be rolled into the ItemBean, but it's amazing how much of a mess the Backing bean becomes when you encapsulate this logic into the backing bean.
    What experiences has everyone else had with JSF and this kind of situation?
    Does anyone know of any good resources about "designing" JSF applications (writing is one thing, designing is another)?
    Regards,
    Anthony

    I have an intermediate level of knowledge on JSF but after completing a component for an application I'm still stumped about the best practices required when designing a Java Server Faces application.
    The issue I faced mostly in the first iteration was Loading of dependant objects.
    Wherever we needed to display an editable view of an object by way of a request parameter there was always the question at what point to load the entity?
    For example, I have a page edit.jspx?itemId=21
    In my faces config, I have a Backing bean which has a managed property:
    <managed-property>
        <property-name>itemId</property-name>
        <property-class>java.lang.Integer</property-class>
        <value>#{param.itemId}</value>
    </managed-property>My backing bean has the getters and setters for this property but at which point is it best to load the item with id of "itemId"?
    It also gets a bit more complex when I depend on other injected properties for example an application scope manager class.
    One thing I have learned is, that the order that you declare the managed-properties in the faces-config appears to be the order that they are injected - I can't make a definitive answer on this as that's just the way it works on Sun App Server 8.1 and JSF 1.1. But I'm still trying to work out when to undertake a simple load for dependant entities in a backing bean.
    One appraoch I have looked at taking is introducing some "Loader" classes - basically a POJO that performs loads based on request param setting events:
        <managed-bean>
            <managed-bean-name>UserLoader</managed-bean-name>
            <managed-bean-class>testfaces.loader.UserLoader</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>invManager</property-name>
                <property-class>testfaces.aspect.InvestigationManager</property-class>
                <value>#{InvestigationManager}</value>
            </managed-property>
            <managed-property>
                <property-name>userId</property-name>
                <property-class>java.lang.Integer</property-class>
                <value>#{param.userId}</value>
            </managed-property>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ItemBean</managed-bean-name>
            <managed-bean-class>testfaces.jsf.bean.ItemBean</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>user</property-name>
                <property-class>org.ikeda.testfaces.model.UserEntity</property-class>
                <value>#{UserLoader.user}</value>
            </managed-property>
        </managed-bean>Ergo, each time I use the ItemBean in a JSP it will try and set the "user" property which is retrieved from the UserLoader provided the param.userId is set from the query string. Mind you this limits me to using only the request parameter (okay for Portlet integration) as there is no property called userId in the ItemBean - another workaround to work out!
    Of course this kind of functionality can be rolled into the ItemBean, but it's amazing how much of a mess the Backing bean becomes when you encapsulate this logic into the backing bean.
    What experiences has everyone else had with JSF and this kind of situation?
    Does anyone know of any good resources about "designing" JSF applications (writing is one thing, designing is another)?
    Regards,
    Anthony

  • Running Oracle Reports from JSF Application in Websphere Application Server

    Hi everybody;
    in our company we are developing jsf applications and we want to use our existing Oracle reports. Reports are deployed in Oracle Application Server 10G. Is there a way to call those reports from our jsf applications deployed in websphere application server.

    Calling reports is just constructing and submitting a URL. So constuct the url in your jsf app or create static hyperlinks in your jsf app to go to the needed url. The url should look something like:
    http ://hostname:7777/reports/rwservlet?report=myrep.jsp&userid=scott/tiger@dev10g&desformat=html&destype=cache

  • When to call a BAPI inputexecute method from webdynpro-java?

    Hello... I'm a little concerned about a situation I'm having. The thing is that I'm trying to use the Bapi_Qualiprof_Change bapi with some test and hard coded data for a future application. It works fine if I fill the input profile_add table in the init() method of my view and then directly call the onActionModifyQualification method (inside the same init() where i filled the parameters).
    On the contrary, if I change the code that intializes the data to the onActionModifyQualification or create an special method to initialize it wich is called later with an action button, then it doesn't work.
    After many test I noticed that i have to call the bapi execute method right in the init... is there something I can do to fix it? or is it that i must do it in order to make it work?
    I have my controller's context mapped to the bapi's model and the view context mapped to the controller's one.... is it good or do i have to build a similar structure to capture the parameters before and then copy the values into the controller's context??
    Thanks a lot!!

    Thanks for your answer, but it doesn't let me do that because wdModifyView is static. Therefore if 2 people are trying to use it, it's goning to be all mixed up, isn't it?
    Anyway, what I really want is executing the bapi when I press the button (that's when it should call the action that calls the bapi). But it only works if I call the action in the init method.

  • Consuming peoplesoft webservices using JSF application gives error

    Hi,
    I am using Jdeveloper 11g to consume a peoplesoft webservice which does the basic datbase operations.
    I have been successful in creating a proxy using the wsdl file and using JAX-WS approach to achieve the same.
    I can connect to the webservice using the proxy client.
    But when i package the proxy( create a jar) and import in my web application (JSF application), i am running into following error.
    <ActionListenerImpl><processAction> com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
    javax.faces.el.EvaluationException: com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at javax.faces.component.UICommand.broadcast(UICommand.java:387)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag. expected: {http://peoplesoft.com/KCM_WEB_CASE_CI}Get__CompIntfc__KCM_WEB_CASE_CIResponse but found: {http://schemas.xmlsoap.org/ws/2002/xx/secext}Get__CompIntfc__KCM_WEB_CASE_CIResponse
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:214)
         at com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:222)
         at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:531)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:127)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
         at $Proxy135.getCompIntfcKCMWEBCASECI(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.spi.ClientInstance$ClientInstanceInvocationHandler.invoke(ClientInstance.java:363)
         at $Proxy136.getCompIntfcKCMWEBCASECI(Unknown Source)
         at project1.proxy.KCM_WEB_CASE_CISoapClient.getKCMMethod_final(KCM_WEB_CASE_CISoapClient.java:618)
         at login.view.Handler.CRMSearchHandler.getSearchResults(CRMSearchHandler.java:18)
         at login.view.backing.Login.search(Login.java:54)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
    I am not sure what else i need to import or rather how to package the proxy classes to get it working.
    Any help will be highly appreciated.
    I even tried creating a webservice proxy in the JSF project instead of importing the jar, yet i am getting the same error, but the irony is that when i run just the proxy class(standalone with main method) i can get access to the webservice.
    Thanks
    Ash
    Edited by: [email protected] on Jun 8, 2010 2:38 PM

    Well,
    There is a issue with analyzer capturing SOAP traffic when using with secure proxies, so that is why you are not seeing any data there.
    And I think if you will try your jax-rpc code again, it might work as there was nothing incorrect in your code, so might be that the whole config was corrupt which was throwing out incorrect error(s).
    About a web service with credentials, you can quickly create one.
    Have a java class like the following:
    import javax.jws.WebService;
    import weblogic.jws.Policy;
    @WebService
    @Policy(uri = "policy:Wssp1.2-2007-Https-UsernameToken-Plain.xml")
    public class Class1 {
    public Class1() {
    super();
    public String sayHello() {
    return "Hi";
    The procy code for this will be something like:
    private static Class1Service class1Service;
    public static void main(String[] args) {
    try {
    class1Service = new Class1Service();
    Class1 class1 = class1Service.getClass1Port();
    Map<String, Object> requestContext = ((BindingProvider) class1).getRequestContext();
    setPortCredentialProviderList(requestContext);
    // Add your code to call the desired methods.
    System.out.println(class1.sayHello());
    } catch (Exception ex) {
    ex.printStackTrace();
    public static void setPortCredentialProviderList(Map<String, Object> requestContext) throws Exception {
    // TODO - Provide the required values
    String username = "weblogic";
    String password = "weblogic1";
    List<CredentialProvider> credList = new ArrayList<CredentialProvider>();
    // Add the necessary credential providers to the list
    credList.add(getUNTCredentialProvider(username, password));
    //credList.add(getBSTCredentialProvider(clientKeyStore, clientKeyStorePassword, clientKeyAlias, clientKeyPassword, serverKeyStore, serverKeyStorePassword, serverKeyAlias, requestContext));
    //credList.add(getSAMLTrustCredentialProvider());
    requestContext.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credList);
    Thanks,
    Vishal

  • Getting data into a JSF application by posting it via http

    (My apologies if there is a thread for this topic - I am not sure what to search for to find if one already exists)
    I have 2 applications - the first is a JSF application into which the user logs in, and accesses various tools. The second is a swing app into which the user logs in and accesses various other tools. The logins are universal - one user, one login, two applications. I am providing a link in the swing app to launch the jsf app. I would like the swing app to pass the user identification when launching the JSF session/browser so the user isn't required to type the info again.
    (I am guessing I can use a JSP call to bridge the two - something that pulls off the id, and plugs it into the session bean? Just not sure how to do that or if there is a better way)
    Many thanks in advance for any assistance!!!

    Hi,
    thank you for your answers:-)
    In conclusion the result is:
    1) There is no "direct" way to read POST-Parameter in WebDynPro ABAP
    => You have to write a wrapper in BSP or an ICF -  HTTP_REQUEST_HANDLER
      (A  ABAP-Class that implements the Interface "IF_HTTP_EXTENSION"
         that reads the POST-Parameter-Value and transfers the value into a reachable localtion for WebDynPro-Abap.
    2) For parsing the XML-Data I can use for example STRANS tcode or  Simple Transformations
    3) For transfering the Data between the BSP / the Request-Handler and WebDynPro for ABAP, I can use for example SharedMemory, Shared Objects.
    Regards
    Steffen
    Edited by: Steffen Spahr on Jul 19, 2011 8:35 AM
    Edited by: Steffen Spahr on Jul 19, 2011 8:55 AM

  • How to call a BAPIs that requires a commit as a Web Service

    We have a Web Dynpro Java application which has some business objects that generate notifications in a backend R/3 system.  Using JCo we simply call BAPI_ALM_NOTIF_CREATE, followed by BAPI_ALM_NOTIF_SAVE, and finally BAPI_TRANSACTION_COMMIT all using the same connection (e.g. these are stateful calls.) 
    Now we need to change from using JCo to calling these BAPIs as Web Services.  We have generated the deployable proxy for these but can't find a way to call them in the same "ABAP session."  The ports generated in the deployable proxy are set to use HTTP Cookie based sessions but the BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT return empty results as if they are not being executed in the same ABAP session as the call to BAPI_ALM_NOTIF_CREATE. 
    We're running WAS Java 6.40 SP15.  Any help would be very much appreciated.

    Hi Jason,
    try to do this using JRA.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cb/072642c9dedd2ce10000000a1550b0/frameset.htm
    Vito
    Best regards,
    Please mark helpful answers

  • Redirect to another jsf application passing parameters

    Hello,
    I'm newbie to JSF, so I hope to explain me almost correctly.
    I have to call from a jsf page the main page of another jsf application (SecondApplication) passing some parameters.
    I thought to pass them in Session. Is it possible, and how ?
    What I've written is totally wrong ?
    Thanks in advance for any help.
    s1a2
    *[FirstApplication]*
    String url="http:/192.168.2.100/SecondApplication";
    FacesContext fC=FacesContext.getCurrentInstance();
    HttpSession session=(HttpSession)fC.getExternalContext().getSession(true);
    session.setAttribute("par1","value1");
    fC.getExternalContext().redirect(url);*[SecondApplication]*
    FacesContext fC=FacesContext.getCurrentInstance();
    HttpSession session=(HttpSession)fC.getExternalContext().getSession(false);
    String Par1=(String)session.getAttribute("par1");
    System.out.println(Par1);

    Astrogobild wrote:
    In the first application, i am doing this way:
    FacesContext.getCurrentInstance().getExternalContext().redirect(sistema.getDiretorio() + "?mat=123456");                   
    FacesContext.getCurrentInstance().responseComplete();In the second application, i can't recovery the value of mat...
    i am doing this way:
    String mat = (String)request.getParameter("mat");but it always returns null...How does the following output look like?sistema.getDiretorio() + "?mat=123456"By the way, there is no need to invoke FacesContext#responseComplete() manually, because this is already done in the ExternalContext#redirect(). Also see its [API doc|http://java.sun.com/javaee/5/docs/api/javax/faces/context/ExternalContext.html].
    String mat = (String)FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("mat");but it always throws a NullPointerException ....What exactly throws NPE? You're invoking 4 method calls here. Maybe the FacesContext#getExternalContext(), because FacesContext#getCurrentInstance() can also return null?

Maybe you are looking for

  • Can office 2013 home and business be installed in windows server?

    Can office 2013 home and business be installed in windows server?

  • Error while creating purchase order with account assignment category "A"

    Dear All,                   At the time of creating purchase order with account assignment category A - Asset its throwing error as " GL Account 123400 can not be used" how to resolve this  issue" Edited by: Matt on Sep 16, 2010 10:09 AM - removed bo

  • Java stack and ABAP stack in upgrading SP

    Hi, pls pardon if it appears silly question. I dont have much knowledge in Basis I am on XI3.0 with SP 09 and upgrading SP to SP20 from SAP service market place. How can I identify which is java stack and which is ABAP stack in evrery SP because Java

  • Editing Actual Text in PDF File

    Is there any way or a third party software that will allow me to actually edit text in a PDF??? Right now, I have a PDF file that was emailed to me for printing and some text in the file needs to be modified. I would just like to edit the actual text

  • Sent Mail Not In Outbox

    I am sending mail and I here the "swoosh" sound but I am not seeing the mail in the outbox. I am often getting warning (triangle gray) that I am over my limit and delete mail. I don't think I have a lot of mail so I find it strange. Any help would be